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

How to restrict data in main window SAPscript?

Former Member
0 Likes
442

Hi All,

I am developing the SAPscript , there are total 48 records are available,Now its displaying around 43 records in Main window but I wanted to restrict the MAIN window for only 30 records and the remaining records should print in the NEXT window, please help me out,

Thanks in advance,

Mounesh

2 REPLIES 2
Read only

aris_hidalgo
Contributor
0 Likes
380

Hi,

Inside the MAIN window, you can put an explicit NEW-PAGE for a given condition. Or you can play around with the height of your window until it goes to the next page after 30 records.

Hope it helps...

Read only

venkat_o
Active Contributor
0 Likes
380

Hi Mounesh, Try this way in the driver program explicitly.


LOOP AT itab.
  lv_count = lv_count + 1.
  CALL FUNCTION 'WRITE_FORM' " THis is used to print data in the form.
  IF lv_count EQ 25.
    CALL FUNCTION 'CONTROL_FORM' " start on new page
    EXPORTING
    command = 'NEW-PAGE'.
    CLEAR lv_count.
  ENDIF.
ENDLOOP.
Thanks Venkat.O