<?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 table with key doubt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209600#M1377431</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 you are concerned about processing the first record twice.  You can just add one to the index before you start looping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Oct 2009 01:51:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-17T01:51:18Z</dc:date>
    <item>
      <title>Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209595#M1377426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, what can i do when i use the&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Read table xxxx WITH KEY tab_key = value ASSIGNING &amp;lt;fs&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;statement and &lt;STRONG&gt;there is more than one entry&lt;/STRONG&gt; with the specified selection criteria? How can i return the values to an internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get all the entries and i don't have the full table key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 18:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209595#M1377426</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2009-10-16T18:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209596#M1377427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One method is shown here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[The Performance of Nested Loops|/people/rob.burbank/blog/2006/02/07/performance-of-nested-loops]&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, 16 Oct 2009 19:07:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209596#M1377427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T19:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209597#M1377428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabio...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannt retrieve more than one row using READ TABLE.  You have to use a LOOP - ENDLOOP statement in order to get each row of your table that fulfill your condition, and append them to your new table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write if you need more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Dimas Salazar&lt;/P&gt;&lt;P&gt;Caracas - Venezuela&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 19:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209597#M1377428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T19:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209598#M1377429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An efficient way to do this is to have your table sorted by a specific key.  Let's say I have a table with the feild material number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_index like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by material_number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ready table itab with key material_number = yournumber&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move sy-tabix to lv_index. " this holds the index of your first material record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now we loop at the table start at that index&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at itab index lv_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;perform your processing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if we come accross a different material number - exit the loop.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if itab-material_number ne yournumber.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&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;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you only processes the records you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2009 21:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209598#M1377429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T21:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209599#M1377430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But you process the first one twice. How wouild you get around that.&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, 16 Oct 2009 21:37:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209599#M1377430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-16T21:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209600#M1377431</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 you are concerned about processing the first record twice.  You can just add one to the index before you start looping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2009 01:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209600#M1377431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-17T01:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209601#M1377432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my example the read is only used to find the index, but you could process the first record at this time, add one to the index and then start looping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2009 01:52:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209601#M1377432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-17T01:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209602#M1377433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Fabio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately ABAP doesn't provide any means to just read multiple line from one internal table to other. So you can not use READ TABLE for your purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to use LOOP... ENDLOOP only. You can use the following construct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT XXX ASSIGNING &amp;lt;fs&amp;gt;.

CHECK &amp;lt;fs&amp;gt;-tabkey = value.

