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: 

Dynamic lne size in classical report

Former Member
0 Kudos

Hi all,

I have a program where depending on the number of fields to be displayed in the report the line-size should be varied so as to avoid scrolling unnecessarily in the report. Is there any way one can change the line-size at run time???

Thanks,

Arup

5 REPLIES 5

Former Member
0 Kudos

hi Arup,

Check this out

http://www.allsaplinks.com/dynamic_linesize.html

Regards,

Santosh

0 Kudos

You cannot change the width of individual pages within a list level. You can only change the width of all pages of a new list level. To do so, use the NEW-PAGE statement:

Syntax

NEW-PAGE LINE-SIZE <width>.

All list levels starting from the new page have a width of <width> instead of the one specified in the REPORT statement. If you set <width> to 0, the system uses the width of the standard list .

If you set <width> to SY-SCOLS, you can adapt the width of the new list level to the window width, even if the window is smaller than the standard window. The SY-SCOLS system field contains the number of characters of a line of the current window.

Within a list level, that is, if the next page is not the beginning of a new list level, the system ignores the LINE-SIZE option.

0 Kudos

Hi,

You can try to use the system variable SY-LINSZ to change the list width at runtime.

Regards,

Suresh Datti

Former Member
0 Kudos

Hi,

check this code,

parameters c_box as checkbox.

if c_box = 'X'.

sy-linsz = 5.

else.

sy-linsz = 256.

endif.

new-page line-size sy-linsz.

write:'12345678901234567890'.

former_member188685
Active Contributor
0 Kudos

Hi,

you can use the system variable LINSZ and modify the list dynamically.

Regards

vijay