Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 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>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 10:38 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.