11-25-2007 7:06 PM
11-25-2007 7:17 PM
Hi Nilesh,
Create a message class from SE91 Transaction and you can use those message in your program as below
If you have created a message class ZMESS with message E001.
Report ztest no standard page heading message id zmess.
If f1 <> f2.
message e001 type 'E'.
endif.
Regards,
Satish
11-25-2007 7:17 PM
Hi Nilesh,
Create a message class from SE91 Transaction and you can use those message in your program as below
If you have created a message class ZMESS with message E001.
Report ztest no standard page heading message id zmess.
If f1 <> f2.
message e001 type 'E'.
endif.
Regards,
Satish
11-25-2007 7:46 PM
Hi,
<b>Creating own message class</b>
Goto the transaction code SE91.
Give the message class name and create. Message class will be created
We can create the appropriate messages in that created class.
Message class should be declared in the REPORT statement with the addition MESSAGE-ID and long text should be created for each message used if possible.
REPORT <name> MESSAGE-ID <message class>.
<b>Message types:</b>
A --> Termination Message
The message appears in a dialog box, and the program terminates. When the user has confirmed the message, control returns to the next-highest area menu.
E --> Error Message
Depending on the program context, an error dialog appears or the program terminates.
I --> Information
The message appears in a dialog box. Once the user has confirmed the message, the program continues immediately after the MESSAGE statement.
S --> Status Message and Sucess message
The program continues normally after the MESSAGE statement, and the message is displayed in the status bar of the next screen.
W --> Warning
Depending on the program context, an error dialog appears or the program terminates.
X --> Exit
No message is displayed, and the program terminates with a short dump. Program terminations with a short dump normally only occur when a runtime error occurs. Message type X allows you to force a program termination. The short dump contains the message ID.
Refer the following link for details.
http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801b3e454211d189710000e8322d00/frameset.htm
Regards,
Maha