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: 

BDC - return values

former_member184569
Active Contributor
0 Kudos

Hi,

I have called the program rsbdcsub in my main program to automatically process a BDC session. On returning to the main program, I would like to know the status of the BDC session, whether it has been succesfully processed or has errors. And also if possible, I need to get the log details.

Is there any way to know these details? Are these information being stored in any database table ?

Thanks,

Susmitha

9 REPLIES 9

Former Member
0 Kudos

Hi Sushmita,

Go to SE35 tcode...

Select ur session name...

in that screen it self u r able to see the status of the session.it shows the status like whether the session processed successful or it has any erros...

i hope u got what u want..

Plz award some points...if this solution helps you..

RAJA

0 Kudos

Hi Raja,

I want the information in SM35 log details, in my main program. Because the users will not have authorization to use SM35.

0 Kudos

Hi,

I think you can try the following,

DATA : BEGIN OF t_list OCCURS 0.

INCLUDE STRUCTURE abaplist.

DATA : END OF t_list.

SUBMIT rsbdcsub ....

....

EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = t_list

EXCEPTIONS

not_found = 1

OTHERS = 2.

CALL FUNCTION 'WRITE_LIST'

TABLES

listobject = t_list

EXCEPTIONS

empty_list = 1

OTHERS = 2.

Sri

Former Member
0 Kudos

RSBDCSUB will only trigger the session processing in background task. So in your main program you cannot have the log back. Maybe you run another program after sometime ( the sessions may have processed ) to read the logs .

Cheers.

0 Kudos

Sanjay,

How do I read the logs from a program?

0 Kudos

Hi Susmitha!

In addition to Sanjay (you need a second program / run to check results later):

In table APQI you find statistics to batch input recordings.

Fields

TRANSCNT total number of transactions

TRANSCNTE number of transactions with error

TRANSCNTF number of successful transactions

show some information about last run.

Regards,

Christian

0 Kudos

Hi

Logs are stored at OS level.

You can see program RSBDC_PROTOCOL ( subroutine GET_LOG)

to find out how a log is read. It uses functions from group STMS to read the logs.

Cheers.

( Dont forget to reward if answers were helpful ).

Former Member
0 Kudos

May be this will help you

Here are the steps:

Step1) Process BDC session (say v_session) programatically

SUBMIT rsbdcsub WITH mappe EQ v_session

                            WITH von     EQ sy-datum

                            WITH bis      EQ sy-datum

                            AND RETURN.

Step2) Get session qid and display session error log

  • Get session qid

SELECT SINGLE qid  INTO v_qid FROM  apqi WHERE  datatyp = 'BDC' 

AND groupid = v_session

AND progid = sy-repid

AND userid = sy-uname

AND credate = sy-datum.

IF v_qid IS NOT INITIAL.

  • Generate BDC session error log

    SUBMIT rsbdc_protocol

    WITH session EQ v_session

    WITH  user EQ sy-uname

    WITH  queue_id EQ v_qid

    AND RETURN.

  ENDIF.

Please reward if useful.

raphael_almeida
Active Contributor
0 Kudos

Hi, Susmitha!

If you use CALL TRANSACTION, all information being available in  the MESSAGES option (bdcmsgcoll structure). To start viewing messages, simply perform a loop in the itable (It need be type table bdcmsgcoll) to receive the value of exported MESSAGES and call the function MESSAGE_TEXT_BUILD, passing in that function the corresponding line of this loop in IMPORTING field message_text_output.


Warm regards,


Raphael Pacheco.