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: 

Print tpage number/total page number in a report with width more than 240

Former Member
0 Kudos
87

Dear all,

I need to display total page number as following code sample.

But I need to put it after position 240.

this program can print total page number if it is placed at postion 239 or before.

WRITE: /234(10) 'Heading', 239 SY-PAGNO,'of ', '-----'.

Whenever I put 240 or more WRITE: /234(10) 'Heading', 240 SY-PAGNO,'of ', '-----'.

Total page num could not be displayed.

Please tell me the solution.

thanks

REPORT YPAGECOUNT NO STANDARD PAGE HEADING LINE-SIZE 276 LINE-COUNT 65.

DATA L_PAGE_COUNT(5) TYPE C.

TOP-OF-PAGE.

  • WRITE : /234(10) 'PAGE', SY-PAGNO,'/ ','-----', ''.

WRITE: /234(10) 'Heading', 239 SY-PAGNO,'of ', '-----'.

ULINE.

START-OF-SELECTION.

  • Real list output takes place here

DO 1000 TIMES.

WRITE: / 'Line #', SY-LINNO.

ENDDO.

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

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

MODIFY CURRENT LINE.

ENDDO.

3 REPLIES 3

Former Member
0 Kudos
56

Using Values Greater than 255 for the LINE-SIZE of a List

If you define a fixed column width greater than 255 using the LINE-SIZE addition in the REPORT or NEW-PAGEstatement, the following notes apply:

Type definitions: The type group SLIST defines the valid maximum value for the list width (SLIST_MAX_LINESIZE), and contains a type for list lines with maximum width (SLIST_MAX_LISTLINE).

Accessing the entire contents of a line: To read or modify the entire contents of a wide line, you can use the ... LINE VALUE addition in the READ LINE or MODIFY LINE statements. This is an alternative to using SY-LISEL that is independent of the attributes of the system field (since the length of SY-LISEL is 255 characters).

Horizontal lines: With extra-wide lists, the "ULINE." statement corresponds to "WRITE / SY-ULINE.". So, for example, "ULINE AT 5(300)." corresponds to "WRITE AT 5(300) SY-ULINE.".

Output length: You can use the length specification in WRITE (or ULINE) to extend the output length of an extra-wide list up to the value of LINE-SIZE. If you want to output a whole field that is longer than 255 characters, you must use this, even if the field itself is defined as longer than 255 characters.

Example

NEW-PAGE LINE-SIZE 1000.

DATA: F1(500) VALUE 'F1'.

WRITE: / F1 COLOR COL_NORMAL. " Output with length 255

WRITE: /(500) F1 COLOR COL_NORMAL. " Output with length 500

Awrd Points if useful

Bhupal

Former Member
0 Kudos
56

Hi,

The defaul line size is 255 chars..in ur program give the line size as 1023 which is the maximum...

then try like this to wirte the page number or whatever u want...

WRITE AT /(506) sy-uline .

This will defintely write.

Regards,

Ari

Edited by: Arivarasu S on Dec 21, 2007 2:46 PM

jayakummar
Active Participant
0 Kudos
56

hai,

hai in the first line of the program you have

report zyour prg name no .

you can add here like

report zyour prg name no line-size 1023.

line-size 1023 is the maximum lenth of the report.

if you give like this it will useful for your problem.

Plzz reward points if useful...

regards,

jai.m