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

query regarding pageno. in report

Former Member
0 Likes
455

Hi team,

i have a requirement regarding report pageno.

like they want want to print 1 of 2 , 2 of 2 in report .

i have done this in smartforms but same thing isn't work in report , is there any other way to print , so please give me solution ASAP.

Thanks ,

Puneet.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
433

try this sample code...


REPORT test NO STANDARD PAGE HEADING LINE-COUNT 23(3).

DATA : itab LIKE STANDARD TABLE OF mara WITH HEADER LINE.
DATA : lin TYPE i.

END-OF-PAGE.

  WRITE :/30 sy-pagno, ' of ', lin.

START-OF-SELECTION.
  SELECT * INTO TABLE itab FROM mara UP TO 100 ROWS.

  DESCRIBE TABLE itab LINES lin.
  lin = lin / 20.

  LOOP AT itab.
    WRITE :/ itab-matnr.
  ENDLOOP.

Hi team,

i have a requirement regarding report pageno.

like they want want to print 1 of 2 , 2 of 2 in report .

i have done this in smartforms but same thing isn't work in report , is there any other way to print , so please give me solution ASAP.

Thanks ,

Puneet.

2 REPLIES 2
Read only

Former Member
0 Likes
433

HI Puneet Check this program.

REPORT zbhu_dataset LINE-COUNT 3.

DATA : a TYPE i.

DATA : n TYPE i.

DATA : l TYPE i.

DATA : t TYPE i, t1 type i.

DATA : BEGIN OF itab OCCURS 0,

a(5),

END OF itab.

itab-a = 'Hello'.

APPEND itab.

itab-a = 'Hello'.

APPEND itab.

itab-a = 'Hello'.

APPEND itab.

itab-a = 'Hello'.

APPEND itab.

itab-a = 'Hello'.

APPEND itab.

DESCRIBE TABLE itab LINES n.

t = n / sy-linct.

t1 = t * 2. " 2 is the no.of manually displayed lines.

n = n + t1. " Gives Total No.Of Lines to be displayed(headings also)

t = n / t. " Gives total no.of pages

LOOP AT itab.

WRITE:/ itab-a.

WRITE: sy-pagno, '/', t .

ENDLOOP.

awrd points if helpful

Bhupal

Read only

Former Member
0 Likes
434

try this sample code...


REPORT test NO STANDARD PAGE HEADING LINE-COUNT 23(3).

DATA : itab LIKE STANDARD TABLE OF mara WITH HEADER LINE.
DATA : lin TYPE i.

END-OF-PAGE.

  WRITE :/30 sy-pagno, ' of ', lin.

START-OF-SELECTION.
  SELECT * INTO TABLE itab FROM mara UP TO 100 ROWS.

  DESCRIBE TABLE itab LINES lin.
  lin = lin / 20.

  LOOP AT itab.
    WRITE :/ itab-matnr.
  ENDLOOP.