<?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: Syntax error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950133#M695619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you trying to get with this statement? Are you looking at current date plus 5 days or are you taking the offset of eindt from the 5th position?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you want to read all records with eindt less than or equal to current date plus 5 days. Declare another variable of type date and do the calculation before the select statement as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_eindt like eket-eindt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_eindt = sy-datum + 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln eindt into table it_eket&lt;/P&gt;&lt;P&gt;from eket&lt;/P&gt;&lt;P&gt;for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;where ebeln = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;eindt &amp;lt;= l_eindt .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another suggestion is that you should use EBELP (line item number) also in your internal tables, otherwise you may get incorrect values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2007 20:04:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-18T20:04:09Z</dc:date>
    <item>
      <title>Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950127#M695613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got an issue, I have written the folowing code and getting this error"&amp;lt;b&amp;gt;Incorrect expression "+" in logical condition."&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select ebeln eindt into table it_eket&lt;/P&gt;&lt;P&gt;    from eket&lt;/P&gt;&lt;P&gt;    for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;    where ebeln = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;    eindt &amp;lt;= syst-datum + 5 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me out....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 19:58:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950127#M695613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T19:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950128#M695614</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 have to declare a variable for the date and use that date in your select statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_date type sydatum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date = sy-datum + 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln eindt into table it_eket&lt;/P&gt;&lt;P&gt;from eket&lt;/P&gt;&lt;P&gt;for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;where ebeln = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;eindt &amp;lt;= v_date .&lt;/P&gt;&lt;P&gt;&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>Thu, 18 Oct 2007 20:01:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950128#M695614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T20:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950129#M695615</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;
data: wa_eindt like sy-datum.

wa_eindt = sy-datum + 5.

select ebeln eindt into table it_eket
from eket
for all entries in it_ekpo
where ebeln = it_ekpo-ebeln and
eindt &amp;lt;= wa_eindt.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&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>Thu, 18 Oct 2007 20:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950129#M695615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T20:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950130#M695616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use offsets in a WHERE. You'll have to move the value you want into a separate variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 20:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950130#M695616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T20:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950131#M695617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea, you can't do that in a SELECT statement.  here is a work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: datum type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;datum = sy-datum + 5.

select ebeln eindt into table it_eket
from eket
for all entries in it_ekpo
where ebeln = it_ekpo-ebeln and
eindt &amp;lt;= datum.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 20:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950131#M695617</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-10-18T20:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950132#M695618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;eindt &amp;lt;= syst-datum + 5 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;this statement wont work. Declare another field as datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;datum1 = syst-datum + 5.

select ebeln eindt into table it_eket
from eket
for all entries in it_ekpo
where ebeln = it_ekpo-ebeln and
eindt &amp;lt;= datum1 .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aneesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 20:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950132#M695618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T20:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950133#M695619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you trying to get with this statement? Are you looking at current date plus 5 days or are you taking the offset of eindt from the 5th position?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you want to read all records with eindt less than or equal to current date plus 5 days. Declare another variable of type date and do the calculation before the select statement as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_eindt like eket-eindt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_eindt = sy-datum + 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln eindt into table it_eket&lt;/P&gt;&lt;P&gt;from eket&lt;/P&gt;&lt;P&gt;for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;where ebeln = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;eindt &amp;lt;= l_eindt .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another suggestion is that you should use EBELP (line item number) also in your internal tables, otherwise you may get incorrect values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 20:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950133#M695619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T20:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950134#M695620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi you can not use logical expression in this way into select statement....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;store the value of the date in temporary variable and then use it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : &amp;lt;b&amp;gt;tempdate&amp;lt;/b&amp;gt; like syst-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempdate = syst-datum + 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln eindt into table it_eket&lt;/P&gt;&lt;P&gt;from eket&lt;/P&gt;&lt;P&gt;for all entries in it_ekpo&lt;/P&gt;&lt;P&gt;where ebeln = it_ekpo-ebeln and&lt;/P&gt;&lt;P&gt;eindt &amp;lt;= &amp;lt;b&amp;gt;tempdate&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 20:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/2950134#M695620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T20:06:27Z</dc:date>
    </item>
  </channel>
</rss>

