2006 Oct 26 9:47 PM
Hi,
I am using the below code for printing the Total no of pages.This is working in forground,but not working in Background.can any one give idea why it is not working and How do i acheive this in background.
WRITE SY-PAGNO TO TOTAL_PAGES.
DO SY-PAGNO TIMES.
READ LINE 1 OF PAGE SY-INDEX.
REPLACE '****' WITH TOTAL_PAGES INTO SY-LISEL.
MODIFY LINE 1 OF PAGE SY-INDEX.
ENDDO.
Thanks in Advance,
Regards,
Anu.
Hi,
I am using the below code for printing the Total no of pages.This is working in forground,but not working in Background.can any one give idea why it is not working and How do i acheive this in background.
WRITE SY-PAGNO TO TOTAL_PAGES.
DO SY-PAGNO TIMES.
READ LINE 1 OF PAGE SY-INDEX.
REPLACE '****' WITH TOTAL_PAGES INTO SY-LISEL.
MODIFY LINE 1 OF PAGE SY-INDEX.
ENDDO.
Thanks in Advance,
Regards,
Anu.
2006 Oct 27 3:26 AM
2006 Oct 27 3:44 AM
2006 Oct 27 5:52 AM
If I'm not wrong what ur code does is once entire report is printed it goes to each page of the report and display no. of pages in the first line.
This can't be done in background mode. The only solution I can think about is, before displaying the report find out the possible total no. of pages to be displayed using page size and no. of records in the initial table you are displaying. And use this variable wherever u want to.
2006 Oct 27 6:53 AM
Hi,
This doesn't work in the background as nothing is actually been printed on the screen.
I think the only way is to keep track of the number of lines u r printing (may be the no. of lines in ur internal table) & then calculate the no. of pages taking total records, header space & footer into consideration.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |