Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the messages from the processed Batch session log

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

hi vinay,

please refer this thread it might help you.

thanks

tanmaya

kesavadas_thekkillath
Active Contributor
0 Kudos

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

andreas_mann3
Active Contributor
0 Kudos

better use fm AC_DOCUMENT_DIRECT_INPUT

or "call transaction 'FB01' messages into itab

A.

Former Member
0 Kudos

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.