<?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: CHECK not properly evaluating against a range table within a SELECT loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694175#M1870297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;Thanks Jörg!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that it's been explained as such, that actually makes perfect sense!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the improvements you've suggested, as I previously stated, this comes directly from SAP standard code. I completely agree, and they may do well to heed your suggestions...&lt;/P&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;Thanks again!&lt;BR /&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Nov 2014 15:04:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-11-04T15:04:54Z</dc:date>
    <item>
      <title>CHECK not properly evaluating against a range table within a SELECT loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694173#M1870295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;Hello again everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;Seems I've found yet another syntactical peculiarity while trying to reuse standard code, so let's just dive right in...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the block of code I'm struggling with:&lt;BR /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/577163" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Now, in debugger, I can see that bwkey contains 1510 and the range table is empty:&lt;BR /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/577164" /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/577165" /&gt;&lt;/P&gt;&lt;P&gt;This being the case, I would expect that the check should evaluate to false (and set sy-subrc NE 0), and skip the remainder of this selection loop iteration, continuing with the next iteration. However:&lt;BR /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/577166" width="450" /&gt;&lt;BR /&gt;...it seems to have evaluated it as being true!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could this be the case, as (with the range table empty at this point) 1510 is NOT "in" an empty table?&lt;/P&gt;&lt;P&gt;Thanks in advance, and &amp;lt;removed by moderator&amp;gt; for helpful answers!&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manish Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:14:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694173#M1870295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-03T21:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK not properly evaluating against a range table within a SELECT loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694174#M1870296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;as a matter of fact, this is the correct behaviour. An empty range will always return true on check.&lt;/P&gt;&lt;P&gt;This is not at all peculiar when you think of it as a non-existent condition. &lt;/P&gt;&lt;P&gt;Mind you, the result would turn out as false, if you had only an empty row in the ranges table. Since this would be an existent condition, it would be evaluated according to the rules and most certainly be treated as false.&lt;/P&gt;&lt;P&gt;What i do find peculiar, is the way you check the range WHITHIN the select-loop instead of a select condition. &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1078/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And while giving advice on improvement, you could still enhance your coding by gathering only those values, that are needed and by combining both selects by join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards - Jörg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 22:15:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694174#M1870296</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2014-11-03T22:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: CHECK not properly evaluating against a range table within a SELECT loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694175#M1870297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;Thanks Jörg!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that it's been explained as such, that actually makes perfect sense!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the improvements you've suggested, as I previously stated, this comes directly from SAP standard code. I completely agree, and they may do well to heed your suggestions...&lt;/P&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; text-indent: 0px;"&gt;Thanks again!&lt;BR /&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 15:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-properly-evaluating-against-a-range-table-within-a-select-loop/m-p/10694175#M1870297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-11-04T15:04:54Z</dc:date>
    </item>
  </channel>
</rss>

