Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating Message class

Former Member
0 Likes
4,758

Hi ,

Can anybody tell me how to create a message class and how to use it in the program.

please provide me a sample program if passible.

thanks

KP

7 REPLIES 7
Read only

rahulkavuri
Active Contributor
0 Likes
1,098

hi message class is created using SE91.

About using it in a program while ur declaring the report u need to use

report zfi0042h

no standard page heading

message-id zclass

line-size 132

line-count 65.

here in this message i want to club a variable and a text together so i define message 000 in zclass with '&&&' that is we are going to club 3 different variables(it can be fixed values) into a message.

'&' symbol is used to populate variables into it

message e000(zclass) with "This" variable "not valid".

If you want a standard fixed message then you define a message say 001 with "Please type something"

in program u can say

message e001(zclass).

award points if found helpful

Read only

Former Member
0 Likes
1,098

hi,

u can create in 2 ways..

in report..

REPORT Z_PROGRAM

LINE-COUNT 65(2)

LINE-SIZE 255

NO STANDARD PAGE HEADING

Message-id ZMSGID.

double click on ZMSGID and create it and provide messages.

other way is t-code SE91.

create new ID and provide messages

Regards

SAB

Read only

ferry_lianto
Active Contributor
0 Likes
1,098

Hi,

You create and edit Message Class using Transaction SE91. Once you have created a message, you can use it in the MESSAGE statement in a program.

All messages are stored in table T100.

Creating Message Classes

To create a new message class from the ABAP Editor:

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, for example:

REPORT <name> MESSAGE-ID <message class>.

Messages are stored system-wide. The chosen message ID (message class) must not already exist in the system.

2. Double-click the message ID.

If you enter an ID that already exists in the system, the system calls up Message maintenance. In this case, enter a different ID. Once you have done this, the system asks you whether you want to create a new message class.

3. Choose Yes.

The system calls up Message maintenance.

4. Enter a brief description of the class in Short text.

5. Choose Save.

For more information, please check this link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801b3e454211d189710000e8322d00/frameset.htm

Regards,

Ferry Lianto

Read only

kiran_k8
Active Contributor
0 Likes
1,098

Hi,

REPORT KP NO STANDARD PAGE HEADING MESSAGEID ZKP.

Now double click on ZKP.It will take you to SE91 transaction where you can create the customised messages as per you requirement.

K.Kiran.

Read only

Former Member
0 Likes
1,098

Hi,

Message classes are created from the transaction SE91 .

The usage of the message class in the program is as follows :

MESSAGE E001(<message class>)

Where E stands for the type of the error that you want to throw which can be either Error Message ( E ) or Information message ( I ) or a Warning Message ( W ) or an Abend Message ( A ) which is followed by the message number defined in the message class .

Regards,

Sowmya.

Read only

Former Member
0 Likes
1,098

hi,

Message classes can be in defined in many forms like :

1> message innn(mmm)

where mmm is the message class and the nnn is the message

for example :

message i002(001)

2> message id mmm type x number nnn

where x may be 'I' or 'E' -- type of message

for example :

message id '001' type 'I' number '002'

3> message innn.

for example :

message i001.

In the above case the message id is tot be specified in the message statement.

for example:

REPORT ZRULE111 message-id 001.

try out this

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,098

Hi

go to the Transaction se91. Give the message class name and create.

Message class will be created . then create the appropriate messages in that created class.

you can use the created message class in the following way.

report xyz message-id messageclass name.

or without specifying in the report header also we can use the message class as follows:

message messagetype(message number)(created message class name).

for more information refer:

http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801b3e454211d189710000e8322d00/frameset.htm

Regards,

kumar