cancel
Showing results for 
Search instead for 
Did you mean: 

How to print 20 lines in one page and remaining lines in another in script?

Former Member
0 Kudos

Hi I created 2 pages in script for page1 next page is page2 , how i can print 20 lines in one page and remaining in next page plz send me the code for that and is windows same for 2 pages?...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can try this without any coding. Reduce the hight of the main window in the first page to fit only 20 lines. Then automatically it will jump to the next page. no coding is required. Only some formatting on your first page.

- Guru

Reward points for helpful answers

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Krishna,

Try below code...

CALL FUNCTION 'OPEN_FORM'

EXPORTING

form = form.

CALL FUNCTION 'START_FORM'

EXPORTING

language = sy-langu

startpage = page1

LOOP AT itab.

count = count + 1.

item = count mod 20.

IF item EQ '1' AND count NE '1'.

CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'START_FORM'

EXPORTING

language = sy-langu

startpage = <b>page2</b>

ENDIF.

"write_form statement ....

.....

.....

ENDLOOP.

Message was edited by:

Hikaruno

Former Member
0 Kudos

write as

loop at itab.

if sy-tabix > 20.

trigger next page.

endif.

endloop.