<?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 Variable in the where condition how? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-in-the-where-condition-how/m-p/986982#M73200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Expert Abapers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to use a variable in the where condition..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (Var_tab_name)&lt;/P&gt;&lt;P&gt;into itab&lt;/P&gt;&lt;P&gt;where (var1) = 'A'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i know this expression where (var1) is not allowed, but what is the alternative to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BWer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2005 15:52:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-07-13T15:52:46Z</dc:date>
    <item>
      <title>Variable in the where condition how?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-in-the-where-condition-how/m-p/986982#M73200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Expert Abapers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to use a variable in the where condition..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (Var_tab_name)&lt;/P&gt;&lt;P&gt;into itab&lt;/P&gt;&lt;P&gt;where (var1) = 'A'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i know this expression where (var1) is not allowed, but what is the alternative to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BWer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2005 15:52:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-in-the-where-condition-how/m-p/986982#M73200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-13T15:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in the where condition how?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-in-the-where-condition-how/m-p/986983#M73201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Dynamic Conditions&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;To specify a condition dynamically, use: &lt;/P&gt;&lt;P&gt;SELECT ... WHERE (&amp;lt;itab&amp;gt;) ...&lt;/P&gt;&lt;P&gt;where &amp;lt;itab&amp;gt; is an internal table with line type C and maximum length 72 characters. All of the conditions listed above except for selection tables, can be written into the lines of &amp;lt;itab&amp;gt;. However, you may only use literals, and not the names of data objects. The internal table can also be left empty. &lt;/P&gt;&lt;P&gt;If you only want to specify a part of the condition dynamically, use: &lt;/P&gt;&lt;P&gt;SELECT ... WHERE &amp;lt;cond&amp;gt; AND (&amp;lt;itab&amp;gt;) ...&lt;/P&gt;&lt;P&gt;You cannot link a static and a dynamic condition using OR.&lt;/P&gt;&lt;P&gt;You may only use dynamic conditions in the WHERE clause of the SELECT stateme&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;data: begin of myselection occurs 0,&lt;/P&gt;&lt;P&gt;	line(72),&lt;/P&gt;&lt;P&gt;       end of myselection.&lt;/P&gt;&lt;P&gt;data char(1) value 'A'.&lt;/P&gt;&lt;P&gt;myselection-line = 'var1 = char'.&lt;/P&gt;&lt;P&gt;append myselection.&lt;/P&gt;&lt;P&gt;select * from (Var_tab_name)&lt;/P&gt;&lt;P&gt;into itab&lt;/P&gt;&lt;P&gt;where (myselection) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Svetlin Rusev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2005 16:16:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-in-the-where-condition-how/m-p/986983#M73201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-13T16:16:32Z</dc:date>
    </item>
  </channel>
</rss>

