Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to print footer in every new-page in a single list.

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

<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>