<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error when calling function module... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532654#M574438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First you should make sure the SSF function interface is correct in your program. The best way to achieve it is:&lt;/P&gt;&lt;P&gt;In the Form Builder go to Environment -&amp;gt; Name of the function module&lt;/P&gt;&lt;P&gt;Copy the name of function module&lt;/P&gt;&lt;P&gt;In your program use 'Insert pattern' with the function name you copied from the smartform&lt;/P&gt;&lt;P&gt;Replace function name copied from the form with the variable ld_function, which holds the function name returned by SSF_FUNCTION_MODULE_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that the variables you are passing to the function module are the same type as interface parameters defined in the smartform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2007 06:10:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-10T06:10:38Z</dc:date>
    <item>
      <title>Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532649#M574433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep on getting the same error when I try to call my form. The error&lt;/P&gt;&lt;P&gt;is: 'Incorrect parameter with CALL FUNCTION.' I checked all the variables &lt;/P&gt;&lt;P&gt;and the tables that I pass but it is all correct. I compared it with the other&lt;/P&gt;&lt;P&gt;program that has a very similar logic and also calls the same form. But why is&lt;/P&gt;&lt;P&gt;this one gets an error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the routine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
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 &amp;lt;&amp;gt; 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!
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 05:58:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532649#M574433</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2007-07-10T05:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532650#M574434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Sample Program Calling Smartforms &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTACA_DRIVER_SMARTFORM                  .

Tables : sflight.
Data : fm_name TYPE rs38l_fnam.

*data : Begin of it_flttab occurs 0,
*        carrid type sflight-carrid,
*        connid type sflight-connid,
*        fldate type sflight-fldate,
*        seatsmax type sflight-seatsmax,
*        seatsocc type sflight-seatsocc,
*        End of it_flttab.

data : it_flttab like table  of sflight.
Data : g_salary type i .
*       it_flttab type standard table of ty_flt.
g_salary = 1000.


select carrid connid fldate seatsmax seatsocc from sflight into
corresponding fields of table it_flttab.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname                 = 'ZTACA_SMFORM2'
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 IMPORTING
   FM_NAME                  = fm_name
 EXCEPTIONS
   NO_FORM                  = 1
   NO_FUNCTION_MODULE       = 2
   OTHERS                   = 3
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

call function fm_name
  Exporting
     salary = g_salary
  TABLES
     it_flttab = it_flttab
  EXCEPTIONS
    FORMATTING_ERROR           = 1
    INTERNAL_ERROR             = 2
    SEND_ERROR                 = 3
    USER_CANCELED              = 4
    OTHERS                     = 5           .

 IF SY-SUBRC &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
 ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:02:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532650#M574434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T06:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532651#M574435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Check the TYPE's for each paramter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Try commenting one paramter at a time and execute, The paramter after commenting which solves the error is the culprit then you just need to find out the problem with that paramter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:02:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532651#M574435</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-10T06:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532652#M574436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Vijay &lt;/P&gt;&lt;P&gt;Check it is most activated versioon of FM of Smartforms.&lt;/P&gt;&lt;P&gt;Otherwise Activate it again. Whcih will delete the log.&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532652#M574436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T06:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532653#M574437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;U should dynamically declare the function module name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532653#M574437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T06:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532654#M574438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First you should make sure the SSF function interface is correct in your program. The best way to achieve it is:&lt;/P&gt;&lt;P&gt;In the Form Builder go to Environment -&amp;gt; Name of the function module&lt;/P&gt;&lt;P&gt;Copy the name of function module&lt;/P&gt;&lt;P&gt;In your program use 'Insert pattern' with the function name you copied from the smartform&lt;/P&gt;&lt;P&gt;Replace function name copied from the form with the variable ld_function, which holds the function name returned by SSF_FUNCTION_MODULE_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that the variables you are passing to the function module are the same type as interface parameters defined in the smartform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532654#M574438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T06:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error when calling function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532655#M574439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your replies. The reason why it keeps getting an error is that&lt;/P&gt;&lt;P&gt;I declared a new variable in my smartforms and forgot to tick the 'OPTIONAL'&lt;/P&gt;&lt;P&gt;checkbox so when I call the form, it requires the variable which I forgot to pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you guys!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:18:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-calling-function-module/m-p/2532655#M574439</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2007-07-10T06:18:52Z</dc:date>
    </item>
  </channel>
</rss>

