Question:
we know the event of End-Of-Page will be triggered when a new page be generated. But in the last page, it will not be triggered due no new page will be generated. How to trigger it in last page? I want to print the footer in every page (include last page).
Answer:
can you not trigger it using hard NEW-PAGE in the program?
Answer:
can you not trigger it using hard NEW-PAGE in the program?
New Page statement can't trigger the End-of-page Event.
Answer:
Hi
I use script below to trigger end-of-page into last page.
line count 59(9).
data: v_linno type p.
TOP-OF-PAGE.
......bla--bla--bla........
END-OF-PAGE.
.....bla.....bla.....bla.....
START-OF-SELECTION.
.....bla.....bla.....bla......
-----------------------------------
v_linno = SY-LINNO.
SET BLANK LINES ON.
WHILE v_linno < 50. "my report have 59 line count with 9 line for footer
as show above."
skip .
v_linno = v_linno + 1.
ENDWHILE.
SET BLANK LINES OFF.
------------------------------------
hope usefull.
_________________
themex
Answer:
Use RESERVE command. It works also for the last page of the report, without need of counting the printed lines.
Try the following program:
REPORT zztest LINE-COUNT 65(2).
write: / 'page 1 line 1'.
write: / 'page 1 line 2'.
reserve SY-LINCT lines.
write: / 'page 2 line 1'.
write: / 'page 2 line 2'.
reserve SY-LINCT lines.
end-of-page.
write: /'footer line 1'.
write: /'footer line 2'.
Answer:
uthams:
Nice code. I'd put that in a function module to make it easier to reuse if I were you.
Or do you get paid per line of code?