..... Process &amp;lt;fs&amp;gt;......

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didnt suggest the WHERE clause in LOOP statement because its very non-performant. So better check your condition inside with CHECK statement. If CHECK fails, the loop will continue with the next iteration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Anand.&lt;/P&gt;&lt;P&gt;[How2SAP.com|http://www.how2sap.com/]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2009 06:03:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209602#M1377433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-17T06:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209603#M1377434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand - you can read every record in an internal table and never use a LOOP statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you say that the CHECK is better than using LOOP...WHERE? If you can show an example with run time statistics, that would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2009 19:56:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209603#M1377434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-17T19:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209604#M1377435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the replies.&lt;/P&gt;&lt;P&gt;i'll test some scenarios and then return back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment i'm wondering if binary search would always return the first line in the criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See you soon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Oct 2009 10:23:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209604#M1377435</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2009-10-18T10:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209605#M1377436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Anand - you can read every record in an internal table and never use a LOOP statement.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Why do you say that the CHECK is better than using LOOP...WHERE? If you can show an example with run time statistics, that would be great.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Rob&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand it, WHERE is usually better performance-wise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Oct 2009 12:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209605#M1377436</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-10-18T12:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209606#M1377437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; As I understand it, WHERE is usually better performance-wise.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would expect that they do basically the same thing, but I'll try to check it Monday or Tuesday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Oct 2009 19:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209606#M1377437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-18T19:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209607#M1377438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Fabio, 
&amp;lt;li&amp;gt;READ TABLE statement does not return multiple values as you said.
&lt;PRE&gt;&lt;CODE&gt;
   READ TABLE sflight_tab
        WITH TABLE KEY carrid = p_carrid
                       fldate = p_fldate
        ASSIGNING &amp;lt;sflight&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;
&amp;lt;li&amp;gt;Use LOOP -ENDLOOP statement by setting WHERE clause also. It gives good results when you multiple records for the condition given .
   &lt;PRE&gt;&lt;CODE&gt;LOOP AT sflight_tab ASSIGNING &amp;lt;sflight&amp;gt; WHERE carrid = p_carrid
                                             AND fldate = p_fldate.
   ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 02:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209607#M1377438</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-10-19T02:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209608#M1377439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - I ran a quick test. The results are mixed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ... WHERE consistently ran in about 72% of the time as LOOP/CHECK. So it is faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The saving is about 0.3 msec for each hit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest MESSAGE-ID 00.

DATA: start TYPE i,
      end   TYPE i,
      dif   TYPE i.

DATA: BEGIN OF itab OCCURS 0,
        f1,
      END   OF itab.

DO 100000 TIMES.
  itab-f1 = 'A'.
  APPEND itab.
  itab-f1 = 'B'.
  APPEND itab.
  itab-f1 = 'C'.
  APPEND itab.
  itab-f1 = 'D'.
  APPEND itab.
  itab-f1 = 'E'.
  APPEND itab.
ENDDO.

DO 10 TIMES.
  GET RUN TIME FIELD start.
  LOOP AT itab WHERE f1 = 'C'.
  ENDLOOP.
  GET RUN TIME FIELD end.
  dif = end - start.
  WRITE: /001 'time for LOOP...WHERE     :', dif, 'msec'.

  GET RUN TIME FIELD start.
  LOOP AT itab.
    CHECK itab-f1 = 'C'.
  ENDLOOP.
  GET RUN TIME FIELD end.
  dif = end - start.
  WRITE: /001 'time for CHECK within LOOP:', dif, 'msec'.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 13:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209608#M1377439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T13:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209609#M1377440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; At the moment i'm wondering if binary search would always return the first line in the criteria.&lt;/P&gt;&lt;P&gt;&amp;gt; See you soon.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, it will not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209609#M1377440</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-19T14:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209610#M1377441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rainer - from the help for READ with BINARY SEARCH:&lt;/P&gt;&lt;P&gt;&amp;gt; if there are several hits (because of an incompletely specified search key or because there are&lt;/P&gt;&lt;P&gt;&amp;gt; duplicate entries in the table), then the first hit in terms of the sequence of the rows is always &lt;/P&gt;&lt;P&gt;&amp;gt; returned, that is, the row with the smallest index. &lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:28:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209610#M1377441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T14:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209611#M1377442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, didnt know that cause a binary search itself will not position on the first row (row with lowest index). If you have 5 rows with the same key, it will give you back the second or third index depending on the algorithm. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in ABAP there must be an additional "read back until" to get the row with the lowest index.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:54:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209611#M1377442</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-19T14:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209612#M1377443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes.. probably is that... good to know it.&lt;/P&gt;&lt;P&gt;this thread is going deep, that's cool!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i already start a resolution without using the where clause.. after i'll do using that and post my results too. Then i check this thread answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks to everybody.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 16:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209612#M1377443</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2009-10-19T16:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Read table with key doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209613#M1377444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys! after a long time I'm back to post the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob Burbank was very helpful and the solution was create nested loops using read table binary search and then start the 'inside'  loops from the found index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a friend of mine told me this technique is called 'binary loop'. It has a really good performance and don't create internal tables like the where condition in the loop statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for everybody!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2010 02:05:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-with-key-doubt/m-p/6209613#M1377444</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2010-01-08T02:05:59Z</dc:date>
    </item>
  </channel>
</rss>

