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

ALV display.

Former Member
0 Likes
1,086

Hi,

I am using an ALV grid display for a report output.

I want to display a text in the grid stating that "No records found".

Is it possible to display a text in the ALV grid as such? If yes,then how cab we do it?

Please help.

Thanks,

Sandeep.

Hi,

I am using an ALV grid display for a report output.

I want to display a text in the grid stating that "No records found".

Is it possible to display a text in the ALV grid as such? If yes,then how cab we do it?

Please help.

Thanks,

Sandeep.

8 REPLIES 8
Read only

Former Member
0 Likes
1,062

Hi,

by default u will get the message "no records found" if there is no data in the alv grid.

u don't need to write any code for that.

rgds,

bharat.

Read only

0 Likes
1,062

Could you please explain how?

Presently though the internal table is empty,I don't get the message.

Thanks,

Sandeep.

Read only

Former Member
0 Likes
1,062

Hi Sandeep ,

If you want it this way , then you need to create another internal table , this internal table will contain the error message and then call the ALV using this interna table. So in this case you will have two catalogs and internal tables , one when data is there and the other when no data is selected.

Regards

Arun

Read only

Former Member
0 Likes
1,062

Hi,

Do it this way. Say i_output is the internal table which has all the data to be displayed in ALV.

then,

if not i_output[] is initial.

call function 'REUSE_ALV_GRID_DISPLAY'.

else.

message 'No Records found !!' type i.

endif.

Best regards,

Prashant

Read only

Former Member
0 Likes
1,062

Hi sandeep

Sorry just now i understood ur problem then its best to go as said above

as declaring function module and then typing an error msg in the next statement

Regards

Pavan

Message was edited by:

pavan praveen

Read only

S0025444845
Active Participant
0 Likes
1,062

Hi,

It should be done this way only

if it_out is final output internal table then

if not i_out[] is initial.

call function 'REUSE_ALV_GRID_DISPLAY'.

else.

message 'No Records found !!' type 'I'.

endif.

regards,

Sudha

Read only

Former Member
0 Likes
1,062

Hi,

Check the sample program in the following link:

http://www.sap-img.com/abap/example-of-a-simple-alv-grid-report.htm

Regards,

Bhaskar

Read only

Former Member
0 Likes
1,062

hi sandeep,

just do as follows,

if not <itab>[] is initial.(this is final internal table which is passed into FM list display)

call function 'reuse_alv_list_display'

-

-

-

-

-

esle.

message i001(message class)."no records found

endif.

regards,

seshu.

endif.