<?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: Returning a table in a Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018804#M713580</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) You need to create a Table type with the same &amp;lt;Line type&amp;gt; in the data dictionary.&lt;/P&gt;&lt;P&gt;2) Specify the 2 fiels in the KEYS tab of the table type.&lt;/P&gt;&lt;P&gt;3) Then in the exporting parameter you can specify any &amp;lt;Tabname&amp;gt; Type &amp;lt;DDICTTYPE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Lokesh Aggarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Nov 2007 15:13:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-13T15:13:56Z</dc:date>
    <item>
      <title>Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018801#M713577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to return a table from a function module.&lt;/P&gt;&lt;P&gt;The table has two columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please guide me how can I achieve this. &lt;/P&gt;&lt;P&gt;Actually I am not able to fill in the export tab in the function module screen.&lt;/P&gt;&lt;P&gt;What should be &lt;/P&gt;&lt;P&gt;Parameter name&lt;/P&gt;&lt;P&gt;Type spec&lt;/P&gt;&lt;P&gt;&amp;amp; Associated type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 14:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018801#M713577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T14:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018802#M713578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;which function module it is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 14:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018802#M713578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T14:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018803#M713579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its a custom function module am trying to create.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 14:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018803#M713579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T14:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018804#M713580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) You need to create a Table type with the same &amp;lt;Line type&amp;gt; in the data dictionary.&lt;/P&gt;&lt;P&gt;2) Specify the 2 fiels in the KEYS tab of the table type.&lt;/P&gt;&lt;P&gt;3) Then in the exporting parameter you can specify any &amp;lt;Tabname&amp;gt; Type &amp;lt;DDICTTYPE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Lokesh Aggarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 15:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018804#M713580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T15:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018805#M713581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is just example try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import parameter : I_KUNNR type KUNNR - Customer Number&lt;/P&gt;&lt;P&gt;Table Parameter: T_DATA like KNA1 - Customer table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from kna1 into table t_data where kunnr = i_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 15:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018805#M713581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018806#M713582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It is not compulsory to fill &lt;/P&gt;&lt;P&gt;Parameter name,&lt;/P&gt;&lt;P&gt;Type,&lt;/P&gt;&lt;P&gt;Associated type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leave it blank ..with in tables tab just specify table name like 'itab'...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sudhakar G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 15:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018806#M713582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T15:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018807#M713583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. You need to crate a table type for your internal table if you want to assign it in export parameter.&lt;/P&gt;&lt;P&gt;To create a table type:&lt;/P&gt;&lt;P&gt;go to Se11..select the data type.. give your table type name.. press create&lt;/P&gt;&lt;P&gt;Select table type in the next popup..assign your type into Line type.&lt;/P&gt;&lt;P&gt;save and activate...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. now in FM, in your exporting parameter just mainting&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ITAB         TYPE            YOUR_TABLE_TYPE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 15:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018807#M713583</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-13T15:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018808#M713584</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;If you want to return multiple rows to calling program, you should use Table Parameter .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create custom structure using SE11 transaction and use the same in Function module to declare table parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. If you want to return KUNNR and NAME1 fields to calling application. Create structure ZKUNNR with the above fields. declare table parameter as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T_CUST	LIKE	ZKUNNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in source code you can append record in the table parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kunnr name from kna1 into table t_cust.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it will give you better idea about table parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 15:24:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018808#M713584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T15:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018809#M713585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind responses, I did as suggested(Created a table in se11).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the source code when I am trying to insert records to it I am getting an error like &amp;lt;b&amp;gt;ITAB is not an internal table - the "Occurs n" specification is missing?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly advise how can I proceed from here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 16:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018809#M713585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-13T16:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Returning a table in a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018810#M713586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOu need to create a explicit work area for that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data: wa_itab type your_type.

loop at itab into wa_itab.
* access wa_itab for your changes...
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2007 16:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/returning-a-table-in-a-function-module/m-p/3018810#M713586</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-13T16:34:45Z</dc:date>
    </item>
  </channel>
</rss>

