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

Former Member
0 Likes
262

Can any one give a small example using "BDCMSGCOLL" & "FORMAT_MESSAGES" IN CALL TRANSACTION method.

How to get error records in CALL TRANSACTION method.

2 REPLIES 2
Read only

Former Member
0 Likes
241

Hi,

to capture messages,

u need to declare table of type BDCMSGCOL structure.

thenin the call trans statement, i.e,

ex:

data: msgtab type table of bdcmsgcol.

call transcation MM01 using bdctab mode N update 'A' messages into msgtab.

If sy-subrc <> 0. (i.e no successful update)

call function 'FORMAT_MESSAGE'.

exp

pass the paremeters which are available in msgtab.

imp

import into a string.

Revert back if any issues,

Reward with points if u find helpful,

Regards,

Naveen

Read only

Former Member
0 Likes
241

Hi swapna,

declare a table type bdcmsgcoll..

data: it_msg type standard table of bdcmsgcoll with header line.

when you call the transaction you can get all the mesages into the table it_msg.

CALL TRANSACTION <tcode> using it_bdc messages into it_msg.

the message format will not be in the readable format.. so we use FORMAT_MESSAGES...

report the error messages to the user..

loop at it_msg where msgtyp = 'E'.

call FORMAT_MESSAGES (pass it_msgnr as the expoting parameter and get the message into a variable of type string.

endloop.

Regards,

Vidya.