Ansicht
Dokumentation

ABAPMESSAGE_INTO - MESSAGE INTO

ABAPMESSAGE_INTO - MESSAGE INTO

General Material Data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

MESSAGE, INTO

Short Reference



MESSAGE msg $[WITH dobj1 ... dobj4$]
        INTO text.


Effect

The statement MESSAGE with the addition INTO assigns the short text of the message to the target field text. The message type is irrelevant. The program flow is not interrupted and no message processing takes place. The following can be specified for text:

  • An existing character-like variable.

The addition INTO cannot be specified when a text text is specified or when an object reference variable is specified in msg.

Example

The short text of a message sent in a function module is assigned to the data object mtext declared inline when handling the exception error_message using the corresponding system fields.

CALL FUNCTION... EXCEPTIONS error_message = 4.
IF sy-subrc = 4.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          INTO DATA(mtext)
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.






rdisp/max_wprun_time - Maximum work process run time   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 2282 Date: 20240614 Time: 052247     sap01-206 ( 37 ms )