Skip to Content
author's profile photo Former Member
Former Member

display a message by creating own message class

display a message by creating own message class

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2007 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.