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

Page no in Classical & in ALV Reports

Hi All,

I need to know how do I print the page no in the following format in Classical & in ALV Reports.

Eg: "Page 1 of 10 " and for next page it should be

"Page 2 of 10 " and lat last

.

.

.

"Page 10 of 10"

Points will be rewarded for all useful answers.

Regards,

Vinodh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Sep 22, 2006 at 01:36 PM

    Here is a sample program for classical reports.

    
    report zrich_0004
           line-size 80
           line-count 65
           no standard page heading.
    
    data: imara type table of mara with header line.
    
    selection-screen begin of block b1 with frame title text-001 .
    parameters: p_check type c.
    selection-screen end of block b1.
    
    start-of-selection.
    
      perform get_data.
      perform write_report.
    
    top-of-page.
    
      perform top_of_page.
    
    ************************************************************************
    *  FORM GET_DATA
    ************************************************************************
    form get_data.
    
      select * into corresponding fields of table imara
            from mara up to 300 rows.
    
    endform.
    
    ************************************************************************
    *  FORM WRITE_REPORT
    ************************************************************************
    form write_report.
    
      data: xpage(4) type c.
    
      loop at imara.
        write:/ imara-matnr.
      endloop.
    
      write sy-pagno to xpage left-justified.
      do sy-pagno times.
        read line 1 of page sy-index.
        replace '****' with xpage into sy-lisel.
        modify current line.
      enddo.
    
    endform.
    
    ************************************************************************
    *  Form  top_of_page
    ************************************************************************
    form top_of_page.
    
      write:/32 'Test Program',
            at 62 'Page:', at 67 sy-pagno, 'of', '****'.
    
    endform.
    
    

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2006 at 02:01 PM

    Hi Rich,

    Thank you very much for your code to display page no. in classical reports. Is it possible to do it so in ALV???

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2006 at 02:13 PM

    HI Vinod,

    Check out this thread for the same..

    page-number-on-alv-list

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2006 at 02:13 PM

    Hi,

    Please refer the following thread :

    ALV Print page numbers

    Best regards,

    Prashant

    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.