<?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: Using Variable tab  name for a select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-variable-tab-name-for-a-select/m-p/5968758#M1338871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost ok, should be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if l_data ge '01012009'
tabela = 'zxx_new'
else.
tabela = 'zxx_old'
endif.

Select * from (tabela)   "here you determine table dynamicaly  by giving its name
where ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2009 12:01:29 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2009-07-30T12:01:29Z</dc:date>
    <item>
      <title>Using Variable tab  name for a select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-variable-tab-name-for-a-select/m-p/5968757#M1338870</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;I need to do a select from a two different tables controled by system date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to do the following for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: tabela type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_data ge '01012009'&lt;/P&gt;&lt;P&gt;  tabela = 'zxx_new'&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   tabela = 'zxx_old'&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from tabela&lt;/P&gt;&lt;P&gt;where ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's possible using Select statement this way ? or i need to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_data ge '01012009'&lt;/P&gt;&lt;P&gt;  select * from zxx_new ...&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   select * from zxx_old ...&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 11:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-variable-tab-name-for-a-select/m-p/5968757#M1338870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-30T11:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable tab  name for a select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-variable-tab-name-for-a-select/m-p/5968758#M1338871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost ok, should be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if l_data ge '01012009'
tabela = 'zxx_new'
else.
tabela = 'zxx_old'
endif.

Select * from (tabela)   "here you determine table dynamicaly  by giving its name
where ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 12:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-variable-tab-name-for-a-select/m-p/5968758#M1338871</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-07-30T12:01:29Z</dc:date>
    </item>
  </channel>
</rss>

