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

Total number of pages in Normal Report

How to display the total number of pages in normal report.

To display current page number I am using sy-pagno.

Is there any system variable to display Total numbetr of pages in normal report.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Sep 27, 2005 at 09:41 AM

    Hi sumi,

    example for your reference

    REPORT YTHA_TEST line-count 40

    no standard page heading.

    start-of-selection.

    do 100 times.

    write:/ sy-tabix.

    enddo.

    DATA L_PAGE_COUNT(5) TYPE C.

    end-of-selection.

    WRITE SY-PAGNO TO L_PAGE_COUNT LEFT-JUSTIFIED.

    DO SY-PAGNO TIMES.

    READ LINE 1 OF PAGE SY-INDEX.

    REPLACE '-----' WITH L_PAGE_COUNT INTO SY-LISEL.

    MODIFY CURRENT LINE.

    ENDDO.

    TOP-OF-PAGE.

    WRITE: /(70) 'Heading' CENTERED, 70 SY-PAGNO,'of ', '-----'.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2005 at 09:18 AM

    Sumi,

    Try using sy-pagct.

    Thanks

    Kam

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2005 at 09:07 AM

    Hi,

    There is no system variable to find total no of pages but you can use the following to get that one.

    • Declare a variable

    DATA L_PAGE_COUNT(5) TYPE C.

    • Copy this code to the end of program

    • Page count will be printed on each page here

    WRITE SY-PAGNO TO L_PAGE_COUNT LEFT-JUSTIFIED.

    DO SY-PAGNO TIMES.

    READ LINE 1 OF PAGE SY-INDEX.

    REPLACE '-----' WITH L_PAGE_COUNT INTO SY-LISEL.

    MODIFY CURRENT LINE.

    ENDDO.

    TOP-OF-PAGE.

    WRITE: /(70) 'Heading' CENTERED, 70 SY-PAGNO,'of ', '-----'.

    *--- End of Program

    Thayalan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2005 at 09:44 AM

    Sumi,

    In R/2 , we can use sy-pagct.

    In R/3, it is not supported.

    Thanks

    Kam

    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.