Batch Input for Billing

Question:
Hi Guys,
I really really need help from you guys. When I do the batch input data can be entered successfully. My problem now, how to know that the sucessfully entered data return which SAP number.
Just assume I do the batch input for one record then execute it. From normal screen we can see the number after saving the record then we will know the number. But from customised batch input program how to know my billing no.
I'm in deep trouble now..... out of memory already!!
Highly appreciate for your help.
Answer:
The BDC Log will have all the messages including the Billing Doc. No.
KRK
Answer:
BDC? can you explain a bit about it. I mean where to get it....
Thanks for your reply.
Answer:
esi98, please clarify what transaction you are using and how do you create your batch input...
Robert Crouser
Answer:
For Call transaction use function module 'Message_Text_Build' to capture the number. For Session method you have to read the log
Rgds
suresh
Answer:
Thanks guys for your help... but I still couldn't figure it out.
Okay, actually I have create one customise program to store the additional delivery infomation. Then based on the data I have I need to do automatic posting for billing purpose.
So, In my customised abap program will use call transaction method to run the batch input using VF01 (create biling) and once the batch input ran successfully I need to know the billing no. The reason is I need to assign my additional data with the SAP billing no.
Highly appreciated for your help
Answer:
If call transaction 'vf01' is executed successfully, then I think SY-MSGV1 contains the document number.
Answer:
This should solve the problem:
DATA: tb_msg_ITAB TYPE TABLE OF BDCMSGCOLL.
data: wa_msg_itab type BDCMSGCOLL.
...
  clear tb_msg_itab.
  CALL TRANSACTION 'VF01'  USING tb_bdcdata
       MODE wa_mode update 'S'
       messages into tb_msg_ITAB.
  loop at tb_msg_itab into wa_msg_itab.
*  here you'll find the success message and the billing document should be in one of the parameters (wa_msg_itab-MSGV1 or 2 or 3 or 4)
  endloop.
Use update = 'S', otherwise it is possible that the update is not completed when you start the other transaction.
Ciao, Giulio.
Answer:
Thanks again guys...
I will try to use your sample code into my program. If I can get good results thanks a lots for your kind help. May god bless you....
If cannot.... but still can try again!
Answer:
Dear Esi:
Even if you use an asynchronous update, you will get your number. However, the document may not be available for a subsequent action. If all you do is store the document number in a table, you can go with that option.
But if all else fails, you can use the document flow from the delivery note to find the invoice(s).
Regards,
Wolfgang

More Articles:

Start SAPGUI + run transaction via Visual Basic?
BDC for MM02?
Using AT NEW with a conditional loop?
hotspot?
Step Loop?
List all reports in SAP?