‎2007 Apr 10 7:16 AM
Hi Guys
how can we trab error messages in BDC . We make use of BDCMSGCOLL .
can anybody expalin me how can we capture them , I have to display the messages after running the BDC. i am running BDC on transaction sm30 .. view name is vusrextid. Add new enties ,type is NT and put external users as asian\hhh
then SAPUSER then click activate and lastly click save . Waiting for reply.
‎2007 Apr 10 7:19 AM
Hi naval,
1. Simple (just see f1 help on call transaction)
2. data : msg like bdcmsgcoll occurs 0 with header line.
call transaction 'SM30'
using bdcdata
messages msg.
3. All your messages of all types (w, E,s) etc
will get populated in the internal table msg.
regards,
amit m.
‎2007 Apr 10 7:20 AM
Hi,
Use:
internal table to handle messages
DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_MESG(50).
CALL TRANSACTION 'MM01' USING IT_BDCDATA MODE 'N' UPDATE 'S'
MESSAGES INTO IT_MESSAGES.
all messages wiull come into it_messages and display them like:
FORM ERROR_MESSAGES.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = '-D'
IMPORTING
MSG = V_MESG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
LOOP AT IT_MESSAGES WHERE MSGTYP = 'E'.
WRITE : / 'Message :'(I06) ,V_MESG.
CLEAR IT_MESSAGES.
ENDLOOP.
reward if useful
regards,
Anji
‎2007 Apr 10 7:20 AM
Hi,
Use the following variant of CALL TRANSACTIOn :
CALL TRANSACTION 'SM30' MODE <Mode> UPDATE < mode> MESSAGES INTO ITAB.
Here ITAB is an internal table defined of the same structure as BDCMSGCOLL.
Once u get the data in ITAB, the u can easily separate out the error, warning, success messages.
Regards,
Himanshu
‎2007 Apr 10 7:32 AM
Hi,
U can use table BDCMSGCOLL for error trace in BDC
1.First u declare internal table(Error_itab) like bdcmsgcoll.
2.call trasction 'tcode' using it_bdcdata mode ' ' update ' ' and messages into Error_itab.
3.finally u call function 'Format_message'.
4.Loop the internal table (error_itab ) and get error messages
pls give reward if it helpful
regards
vana
‎2011 Mar 11 5:52 AM