Show TOC

Messages and Message ClassesLocate this document in the navigation structure

You can create and group messages in message classes in order to inform the user about an error or a status, or to issue a warning.

Messages

Messages notify a user about unexpected behavior, an error, a status, or a result of an action. An application will display the message at runtime – for example, in a dialog box or in the status bar.

A message is specified by a unique 3-digit message number, a single-digit language key, text information, and a message class.

Messages are stored in the database table T100.

Message with a Long Text

Messages with a long text display additional information as to the cause and the potential solution of a problem.

Display of a message in a dialog window. The long text can be opened by clicking the question mark button
Figure 1: Display of a message in a dialog window. The long text can be opened by clicking the question mark button
Message Classes

Message classes are created within an ABAP project at the ABAP package level. They are used to group messages within a development object. So, you can combine related messages and reuse them in other programs. After creating a message class, you add the individual message(s).

Example

The message with the number 045 contains the placeholder for a parameter. The placeholder "&" stands for the value of the parameter "carrid". In ABAP programs, messages are called using the MESSAGE statement.

Example of a message class where you can add messages
Figure 2: Example of a message class where you can add messages

This example of MESSAGE statement MESSAGE i045(SABAP_DOCU) WITH carrid contains the following elements:

  • Message type: "i"
  • Message number: "045"
  • Message class: "SABAP_DOCU"
  • Short text: "No authorization for airline carrier &"
  • Placeholder "&" which is defined for the parameter "carrid"