‎2007 Feb 19 8:28 PM
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
‎2007 Feb 19 8:29 PM
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
‎2007 Feb 19 8:33 PM
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
‎2007 Feb 19 8:35 PM
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
‎2007 Feb 20 3:22 AM
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.
‎2007 Feb 20 3:30 AM
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.
‎2007 Feb 20 3:39 AM
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
‎2007 Feb 20 4:01 AM
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