<?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: Help with Changing Loop logic to Read logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357562#M1838715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN class="L1S52"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOOP &lt;SPAN class="L1S52"&gt;AT&lt;/SPAN&gt; IT_SRO &lt;SPAN class="L1S52"&gt;ASSIGNING&lt;/SPAN&gt; &amp;lt;FS_SRO&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;WHERE&lt;/SPAN&gt; MATERIAL &lt;SPAN class="L1S52"&gt;EQ&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-MATERIAL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;AND&lt;/SPAN&gt; DATEFROM &lt;SPAN class="L1S52"&gt;LE&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-CALDAY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;AND&lt;/SPAN&gt; DATETO&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;GE&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-CALDAY.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;I don't think you can replace this with READ TABLE because the only operator you can use with READ TABLE construct is '='.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further read - &lt;A href="http://help.sap.com/abapdocu_740/en/abenitab_where_optimization.htm" title="http://help.sap.com/abapdocu_740/en/abenitab_where_optimization.htm"&gt;ABAP Keyword Documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last example is similar to your code where the initial part of the (primary) key is used with '=' operator and the remaining condition is ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the Code Inspector or ABAP Test Cockpit throw any warning?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for confusing you &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/877/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2014 15:23:06 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2014-06-12T15:23:06Z</dc:date>
    <item>
      <title>Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357559#M1838712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am looking to change the following Loop logic to using read logic because it will probably lead to faster performance.&amp;nbsp; Table is Sorted Table with Key MATERIAL DATEFROM DATETO.&amp;nbsp; This code is trying to find a material price record within a price date range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help with the conversion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I need to provide additional information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOOP &lt;SPAN class="L1S52"&gt;AT&lt;/SPAN&gt; IT_SRO &lt;SPAN class="L1S52"&gt;ASSIGNING&lt;/SPAN&gt; &amp;lt;FS_SRO&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;WHERE&lt;/SPAN&gt; MATERIAL &lt;SPAN class="L1S52"&gt;EQ&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-MATERIAL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;AND&lt;/SPAN&gt; DATEFROM &lt;SPAN class="L1S52"&gt;LE&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-CALDAY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;AND&lt;/SPAN&gt; DATETO&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;GE&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-CALDAY.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 13:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357559#M1838712</guid>
      <dc:creator>sap_cohort</dc:creator>
      <dc:date>2014-06-12T13:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357560#M1838713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenneth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Read logic mean Read Table? if&amp;nbsp; true&amp;nbsp; mean we cant use less than and greater value in read table... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 13:37:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357560#M1838713</guid>
      <dc:creator>thangam_perumal</dc:creator>
      <dc:date>2014-06-12T13:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357561#M1838714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking that it might be possible to somehow read to at least get as close to the record as possible with a read and then somehow test if the next record meets the criteria. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe in this case a loop is justified and read cannot do as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any insights.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 14:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357561#M1838714</guid>
      <dc:creator>sap_cohort</dc:creator>
      <dc:date>2014-06-12T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357562#M1838715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN class="L1S52"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOOP &lt;SPAN class="L1S52"&gt;AT&lt;/SPAN&gt; IT_SRO &lt;SPAN class="L1S52"&gt;ASSIGNING&lt;/SPAN&gt; &amp;lt;FS_SRO&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;WHERE&lt;/SPAN&gt; MATERIAL &lt;SPAN class="L1S52"&gt;EQ&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-MATERIAL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;AND&lt;/SPAN&gt; DATEFROM &lt;SPAN class="L1S52"&gt;LE&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-CALDAY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;AND&lt;/SPAN&gt; DATETO&amp;nbsp;&amp;nbsp; &lt;SPAN class="L1S52"&gt;GE&lt;/SPAN&gt; &amp;lt;TRANSACTION&amp;gt;-CALDAY.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;I don't think you can replace this with READ TABLE because the only operator you can use with READ TABLE construct is '='.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further read - &lt;A href="http://help.sap.com/abapdocu_740/en/abenitab_where_optimization.htm" title="http://help.sap.com/abapdocu_740/en/abenitab_where_optimization.htm"&gt;ABAP Keyword Documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last example is similar to your code where the initial part of the (primary) key is used with '=' operator and the remaining condition is ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the Code Inspector or ABAP Test Cockpit throw any warning?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for confusing you &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/877/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 15:23:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357562#M1838715</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-06-12T15:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357563#M1838716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;It probably won't lead to faster performance and I'm not sure Suhas is right. The loop statement works fine with a partial key. (But now I doubt myself, and I haven't the time to write a test program...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK -try this alternative&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;TYPES: BEGIN OF material_attributes_ty,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; DATE_FROM type D,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; DATE_TO type D,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;EM&gt;other attributes&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;END OF material_attributes_ty.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;TYPES: BEGIN OF my_material_ty,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; matnr TYPE matnr,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; attributes TYPE SORTED TABLE OF material_attributes_ty WITH UNIQUE KEY date_from,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;END OF my_material_ty.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;DATA: materials TYPE HASHED TABLE OF my_material_ty WITH UNIQUE KEY matnr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can go direct to your material, and then use looping to get the attribute for your key date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 15:27:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357563#M1838716</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-06-12T15:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357564#M1838717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenneth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to find a specific record or need a bunch of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its multiple records, try with sorting table &lt;SPAN style="font-family: courier new,courier;"&gt;DATEFROM -&amp;gt; ascending; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DATETO-&amp;gt; descending.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Vamshi.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 15:35:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357564#M1838717</guid>
      <dc:creator>vamshi_mohan</dc:creator>
      <dc:date>2014-06-12T15:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357565#M1838718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="font-size: 10pt;"&gt;It probably won't lead to faster performance and I'm not sure Suhas is right. The loop statement works fine with a partial key.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yes, you are correct Matt! The LOOP...WHERE in it's original form (as presented by the OP) is optimized. Similar example is part of the ABAP documentation that i had shared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was aware that the partial key (left-justified) works, but i didn't remember that the remaining part of the key (with non '=' operator) is not taken into account. The "sequential read" warning is generally given by the SCI or ATC, so i never remember the rules &lt;SPAN __jive_emoticon_name="plain" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/877/images/emoticons/plain.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I have corrected my comment. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/877/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 15:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357565#M1838718</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-06-12T15:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357566#M1838719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking to capture a specific record for each material transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it be best to continue using my loop logic on a sorted table or change to a read logic.&amp;nbsp; I'm thinking I could read to the first material price record match and then manually read through the remaining matching material records and test for the date range record I need based on date.&lt;/P&gt;&lt;P&gt;Any opinions are greatly appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/475235" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 14:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357566#M1838719</guid>
      <dc:creator>sap_cohort</dc:creator>
      <dc:date>2014-06-13T14:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357567#M1838720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you read with just material, then the record you get back is the first match. So you can use read to get to 1266, and be sure you're on the one for 01/01/1900.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 15:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357567#M1838720</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2014-06-13T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357568#M1838721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very nice example.&amp;nbsp; Thank you for passing that on and I will use that technique for sure!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 16:01:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357568#M1838721</guid>
      <dc:creator>sap_cohort</dc:creator>
      <dc:date>2014-06-13T16:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357569#M1838722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your sort order is quite fine. The loop also shall be executed as you are expecting as you are using loop at where... So the loop starts from the first material of your search. The loop logic is quite apt. No need of read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share if you implement any better approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 11:51:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357569#M1838722</guid>
      <dc:creator>vamshi_mohan</dc:creator>
      <dc:date>2014-06-18T11:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Changing Loop logic to Read logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357570#M1838723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the replies everyone!&amp;nbsp; Great support group you are!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have decided to stay with the loop statement since it is simple and the table is sorted so performance is fine. Also, to populate the table is just a simple select into table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really, really, like Mathew's solution since it's one I didn't even consider, but it would take more work to fill the table than a simple select into to populate the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 14:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-changing-loop-logic-to-read-logic/m-p/10357570#M1838723</guid>
      <dc:creator>sap_cohort</dc:creator>
      <dc:date>2014-06-18T14:25:01Z</dc:date>
    </item>
  </channel>
</rss>

