Application Development and Automation 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: 
Read only

SYSTEM VARIABLE

Former Member
0 Likes
708

to write total page number in interactive report what is the system variable..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
661

HI,

CHECK THIS ONE

In TOP-OF-PAGE you can write:

WRITE: SY-PAGNO, '/', '-----'.

When the program has finished to print all data, run a routine like this:

  • Declare a variable

DATA: L_PAGE_COUNT(5) TYPE C,

V_LINE TYPE I. "The line where page number is written

  • In my example I suppose the page number is always

  • written in the first row of the page.

V_LINE = 1.

  • 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 V_LINE OF PAGE sy-index.

REPLACE '-----' WITH l_page_count INTO sy-lisel.

MODIFY CURRENT LINE.

ADD 1 TO sy-index.

ENDDO.

REG

ASHOK KUMAR

5 REPLIES 5
Read only

Former Member
0 Likes
661

Hi,

CPAGE --- Current page number

LINCT --- Page length of list

SY-PAGNO -

-


Current page during the list creation.

· WRITE, ULINE, SKIPraise SY-PAGNO by 1 in the case of a line break.

· NEW-PAGE raises SY-PAGNO by 1, but only if at least one output follows both on the current page and after the NEW-PAGE statement.

· NEW-SECTION of the NEW-PAGE PRINT ON statement sets SY-PAGNO to 1.

FOR MORE INFORMATION PLEASE CHECK OUT THE FOLLOWING LINK IT MIGHT HELP YOU

http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm

***********please reward points if theinformation is helpful to you*************

Read only

Former Member
0 Likes
661

HI,

use event

END-OF-PAGE.

Current number of pages is

sy-pagno



and user

sy-lilli

(current list line) to determine the number of pages!

for example : first end of page lilli contains 50 means that you can display 50 lines on one page! If the entries you display are about 213 you can determine there will be 5 pages ! Bingo!

Thanks for any rewardè!s

ASHOK KUMAR

Read only

0 Likes
661

DONT COPY AND PAST FROM OTHERS

GIVE ME CORRECT ANSWER..

Read only

former_member194669
Active Contributor
0 Likes
661

Hi,

SY-PAGNO

aRs

Points are always welcome

Read only

Former Member
0 Likes
663

HI,

CHECK THIS ONE

In TOP-OF-PAGE you can write:

WRITE: SY-PAGNO, '/', '-----'.

When the program has finished to print all data, run a routine like this:

  • Declare a variable

DATA: L_PAGE_COUNT(5) TYPE C,

V_LINE TYPE I. "The line where page number is written

  • In my example I suppose the page number is always

  • written in the first row of the page.

V_LINE = 1.

  • 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 V_LINE OF PAGE sy-index.

REPLACE '-----' WITH l_page_count INTO sy-lisel.

MODIFY CURRENT LINE.

ADD 1 TO sy-index.

ENDDO.

REG

ASHOK KUMAR