Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Page Display

In my script i have 2 pages , in the first page i have table and displaying data.

next page i have constant window.

Now my doubt, when the data display, if table data is exeeds to next page,

will the constant window of second page and its data will be displayed in the next page or not.

pls advice me on this.

regards

Rajaram

Tags:
replied

The easiest way to do this is use functional module

CONTROL_FORM

using this function module you can give different commands like new-page P1

where new-page is command

P1 is page name.

example.

call function 'CONTROL_FORM'

exporting

command = 'NEW-PAGE P1'

exceptions

unopened = 1

unstarted = 2

others = 3.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

And to for your problem you just copy and paste the code that i am writing below.

    • Printing First Page

perform start_form using w_form 'P1' w_repid.

perform write_form using 'HEAD' 'HEADING'.

loop at itab.

perform write_form using 'ARKTX' 'MAIN'.

if sy-tabix = count*

//Count is number of line item that can be accomodated in one page

wcommand = 'NEXT-PAGE P1'.

call function 'CONTROL_FORM'

exporting

command = wcommand

exceptions

unopened = 1

unstarted = 2

others = 3.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

endloop.

      • TO print the remaining Part of Page 2

perform write_form using 'FOOTER' 'FOOTER'.

    • Printing Second Page

perform start_form using w_form 'P2' w_repid.

perform write_form using 'PNO' 'PNO'.

I hope this solves ur problrm

perform write_form using 'HD2' 'HEADER2'.

perform write_form using 'DESC2' 'DESC'.

perform end_function.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question