<?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: getting error in the function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292281#M1634855</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;Actually, I wouldn't recommend the use of that tables parameter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From sap help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table parameters are &lt;STRONG&gt;obsolete&lt;/STRONG&gt; CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES &lt;U&gt;can be replaced by formal parameters defined with CHANGING&lt;/U&gt;. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement. &lt;/P&gt;&lt;P&gt;Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i definitely would go with either importing or changing parameter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 18:12:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-11T18:12:58Z</dc:date>
    <item>
      <title>getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292278#M1634852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created one function module in se37 and i am calling that function module in the se38 report, when i am executing the report it is throwing me an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here in my report i am having the select option fields ex matnr, in the function module importing i have given the parameter matnr over there and when i am running the report it is through an error that  &lt;/P&gt;&lt;P&gt;"The function module interface allows you to specify only  &lt;/P&gt;&lt;P&gt;fields of a particular type under "MATNR".                &lt;/P&gt;&lt;P&gt;The field "S_MATNR" specified here is a different         &lt;/P&gt;&lt;P&gt;field type                                                "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF i am giving the parameter instead of select-options in the report and executing, then the function module is getting triggered and receiving the data what ever the code is available in the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone help me out in this issue so that i can get the data while using the select-option instead of parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 17:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292278#M1634852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T17:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292279#M1634853</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;Here is one way to proceed:&lt;/P&gt;&lt;P&gt;1) You have to change the parameter of your FM to match the type of a range table (on matnr)&lt;/P&gt;&lt;P&gt;2) use a internal table of the same type in your calling program, that you fill from your SO before passing it to the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: lt_matnr TYPE /limeb/r_matnr, 
      g_matnr TYPE matnr.
SELECT-OPTIONS: so_matnr FOR g_matnr.

lt_matnr[] = so_matnr[].
CALL FUNCTION 'ZGET_MATNR'
  EXPORTING
    s_matnr = lt_matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the parameter (from FM) s_matnr beeing defined with the same type as internal table lt_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 17:48:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292279#M1634853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T17:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292280#M1634854</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;In your SE38 report, you are taking MATNR as select option. Select option is nothing but a table with four parameter (SIGN OPTION LOW and HIGH).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in your SE37 FM you are taking MATNR as PARAMETER. That's why this parameter mismatch error is coming. What you can do, instead of importing parameter use table parameter and type of the structure is /CWM/R_MATNR. (Also you can use importing or exporting parameter then you have to create one table TYpes for the structure /CWM/R_MATNR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: When you pass the select option then use [] sign. As select option is a internal table with header line. (like S_MATNT[])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 18:02:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292280#M1634854</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2011-10-11T18:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292281#M1634855</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;Actually, I wouldn't recommend the use of that tables parameter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From sap help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table parameters are &lt;STRONG&gt;obsolete&lt;/STRONG&gt; CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES &lt;U&gt;can be replaced by formal parameters defined with CHANGING&lt;/U&gt;. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement. &lt;/P&gt;&lt;P&gt;Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i definitely would go with either importing or changing parameter...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 18:12:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292281#M1634855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T18:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292282#M1634856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know tables parameters is a obsolete statement. That's why given the export import option also &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Also you can use importing or exporting parameter then you have to create one table TYpes for the structure /CWM/R_MATNR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 18:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292282#M1634856</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2011-10-11T18:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292283#M1634857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Subhankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you mean to say that instead of using the matnr in the parameter, i have to declare the variable in matnr in the tables and the associated type as /CWM/R_MATNR, and mjahr /CWM/R_MJAHR... etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;hyder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 19:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292283#M1634857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T19:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: getting error in the function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292284#M1634858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks got the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 19:27:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-in-the-function-module/m-p/8292284#M1634858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-12T19:27:11Z</dc:date>
    </item>
  </channel>
</rss>

