Showing results for 
Search instead for 
Did you mean: 

achieve page break in smartforms

Former Member
0 Kudos


I had two tables data in smartforms. One is ekko , the second one is ekpo. I am printing ekko details in page one  table control and ekpo data have to print on page two.

My requirement is to print the one header item in page one then after that header related item details I want to print on second page. After that again page one for next header item and go on.

So I had selected "Event on sort end " in ekko table data for field ebeln , So the event raised and in that event I had put command to go to new page -> P2 , wich is item details page. And in second page table control i put the same at end of event and to trigger to go page one .

But I am getting printing the ekko first table data only each header item in individual pages.

Could you please any body help me out.


Praveen chitturi

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos


Assuming you are also wrote the print program.

DATA: st_control_parameters TYPE ssfctrlop .
DATA: st_output_options     TYPE ssfcompop .

st_control_parameters-no_open   = abap_true .
st_control_parameters-no_close  = abap_true .
st_output_options-tdnewid = abap_true .

       control_parameters = st_control_parameters
       output_options     = st_output_options
       formatting_error   = 1
       internal_error     = 2
       send_error         = 3
       user_canceled      = 4
      OTHERS             = 5.
In your program create a loop over your it_ekko .

for each iteration pass the current ekko and its ekpo lines to the form .

data: it_ekpo type shp_vl10_ekpo_t .

        control_parameters = st_control_parameters
        output_options     = st_output_options
        st_ekko            = st_ekko
        it_ekpo            = it_ekpo .

In the form I am asuming that you use the "Next Page" page parameter.

at the of the loop in your program use:

      formatting_error = 1
      internal_error   = 2
      send_error       = 3
      OTHERS           = 4.
This way you moved the logic from the form to the program (

I believe that form should be used only to present the data .