<?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 declaration. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010119#M1166282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are several examples how you can process the dynamic table afterwords.&lt;/P&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;&lt;P&gt;now you have a line of the internal table &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_dyn_table&amp;gt; LIKE LINE OF dyn_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this can be used for any field &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_component&amp;gt; TYPE ANY.&lt;/P&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;&lt;P&gt;example read &lt;/P&gt;&lt;P&gt;READ TABLE dyn_table ASSIGNING &amp;lt;fs_dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;INDEX 1.&lt;/P&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;&lt;P&gt;example loop &lt;/P&gt;&lt;P&gt;LOOP AT dyn_table ASSIGNING &amp;lt;fs_dyn_table&amp;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;place your coding here &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once you have a line you can display its elements &lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF&lt;/P&gt;&lt;P&gt;STRUCTURE &amp;lt;fs_dyn_table&amp;gt; TO &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;WRITE / &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to display by name &lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'COMPONENT_NAME' OF STRUCTURE &amp;lt;fs_dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;TO &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;WRITE: / 'Specific component ' , &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jan 2009 06:03:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-12T06:03:32Z</dc:date>
    <item>
      <title>Dynamic Internal Table declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010117#M1166280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Table Name on the selection screen. Inside program I would like to create the Internal table based on the users input example if user gives MARA then internally Internal should be declared of MARA type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we achieve this ?  Please reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 05:54:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010117#M1166280</guid>
      <dc:creator>former_member190178</dc:creator>
      <dc:date>2009-01-12T05:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010118#M1166281</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 hope the below link will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Khushboo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 05:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010118#M1166281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T05:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010119#M1166282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are several examples how you can process the dynamic table afterwords.&lt;/P&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;&lt;P&gt;now you have a line of the internal table &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_dyn_table&amp;gt; LIKE LINE OF dyn_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this can be used for any field &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_component&amp;gt; TYPE ANY.&lt;/P&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;&lt;P&gt;example read &lt;/P&gt;&lt;P&gt;READ TABLE dyn_table ASSIGNING &amp;lt;fs_dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;INDEX 1.&lt;/P&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;&lt;P&gt;example loop &lt;/P&gt;&lt;P&gt;LOOP AT dyn_table ASSIGNING &amp;lt;fs_dyn_table&amp;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;place your coding here &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once you have a line you can display its elements &lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF&lt;/P&gt;&lt;P&gt;STRUCTURE &amp;lt;fs_dyn_table&amp;gt; TO &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;WRITE / &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to display by name &lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'COMPONENT_NAME' OF STRUCTURE &amp;lt;fs_dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;TO &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;WRITE: / 'Specific component ' , &amp;lt;fs_component&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 06:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010119#M1166282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T06:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010120#M1166283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I advise against using method cl_alv_table_create=&amp;gt;create_dynamic_table. Instead I recommend to use either RTTI or data objects (if available in your SAP release) to create these runtime objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: ldo_data   TYPE REF TO data,
          ld_tabnam TYPE tabname.

FIELD-SYMBOLS:
  &amp;lt;lt_itab&amp;gt;    TYPE TABLE.


ld_tabnam = 'MARA'.
CREATE DATA ldo_data TYPE STANDARD TABLE OF ( ld_tabnam ).
ASSIGN ldo_data-&amp;gt;* TO &amp;lt;lt_itab&amp;gt;.

SELECT * FROM (ld_tabnam) INTO TABLE &amp;lt;lt_itab&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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>Mon, 12 Jan 2009 06:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010120#M1166283</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-01-12T06:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Internal Table declaration.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010121#M1166284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soniya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    There are many threads regarding dynamic internal table, please search SCN before you post a question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    for dynamic internal table refer to the link below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab030.htm" target="test_blank"&gt;http://www.sap-img.com/ab030.htm&lt;/A&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;&lt;/P&gt;&lt;P&gt;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 06:52:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-internal-table-declaration/m-p/5010121#M1166284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T06:52:15Z</dc:date>
    </item>
  </channel>
</rss>

