Application Development 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: 

how to display the err msg in statusbar

Former Member
0 Kudos

Hi friends,

How to display the error msg (red color) in statusbar and other msg is green color in same report of the status bar .

Plz help any one.

Thanks in advance.

1 ACCEPTED SOLUTION

praveen_hannu
Contributor

Hi

Please find the code.

MESSAGE s086 WITH text-m04 DISPLAY LIKE 'E'..

Regards

Praveen

8 REPLIES 8

praveen_hannu
Contributor

Hi

Please find the code.

MESSAGE s086 WITH text-m04 DISPLAY LIKE 'E'..

Regards

Praveen

nirajgadre
Active Contributor
0 Kudos

Hi,

To display the message on the status bar use MESSAGE cammand.

to display any message as error (Red) use MESSAGE TYPE 'E'. to display the message into green (Success) use messge type 'S'.

Former Member
0 Kudos

Hi

For displaying messages, you have to make use of MESSAGE tnnn(message_class) statement.

where, t is the type of message you want to display

nnn is the 3 digit message number.

For diaplaying the ERROR message you hve to pass a value E in place of t in the above syntax. It automatically wii be diaplayed in the status bar in red color.

Similarly, for SUCCESS message the value of t is S, and it is displayed in green color in status bar.

Other messages have different colors and i don't think sap provide the option to change those.

Regards

Gaurav

Former Member

Former Member
0 Kudos

For Error Message (in red color) you simply need to use

Message 'text' type 'S' display like 'E'.

For Other messages (in green color) you can write

Message 'text' type 'E' display like 'S'.

Former Member
0 Kudos

Hi YUMKUMAR ,

You can use the below code.

Create a message class : ZMSSG or with any other name and use the below code.


IF SY-SUBRC  NE 0 .
    MESSAGE : E000(ZMSSG) WITH 'Data not available for this entry'.
  ENDIF .
 
or 
 
IF SY-SUBRC NE 0 .
    MESSAGE : S000(ZMSSG) WITH 'Data not available for this entry'.
  ENDIF .

Regards,

Kittu

Edited by: Kittu on Feb 1, 2010 7:51 AM

Former Member
0 Kudos

Thank u frnd,

but err meg in red color is display for next screen why

?

Former Member
0 Kudos

Thank u frnds.