<?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: Loop... Where clause is not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973923#M949163</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;  Change your code in the below way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_blart INTO wa_dfkkop WHERE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;opbel = lv_opbel AND&lt;/STRONG&gt; (= is missing in your posted code, pls check)&lt;/P&gt;&lt;P&gt;blart = lv_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jun 2008 12:14:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-11T12:14:38Z</dc:date>
    <item>
      <title>Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973921#M949161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is program , which i want to add conditions to a loop command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The constraints is considered only for this condition : blart = lv_blart , and doesn't consider for the second one  opbel &amp;lt;&amp;gt; lv_opbel (meaning the loop continues even if this condition is FALSE ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand , when i write with IF clause, the constraints is valid .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program is : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : lv_blart TYPE blart_kk,&lt;/P&gt;&lt;P&gt;         lv_opbel TYPE opbel_kk,&lt;/P&gt;&lt;P&gt;         it_blart TYPE  TABLE OF dfkkop,&lt;/P&gt;&lt;P&gt;         wa_dfkkop TYPE dfkkop.&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;&lt;/P&gt;&lt;P&gt;/// Loop where ///&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_blart = 'DI'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT it_blart INTO wa_dfkkop WHERE&lt;/P&gt;&lt;P&gt; ( ( opbel &amp;lt;&amp;gt; lv_opbel )  AND ( blart = lv_blart ) ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/// IF clause ///&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; lv_blart = 'DI'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_blart INTO wa_dfkkop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF  ( wa_dfkkop-opbel &amp;lt;&amp;gt; lv_opbel )  &lt;/P&gt;&lt;P&gt; AND ( wa_dfkkop-blart = lv_blart ).&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 for help.     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: avi azulay on Jun 11, 2008 2:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973921#M949161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973922#M949162</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 think there is no relational operator in the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
( opbel lv_opbel ) . " In both loop and IF
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:10:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973922#M949162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973923#M949163</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;  Change your code in the below way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_blart INTO wa_dfkkop WHERE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;opbel = lv_opbel AND&lt;/STRONG&gt; (= is missing in your posted code, pls check)&lt;/P&gt;&lt;P&gt;blart = lv_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973923#M949163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973924#M949164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for quick replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My honest mistake, it should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_blart INTO wa_dfkkop&lt;/P&gt;&lt;P&gt;                    WHERE opbel NE lv_opbel &lt;/P&gt;&lt;P&gt;                          AND blart = lv_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973924#M949164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973925#M949165</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;  My sincere suggestion is don't use Negative conditions in where class. Instead you go ahead within the loop with IF conditions. It will reduce the performance of the program also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973925#M949165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973926#M949166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey bujji.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say i do want to use a negative condition, Why is it working? It works for me in other loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:36:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973926#M949166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973927#M949167</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;If the WHERE clause in the LOOP has inequality condition( ie &amp;lt;&amp;gt;), then it should not give any performance problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&amp;lt;&amp;gt;" condition in the WHERE clause of the SELECT statement may cause problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can go ahead and use &amp;lt;&amp;gt; in LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:45:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973927#M949167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Loop... Where clause is not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973928#M949168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi madhu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Where" clause is not a part of a "select" statement but still, it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 12:54:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-where-clause-is-not-working/m-p/3973928#M949168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T12:54:43Z</dc:date>
    </item>
  </channel>
</rss>

