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

Message ID

Former Member
0 Likes
2,545
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

<b>What does this signify or do?</b>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,739

It issues a message of type TYPE (Error or Information or Success or Abend) whose text is determined by the attributes of ID, Number and the variables. So if I take an example of


MESSAGE ID           00
                 TYPE      'W'
                 NUMBER 003
                 WITH       A  B C D.

will issue a message

Message with maximum length and maximum variable parts: A B C D 1234*.

You can see the messages in SE91, enter 00 for message ID and 003 for number, you will see this message with place holders (&). These place holders will be replaced by their actual values when you issue this message statement (A, B, C, D in this example).

SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, SY-MSGV2, SY-MSGV3 and SY-MSGV4 are system variables which are set in memory during the processing.

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,739

This send a message.

Look at Abap documentation, keyword message for the different types of messages and their effects. <a href="http://help.sap.com/saphelp_46c/helpdata/en/34/8e72e36df74873e10000009b38f9b8/frameset.htm">MESSAGE Syntax</a>

Regards

Read only

Former Member
0 Likes
1,739

This is entire structure which holds message details. You would find this structure in function modules or BAPIs in the form of

Return parameters.

For e.g. BAPIRETURN1

MESSAGE ID - Gives message class

SY-MSGTY - Message type: S Success, E Error, W Warning, I Info, A Abort

NUMBER - Message number

SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 - Message variables which hold text

If the BAPI or any FM does not return expected results, then we refer to this structure analyse the message.

Thanks,

SKJ

Read only

Former Member
0 Likes
1,740

It issues a message of type TYPE (Error or Information or Success or Abend) whose text is determined by the attributes of ID, Number and the variables. So if I take an example of


MESSAGE ID           00
                 TYPE      'W'
                 NUMBER 003
                 WITH       A  B C D.

will issue a message

Message with maximum length and maximum variable parts: A B C D 1234*.

You can see the messages in SE91, enter 00 for message ID and 003 for number, you will see this message with place holders (&). These place holders will be replaced by their actual values when you issue this message statement (A, B, C, D in this example).

SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, SY-MSGV2, SY-MSGV3 and SY-MSGV4 are system variables which are set in memory during the processing.