Register Login

Getting messages from call transaction

Updated May 18, 2018

types tt_errtab TYPE STANDARD TABLE OF BDCMSGCOLL.

data: li_errtab type tt_errtab,
l_errtab type BDCMSGCOLL.



The Call transaction stores the messages in internal table li_errtab


CALL TRANSACTION 'MI02' USING gi_bdcdata MODE 'N'
update 'A'
messages into li_errtab.


However the message text is not stored in the table. You have to use the
fields MSGID and MSGNR in the
table to find the message text. The easiest way is to use MESSAGE ...
INTO:

loop at li_errtab into l_errtab.
MESSAGE ID l_errtab-msgid TYPE l_errtab-MSGTYP NUMBER l_errtab-msgnr
INTO l_errtxt WITH l_errtab-msgv1 l_errtab-msgv2.

...... more code ...
endloop.


The message is stored in the variable l_errtxt


×