<?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: Read from a internal table whose name is decided in runtime in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960131#M1156381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use field symbols.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;FS&amp;gt; TYPE ANY table.&lt;/P&gt;&lt;P&gt;loop at (tab-name) assigning &amp;lt;FS&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kartik tarla on Dec 10, 2008 6:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Dec 2008 12:51:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-10T12:51:29Z</dc:date>
    <item>
      <title>Read from a internal table whose name is decided in runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960130#M1156380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ABAPers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've an internal table's name in a variable, the name is populated in runtime (user_command-&amp;gt;ls_selfield-tabname). Now that using the name (in the variable) i need to read a row from that particular internal table (which is populated into the variable). How can i do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabumanoharan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 12:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960130#M1156380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-10T12:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Read from a internal table whose name is decided in runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960131#M1156381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use field symbols.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;FS&amp;gt; TYPE ANY table.&lt;/P&gt;&lt;P&gt;loop at (tab-name) assigning &amp;lt;FS&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kartik tarla on Dec 10, 2008 6:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 12:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960131#M1156381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-10T12:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read from a internal table whose name is decided in runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960132#M1156382</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;Use below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: tabname(40) TYPE c.

WRITE ls_selfield-tabname TO tabname.


FIELD-SYMBOLS: &amp;lt;fs&amp;gt; TYPE table, 
               &amp;lt;fs_wa&amp;gt;.

ASSIGN (tabname) TO &amp;lt;fs&amp;gt;.
READ TABLE &amp;lt;fs&amp;gt; ASSIGNING &amp;lt;fs_wa&amp;gt; INDEX 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 12:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960132#M1156382</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2008-12-10T12:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read from a internal table whose name is decided in runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960133#M1156383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi see the coding and do the changes accordingly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 

report ztests .

DATA:
  o_ref TYPE REF TO data.
FIELD-SYMBOLS:
  &amp;lt;lt_table&amp;gt; TYPE STANDARD TABLE,
  &amp;lt;fs&amp;gt;       TYPE ANY,
  &amp;lt;field&amp;gt;    TYPE ANY,
  &amp;lt;field1&amp;gt;   TYPE ANY.
PARAMETERS:
  p_tab       TYPE tabname default 'MARA', " Table name (eg: MARA)
  p_field(20) TYPE c default 'MATNR'.      " Field name (eg: MATNR)
 
START-OF-SELECTION.
  CREATE DATA o_ref TYPE TABLE OF (p_tab).
 
  ASSIGN p_field TO &amp;lt;field1&amp;gt;.
  ASSIGN o_ref-&amp;gt;* TO &amp;lt;lt_table&amp;gt;.
 
  SELECT *
    INTO TABLE &amp;lt;lt_table&amp;gt;
    FROM (p_tab).
 
  LOOP AT &amp;lt;lt_table&amp;gt; ASSIGNING &amp;lt;fs&amp;gt;.
    ASSIGN COMPONENT &amp;lt;field1&amp;gt; OF STRUCTURE &amp;lt;fs&amp;gt;
                  TO &amp;lt;field&amp;gt;.
    IF sy-subrc = 0.
      WRITE:/ &amp;lt;field&amp;gt;.
    ENDIF.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 12:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960133#M1156383</guid>
      <dc:creator>former_member203501</dc:creator>
      <dc:date>2008-12-10T12:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Read from a internal table whose name is decided in runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960134#M1156384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;closing the thread&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 07:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-from-a-internal-table-whose-name-is-decided-in-runtime/m-p/4960134#M1156384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T07:26:54Z</dc:date>
    </item>
  </channel>
</rss>

