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

BDC error messages

Former Member
0 Likes
1,582

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.

5 REPLIES 5
Read only

Former Member
0 Likes
692

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.

Read only

Former Member
0 Likes
692

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

Read only

Former Member
0 Likes
692

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

Read only

Former Member
0 Likes
692

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

Read only

Former Member
0 Likes
692

Thanku very much for support . Closing the thread.