04-21-2006 12:05 PM
I want to capture the BDC session error log as report from SM35 .
Please advice.
Anil.
04-21-2006 12:52 PM
Hello Anil,
Use report <b>RSBDCLOG</b> for Log of the BDC Session.
Regards,
Naimesh
04-21-2006 12:57 PM
Hi Anil,
refer this thread for a similar discussion and the solution also..
A code snippet from that thread is below..
DATA: BEGIN OF LOGTABLE OCCURS 50,
ENTERDATE LIKE BTCTLE-ENTERDATE,
ENTERTIME LIKE BTCTLE-ENTERTIME,
LOGMESSAGE(400) TYPE C,
END OF LOGTABLE.
DATA: CHARCP LIKE RSTSTYPE-CHARCO VALUE '0000'.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
AUTHORITY = ' '
CLIENT = APQL-MANDANT
NAME = APQL-TEMSEID
IMPORTING
CHARCO = CHARCP
EXCEPTIONS
FB_ERROR = 1
FB_RSTS_OTHER = 2
NO_OBJECT = 3
NO_PERMISSION = 4
OTHERS = 5.
CALL FUNCTION 'RSTS_OPEN_RLC'
EXPORTING
NAME = APQL-TEMSEID
CLIENT = APQL-MANDANT
AUTHORITY = 'BATCH'
PROM = 'I'
RECTYP = 'VNL----'
CHARCO = CHARCP
EXCEPTIONS
FB_CALL_HANDLE = 4
FB_ERROR = 8
FB_RSTS_NOCONV = 12
FB_RSTS_OTHER = 16
NO_OBJECT = 20
OTHERS = 24.
IF SY-SUBRC > 0.
EXIT.
ENDIF.
CALL FUNCTION 'RSTS_READ'
TABLES
DATATAB = LOG_TABLE
EXCEPTIONS
FB_CALL_HANDLE = 4
FB_ERROR = 8
FB_RSTS_NOCONV = 12
FB_RSTS_OTHER = 16
OTHERS = 16.
IF SY-SUBRC > 0.
EXIT.
ENDIF.
CALL FUNCTION 'RSTS_CLOSE'
EXCEPTIONS
OTHERS = 4.
LOG_TABLE will contain the log you want.
regards
satesh
04-21-2006 1:21 PM
hi
use RSBDCLOG or in turn trap the error in the program and pass it to internal table!!
alter
if u r using call transaction in the program u can declare an internal table of type bdcmsgcoll and error messages will b stored!!
plz reward points for helpful post and close the thread!!
gunjan
04-21-2006 1:23 PM
04-21-2006 1:33 PM
Thanks to all..
Let me try with options which u have given to me.
Anil.
04-21-2006 1:35 PM
Hi ANil,
Kindly reward all your helpful answers and close the thread if the problem is solved..
regards
satesh