‎2008 May 20 9:54 AM
Hi gurus,
I am developing one report. In select queries if the data is not fetching I try to display error message.
My doubt is if the data is not fetching the error message is displayed,But our client need to display that error message in the status bar of the selection-screen.
Measn the selection-screen dispalys as same,but in below the error message needs to be displayed.
Please can any one give me suggestions.
Thanks in Advance...
Thanks and Regards
Siri....
‎2008 May 20 9:57 AM
Hi abinava,
1. do like this and it will work.
start-of-selection.
if no records found.
message 'no records found' type 'S'.
leave list-processing.
endif.
2. important things :
a) message should be of type S or I or W (and not E)
b) Leave list-processing is important.
regards,
amit m.
‎2008 May 20 9:59 AM
Hi,
Message S000(...) display like 'E'.
Return.
this will display the message as error and remain on the screen
This should solve the issue.
Shruthi
Edited by: Shruthi R on May 20, 2008 11:13 AM
‎2008 May 20 10:11 AM
Hi,
Its an error message that u want, you need to put the following:
message exxx(yyyy).
where xxx is the message number and yyyy the message class,
Regards,
Dev
‎2008 May 20 10:12 AM
hey abhinav
use message type as success and it will work perfectly.
ex.
MESSAGE 'No Data Found' TYPE 'S'.
*Reward If UseFul.
Thx & Regards.
Anoop Gupta
‎2008 May 20 10:15 AM
Hi,
if you want to display the error message in the status bar then you have to put the code in at selection screen. otherwise you will get a pop up window .
Hope this solves your problem.
Reward points if helpful.
Thanks and regards.
‎2008 May 20 10:48 AM
Hi abinava,
Once try with this code
tables : mara.
data: itab type table of mara with header line .
parameters: p_matnr like mara-matnr.
start-of-selection.
select * from mara into table itab where matnr = p_matnr.
if sy-subrc <> 0.
message 'no records found' type 'S'.
ELSE.
loop at itab.
write: itab-matnr,
itab-ersda,
itab-ernam.
endloop.
ENDIF.
Thanks&Regards,
S.Gangireddy