<?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: Binary Search in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178762#M463012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MAya,&lt;/P&gt;&lt;P&gt;Go through below link,&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2756162"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2007 12:42:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-20T12:42:52Z</dc:date>
    <item>
      <title>Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178760#M463010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone explain Binary Search Concept&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178760#M463010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178761#M463011</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;binary search is for improving the performance while fetching the data from internal table&lt;/P&gt;&lt;P&gt;for more info see this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb373d358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb373d358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:42:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178761#M463011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178762#M463012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MAya,&lt;/P&gt;&lt;P&gt;Go through below link,&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2756162"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:42:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178762#M463012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178763#M463013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It is used to find/read  the record fast.&lt;/P&gt;&lt;P&gt;Have to sort the ITAB1 first before this by that field/s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;read table itab1 with key f1 = itab-f1 binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&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>Fri, 20 Apr 2007 12:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178763#M463013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178764#M463014</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;first sort the table content,&lt;/P&gt;&lt;P&gt;and then Mark HIGH(High Value),LOW(Low Value), Mid(middle value)&lt;/P&gt;&lt;P&gt;search the value inside two half High to Middle and then Middle to LOW&lt;/P&gt;&lt;P&gt;if the value in High to Middle then Separation happen inside that &lt;/P&gt;&lt;P&gt;its keeps on moving just like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Hariharan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178764#M463014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178765#M463015</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 a set of records, if we want to search for a record by using binary search concept..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, the set of records are divided into two subsets. It searches in the first subset by again dividing it into subsets. If it is not found in first subset, then it searches in the next subset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178765#M463015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178766#M463016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  Suppose you have 10 records and 6 th record is your search record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In linear search we have to search record by record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In binary search search can split the entire records into 2 groups and suppose if it finds the searching record in 1 group,it can ignore the other group.&lt;/P&gt;&lt;P&gt;Now in that considered group agian it split entire records into 2 groups and begin searching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;searching can be carriedout until it finds the searching records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processing time is very fast.O(log (2)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Restriction to use the Binary search on a table is the table must be in a sorted order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:47:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178766#M463016</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-04-20T12:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178767#M463017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never forget to sort the internal table on keys in "with key" statement before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SORT bin_tab BY k1 k2 ... kn.

LOOP AT itab.

   READ TABLE bin_tab WITH KEY k1 = itab-k1 k2 = itab-k2 ... kn = itab-kn

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178767#M463017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178768#M463018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maya,&lt;/P&gt;&lt;P&gt;    It is something like this.&lt;/P&gt;&lt;P&gt;If a table has 100 records.&lt;/P&gt;&lt;P&gt;You are searching for 97th record.&lt;/P&gt;&lt;P&gt;If you search sequentially, then you need to take 97 steps in the worst case.&lt;/P&gt;&lt;P&gt;If you use binary search, you will split the contents into two.&lt;/P&gt;&lt;P&gt;1-50 and 51-100&lt;/P&gt;&lt;P&gt;If the search key is greater than half of the total records, then you don't need to search the lower half.&lt;/P&gt;&lt;P&gt;here in our case, you don't need to look in 1-50 set as 97 &amp;gt;50.&lt;/P&gt;&lt;P&gt;Now.&lt;/P&gt;&lt;P&gt;YOu split 51-100 as 51-75 and 76-100.&lt;/P&gt;&lt;P&gt;again you compare 97 with 75. YOu can disregard 50-75.&lt;/P&gt;&lt;P&gt;The set you need to search is 76-100.&lt;/P&gt;&lt;P&gt;Split it again 76-87 and 88 to 100.&lt;/P&gt;&lt;P&gt;97&amp;gt; 87 so disregard 76-87 set.&lt;/P&gt;&lt;P&gt;Similarly you gave to continue this algorithm till you find the match.&lt;/P&gt;&lt;P&gt;This will improve the performance logarithmitically.&lt;/P&gt;&lt;P&gt;Means, the worst case for a search for 1024 records will be 32 takes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The worst case for a search of 10 power 100 records will be just 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 12:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178768#M463018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T12:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178769#M463019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raghuram,&lt;/P&gt;&lt;P&gt;                    &amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Clear description about Binary search...... from the scratch.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;What is what ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through this link...........&lt;/P&gt;&lt;P&gt;&lt;A href="http://en.wikipedia.org/wiki/Binary_search" target="test_blank"&gt;http://en.wikipedia.org/wiki/Binary_search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward all helpful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 13:01:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178769#M463019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T13:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178770#M463020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple way find to have a no 7 from a list of 1-10 numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st step check between (n = 10 ) / 2 =&amp;gt; 5 search betn lower range 1-5&lt;/P&gt;&lt;P&gt;2nd step check between ( n = 5 ) / 2  =&amp;gt;2 search betn 6-7&lt;/P&gt;&lt;P&gt;3rd Step check between (n = 2 ) / 2  =&amp;gt; 1 check with 6&lt;/P&gt;&lt;P&gt;4th Step check with 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its like a tree structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you have undertsand&lt;/P&gt;&lt;P&gt;Reward if helpful &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 13:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/2178770#M463020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T13:08:36Z</dc:date>
    </item>
  </channel>
</rss>

