Wednesday, September 11, 2013

Smartforms Printing Without Dialog Box

Smartforms printing without dialog box. This is the sample code :

DATAst_control_parameters    TYPE ssfctrlop.

st_control_parameters-no_dialog 'X'.

* Get Smartforms generated FM name
    PERFORM f_sf_get_fm_name.
    CALL FUNCTION d_fm_name
      EXPORTING
        control_parameters   = st_control_parameters
        output_options       st_output_options
      IMPORTING
        document_output_info st_document_output_info
        job_output_info      st_job_output_info
        job_output_options   st_job_output_options
        s_header             t_data
      TABLES
        t_spouse             t_itab
      EXCEPTIONS
        formatting_error     1
        internal_error       2
        send_error           3
        user_canceled        4
        OTHERS               5.

    CHECK sy-subrc EQ 0.

No comments:

Post a Comment