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

Message type 'E'

I m using message type E. for that i should get an error message in red color in the status bar.

But i m not getting like that.For me an information message is raised with stop symbol & the program exits.

I want to diaplay an error message in the status bar.

I m writing the message in the exception handling.

i.e after execution of the FM i m checking the sy-subrc. if sy-subrc is one of the exception number in FM i want to write the error message in red color.

Can any one solve this issue.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:30 AM

    It Depends upon Mode of Program what u are using .

    Regards

    Prabhu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:31 AM

    Hi

    After exceptions check the sy-subrc:

    IF SY-SUBRC > 0.
      MESSAGE EXXX(YY) WITH <TEXT>.
    ENDIF.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:32 AM

    Hello,

    If the FM raises an exception then the system itself will give a error message.

    For that u need to uncomment the following

    <b> IF SY-SUBRC <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.</b>

    If this also doesn't solves ur problem then paste ur code where u r calling that FM

    If useful reward.

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:32 AM

    Hi kalapana,

    try with the message type s might be solve your problem

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:34 AM

    Hi,

    try this.

    if sy-subrc ne 0.

    message e001(e) with 'no record found (text)'.

    Endif.

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2007 at 01:01 PM

    hi,

    Check report demo_messages

    this is also available from transaction ABAPDOCU.

    Kind regards, Rob dielemans

    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.