Skip to Content

How to print multiple smartforms for different Reservation no.

Dear All,

for multiple smartforms using select options suppose if i gave 200   to    400 . At the time i need to print 200 smartforms if it is present .

so far i have done with one entry if i gave multiple entries it get in to with previous it is not coming as seperate smartforms . Can anyone help me

out of this.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Dec 30, 2014 at 05:38 AM

    Hi Ravi ,

          loop the data with your internal number , each time you have to call the smartform.

    Loop it_fin into wa_fin.

       Call the smart form with wa_fin-num.




    Add comment
    10|10000 characters needed characters exceeded

  • Dec 30, 2014 at 05:45 AM

    Hi -

    Your question is not fully clear.

    Do you mean you have a driver program, on which you have select option for reservation and for each reservation you want to print the smart form.

    If that is the case, take all the reservation from the select option to an internal table and do a loop over the internal table and inside the loop you can call the smart form for each reservation.

    Let us know, if you have different scenario or issues further.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 30, 2014 at 06:03 AM

    Hi Ravi,


    Programming line

    AT NEW  Resb.

    flag = abap_true.


    Command   Node

    Condition -Tab.

    flag = 'X'.

    select go to new page.

    Hope it helpful.



    Add comment
    10|10000 characters needed characters exceeded

  • Dec 30, 2014 at 06:20 AM

    Hi Raviram,

    So far you did the coding for the single entry, so for multiple entry first of all you have to check your program logic and have to change to get the final Information in faster way.

    One important thing, you should not any of the data fetching logic in Smartforms, it could be performance problem.

    All Information should fetch in Driver program first.

    You final Program Flow would be like.

    Program Logic.

         1     Select Data (from all respective DB table )

         2     arrange data in specific Internal tables

         3     Take the Smartforms Function Module name (SSF_FUNCTION_MODULE_NAME )

         3     Loop at Primary Internal table ( in you case which contains the 200-400 information entries ).

         4     And apply the below logic to get the all page in final output with diff pages.


                    if sy-tabix = 1.  (for the 1st Record )

                        Control_parameters-no_open = space.

                        Control_parameters-no_close = 'X'.

                   elseif sy-tabix = lines( it_final).  (For the Final Records.

                        Control_parameters-no_open = 'X'.

                        Control_parameters-no_close = Space


                        Control_parameters-No_open = 'X'.

                         Control_parameters-No_Close = 'X'.



                    here control_parameters is your smartforms exporting parameters (while Calling ).

         5     Call the Smart forms and pass the all information.

         6.     End Loop.




    Add comment
    10|10000 characters needed characters exceeded