‎2007 Jun 10 11:58 AM
Can any one give a small example using "BDCMSGCOLL" & "FORMAT_MESSAGES" IN CALL TRANSACTION method.
How to get error records in CALL TRANSACTION method.
‎2007 Jun 10 12:09 PM
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
‎2007 Jun 10 2:55 PM
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.