04-07-2010 8:10 AM
Hi All,
I am posting an accounting document through FB01 by submitting the report RFBIBL00 along with the file through which a Batch session gets generated in SM35.The Batch session is then processed by submitting the report RSBDCSUB. My code is as shown below:
SUBMIT rfbibl00 WITH ds_name = co_file_output
WITH callmode = co_batch AND RETURN.
Process Batch session
SUBMIT rsbdcsub
WITH mappe = gv_name_jd
WITH von = sy-datlo
WITH bis = sy-datlo
AND RETURN
My requirement is to capture the document number from the log of the processed batch session. Can anyone suggest me how to go about this.
Thanks in Advance,
Vinay B
04-07-2010 8:38 AM
hi vinay ,
you can use export command before submitting and use import command inside the submitted report...you can export any number of fields and internal table....so you can pass the document number if you have it in the program.
data: indxkey TYPE indx-srtfd VALUE 'KEYVALUE'.
* to export the internal table to Zls_open_delivery.
EXPORT i_vbap to DATABASE indx(t1) id indxkey.
hope this helps you ,
thanks
tanmaya
04-07-2010 8:52 AM
Hi Tanmaya,
Thanks for the quick reply. But my requirement is to capture the messages in the log of the processed Batch session in transaction SM35.
04-07-2010 9:07 AM
04-07-2010 11:43 AM
Hi,
check the routine read_bdc_log_plain in program rsbdc_protocol.
get the data from table APQL and then use the logic.
bapiret2-id = logtable-logmessage+74(16).
bapiret2-number = logtable-logmessage+94(3).
bapiret2-message_v1 = logtable-logmessage+100(20).
CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'
EXPORTING
id = bapiret2-id
number = bapiret2-number
textformat = 'ASC'
message_v1 = bapiret2-message_v1
IMPORTING
message = bapiret2-message.
WRITE: (60) bapiret2-message.
Edited by: Keshav.T on Apr 7, 2010 4:23 PM
04-07-2010 12:02 PM
better use fm AC_DOCUMENT_DIRECT_INPUT
or "call transaction 'FB01' messages into itab
A.
07-24-2010 3:59 PM
Hi Vinay,
You want the messages returned by BDC right?
If your issue is not solved yet, please let me know.
Thanks and regards,
Sachin.