<?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: Regarding sql query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281670#M1388370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try including some brackets and see if it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;... AND ( BWART_I = '201' or BWART_I = '261' ) AND ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and please use more meaningful subject lines in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Nov 2009 13:25:09 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2009-11-03T13:25:09Z</dc:date>
    <item>
      <title>Regarding sql query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281669#M1388369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guriji,s&lt;/P&gt;&lt;P&gt;I have written one query in which i want to fetch the data between some dates. but when we execute this query  it will fetch the data from starting of the date.Plz tell me what is the problem in my query.&lt;/P&gt;&lt;P&gt;In the  initial  input screen we are giving the material no. Plant And Days.&lt;/P&gt;&lt;P&gt;Based on the days we are calculating the date. &lt;/P&gt;&lt;P&gt;Tables:  WB2_V_MKPF_MSEG2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF DAYS IS NOT INITIAL.&lt;/P&gt;&lt;P&gt; WB2_V_MKPF_MSEG2-BUDAT = ( SY-DATUM - DAYS ).&lt;/P&gt;&lt;P&gt;SELECT MATNR_I  WERKS_I BWART_I BUDAT FROM  WB2_V_MKPF_MSEG2 INTO CORRESPONDING FIELDS OF TABLE T_ITAB4&lt;/P&gt;&lt;P&gt;  WHERE  WERKS_I IN PLANT and matnr_I in Material  AND  BWART_I = '201' or  BWART_I = '261'AND BUDAT BETWEEN WB2_V_MKPF_MSEG2-BUDAT AND SY-DATUM  .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281669#M1388369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T12:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding sql query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281670#M1388370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try including some brackets and see if it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;... AND ( BWART_I = '201' or BWART_I = '261' ) AND ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and please use more meaningful subject lines in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 13:25:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281670#M1388370</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-11-03T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding sql query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281671#M1388371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is with the bracket.Thomas is correct.&lt;/P&gt;&lt;P&gt;The program is not evaluating all select conditions.if the condition "WERKS_I IN PLANT and matnr_I in Material AND BWART_I = '201' "is true it will not check for the date condition because that is added with OR part.So put the bracket as told by thomas.&lt;/P&gt;&lt;P&gt;In case OR,if any of the condition is true it will not evaluate the 2nd part&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shweta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 13:31:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sql-query/m-p/6281671#M1388371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-03T13:31:17Z</dc:date>
    </item>
  </channel>
</rss>

