<?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: creating an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096339#M979557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hyma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to have a look at my Wiki posting&lt;/P&gt;&lt;P&gt;[Creating Flat and Complex Internal Tables Dynamically using RTTI|https://wiki.sdn.sap.com/wiki/display/Snippets/Creating&lt;EM&gt;Flat&lt;/EM&gt;and&lt;EM&gt;Complex&lt;/EM&gt;Internal&lt;EM&gt;Tables&lt;/EM&gt;Dynamically&lt;EM&gt;using&lt;/EM&gt;RTTI]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2008 10:40:51 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-07-09T10:40:51Z</dc:date>
    <item>
      <title>creating an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096338#M979556</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;Is there any method which can create an internal table with the given name and type?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want an internal table to be created dynamically with the name "itab_1" and type "typ_itab".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i cant declare the internal table statically because the name of the internal table is dynamic&lt;/P&gt;&lt;P&gt;it ca be itab_1 or itab_2 or... itab_n.&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;hyma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 10:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096338#M979556</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2008-07-09T10:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: creating an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096339#M979557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hyma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to have a look at my Wiki posting&lt;/P&gt;&lt;P&gt;[Creating Flat and Complex Internal Tables Dynamically using RTTI|https://wiki.sdn.sap.com/wiki/display/Snippets/Creating&lt;EM&gt;Flat&lt;/EM&gt;and&lt;EM&gt;Complex&lt;/EM&gt;Internal&lt;EM&gt;Tables&lt;/EM&gt;Dynamically&lt;EM&gt;using&lt;/EM&gt;RTTI]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 10:40:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096339#M979557</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-07-09T10:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: creating an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096340#M979558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this dynamic "select into" by creating your internal table&lt;/P&gt;&lt;P&gt;and work area dynamically so you don't have to know the table and&lt;/P&gt;&lt;P&gt;structure ahead of time as it is all create at run time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) get the field catalog for you table (REUSE_ALV_FIELDCATALOG_MERGE -&lt;/P&gt;&lt;P&gt;this only works for DDIC tables not internal tables defined in your&lt;/P&gt;&lt;P&gt;code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) create the internal table and work area&lt;/P&gt;&lt;P&gt;data: gv_tfcat type lvc_t_fcat.&lt;/P&gt;&lt;P&gt;data: gv_tabl type ref to data.&lt;/P&gt;&lt;P&gt;data: gv_line type ref to data.&lt;/P&gt;&lt;P&gt;Data: tabnam type table_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols:&lt;/P&gt;&lt;P&gt;&amp;lt;gf_tab&amp;gt; type any table,&lt;/P&gt;&lt;P&gt;&amp;lt;gf_wa&amp;gt;,&lt;/P&gt;&lt;P&gt;&amp;lt;gf_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic internal table and assign to FS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;it_fieldcatalog = gv_tfcat&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;ep_table = gv_tabl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign gv_tabl-&amp;gt;* to &amp;lt;gf_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic work area and assign to FS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;create data gv_line like line of &amp;lt;gf_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;assign gv_line-&amp;gt;* to &amp;lt;gf_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) perform your selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from (tabnam)&lt;/P&gt;&lt;P&gt;into corresponding fields of table &amp;lt;gf_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) when you wish to use the table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at &amp;lt;gf_tab&amp;gt; into &amp;lt;gf_wa&amp;gt;.&lt;/P&gt;&lt;P&gt;do.&lt;/P&gt;&lt;P&gt;assign component sy-index&lt;/P&gt;&lt;P&gt;of structure &amp;lt;gf_wa&amp;gt; to &amp;lt;gf_fld&amp;gt;.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;............. your additional code here ................... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Its not my own code..... anyway i feel it clear's ur doubt..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 12:01:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096340#M979558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T12:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: creating an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096341#M979559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm glad you pointed out it's not your own code.  It would have been polite to post the link though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/groups/technical-functional/sap-dev/dynamic-internal-table-name-in-select-statement-1521770" target="test_blank"&gt;http://sap.ittoolbox.com/groups/technical-functional/sap-dev/dynamic-internal-table-name-in-select-statement-1521770&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 12:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-an-internal-table/m-p/4096341#M979559</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-07-09T12:14:07Z</dc:date>
    </item>
  </channel>
</rss>

