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

Error message during call transaction

Former Member
0 Likes
1,431

Hi all,

I want to get the message type after calling the transaction method. I've simulated an input for error, and I expect that the returned message type should be 'E' or 'W'. But it (SY-MSGTY and msgtab-MSGTYP) still returns 'S' even there is error. What's wrong ?

Call transaction 'VL02N' USING BTAB MODE 'N' UPDATE 'S'.

messages into msgtab.

7 REPLIES 7
Read only

FredericGirod
Active Contributor
0 Likes
980

erase

Message was edited by: Frédéric Girod

Read only

Former Member
0 Likes
980

Hi Macy,

S stands for 'Status' and not 'Success' message. These messages indicate errors on occasion. You will need to check the message id and number on receipt of such message to know whats going on.

Regards,

Anand.

Read only

Former Member
0 Likes
980
CALL TRANSACTION tcode USING bdcdata
                   MODE   ctumode
                   UPDATE cupdate
                   MESSAGES INTO messtab.

 LOOP AT messtab.
    msgtype = messtab-msgtyp.

Check what the actual tranaction is giving as message for eg. mm01 does give u a sucess message saying data for the matnr is already maintained.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
980

Processing without display of screens. If a breakpoint is reached in one of the called transactions, processing is terminated with sy-subrc same as 1001. The field sy-msgty contains "S", sy-msgid contains "00", sy-msgno contains "344", sy-msgv1 contains "SAPMSSY3", and sy-msgv2 contains "0131".

Read only

Lakshmant1
Active Contributor
0 Likes
980

Hi Macy,

Since the msgtab contains multiple entries, you need to loop the internal table to check for E or W messages.

Loop at msgtab and then check for msgty = 'E' or 'W'.

Hope this helps.

Thanks

Lakshman

Read only

Former Member
0 Likes
980

if a error message is of type success then it will return only 'S'. for ex: in mm01 if the matnr already exists it will show a 'S' type message not 'E' or 'W' in that case u have to manually write the code to verify the values that you pass in.

Read only

Former Member
0 Likes
980

Hi Macy,

try with mode E and see any errors are there..

Call transaction 'VL02N' USING BTAB MODE <b>'E'</b> UPDATE 'S'.
messages into msgtab. 
LOOP at msgtab where msgtyp = 'E'.

"capture error message here

ENDLOOP.

Regards

vijay