<?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: Dynamic internal table in Function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597915#M1568004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;I assume u will pass the table name to your FM and it will retun a table filled with data from the table name passed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, here is the code for that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 1 importing parameter "TAB_NAME" of type "DD02L-TABNAME" in your FM.&lt;/P&gt;&lt;P&gt;Create 1 exporting parameter "TAB_DATA" of type "ANY TABLE" in your FM.&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;data it_general type ref to data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;it_general_tab&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create data it_general type table of (tab_name).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign it_general-&amp;gt;* to &amp;lt;it_general_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (tab_name)&lt;/P&gt;&lt;P&gt;into table &amp;lt;it_general_tab&amp;gt;&lt;/P&gt;&lt;P&gt;up to 10 rows. " you can set your own selection ceiteria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab_data = &amp;lt;it_general_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This FM cannot be tested from SE37 due to dynamic parameter. To test it, you need to call it in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vishal Kapoor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vishal kapoor on Jan 18, 2011 10:26 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jan 2011 04:55:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-01-18T04:55:18Z</dc:date>
    <item>
      <title>Dynamic internal table in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597912#M1568001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guru's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I need to write a normal function module to read different tables data and pass back to the calling program.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  My problems are: &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;How to define dynamic internal tables as parameters?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  What is the best way to either Export or Table parameters? If yes could you suggest how to define.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  After the definition. I have the internal tables with records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I &lt;STRONG&gt;need to fill the result tables back to dynamically defined internal tables in parameters? How should i do?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If anybody have any &lt;STRONG&gt;code examples.&lt;/STRONG&gt; could you please post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;that would really helpful to me.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 08:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597912#M1568001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-12T08:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597913#M1568002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 08:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597913#M1568002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-12T08:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597914#M1568003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 03:05:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597914#M1568003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-18T03:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic internal table in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597915#M1568004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;I assume u will pass the table name to your FM and it will retun a table filled with data from the table name passed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, here is the code for that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create 1 importing parameter "TAB_NAME" of type "DD02L-TABNAME" in your FM.&lt;/P&gt;&lt;P&gt;Create 1 exporting parameter "TAB_DATA" of type "ANY TABLE" in your FM.&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;data it_general type ref to data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;it_general_tab&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create data it_general type table of (tab_name).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign it_general-&amp;gt;* to &amp;lt;it_general_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (tab_name)&lt;/P&gt;&lt;P&gt;into table &amp;lt;it_general_tab&amp;gt;&lt;/P&gt;&lt;P&gt;up to 10 rows. " you can set your own selection ceiteria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab_data = &amp;lt;it_general_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This FM cannot be tested from SE37 due to dynamic parameter. To test it, you need to call it in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vishal Kapoor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vishal kapoor on Jan 18, 2011 10:26 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 04:55:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-in-function-module/m-p/7597915#M1568004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-18T04:55:18Z</dc:date>
    </item>
  </channel>
</rss>

