Skip to Content
0
Jul 10, 2007 at 05:58 AM

Error when calling function module...

1425 Views

Hello Experts,

I keep on getting the same error when I try to call my form. The error

is: 'Incorrect parameter with CALL FUNCTION.' I checked all the variables

and the tables that I pass but it is all correct. I compared it with the other

program that has a very similar logic and also calls the same form. But why is

this one gets an error?

Below is the routine:

PERFORM call_smartform.

FORM call_smartform.
  DATA: lv_control TYPE ssfctrlop,
        lv_options TYPE ssfcompop,
        ld_function TYPE rs38l_fnam.

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = 'ZFI_UL_INV'
    IMPORTING
      fm_name            = ld_function
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  CALL FUNCTION ld_function
    EXPORTING
      control_parameters = lv_control
      output_options     = lv_options
      s_belnr            = s_belnr-low
      l_name1            = l_name1
      l_name2            = l_name2
      l_ort01            = l_ort01
      l_pstlz            = l_pstlz
      l_stras            = l_stras
      l_kunnr            = l_kunnr
      l_mwsts            = l_mwsts
      l_fipos            = l_fipos
      l_txbhw            = l_txbhw
      l_total            = l_total
      l_zterm            = l_zterm
      l_augdt            = l_augdt
      l_augcp            = l_augcp
      l_hzuon            = l_hzuon
      l_vertn            = l_vertn
      l_altkt            = l_altkt
    TABLES
      i_bseg             = i_bseg2
    EXCEPTIONS
      formatting_error   = 1
      internal_error     = 2
      send_error         = 3
      user_canceled      = 4
      OTHERS             = 5.
  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.                    "call_smartform
Hope you can help me guys. Thank you and take care!