04-25-2006 8:22 AM
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
04-25-2006 8:27 AM
04-25-2006 8:29 AM
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.
04-25-2006 8:33 AM
Hi,
You can try to use the system variable SY-LINSZ to change the list width at runtime.
Regards,
Suresh Datti
04-25-2006 8:41 AM
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'.
04-25-2006 8:50 AM
Hi,
you can use the system variable LINSZ and modify the list dynamically.
Regards
vijay