cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict no of records per page in script

former_member575017
Participant
0 Kudos

Hi Experts,

I am working on SAP Scripts and I am having one problem I need to restrict 15 records per page.

Please help me out.

LOOP AT IT_ITAB

Call function WRITE_FORM

ENDLOOP.

Is there any ways to restrict in loop?

Thanks in advance

Basu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

check for sy-tabix inside loop and use exit when needed

former_member575017
Participant
0 Kudos

Hi Phani,

I need to move ferther records to next page, after every 15 records I need to change the page....

Regards

Basu

Former Member
0 Kudos

Inside the loop,

after the write_form give the following if condition

loop at itab.
...write_form...
w_count = sy-tabix MOD 15.

if w_count eq 0.

CALL FUNCITON 'control_form'
COMMAND = 'NEW-PAGE' .
endif.

endloop.

Regards

Sharath

former_member575017
Participant
0 Kudos

Thanks Sharat for the solution.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Provide height of the window as 15 LN then it automatically display next 16 th row in next page.