2008 Jun 26 12:43 PM
hi experts
how do i show a warnnig messege with red color
thanks
amit
hi experts
how do i show a warnnig messege with red color
thanks
amit
2008 Jun 26 12:45 PM
You ca't display warning message in red clor.It will be dislpayed in orange color.Other alternative is give 'Information' message.It will be a pop-up message.
2008 Jun 26 12:47 PM
hi,
Warning message comes in Yellow color and can be issued in the below way ...
message w001(zfi).
2008 Jun 26 12:55 PM
hi check this report..
report message-id zmsg.
if sy-subrc eq 0.
message i000 DISPLAY LIKE 'E' with ' this is test'.
endif.
2008 Jun 26 12:57 PM
Hi,
When you want to give a warning message, in some cases (Within the Events) it behaves like error message. then your warning message comes in red color as an error message only.
2008 Jun 26 1:09 PM
hi amit walden
MESSAGE 'Donot allow' TYPE 'E'.
Reward if useful,
S.Suresh.
2008 Jun 26 3:13 PM
Error messages will be displayed in red. To specify the error type you will need to put a distinct character when raising the error.
If sy-subrc NE 0.
Message e000(00) with text-001.
endif.
The 'e' denotes and error message that will display the message in text field 001 and terminate the program.
See the link below for more information on messages.
Link: [http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaae335c111d1829f0000e829fbfe/content.htm]
2008 Jun 26 3:25 PM
Hi Amit,
Warning message cannot be displayed in red color.
&***********Reward point if helpful**************&
2008 Jun 26 3:27 PM
Hello amit,
Different messages behave differently in different events,
A message of type 'W' behaves as a message of type 'E' in start-of-selection..
So if you want a warning message to be displayed as an error message give the message command in start-of-selection event.and start-of-selection is the default event .So,check this out...
Example
REPORT z_demo .
DATA:
fs_pernr LIKE p0000.
SELECT pernr FROM pa0001
INTO fs_pernr
WHERE
pernr EQ 78324.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE 'hello' TYPE 'W'.
ENDIF.
WRITE 'hello'.However if you just want to change the colour of a warning message without changing its type then that is not possible as it is pre-defined by sap standards.
*Hope this is useful..
Regards,
Bhumika
2008 Jun 26 3:34 PM
I can´t test this in 4.6C but I understand this was introduced later.
message W001(00) display like 'E'.
This will make a Warning message display in red like an error message.