<?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: BETWEEN condition in Select Query Join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323953#M5018</link>
    <description>&lt;P&gt;hi &lt;A href="https://answers.sap.com/users/2526/ilakkiaraj.html"&gt;Ilakkiaraj &lt;/A&gt;,&lt;/P&gt;&lt;P&gt;         Try selection option ,i think it's possible to  full fill your requirement .&lt;/P&gt;&lt;P&gt;thanks .&lt;/P&gt;</description>
    <pubDate>Sat, 07 Jan 2017 06:58:32 GMT</pubDate>
    <dc:creator>umayaraj</dc:creator>
    <dc:date>2017-01-07T06:58:32Z</dc:date>
    <item>
      <title>BETWEEN condition in Select Query Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323952#M5017</link>
      <description>&lt;P&gt;I have Validity Date (DATAB) &amp;amp; Created Date (ERDAT) in my ZTable. I want to select records from EKBE where the BUDAT field is in between DATAB &amp;amp; ERDAT. I wanted to get it done in a single select query. I got my result from the following code. but it shows syntax error.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT a~bukrs, a~werks, a~sl_no, a~ebeln, a~ebelp, a~matnr, a~bdatj, a~poper, a~bsart, a~lifnr, a~kschl, a~ernam, a~erdat, a~datbi, a~datab, a~meins, a~mwskz, a~kbetr_cr, a~kbetr_pr, b~belnr, b~budat,c~knumv, d~menge
FROM zco_poamd AS a
INNERJOIN ekbe AS b
ON  a~werks = b~werks
AND a~matnr = b~matnr
AND a~ebeln = b~ebeln
AND a~ebelp = b~ebelp
AND a~bdatj = b~gjahr
AND b~vgabe ='1'AND b~bwart IN('101','102','107','108','122','161','162','543','922')
WHERE b~budat &amp;gt;= a~datab
  AND b~budat &amp;lt;= a~erdat.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But my doubt is, why can't I get it done by the following code?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;...WHERE b~budat BETWEEN a~datab AND a~erdat.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Like Mr. Horst Keller suggested, I understood that only host variables can be declared in the interval for the BETWEEN keyword. But as SAP HELP says, if BETWEEN keyword behaves similar to "b~budat &amp;gt;= a~datab AND b~budat &amp;lt;= a~erdat", why doesn't the keyword work like that and instead gives the syntax error "Incorrect expression "BETWEEN A~DATAB" in logical condition"...?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 22:00:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323952#M5017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2024-01-21T22:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: BETWEEN condition in Select Query Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323953#M5018</link>
      <description>&lt;P&gt;hi &lt;A href="https://answers.sap.com/users/2526/ilakkiaraj.html"&gt;Ilakkiaraj &lt;/A&gt;,&lt;/P&gt;&lt;P&gt;         Try selection option ,i think it's possible to  full fill your requirement .&lt;/P&gt;&lt;P&gt;thanks .&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2017 06:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323953#M5018</guid>
      <dc:creator>umayaraj</dc:creator>
      <dc:date>2017-01-07T06:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: BETWEEN condition in Select Query Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323954#M5019</link>
      <description>&lt;P&gt;My in between value range must be taken from the base table of the Select query, not through Select-options. I completed my requirement, I just want to understand the architecture of the BETWEEN keyword in SELECT statement.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2017 09:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323954#M5019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-01-07T09:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: BETWEEN condition in Select Query Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323955#M5020</link>
      <description>&lt;P&gt;BETWEEN is stricter than simple comparisons. &lt;A target="_blank" href="http://help.sap.com/abapdocu_751/en/index.htm?file=abenwhere_logexp_interval.htm"&gt;Only numeric columns can be compared&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;It is under discussion to remove the restriction at least for NUMC, DATS, TIMS, ...&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2017 10:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323955#M5020</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-01-07T10:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: BETWEEN condition in Select Query Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323956#M5021</link>
      <description>&lt;P&gt;Thanks for link Mr. Keller. Now I understand why I was not able to do it the way I wanted to.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 02:30:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/between-condition-in-select-query-join/m-p/323956#M5021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-01-09T02:30:29Z</dc:date>
    </item>
  </channel>
</rss>

