ABAP Keyword Documentation → ABAP - Quick Reference
MESSAGE - Quick reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
MESSAGE { tn
| tn(id)
| { ID mid TYPE mtype NUMBER num }
| {oref TYPE mtype}
| {text TYPE mtype} }
{ { [DISPLAY LIKE dtype]
[RAISING exception] }
| [INTO text] }
[WITH dobj1 ... dobj4].
Effect
Sends a message.
Additions
Specifies the message and message type
-
tn(message typet, message numbern, message class from the additionMESSAGE-IDof the program introduction) -
tn(id)(message typet, message numbern, message classid) -
ID mid TYPE mtype NUMBER num(message type frommtype, message number fromnum, message class frommid) -
oref TYPE mtype(message type frommtype, message number and message class from the interface IF_T100_MESSAGE implemented in the dynamic type of the object reference variableoref) -
text TYPE mtype(message type frommtype, message text fromtext)
Specifies the display type
-
DISPLAY LIKE dtype
Displays the message in a dialog box and uses the icon of the message type specified indtype. -
INTO text
Returns the message text intext; the message is not sent. -
WITH dobj1 ... dobj4
Replaces the placeholders "&1" to "&4" and "&" of the message text with the contents ofdobj1, ...dobj4.
Raises a non-class-based exception
-
RAISING exception
Either displays the message or raises a non-class-based exceptionexceptionin a function module or in a method. An exception is raised to which return values were assigned in the call; another exception sends the message.