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

Doubt in Selection Screen

Former Member
0 Likes
746

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....

6 REPLIES 6
Read only

Former Member
0 Likes
723

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.

Read only

Former Member
0 Likes
723

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

Read only

dev_parbutteea
Active Contributor
0 Likes
723

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

Read only

anoop_gupta2
Participant
0 Likes
723

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

Read only

Former Member
0 Likes
723

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.

Read only

Former Member
0 Likes
723

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