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

new page problem

Former Member
0 Likes
380

hello experts

i am writing a text to screen from a table. the text contains 186 rows each row is a row in a table

how can i write to the screen the page number each time i get to a new page.

thanks

Amit.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
367

Hi,

Write out the system field sy-pagno in the top-of-page event.

Darren

2 REPLIES 2
Read only

Former Member
0 Likes
368

Hi,

Write out the system field sy-pagno in the top-of-page event.

Darren

Read only

Former Member
0 Likes
367

Hi follow this sytax.

REPORT Y_WA no standard page heading line-count 60(5).

data: v_totpage type i.

data: v_temp(3) type c.

Start-of-selection.

do 100 times.

write:/ sy-index.

enddo.

end-of-selection.

v_temp = v_totpage.

do v_totpage times.

read line 1 of page sy-index.

replace '@@@' in sy-lisel with v_temp.

modify line 1 of page sy-index.

enddo.

top-of-page.

write:/60 'page', sy-pagno, '/','@@@'.

v_totpage = sy-pagno.

Here is a sample:

<![if !supportEmptyParas]>

  • zlines number of lines in the table

  • sy-srows number of lines in screen

  • sy-cpage current page

  • zpages total number of pages type i

  • temp temporary number type f

describe table itab lines zlines.

temp = zlines / sy-srows.

zpages = trunc( temp ).

temp = frac( temp ).

if temp > 0.

zpages = zpages + 1.

endif.

  • zpages is the number of pages

write: /'Page ',sy-cpage, ' of ', zpages.

RELATED POST

Thanks,

sriii.