Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

EDIT the spool pages

Hi,

My requirement is I need to run the program in the background where I have kept the changing of my header page is like PAGE X of XXXX.

This program is working fine when I keep the program in foreground mode.But when I ran the program in background only the last page is coming perfect. Means PAGE 12 of 12 but all other are came as PAGE 1 OF XXXX.

As the request is already kept in the spool so not able to edit at the end of the program.Below is my code part.

REPORT ZTEST_PSK no standard page heading line-count 30 LINE-SIZE 90

.

DATA L_PAGE_COUNT(5) TYPE C.

START-OF-SELECTION.

  • Real list output takes place here

DO 300 TIMES.

WRITE: / 'Line #', SY-LINNO.

ENDDO.

end-of-selection.

  • Page count will be printed on each page here

WRITE SY-PAGNO TO L_PAGE_COUNT LEFT-JUSTIFIED.

DO SY-PAGNO TIMES.

READ LINE 1 OF PAGE SY-INDEX.

REPLACE 'XXXX' WITH L_PAGE_COUNT INTO SY-LISEL.

MODIFY CURRENT LINE.

ENDDO.

TOP-OF-PAGE.

WRITE: /(70) 'Heading' CENTERED, 70 SY-PAGNO,'of ', 'XXXX'.

ULINE.

Please help me in getting to edit all the page in the background run.

Thanks in advance.

Regards,

PSK

Tags:
Not what you were looking for? View more on this topic or Ask a question