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: 

Page Display

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

Hi,

In page attributes you have to give what is the next page.

If you set next page as FIRST page then constant window will not display.

If you set next page as SECOND page then constant window will display but that extra data in first page will not display.

You have to call that page dynamically.

0 Kudos

but i want to display the constant window from the second page itself, not in first page.

how can we display this.

advice me.

regards

rajaram

0 Kudos

Whichever window you define in the second page will always appear, from the 2nd page on, as long as it isn't a main window (which usually goes in the first page) - AND as long as you defined the link between the 1st page and the 2nd or Next one, however you call it.

Example: if you define one window with a footer in the 2nd page/next , like "This is a test", this text will appear on every page from the 2nd and so on.

Hope it helps,

Avraham

Former Member
0 Kudos

Hi Raja,

No table data will not exceed in the next page since it does not contains the main window.

Regards,

Sravanthi

Former Member
0 Kudos

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.