<?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 problem in read statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946989#M694751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;my code is ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln audat kunnr auart&lt;/P&gt;&lt;P&gt;        from vbak&lt;/P&gt;&lt;P&gt;        into table  t_vbak2&lt;/P&gt;&lt;P&gt;        for all entries in t_vbfa2&lt;/P&gt;&lt;P&gt;        where vbeln = t_vbfa2-vbelv&lt;/P&gt;&lt;P&gt;        and audat in r_daterange&lt;/P&gt;&lt;P&gt;        and kunnr = partner_number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if not t_vbak2[] is initial.&lt;/P&gt;&lt;P&gt;          sort t_vbak2 by vbeln audat auart.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;now if i use read statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table t_vbak2 into wa_vbak2&lt;/P&gt;&lt;P&gt;        with key  vbeln = wa_vbfa1-vbelv&lt;/P&gt;&lt;P&gt;                  audat in r_daterange&lt;/P&gt;&lt;P&gt;                  kunnr = partner_number binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help me with this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Challa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2007 18:03:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-18T18:03:54Z</dc:date>
    <item>
      <title>problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946989#M694751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;my code is ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln audat kunnr auart&lt;/P&gt;&lt;P&gt;        from vbak&lt;/P&gt;&lt;P&gt;        into table  t_vbak2&lt;/P&gt;&lt;P&gt;        for all entries in t_vbfa2&lt;/P&gt;&lt;P&gt;        where vbeln = t_vbfa2-vbelv&lt;/P&gt;&lt;P&gt;        and audat in r_daterange&lt;/P&gt;&lt;P&gt;        and kunnr = partner_number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if not t_vbak2[] is initial.&lt;/P&gt;&lt;P&gt;          sort t_vbak2 by vbeln audat auart.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;now if i use read statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table t_vbak2 into wa_vbak2&lt;/P&gt;&lt;P&gt;        with key  vbeln = wa_vbfa1-vbelv&lt;/P&gt;&lt;P&gt;                  audat in r_daterange&lt;/P&gt;&lt;P&gt;                  kunnr = partner_number binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help me with this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Challa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 18:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946989#M694751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T18:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946990#M694752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;check what type of error you are getting&lt;/P&gt;&lt;P&gt;May be you can't use the IN parameter with ranges like where condition of select in READ&lt;/P&gt;&lt;P&gt;so have to use only EQUAL symbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 18:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946990#M694752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T18:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: problem in read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946991#M694753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use the IN operator in your READ statement, only  =  as you are trying to read with key.  In your case, you must use the LOOP statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at t_vbak2 into wa_vbak2
          where vbeln = wa_vbfa1-vbelv
             and audat in R_daterange
             and kunnr = Partner_Number.

* Do whatever you need to do
Exit.   " This is so you only read one record.
Endloop.&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 18:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-read-statement/m-p/2946991#M694753</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-10-18T18:06:41Z</dc:date>
    </item>
  </channel>
</rss>

