Create Message Class
Create Message Class
com/ ©
https://www.youtube.com/@s4hclubforyou ©
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
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:
The message class assigns messages to a specific area, such as an application area or a packet.
Caution
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/
1|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
You must create an explanatory long text when you maintain the message if the short text itself is
Within short and long texts, you can use placeholders which can be replaced with the content of data
To reach the Message Maintenance screen, use one of the following paths:
The Maintain Messages screen appears. By default, the system displays the message class linked
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
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|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
3|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
4|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
5|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
2. In the context menu of the package, choose Create → Other (1) → Message class.
6|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
3. In the new dialog box, enter the name of the message class and choose with the quick info text
Confirm.
7|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
8|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
See also
Adding Messages
9|P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
Use
You use this procedure to create new message classes in your program.
Procedure
1. In the initial statement (for example, REPORT) or directly in the statement MESSAGE-ID <id>,
Tip
Caution
10 | P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
Messages are available system-wide and the ID of the message class must be unique.
The system asks you whether you want to create a new message class.
11 | P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
3. Choose Yes.
12 | P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
4. On the Attributes tab page, in the Short text field, enter a short description of the class.
13 | P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
Result
You can add messages to your class by choosing the Messages tab page. You can always return to the
your code.
14 | P a g e
https://s4hclub.com/ ©
https://www.youtube.com/@s4hclubforyou ©
15 | P a g e