cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding new page in smartform

Former Member
0 Kudos

Hi experts,

              I got one requirement regarding smart-form. In that we have to display material details in one page whenever we enter the material number  and new page will trigger for another material  means we enter two material numbers then first material will display in one page and if any data remaining then go to next page and print the data . and for second material will trigger new page and there the data should print . so can any body explain in detail.how to acheive this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

you have to put smartform in loop.

for e.g:

Loop it_material_table.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

      EXPORTING

        formname           =  form name

      IMPORTING

        fm_name            = ws_c_fm_name " FM created for form

      EXCEPTIONS

        no_form            = 1

        no_function_module = 2

        OTHERS             = 3.

  CALL FUNCTION ws_c_fm_name

        EXPORTING

        marterial_no = it_material_table-material_no

        IMPORTING

          document_output_info = wa_document_output_info_p

          job_output_info      = wa_tab_otf_data

          job_output_options   = wa_job_output_options_p

       EXCEPTIONS

          formatting_error     = 1

          internal_error       = 2

          send_error           = 3

          user_canceled        = 4

          OTHERS               = 5.

endloop.

(Note: You have to suppress print preview window.)

Regards,

Sandeep

Former Member
0 Kudos

Hi,

You can check this thread for reference:

http://scn.sap.com/thread/3507634

Best regards,

Gabor