i need to print total no of pages in the classical report output in the spool .
i have implemented the below code but its calculating incorrect page numbers.
CALL FUNCTION 'DISPLAY_PAGENUMBER'
EXPORTING
LINES_TOTAL = LW_TOT_LINES_5
LINES_LOOP = '7'
IMPORTING
PAGES_TOTAL = lw_tot_pages.
also i tried the code
DESCRIBE TABLE GINT_ALV_A LINES LW_TOT_LINES_1.
DESCRIBE TABLE GINT_ALV_B LINES LW_TOT_LINES_2.
DESCRIBE TABLE GINT_ALV_C LINES LW_TOT_LINES_3.
DESCRIBE TABLE GINT_ALV_D LINES LW_TOT_LINES_4.
LW_TOT_LINES_5 = LW_TOT_LINES_1 + LW_TOT_LINES_2 + LW_TOT_LINES_3 + LW_TOT_LINES_4 + 35.
**************
LW_TEMP = LW_TOT_LINES_5 / 30.
lw_tot_pages = trunc( LW_TEMP ).
*temp = frac( temp ).
if LW_TEMP > 0.
lw_tot_pages = lw_tot_pages + 1.
endif.
but even the above code is not working.
please help