<?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: read statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856483#M362047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Istead of using 'EXIT' inside loop, U can perform the action whichever u want &lt;/P&gt;&lt;P&gt;in that loop. It will work only for the matching records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreenu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jan 2007 16:54:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-05T16:54:37Z</dc:date>
    <item>
      <title>read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856480#M362044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am having errors with the following statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        READ TABLE IT_A901     WITH KEY BZIRK = IT_KNVV-BZIRK&lt;/P&gt;&lt;P&gt;                                        VKORG = IT_KNVV-VKORG&lt;/P&gt;&lt;P&gt;                                        KDGRP = IT_KNVV-KDGRP&lt;/P&gt;&lt;P&gt;                                        DATBI GE IT_BSID-BUDAT&lt;/P&gt;&lt;P&gt;                                        DATAB LE IT_BSID-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;madhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 16:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856480#M362044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T16:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856481#M362045</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 cannot use GE operator in the READ statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead use LOOP AT..EXIT..ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_A901 WHERE BZIRK = IT_KNVV-BZIRK&lt;/P&gt;&lt;P&gt;AND VKORG = IT_KNVV-VKORG&lt;/P&gt;&lt;P&gt;AND KDGRP = IT_KNVV-KDGRP&lt;/P&gt;&lt;P&gt;AND DATBI GE IT_BSID-BUDAT&lt;/P&gt;&lt;P&gt;AND DATAB LE IT_BSID-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;RECORD NOT FOUND.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;RECORD FOUND.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&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>Fri, 05 Jan 2007 16:49:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856481#M362045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T16:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856482#M362046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Naren. However i am assuming that the Exit command would loop the Internal table only once and would exit even if multiple entries found for the same condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Madhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 16:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856482#M362046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T16:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856483#M362047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Istead of using 'EXIT' inside loop, U can perform the action whichever u want &lt;/P&gt;&lt;P&gt;in that loop. It will work only for the matching records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreenu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 16:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856483#M362047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T16:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856484#M362048</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;Yes..If the record is found then the EXIT statement will come out of the LOOP in the first iteration itself..If there is no record found..Then it will directly come out of the LOOP.&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>Fri, 05 Jan 2007 16:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856484#M362048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T16:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856485#M362049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is right, but you were trying to use the READ statement which tells us that you only want to get one record, which is why Narren has added the EXIT statement.  If you want all record that satisfy the condition, simply remove the EXIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narren's solution is to get around the limitation of using GE or LE in a READ statement,   this is the reason for the LOOP and the EXIT statements.&lt;/P&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>Fri, 05 Jan 2007 16:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856485#M362049</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-05T16:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856486#M362050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort the table and then do a binary search. If an entry is found, continue with indexed reads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 16:57:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856486#M362050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T16:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: read statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856487#M362051</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;  In Read statement we should not use 'GE' or 'LE'. And why your are using Exit statement.&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_KNVV-VKORG&lt;/P&gt;&lt;P&gt;     READ TABLE IT_A901 WITH KEY BZIRK = IT_KNVV-BZIRK&lt;/P&gt;&lt;P&gt;                                                       VKORG = IT_KNVV-VKORG&lt;/P&gt;&lt;P&gt;                                                       KDGRP = IT_KNVV-KDGRP&lt;/P&gt;&lt;P&gt;                                                       DATBI &amp;gt; IT_BSID-BUDAT&lt;/P&gt;&lt;P&gt;                                                       DATAB &amp;lt; IT_BSID-BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC =  0.  (RECORD FOUND)&lt;/P&gt;&lt;P&gt;       WRITE YOUR CODE.&lt;/P&gt;&lt;P&gt;    ELSE (RECORD NOT FOUND)&lt;/P&gt;&lt;P&gt;       WRITE YOUR CODE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnak you&lt;/P&gt;&lt;P&gt;Gopal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 17:03:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement/m-p/1856487#M362051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T17:03:57Z</dc:date>
    </item>
  </channel>
</rss>

