02-21-2005 5:09 AM
Hello friends........can any one help me....how 2 find out the errors occured during batch input method , call transaction method and direct input method.
for example..when uploading 100 records of data.... the error occured in the 60 th record...whr the error will be stored? ....what happens to the process?........n how to rectify it?
Regds,
Ariff
02-21-2005 5:27 AM
Hello,
You can reprocess the Session in ERROR Mode. You can rectify the data once the screen pops up in Error mode.
hope this helps you.
Regds, Murugesh AS
02-21-2005 5:36 AM
Hi,
If your BI sessions were run with the option for keeping a log, you can use transaction SM35 to reprocess the session.
Regards
02-21-2005 8:14 AM
02-21-2005 8:51 AM
Hi Ariff,
If it is a 'Call transaction' method, then you have to pass the messages to an internal table with structure 'bdcmsgcoll'. Once you do this, you can read the various messages with the Message type and process this internal table and decide what whether to print or list or do any subsequent processings with the messages. You also get the message descriptions in this internal table. The syntax with an example is
CALL TRANSACTION 'ME21' USING BDCDATA MODE 'N'
MESSAGES INTO ITAB.
If it is 'session method' that you are using, the provision for tracking, viewing and further processing of meesages and errors are there within transaction sm35.
Hope things are clear and please award points if you find this info useful.
regards,
Madhavan
02-24-2005 5:57 AM
hello friends thanx for your replie........but if my batch input program runs in the background ...........how would i trap the errors?
thnx
Ariff
02-24-2005 6:01 AM
Hi,
If you have marked the flag for KEEP='X' to retain the session, then you can still see them in SM35.
Regards
02-25-2005 4:12 AM
Hi,
If you are using the Call transaction method in the background, then simply use the 'write' statement to write the messages and it appears in the log in sm37.
If it is the session method, the log will anyway be there in sm35 provided the parameter KEEP = 'X' in function module 'BDC_OPEN_GROUP'.
regards,
Madhavan
02-25-2005 4:56 AM
Try this code for error log in bdc it will get u all errors while loading a file . But the problem is if its a flat file thn u should validate it while downloading it to the SAP system. I mean validating the entries in the internal table before you actually call the transaction.That is effective for performance.
To get the SAP generated messages which are generated while the transaction here's the code.
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
LOOP AT MESSTAB.
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
GV_MSG = L_MSTRING.
IF T100-ARBGB NE 'M3' AND
T100-MSGNR NE '800'.
ELSE.
ENDIF.
ENDLOOP.
REFRESH MESSTAB.
02-25-2005 8:21 AM