Tutorial by Examples

PROGRAM zprogram MESSAGE-ID sabapdemos. System-defined message may be stored in a message class. The MESSAGE-ID token defines the message class sabapdemos for the entire program. If this is not used, the message class must be specified on each MESSAGE call.
PROGRAM zprogram MESSAGE-ID za. ... MESSAGE i000 WITH TEXT-i00. A message will display the text stored in the text symbol i00 to the user. Since the message type is i (as seen in i000), after the user exits the dialog box, program flow will continue from the point of the MESSAGE call. Although...
PROGRAM zprogram. ... MESSAGE i050(sabapdemos). It may be inconvenient to define a message class for the entire program, so it is possible to define the message class that the message comes from in the MESSAGE statement itself. This example will display message 050 from the message class sabapd...
DATA: msgid TYPE sy-msgid VALUE 'SABAPDEMOS', msgty TYPE sy-msgty VALUE 'I', msgno TYPE sy-msgno VALUE '050'. MESSAGE ID mid TYPE mtype NUMBER num. The MESSAGE call above is synonymous to the call MESSAGE i050(sapdemos)..
The & symbol may be used in a message to allow parameters to be passed to it. Ordered Parameters Message 777 of class sabapdemos: Message with type &1 &2 in event &3 Calling this message with three parameters will return a message using the parameters: MESSAGE i050(sabapdemo...

Page 1 of 1