Smart Form FM


Smart Form FM


Function module to call the smart form

  DATA:l_s_outopt TYPE ssfcompop,
         l_s_cont        TYPE ssfctrlop.

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING
            formname           = 'ZPAYMENT_FORM2'
       IMPORTING
            fm_name            = g_f_fmname2
       EXCEPTIONS
            no_form                    = 1
            no_function_module = 2
            OTHERS                   = 3.

  IF sy-subrc <> 0.
  ENDIF.

*Output Print  settings for smartforms
  l_s_outopt-tddest         = 'LOCL'.
  l_s_outopt-tdnoprev     = c_x.
  l_s_outopt-tdnewid       = c_x.
  l_s_outopt-tddelete      = space."Delete after print
*  l_s_outopt-tdlifetime   = '1'.

  l_s_cont-no_dialog = c_x.

  CALL FUNCTION G_F_FMNAME2
       EXPORTING
            control_parameters = l_s_cont
            output_options     = l_s_outopt
            user_settings       = space
       TABLES
            g_t_item             = g_t_item_vendor
            g_t_header         = g_t_header_vendor
       EXCEPTIONS
            formatting_error   = 1
            internal_error       = 2
            send_error           = 3
            user_canceled     = 4
            OTHERS             = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
  ENDIF.

No comments:

Post a Comment

/*Newer Post*/ Older Post Home