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: 

Page no in Reports

Former Member
0 Kudos

Hi All,

How can we print page nos in a report?

Thanks,

Rakesh.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Use sy-pagno in report.

Thanks,

Kasiraman R

Former Member
0 Kudos

use system field SY-PAGNO.

Reward if useful

Regards

ANUPAM

Kanagaraja_L
Active Contributor
0 Kudos

Use Syatem variable SY-PAGNO in the write statement.

or

data x_text(100) type c.

data x_page(10) type c.

concatenate 'pageno' sy-pagno into x_text separated by space.

change this to

x_page = sy-pagno.

concatenate 'pageno' x_page into x_text separated by space.

Kanagaraja L

former_member402443
Contributor
0 Kudos

Hi Rakesh,

Check this code.

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

WRITE 😕 'H'.

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

MODIFY CURRENT LINE.

ENDDO.

WRITE 😕 'HELLO' .

TOP-OF-PAGE.

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

Reward Points, if useful.

Regards,

Manoj Kumar

jayakummar
Active Participant
0 Kudos

hai,

use this,

top-of-page.

Current Page No : sy-pagno.

reward points if helpful.

regards,

jai.m