10-14-2008 1:38 PM
Hi all,
Not able to get the total no of pages in alv through end_of_ list event .
plz go through my code :
FORM alv_event_end_of_list .
DATA: x_footer TYPE slis_listheader.
Page Number
CLEAR x_footer.
x_footer-typ = 'S'.
x_footer-key = 'End of List'.
x_footer-info = sy-pagno.
APPEND x_footer TO gt_footer.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_footer
I_LOGO = <<If you want to set a logo, please,
uncomment and edit this line>>
I_END_OF_LIST_GRID = 'X'
I_ALV_FORM =
.
ENDFORM. " ALV_EVENT_END_OF_LIST
cheers,
sravan.
10-14-2008 1:46 PM
To use from the beginning of your report, you will have to loop through your report once before display. ABAP does not provide
an easy "read-ahead" method of doing this, so this is the "cludgy" way of making it work if needed.
FORM GET_TOTAL_PAGENO.
WRITE SY-PAGNO TO NUM_PAGES_C LEFT-JUSTIFIED.
DO SY-PAGNO TIMES.
READ LINE 2 OF PAGE SY-INDEX.
REPLACE '*****' WITH NUM_PAGES_C INTO SY-LISEL.
MODIFY LINE 2 OF PAGE SY-INDEX.
ENDDO.
ENDFORM. " GET_TOTAL_PAGENO
10-14-2008 1:58 PM
hi Sravan,
check it.
saptechnical.com/Tutorials/ALV/PageNumbers/Demo.htm
hope it may help you.
thanks
Sachin