MESSAGE - text

Syntax

... text TYPE mtype ... .

Effect

This variant sends a character string contained in text as a message of the message type specified in mtype. You can enter a character-type data object text, which will be used as a short text for the message. Only the first 300 characters in text are taken into account. No long text can be defined for a message of this type.

For mtype, a character-type data object is expected, which must contain the message type in capital letters. Invalid message types generate an untreatable exception.

Notes

Example

: Output of an exception text as an information message.

DATA: oref TYPE REF TO cx_sy_arithmetic_error,
      text TYPE string.
TRY.
  ...
  CATCH cx_sy_arithmetic_error INTO oref.
    text = oref->get_text( ).
    MESSAGE text TYPE 'I'.
ENDTRY.