‎2006 Sep 14 11:14 AM
Hi all.
I have an issue in scripts.
How to count the number of lines in the out put of the script.
because my requirement is, after x lines ,I want a page break(new-page).
is it possible to track the line number in the script output.
Thanks in advance,
Eswar.M
‎2006 Sep 14 11:29 AM
Hi,
Script takes data from driver program,try to
count lines of itab and after specified lines
do a page break
loop at itab.
gv_page = gv_page + 1.
if gv_page = 10.
call function 'write_form'.
element = 'E'
endif.
endloop
se71
if &gv_page& = 10
new-page.
endif.
regards
amole
‎2006 Sep 14 11:19 AM
Hello,
Ur requirement is typical.
U cannount the no of lines,approximately based on no of records u can give page break.For example u have to give page break after 10 lines,then count the no of records to 10 and give page break.
Regards
‎2006 Sep 14 11:21 AM
There is no system field to indicate the number of lines for sapscript...the best way is to use a counter as you write the data to sapscript...and when the counter reaches the required value ...call a page break...and reset the counter.
‎2006 Sep 14 11:29 AM
Hi,
Script takes data from driver program,try to
count lines of itab and after specified lines
do a page break
loop at itab.
gv_page = gv_page + 1.
if gv_page = 10.
call function 'write_form'.
element = 'E'
endif.
endloop
se71
if &gv_page& = 10
new-page.
endif.
regards
amole