Show TOC

 Maintenance of MessagesLocate this document in the navigation structure

Purpose

Messages are short texts which are displayed by an ABAP program in a dialog box or in the status bar of the current SAP GUI window. They are called by means of the MESSAGE statement. You can use messages to inform the user about the program flow, handle errors inside a self-defined input check-up, or terminate the program.

Note

The system displays the messages in the logon language of the user.

Features

Assigning Messages

To send messages from a program, you must link it to a message class. Each message class has an ID and contains a whole set of messages. Each message has a single line of text and can contain placeholders for variables. Once you have created a message, you can use it in the MESSAGE statement in a program. All messages are stored in table T100. Database table T100 has the following columns:

  • A single-digit language key
  • A 20-digit message class

    The message class assigns messages to a specific area, such as an application area or a packet.

  • A 3-digit message number

    The range between 900 and 999 is reserved for customers.

  • A 73-digit (maximum) message text
    Caution

    You must create an explanatory long text when you maintain the message if the short text itself is not sufficiently explanatory.

Within short and long texts, you can use placeholders which can be replaced with the content of data objects using the MESSAGE statement.

Starting the Message Maintenance Transaction

To reach the Message Maintenance screen, use one of the following paths:

  • Use forward navigation in the ABAP Editor (double-click on keywords).
  • In the ABAP Editor, choose Goto → Messages.

    The Maintain Messages screen appears. By default, the system displays the message class linked to the current program.

    Note

    If you choose Goto → Messages in the ABAP Editor and your program does not have a defined message class, the system assumes you want to browse an existing class and prompts you to enter a message class ID.

    For more information about messages, see messages .

To create a new message class, you can also use the following path:

  1. Open the Repository Browser (transaction SE80) and navigate to the desired package.
  2. In the context menu of the package, choose Create → Other (1) → Message class.

    A dialog box appears.

  3. In the new dialog box, enter the name of the message class and choose  with the quick info text Confirm.

    The Message Maintenance screen (transaction SE91) appears.

See also

Creating Message Classes

Adding Messages

Creating a Message Long Text

Assigning an IMG Activity to a Message