<?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: loop and Read in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100199#M437712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are not the same if there are more than one record satisfying the WHERE condition. They are same if you know for sure that there is only one record satisfying that WHERE condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Apr 2007 17:21:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-03T17:21:28Z</dc:date>
    <item>
      <title>loop and Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100197#M437710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will the below snippets are same,if not what is the difference,(performance??)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE&lt;/P&gt;&lt;P&gt;WHERE VNAM = 'ZVAR1'.&lt;/P&gt;&lt;P&gt;&amp;lt; logic x&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ I_T_VAR_RANGE INTO LOC_VAR_RANGE&lt;/P&gt;&lt;P&gt;with Key VNAM = 'ZVAR1'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0&lt;/P&gt;&lt;P&gt;&amp;lt; logic x&amp;gt;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 17:17:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100197#M437710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T17:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: loop and Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100198#M437711</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;If there is more than one record with the condition VNAM = 'ZVAR1'. Then LOOP AT I_T_VA_RANGE will process all the records that matches the condition..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE&lt;/P&gt;&lt;P&gt;WHERE VNAM = 'ZVAR1'.&lt;/P&gt;&lt;P&gt;&amp;lt; logic x&amp;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;The READ TABLE will get the first occurence of that condition...If there are more than one record..It will get the first record...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ I_T_VAR_RANGE INTO LOC_VAR_RANGE&lt;/P&gt;&lt;P&gt;with Key VNAM = 'ZVAR1'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0&lt;/P&gt;&lt;P&gt;&amp;lt; logic x&amp;gt;&lt;/P&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>Tue, 03 Apr 2007 17:20:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100198#M437711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T17:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: loop and Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100199#M437712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are not the same if there are more than one record satisfying the WHERE condition. They are same if you know for sure that there is only one record satisfying that WHERE condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 17:21:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100199#M437712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T17:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: loop and Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100200#M437713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got it thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 17:23:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100200#M437713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T17:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: loop and Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100201#M437714</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;The LOOP statement will process the records of the internal table where VNAM = 'ZVAR1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, the READ statement will read the first suitable row where VNAM = 'ZVAR1' even you have more tan 1 records in the internal where VNAM = 'ZVAR1'.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 17:23:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-and-read/m-p/2100201#M437714</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-04-03T17:23:57Z</dc:date>
    </item>
  </channel>
</rss>

