Application Development and Automation 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: 
Read only

SCRIPTS

Former Member
0 Likes
551

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
526

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

3 REPLIES 3
Read only

Former Member
0 Likes
526

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

Read only

Former Member
0 Likes
526

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.

Read only

Former Member
0 Likes
527

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