ABAP Message Classes/MESSAGE keyword Passing Parameters to Messages


Example

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(sabapdemos) WITH 'E' '010' 'START-OF-SELECTION`.

This message will be displayed as Message with type E 010 in event START-OF-SELECTION. The number next to the & symbol designates the order in which the parameters are displayed.


Unordered Parameters

Message 888 of class sabapdemos:

& & & &

The calling of this message is similar:

MESSAGE i050(sabapdemos) WITH 'param1' 'param2' 'param3' 'param4'.

This will output param1 param2 param3 param4.