2008 Jan 08 8:56 AM
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.
2008 Jan 08 9:45 AM
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.
2008 Jan 08 9:36 AM
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
2008 Jan 08 9:45 AM
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |