<?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 Read table, table name in variable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188345#M1001158</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;I am try trying to do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select statement to get the table name --&amp;gt; store in tname (variable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I have to do a select to read the data in this table (table name is in tname variable) based on some conditions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1st step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Select ME_TECH from RSAC into &lt;STRONG&gt;tname&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        where NAME = 'PLANT'&lt;/P&gt;&lt;P&gt;              and DATEFROM &amp;lt;= ldate&lt;/P&gt;&lt;P&gt;              and DATETO &amp;gt;= ldate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd step??&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,&lt;/P&gt;&lt;P&gt;Anirudh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2008 20:32:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-22T20:32:04Z</dc:date>
    <item>
      <title>Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188345#M1001158</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;I am try trying to do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select statement to get the table name --&amp;gt; store in tname (variable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I have to do a select to read the data in this table (table name is in tname variable) based on some conditions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 1st step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Select ME_TECH from RSAC into &lt;STRONG&gt;tname&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        where NAME = 'PLANT'&lt;/P&gt;&lt;P&gt;              and DATEFROM &amp;lt;= ldate&lt;/P&gt;&lt;P&gt;              and DATETO &amp;gt;= ldate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd step??&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,&lt;/P&gt;&lt;P&gt;Anirudh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 20:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188345#M1001158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-22T20:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188346#M1001159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Field Symbols&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 20:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188346#M1001159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-22T20:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188347#M1001160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please elaborate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 20:39:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188347#M1001160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-22T20:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188348#M1001161</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;Select * from (Tname) into corresponding fields of table ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the braces are close, there is no space between the brackets and the word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Subramanian PL on Jul 22, 2008 1:41 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 20:40:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188348#M1001161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-22T20:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188349#M1001162</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;Please search in SDN with the keyword..Dynamic internal table..I am sure you will get lot of posts on this..which discuss about populating the data from a table name which is dynamic..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 20:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188349#M1001162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-22T20:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188350#M1001163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;report ztest.

parameters: p_table type dd02l-tabname.

field-symbols: &amp;lt;fs&amp;gt; type standard table." of (p_table).


select * from (p_table)
into table &amp;lt;fs&amp;gt;
up to 20 rows.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another way using CL_ALV_TABLE_CREATE, for this you have to pass the fieldcatalog.&lt;/P&gt;&lt;P&gt;it return the internal table reference. using that you can proceed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2008 20:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188350#M1001163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-22T20:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read table, table name in variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188351#M1001164</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;When u want to fetch the data in a variable use select single stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single ME_TECH  from &amp;lt;tablename&amp;gt;&lt;/P&gt;&lt;P&gt;                                     into &amp;lt;variable name&amp;gt;&lt;/P&gt;&lt;P&gt;    where &amp;lt;conditions&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;&lt;/P&gt;&lt;P&gt;Sharin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2008 03:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-table-name-in-variable/m-p/4188351#M1001164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-23T03:28:26Z</dc:date>
    </item>
  </channel>
</rss>

