ABAP Keyword Documentation →  ABAP − Reference →  User Dialogs →  Messages →  MESSAGE → 

MESSAGE - text

Short Reference

Syntax

... text TYPE mtype ... .

Effect

This variant sends a character string in text as a message of the message type specified in mtype. text is a character-like expression position whose value is used as the short text of the message. Only the first 300 characters are used. No long text can be defined for a message of this type.

mtype expects a character-like data object containing the message type in uppercase letters. Invalid message types raise a non-handleable exception.

Notes

Example

Produces an exception text as an information message.

DATA oref TYPE REF TO cx_sy_arithmetic_error.
TRY.
  ...
  CATCH cx_sy_arithmetic_error INTO oref.
    MESSAGE oref->get_text( ) TYPE 'I'.
ENDTRY.