Messages are texts that can be shown on the bottom of the
screen. Messages belongs to a message class. There different type
of messages indicated by the first letter of the message
indetifier.
Messages are defined in table T100.
You maintain messages and message classes using transaction
SE91.
Message xnnn
x is the type of message ( See: Types of messages )
nnn is the identifier of the message.
Example: message e001
You set the message class for the whole program in the header of
thje program:
report my_report message-id <xx>.
Setting the message class for a sigle message:
Message ID <Message class> type <type> number
<number>
Example: message id 'ZB' type 'W' number '004' with 'Test'.
I Info Press ENTER to continue
W Warning Correction possible
E Error Correction required
A Abend Transaction terminated
X Exit Transaction terminated with short dump
S Success Message on next screen
You can paramiterize messages, so that you can insert your own text
programmatically
in messages.
When you define the message use &<parameter number> for
the parameters:
This is a &1 message
When you call the message use the syntax
Message e001 with 'bad'
The resulting message: This is a bad message
Sometimes you want to store e.g. an error message from a
function module in a text field instead of displaying it.
Use this syntax to store the message to the field
l_errror_text.
CALL FUNCTION ... something
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
into l_errror_text.
ENDIF.
| Converted from CHM to HTML with chm2web Standard 2.7 (unicode) |