<?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: hash table and function module input in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118149#M1510705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Typing of such parameter should be either &lt;EM&gt;generic&lt;/EM&gt; (i.e ANY TABLE) or &lt;EM&gt;fully specified&lt;/EM&gt; (HASHED/SORTED/STANDARD TABLE). In both cases when you pass i.e. HASHED table to that formal parameter the dynamic type will be inherited by the actual paremeter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that inside the function module you will not be able to use HASHED table "banned" statement i.e. not appending to this table. The system must be fully convinced about the type of passed parameter to allow certain access. Without that knowledge it won't pass you through the syntax checker or will trigger runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"1) parameter is typed
CHANGING
   C_TAB type ANY TABLE


"here you can't use STANDARD/SORTED table specific statements as the dynamic type of param might be HASHED TABLE
append ... to c_tab.  "error during runtime

"2) parameter is typed
CHANGING
   C_TAB type HASHED TABLE

"here system explicitly knows that dynamic type is the same as static one so you can append to this table too
append ... to c_tab.  "syntax error before runtime
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So the anwser to your question &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so insite the function module is this table still hashtable type or just normal internal table ?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;is... &lt;/P&gt;&lt;P&gt;During syntax check system takes static type of table and shouts if table related operation is not allowed for this kind.&lt;/P&gt;&lt;P&gt;During runtime system takes dynamic type of the table and checks whether particular statement is allowed for this kind of table, if not triggers an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jul 2010 08:24:22 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2010-07-30T08:24:22Z</dc:date>
    <item>
      <title>hash table and function module input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118147#M1510703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAP Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise what happening if i am passing the intertal table (hashtable) become input of function module (table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so insite the function module is this table still hashtable type or just normal internal table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 07:46:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118147#M1510703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-30T07:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: hash table and function module input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118148#M1510704</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;I presume the internal table remains the same as what you declare in the IMPORT/EXPORT/TABLES - Associated Type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 07:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118148#M1510704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-30T07:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: hash table and function module input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118149#M1510705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Typing of such parameter should be either &lt;EM&gt;generic&lt;/EM&gt; (i.e ANY TABLE) or &lt;EM&gt;fully specified&lt;/EM&gt; (HASHED/SORTED/STANDARD TABLE). In both cases when you pass i.e. HASHED table to that formal parameter the dynamic type will be inherited by the actual paremeter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that inside the function module you will not be able to use HASHED table "banned" statement i.e. not appending to this table. The system must be fully convinced about the type of passed parameter to allow certain access. Without that knowledge it won't pass you through the syntax checker or will trigger runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"1) parameter is typed
CHANGING
   C_TAB type ANY TABLE


"here you can't use STANDARD/SORTED table specific statements as the dynamic type of param might be HASHED TABLE
append ... to c_tab.  "error during runtime

"2) parameter is typed
CHANGING
   C_TAB type HASHED TABLE

"here system explicitly knows that dynamic type is the same as static one so you can append to this table too
append ... to c_tab.  "syntax error before runtime
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So the anwser to your question &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so insite the function module is this table still hashtable type or just normal internal table ?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;is... &lt;/P&gt;&lt;P&gt;During syntax check system takes static type of table and shouts if table related operation is not allowed for this kind.&lt;/P&gt;&lt;P&gt;During runtime system takes dynamic type of the table and checks whether particular statement is allowed for this kind of table, if not triggers an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 08:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118149#M1510705</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-07-30T08:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: hash table and function module input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118150#M1510706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernand Lesmana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                IT table are of 4 types  1.standard table  2. hashed table 3. sorted table 4. index table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      so, In ur program if u r passing hased table to FM then in the FM it should be hashed table otherwise u will get runtine error as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL_FUNCTION_CONFLICT_TAB_TYP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        i.e, if the FM import parameter is of type standard table then u will get the type conflict error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help u.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 08:30:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-and-function-module-input/m-p/7118150#M1510706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-30T08:30:19Z</dc:date>
    </item>
  </channel>
</rss>

