Application Development and Automation 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: 
Read only

Re : Error Capturing in BDC Session Method

Former Member
0 Likes
365

Hello Experts,

I have done a BDC Program using Session method . I am running my rprogram in Background method using RSBDCSUB Transaction . My query is , I do not want to go to the SM35 Transaction to view the Error , i want to capture in a file and dsplay that file automatically to the End user, Please find me a Solution to my Query, it is Very urgent task

Thanks In advance

Nagaraj S.

2 REPLIES 2
Read only

Former Member
0 Likes
338

DATA: BDCDATA TYPE TABLE OF BDCDATA.

DATA: ITAB TYPE TABLE OF BDCMSGCOLL.

DATA: PROGRAM LIKE SY-REPID,

WA_BDCDATA TYPE BDCDATA.

WA_BDCDATA-PROGRAM = 'SAPMS38M'.

WA_BDCDATA-DYNPRO = '0100'.

WA_BDCDATA-DYNBEGIN = 'X'.

APPEND WA_BDCDATA TO BDCDATA.

CLEAR WA_BDCDATA.

WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.

WA_BDCDATA-FVAL = PROGRAM.

APPEND WA_BDCDATA TO BDCDATA.

...

CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'

MESSAGES INTO ITAB.

All the message wud b in ITAB.

LOOP AT ITAB.

OPEN DATASET...

TRANSFER

CLOSE

ENDLOOP.

the file on application server will have all the data.

Create another program to read that file & display errors.

Read only

Former Member
0 Likes
338

hi,

We have the tables BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.

Then obsious, process this internal table containing errors with corrections.

Reward if it helps..

Regards,

Omkar.