09-10-2008 8:08 AM
Hi all,
I have created a batch input program to enter customer cheques
and according to cheque number a new document is created through transaction F-36.
That is to say, assume 10 lines of data is available in file and all cheque numbers are different.
So do I have to call following sentence as 10 times?
CALL TRANSACTION 'F-36' USING bdcdata
OPTIONS FROM lv_opts
MESSAGES INTO messtab.
If yes, then How can I get the created FI documents numbers?
Waiting for your useful answers, offers.
Thanks.
deniz.
09-10-2008 8:16 AM
Hi,
After Call Transaction Syntax check for sy-subrc.
If sy-subrc = 0.
loop the internal table of messages and call fm
FORMAT_MESSAGE.
Now,
loop the messages int table.
case msgtyp.
when 'S".
write 😕 msgv1(Document NoS), msgv2.......
endloop.
This is how U can trap the Document NOs.
Hope this will help U out.
Regards,
Shake sha vali
09-10-2008 8:12 AM
Hi,
When you have to fill your BDC table you will need to put all your file into an internal table and i hope you have done that.
If you have done this then you need to loop on your internal table and call this statement.
Also you messtab will have the message numbers and will have 4 fields called MSGV1 MSGV2 MSGV3 and MSGV4. One of these fields will have the document number created.
Regards,
Pramod
09-10-2008 8:15 AM
Hi,
Use the Parameter Id for the FI document number at the dataelement level and try to get them using this paramter id. Use the GET PARAMETER ID for that.
Regards
Lekha
09-10-2008 8:16 AM
Hi,
After Call Transaction Syntax check for sy-subrc.
If sy-subrc = 0.
loop the internal table of messages and call fm
FORMAT_MESSAGE.
Now,
loop the messages int table.
case msgtyp.
when 'S".
write 😕 msgv1(Document NoS), msgv2.......
endloop.
This is how U can trap the Document NOs.
Hope this will help U out.
Regards,
Shake sha vali
09-10-2008 8:18 AM
yes you can get the FI document number by using
GET paramater ID 'BLN' field belnr , after call transaction if sy-subrc = 0.
then put in internal table for further processing.