11-22-2007 10:21 AM
Dear Friends,
I have been using (NEW PAGE statement) to create new pages in a single list. It allows me to create TOP-OF-PAGE for each new page but not the footer.
How can I get the footer also on every new-page.
Thanks
Alok
11-22-2007 10:34 AM
Hi
Check this code..
REPORT zreport NO STANDARD PAGE HEADING LINE-COUNT 44(3).
TABLES eban.
DATA : BEGIN OF itab OCCURS 100,
matnr LIKE eban-matnr,
menge LIKE eban-menge,
END OF itab.
SELECT-OPTIONS : s_matnr FOR eban-matnr.
START-OF-SELECTION.
SELECT matnr menge INTO CORRESPONDING FIELDS OF TABLE itab FROM eban
WHERE matnr IN s_matnr.
LOOP AT itab.
PERFORM write_list.
ENDLOOP.
TOP-OF-PAGE.
PERFORM header.
END-OF-PAGE.
ULINE /(40).
"here you can write your fooer code
"Do remember you must reserve some lines for footer in REPORT statement
"like LINE-COUNT 44(3) .here I reserved 3 lines out of 44 lines
"otherwise END-OF-PAGE code will not work
"no need to use NEW-PAGE becoz this event fires automatically after 44 lines
*&---------------------------------------------------------------------*
*& Form HEADER
*&---------------------------------------------------------------------*
FORM header.
ULINE /(40).
WRITE 😕 sy-vline,
(18) 'Material' CENTERED COLOR COL_HEADING ,
20 sy-vline,
(10) 'Quantity' CENTERED COLOR COL_HEADING ,
40 sy-vline.
ULINE /(40).
ENDFORM. "HEADER
*&---------------------------------------------------------------------*
*& Form WRITE_LIST
*&---------------------------------------------------------------------*
FORM write_list.
WRITE 😕 sy-vline,
2 itab-matnr CENTERED,
20 sy-vline,
21 itab-menge DECIMALS 0,
40 sy-vline.
ENDFORM. "WRITE_LIST
Message was edited by:
Perez C
11-22-2007 10:36 AM
<b>You cannot use NEW-PAGE to create or change a page footer. A page footer defined in the REPORT statement (see Determining the Page Length) is kept as such, independent of a NEW-PAGE statement.</b>
<b>For the actual list output, <length> minus the page header length and the page footer length is available</b>
11-22-2007 10:38 AM