Application Development and Automation 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: 
Read only

message as yellow error

Former Member
0 Likes
3,633

Hi friends,

I wanted to know abt message in report. I am fetching the records from two different database table i.e. kna1 & lfa1.

Suppose I am not getting the data for kna1 but the data is available for lfa1.

My req. is like if no data is available for kna1 then information message should be display in status bar as yellow error & if my user press enter then it will go for lfa1 detail.

anybody will tell me what i can do for this case.

Pls reply me asap.

12 REPLIES 12
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,940

Hello Neha

The "yellow" message is not an error but a <b>warning</b>, e.g.:

IF ( <kna1 entry is not found> ).
  MESSAGE 'KNA1 entry not found for no. ...' TYPE 'W'.
ENDIF.

Regards

Uwe

Read only

Former Member
0 Likes
1,940

if no data is available for kna1 then give a warning message not information message ,it wil then show up in the status bar and if user press enter the code will go to next step..

hope it clarifies the issue.

pls reward points

Read only

Former Member
0 Likes
1,940

you have to use warning message type for yellow colour error.

that is type W.

like message W001(zspd).

here zspd is the message class(create in se91) .

check sy-subrc value for displaying message i.e. if 0 successful else show the msg when you r fetching data from kna1.

regards

shiba dutta

Read only

Former Member
0 Likes
1,940

hi use like this

Message w000(message id) with 'message text'.

Read only

Former Member
0 Likes
1,940

hi

good

write your messge like this and check the difference.

FORMAT COLOR 3.

MESSAGE message name.

FORMAT COLOR OFF.

thanks

mrutyun^

Read only

Former Member
0 Likes
1,940

select <fileds> from kna1 into table it_kna1

where < where clause>.

if sy-subrc is initial.

message ur text message' type 'W'.

else.

select <fields> from lfa1 into table it_lfa1

where <where clause>.

endif.

Hope this helps.

Sujatha.

Read only

0 Likes
1,940

Hi friends,

I tried with message type 'W' but I am getting the message in red color.

If i put the message type 'I' the message should display in pop-up window.

I don't want this.

I wanted to display my message in yellow color in status bar.

All the above suggestions are not working but thanks for all reply.

Could you pls suggest me another solution??

Read only

Former Member
0 Likes
1,940

Neha,

if sy-subrc is initial.

Pls replace the above sentence with the below sentence.

if sy-subrc is <b>not</b> initial.

Read only

0 Likes
1,940

use code liek thiis -

tables: pa0001,pa0002,ZGILL_MAIN.

Start-of-selection.

select single * from ZGILL_MAIN where pernr = '01100001

if sy-subrc ne 0.

message W016(rp) with 'no data found'.

endif.

Read only

0 Likes
1,940

Hi Friends,

Still it is not working.

the coding is like.

select * from kna1 into table lt_kna1 where land1 in s_land1.

if sy-subrc = 0.

*processing

else.

message w001(zmsg).

endif.

But still the warning message is displaying in green color. I wanted to see that message in yellow color.

Could u suggest me another options.

Read only

0 Likes
1,940

Hi,

Warning messages will be yellow in colour.

Anyway,try this status message.

message s001(zmsg).

Read only

former_member404244
Active Contributor
0 Likes
1,940

Hi Neha,

actually if u specify it as W it should work.Please check whther in some other place u might have given as E.check the message number u r using.if u used multiple times then u need to take care for all times.So make all as W and check..

reagrds,

nagaraj