<?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 'from' Clause in Native SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805322#M41288</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;&amp;lt;u&amp;gt;Assuming you can also use Open SQL.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macroman's &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; suggestion is OK.  in Open SQL (this is SQL of ABAP platform) but a query statement can be constituted using some dynamic clauses. Although macro coding has some restrictions it will be less time consuming using it than a dynamic query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;An example SELECT statement with dynamic clauses:&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT (fields) FROM (table_name_variable)
INTO &amp;lt;target_fields&amp;gt;
WHERE (conditions_tab) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information:&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3983358411d1829f0000e829fbfe/frameset.htm"&amp;gt;Open SQL -Reading Data&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Nov 2004 19:10:12 GMT</pubDate>
    <dc:creator>ssimsekler</dc:creator>
    <dc:date>2004-11-03T19:10:12Z</dc:date>
    <item>
      <title>Dynamic 'from' Clause in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805319#M41285</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;While running a select query in ORACLE, we can put the table name in '&amp;lt;i&amp;gt;from&amp;lt;/i&amp;gt;' clause at the runtime-Seletion Screen Parameter .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am not able to do so in SAP using Native Sql. Does SAP has any  restrictions regarding this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be possible that ,by using Embedded SQL (C/C++ precompiler ),we may be able to achive this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body please throw light on this.&lt;/P&gt;&lt;P&gt;Its Urgent.&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2004 15:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805319#M41285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-03T15:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic 'from' Clause in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805320#M41286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know much about native SQL, but with open SQL this is possible with a statement like "&amp;lt;u&amp;gt;select * from (p_table)&amp;lt;/u&amp;gt;" where p_table is the parameter which takes table name on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aravind.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2004 16:11:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805320#M41286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-03T16:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic 'from' Clause in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805321#M41287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried macroes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM &amp;amp;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;(I will become a macroes' fan)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2004 16:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805321#M41287</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2004-11-03T16:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic 'from' Clause in Native SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805322#M41288</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;&amp;lt;u&amp;gt;Assuming you can also use Open SQL.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macroman's &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; suggestion is OK.  in Open SQL (this is SQL of ABAP platform) but a query statement can be constituted using some dynamic clauses. Although macro coding has some restrictions it will be less time consuming using it than a dynamic query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;An example SELECT statement with dynamic clauses:&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT (fields) FROM (table_name_variable)
INTO &amp;lt;target_fields&amp;gt;
WHERE (conditions_tab) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information:&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3983358411d1829f0000e829fbfe/frameset.htm"&amp;gt;Open SQL -Reading Data&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2004 19:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-from-clause-in-native-sql/m-p/805322#M41288</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2004-11-03T19:10:12Z</dc:date>
    </item>
  </channel>
</rss>

