09-22-2006 2:31 PM
Hi All,
I need to know how do I print the page no in the following format in Classical & in ALV Reports.
Eg: "Page 1 of 10 " and for next page it should be
"Page 2 of 10 " and lat last
.
.
.
"Page 10 of 10"
Points will be rewarded for all useful answers.
Regards,
Vinodh.
09-22-2006 2:36 PM
Here is a sample program for classical reports.
report zrich_0004
line-size 80
line-count 65
no standard page heading.
data: imara type table of mara with header line.
selection-screen begin of block b1 with frame title text-001 .
parameters: p_check type c.
selection-screen end of block b1.
start-of-selection.
perform get_data.
perform write_report.
top-of-page.
perform top_of_page.
************************************************************************
* FORM GET_DATA
************************************************************************
form get_data.
select * into corresponding fields of table imara
from mara up to 300 rows.
endform.
************************************************************************
* FORM WRITE_REPORT
************************************************************************
form write_report.
data: xpage(4) type c.
loop at imara.
write:/ imara-matnr.
endloop.
write sy-pagno to xpage left-justified.
do sy-pagno times.
read line 1 of page sy-index.
replace '****' with xpage into sy-lisel.
modify current line.
enddo.
endform.
************************************************************************
* Form top_of_page
************************************************************************
form top_of_page.
write:/32 'Test Program',
at 62 'Page:', at 67 sy-pagno, 'of', '****'.
endform.
Regards,
Rich Heilman
09-22-2006 3:01 PM
Hi Rich,
Thank you very much for your code to display page no. in classical reports. Is it possible to do it so in ALV???
09-22-2006 3:32 PM
09-22-2006 3:13 PM
09-22-2006 3:13 PM