<?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: Generic function module call; Tables parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782773#M1952886</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;If you just read the documentation, you will have the answer -&amp;gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.sap.com/abapdocu_702/en/?url=ABAPCALL_FUNCTION_DYNAMIC.htm"&gt;http://help.sap.com/abapdocu_702/en/?url=ABAPCALL_FUNCTION_DYNAMIC.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I understand your point. But it has been discussed many times in the forum :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, see the answer of Tomas Buryanek about the required CREATE DATA before doing the CALL FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the CALL FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then analyze the returned value of the internal table&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;itab&amp;gt; TYPE standard table.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;line&amp;gt; TYPE any.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;field&amp;gt; TYPE any.&lt;/P&gt;&lt;P&gt;ASSIGN ref-&amp;gt;* TO &amp;lt;ITAB&amp;gt;.&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;itab&amp;gt; ASSIGNING &amp;lt;line&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 1 OF STRUCTURE &amp;lt;line&amp;gt; TO &amp;lt;field&amp;gt;. " assuming line is a structure&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jun 2016 07:53:59 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2016-06-24T07:53:59Z</dc:date>
    <item>
      <title>Generic function module call; Tables parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782771#M1952884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to run a generic function module call&lt;/P&gt;&lt;P&gt;like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Call of function module&amp;nbsp; **************************&lt;/P&gt;&lt;P&gt;&amp;nbsp; TRY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FUNCTION gv_function_module&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETER-TABLE lt_parms[]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTION-TABLE lt_exception[].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CATCH cx_sy_dyn_call_illegal_func.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CATCH cx_sy_dyn_call_error.&lt;/P&gt;&lt;P&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDTRY.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; It works fine for importing and exporting parameters but I don't know how to read the &lt;/P&gt;&lt;P&gt;&amp;nbsp; tables returned by the function module.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks a lot for your help !&lt;/P&gt;&lt;P&gt;&amp;nbsp; Volker&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Example: If you see the signature of FM BAPI_MESSAGE_GETDETAIL below I can fill all importing parameters, &lt;/P&gt;&lt;P&gt;&amp;nbsp; getting back the exporting parameters but how to get the tables parameters ?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; FUNCTION BAPI_MESSAGE_GETDETAIL.&lt;/P&gt;&lt;P&gt;*"----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;*"*"Lokale Schnittstelle:&lt;/P&gt;&lt;P&gt;*"&amp;nbsp; IMPORTING&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(ID) LIKE&amp;nbsp; BAPIRET2-ID&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(NUMBER) LIKE&amp;nbsp; BAPIRET2-NUMBER&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(LANGUAGE) LIKE&amp;nbsp; BAPITGA-LANGU DEFAULT SY-LANGU&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(TEXTFORMAT) LIKE&amp;nbsp; BAPITGA-TEXTFORMAT&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(LINKPATTERN) LIKE&amp;nbsp; BAPITGA-LINKMASK OPTIONAL&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(MESSAGE_V1) LIKE&amp;nbsp; BAPIRET2-MESSAGE_V1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(MESSAGE_V2) LIKE&amp;nbsp; BAPIRET2-MESSAGE_V2 OPTIONAL&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(MESSAGE_V3) LIKE&amp;nbsp; BAPIRET2-MESSAGE_V3 OPTIONAL&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(MESSAGE_V4) LIKE&amp;nbsp; BAPIRET2-MESSAGE_V4 OPTIONAL&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(LANGUAGE_ISO) TYPE&amp;nbsp; BAPI_STAND-LANGU_ISO OPTIONAL&lt;/P&gt;&lt;P&gt;*"&amp;nbsp; EXPORTING&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(MESSAGE) LIKE&amp;nbsp; BAPIRET2-MESSAGE&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(RETURN) LIKE&amp;nbsp; BAPIRET2 STRUCTURE&amp;nbsp; BAPIRET2&lt;/P&gt;&lt;P&gt;*"&amp;nbsp; TABLES&lt;/P&gt;&lt;P&gt;*"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEXT STRUCTURE&amp;nbsp; BAPITGB OPTIONAL&lt;/P&gt;&lt;P&gt;*"----------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 06:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782771#M1952884</guid>
      <dc:creator>VolkerProebius</dc:creator>
      <dc:date>2016-06-24T06:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generic function module call; Tables parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782772#M1952885</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 ABAP editor, there's an option 'Pattern'. Use that to call any FM/BAPI. Click on 'pattern' and enter FM. Un-comment required parameters under import/export/tables.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/982478" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 06:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782772#M1952885</guid>
      <dc:creator>pranay570708</dc:creator>
      <dc:date>2016-06-24T06:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Generic function module call; Tables parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782773#M1952886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;If you just read the documentation, you will have the answer -&amp;gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.sap.com/abapdocu_702/en/?url=ABAPCALL_FUNCTION_DYNAMIC.htm"&gt;http://help.sap.com/abapdocu_702/en/?url=ABAPCALL_FUNCTION_DYNAMIC.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I understand your point. But it has been discussed many times in the forum :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, see the answer of Tomas Buryanek about the required CREATE DATA before doing the CALL FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the CALL FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then analyze the returned value of the internal table&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;itab&amp;gt; TYPE standard table.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;line&amp;gt; TYPE any.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;field&amp;gt; TYPE any.&lt;/P&gt;&lt;P&gt;ASSIGN ref-&amp;gt;* TO &amp;lt;ITAB&amp;gt;.&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;itab&amp;gt; ASSIGNING &amp;lt;line&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 1 OF STRUCTURE &amp;lt;line&amp;gt; TO &amp;lt;field&amp;gt;. " assuming line is a structure&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 07:53:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782773#M1952886</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-06-24T07:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generic function module call; Tables parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782774#M1952887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABLES parameter works as both importing and exporting parameter.&lt;/P&gt;&lt;P&gt;So you need to prepare an entry in PARAMETER-TABLE for it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;DATA mara TYPE mara_tt.&lt;/P&gt;
&lt;P&gt;DATA: lt_par_tab TYPE abap_func_parmbind_tab,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_par_tab LIKE LINE OF lt_par_tab,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lref_mara TYPE REF TO data.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;CREATE DATA lref_mara LIKE mara.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ls_par_tab-name = 'MARA'.&lt;/P&gt;
&lt;P&gt;ls_par_tab-kind = abap_func_tables. " = &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;'30'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;* ls_par_tab-value = lref_mara.&lt;/P&gt;
&lt;P&gt;* EDIT: better this way, without lref_mara:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="L0S52"&gt;GET &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REFERENCE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;mara &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;ls_par_tab&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;value&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;INSERT ls_par_tab INTO TABLE lt_par_tab.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;CALL FUNCTION 'ZTEST_TABLE_RETURN'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; PARAMETER-TABLE lt_par_tab.&lt;/P&gt;
&lt;P&gt;"Interface:&lt;/P&gt;
&lt;P&gt;* TABLES&lt;/P&gt;
&lt;P&gt;*&amp;nbsp;&amp;nbsp; MARA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = MARA.&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 07:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generic-function-module-call-tables-parameters/m-p/11782774#M1952887</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2016-06-24T07:57:20Z</dc:date>
    </item>
  </channel>
</rss>

