ABAPMESSAGE_TEXT - MESSAGE TEXT

ABAP Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

MESSAGE - txt

Short Reference



Syntax

... text TYPE mtype ... .

Effect

This variant sends a character string contained in text as amessage of themessage typespecified in mtype. You can enter a character-type data object text, which will be usedas 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

  • : In this variant, the additions WITH and INTO are not allowed in message_options.
  • If field symbols or formal parameters of the type any or data are specified for text,these must be of character type when the statement is executed. The syntactically identical variantMESSAGE oref cannot be executed with generically typed field symbols or formal parameters.
  • Because the system fields sy-msgid and sy-msgno are filled unspecifically when a characterstring is entered, this variant should only be used on rare occasions if the content of the system fields is not required for identification of the message. Otherwise, in all cases in which messages are transferred (for example, fromfunction modules) or logged (for example, inbatch input) using these system fields, language-independent access to the message text would be lost.

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.


CPI1466 during Backup   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.


Length: 2959 Date: 20120523 Time: 001349     triton ( 117 ms )