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: 

How to change Line-count dynamically

Former Member
0 Kudos

Hi ABAPer's

Is it possible to Change the Line-count of a page Dynamically.

My req is I want to Change the Line-count of the page inside the program based on the option selected.For eg if option is 1 page-count should be 64 else it should be 65.

How to do this.Kindly Calrify.

Rgds

Sapient

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can change the line count just by specifing this statement. Check this sample program.

new-page line-count 20.

REPORT  ZRICHA_001 line-count   4.

data : v_code type sy-ucomm.
start-of-selection.
v_code = '1'.
do 4 times.
case v_code.
 when '1'.
  new-page line-count 20.
  write : / 'a'.
  v_code = '2'.
 when '2'.
  new-page line-count 40.
  write : / 'b'.
  v_code = '3'.
 when '3'.
  new-page line-count 60.
  write : / 'c'.
 endcase.
enddo.

Regards,

Richa

2 REPLIES 2

former_member181962
Active Contributor
0 Kudos

use the syntax.

if cond.

new-page line-count 64.

else.

new-page line-count 65.

endif

see sample prog:

DEMO_LIST_LINE_COUNT

Former Member
0 Kudos

Hi,

You can change the line count just by specifing this statement. Check this sample program.

new-page line-count 20.

REPORT  ZRICHA_001 line-count   4.

data : v_code type sy-ucomm.
start-of-selection.
v_code = '1'.
do 4 times.
case v_code.
 when '1'.
  new-page line-count 20.
  write : / 'a'.
  v_code = '2'.
 when '2'.
  new-page line-count 40.
  write : / 'b'.
  v_code = '3'.
 when '3'.
  new-page line-count 60.
  write : / 'c'.
 endcase.
enddo.

Regards,

Richa