‎2006 Dec 19 6:08 AM
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.
‎2006 Dec 19 6:10 AM
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
‎2006 Dec 19 6:10 AM
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
‎2006 Dec 19 6:12 AM
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
‎2006 Dec 19 6:12 AM
hi use like this
Message w000(message id) with 'message text'.
‎2006 Dec 19 6:19 AM
hi
good
write your messge like this and check the difference.
FORMAT COLOR 3.
MESSAGE message name.
FORMAT COLOR OFF.
thanks
mrutyun^
‎2006 Dec 19 6:20 AM
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.
‎2006 Dec 19 6:26 AM
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??
‎2006 Dec 19 6:23 AM
Neha,
if sy-subrc is initial.
Pls replace the above sentence with the below sentence.
if sy-subrc is <b>not</b> initial.
‎2006 Dec 19 6:33 AM
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.
‎2006 Dec 19 7:40 AM
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.
‎2006 Dec 19 7:48 AM
Hi,
Warning messages will be yellow in colour.
Anyway,try this status message.
message s001(zmsg).
‎2006 Dec 19 6:33 AM
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