<?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 Runtime Declaration of Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347458#M802765</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;I need to create an internal table at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a selection screen parameter which is specific to country, Which can take values below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:- IT_AREA  for Italy(IT)&lt;/P&gt;&lt;P&gt;      FR_AREA for France(FR)&lt;/P&gt;&lt;P&gt;      IE_AREA  for Ireland(IE).....And similary for other countries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the Above parameter, I need to create Internal Table as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  itab TYPE italy_data Occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I declare as above, Then itab has fields from italy_data. And this internal table i will be sending it to Function Module to get data into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Requirement is to Create the Internal table itab during runtime for tables italy_data OR france_data OR ireland_data based on selection screen parameter. Tables on Country may have different number of fields in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me on this??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2008 12:36:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-04T12:36:47Z</dc:date>
    <item>
      <title>Runtime Declaration of Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347458#M802765</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;I need to create an internal table at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a selection screen parameter which is specific to country, Which can take values below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:- IT_AREA  for Italy(IT)&lt;/P&gt;&lt;P&gt;      FR_AREA for France(FR)&lt;/P&gt;&lt;P&gt;      IE_AREA  for Ireland(IE).....And similary for other countries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the Above parameter, I need to create Internal Table as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  itab TYPE italy_data Occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I declare as above, Then itab has fields from italy_data. And this internal table i will be sending it to Function Module to get data into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Requirement is to Create the Internal table itab during runtime for tables italy_data OR france_data OR ireland_data based on selection screen parameter. Tables on Country may have different number of fields in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me on this??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 12:36:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347458#M802765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T12:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Declaration of Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347459#M802766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this webblog of Dynamic Internal Table&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 12:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347459#M802766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T12:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Declaration of Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347460#M802767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  tabname      type string,
  it                 TYPE REF TO data,
  wa                 TYPE REF TO data.

FIELD-SYMBOLS:
  &amp;lt;it&amp;gt;               TYPE STANDARD TABLE,
  &amp;lt;p&amp;gt;                TYPE ANY.

case s_ctry-low.

  when 'IT_AREA '.
    tabname = 'italy_data'.

* other possibilities here
  
endcase.

  CREATE DATA it TYPE TABLE OF (tabname).
  ASSIGN it-&amp;gt;* TO &amp;lt;it&amp;gt;.

select *
into table &amp;lt;it&amp;gt;
from (tabname).


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rainer Hübenthal on Feb 4, 2008 1:47 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 12:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-declaration-of-internal-table/m-p/3347460#M802767</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-02-04T12:47:01Z</dc:date>
    </item>
  </channel>
</rss>

