<?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: Where condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616054#M275918</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vbrk~erdat vbrk~erzet 
...
ORDER BY vbrk~erdat DESCENDING
         vbrk~erzet DESCENDING.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Sep 2006 20:04:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-19T20:04:56Z</dc:date>
    <item>
      <title>Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616050#M275914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends I have to pull data from a table, based on records created from the last execution of the program till the current time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written my logic as is below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can it be made more simple as it seems confusing to my lead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        where ( vbrk&lt;SUB&gt;erdat EQ w_var_date AND vbrk&lt;/SUB&gt;erzet GT w_var_time )&lt;/P&gt;&lt;P&gt;         OR ( vbrk&lt;SUB&gt;erdat GT w_var_date AND vbrk&lt;/SUB&gt;erdat LT w_sys_date )&lt;/P&gt;&lt;P&gt;         OR ( vbrk&lt;SUB&gt;erdat EQ w_sys_date AND vbrk&lt;/SUB&gt;erzet LE w_sys_time ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_var_date - date when the program was executed last&lt;/P&gt;&lt;P&gt;w_var_time - time when the program was executed last&lt;/P&gt;&lt;P&gt;w_sys_date - sy-datum (Sysytm Date)&lt;/P&gt;&lt;P&gt;w_sys_time - sy-erzet (System time)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any advice,&lt;/P&gt;&lt;P&gt;Shejal Shetty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 19:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616050#M275914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T19:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616051#M275915</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;  You don't have to consider the system date and time..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHERE ( vbrk&lt;SUB&gt;erdat &amp;gt;= w_var_date and vbrk&lt;/SUB&gt;erzet &amp;gt; w_var_time ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I believe this should be enough..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 19:57:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616051#M275915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T19:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616052#M275916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, how about:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
where ( vbrk~erdat EQ w_var_date AND vbrk~erzet GT w_var_time )
   OR ( vbrk~erdat GT w_var_date ).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 19:59:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616052#M275916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T19:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616053#M275917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was a good one Rob..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616053#M275917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616054#M275918</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vbrk~erdat vbrk~erzet 
...
ORDER BY vbrk~erdat DESCENDING
         vbrk~erzet DESCENDING.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616054#M275918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616055#M275919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shejal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To meet your requirement all conditions are necessary. &lt;/P&gt;&lt;P&gt;So, your WHERE condition is absolutely correct even though it looks confuse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: You need to put additional parenthesis to your condition. Otherwise, it will leads to wrong results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your intention is meet to one of conditions, so all these conditions should be under one more pair of parenthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &amp;lt;b&amp;gt;(&amp;lt;/b&amp;gt; ( vbrk&lt;SUB&gt;erdat EQ w_var_date AND vbrk&lt;/SUB&gt;erzet GT w_var_time )&lt;/P&gt;&lt;P&gt;OR ( vbrk&lt;SUB&gt;erdat GT w_var_date AND vbrk&lt;/SUB&gt;erdat LT w_sys_date )&lt;/P&gt;&lt;P&gt;OR ( vbrk&lt;SUB&gt;erdat EQ w_sys_date AND vbrk&lt;/SUB&gt;erzet LE w_sys_time ) &amp;lt;b&amp;gt;)&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:07:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616055#M275919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616056#M275920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone.&lt;/P&gt;&lt;P&gt;I didnt think of not uding the current date and time.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616056#M275920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616057#M275921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vinay for the suggestion but i am kind of thinking that the way Rob has said would also meet all the conditions..Dosent It?&lt;/P&gt;&lt;P&gt; and looks smuch simplier than the one i had written it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shejal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 20:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-condition/m-p/1616057#M275921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T20:17:47Z</dc:date>
    </item>
  </channel>
</rss>

