0% found this document useful (0 votes)
15 views

Create Message Class

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Create Message Class

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

https://s4hclub.

com/ ©

https://www.youtube.com/@s4hclubforyou ©

Creating a Message Class


Maintenance of Messages
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
Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

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

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.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

2|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

3|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

4|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

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.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

6|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

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.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

7|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

The Message Maintenance screen (transaction SE91) appears.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

8|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

See also

Creating Message Classes

Adding Messages

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

9|P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

Creating a Message Long Text

Assigning an IMG Activity to a Message

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>,

enter a parameter value of up to 20 characters as a message ID.

Tip

REPORT STEST MESSAGE-ID smsgclass.

Caution

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

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.

2. Double-click the message ID.

The system asks you whether you want to create a new message class.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

11 | P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

3. Choose Yes.

The Message maintenance screen appears.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

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.

5. Choose with the quick info text Save.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

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

Message maintenance screen by double-clicking a message ID or a message number where it appears in

your code.

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

14 | P a g e
https://s4hclub.com/ ©

https://www.youtube.com/@s4hclubforyou ©

Mickaël QUESNOT https://www.linkedin.com/in/mickaelquesnot/

Directeur SAP SCM & Cloud Solutions (Concur, EnableNow)

15 | P a g e

You might also like