<?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/3805347#M915269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will depend upon the content of the internal table if whole column for a field is empty and it is the only key to read the table it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at this case it will work as this is one of three keys avilable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a whole if a key can identify a unique record from an internal table binary serch will work otherwise not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2008 06:29:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-21T06:29:39Z</dc:date>
    <item>
      <title>Binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805344#M915266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, Is it possible to use binary search for a fileld which is blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; sort it_mhis by warpl abnum knasr.&lt;/P&gt;&lt;P&gt;  read table it_mhis into wa_mhis&lt;/P&gt;&lt;P&gt;                         with key warpl = wa_afih-warpl&lt;/P&gt;&lt;P&gt;                                  abnum = wa_afih-abnum&lt;/P&gt;&lt;P&gt;                                  knasr  = ' '.             " (Balank)&lt;/P&gt;&lt;P&gt;                                   binary search.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the above statment is wrong ,i would like to know why??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 06:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805344#M915266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T06:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805345#M915267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its just the sort sequence that matters.. nothing to do with the data in the internal table..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort it_mhis by warpl abnum knasr.
read table it_mhis into wa_mhis with key warpl = wa_afih-warpl
                                                            abnum = wa_afih-abnum
                                                            knasr = ' '. " (Balank)
                                                            binary search. 
if sy-subrc eq 0.

endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 06:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805345#M915267</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-05-21T06:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805346#M915268</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;It is possible, no issues. Binary search addition in read statement works properly only when the internal table sorted with key fields used in the condition of the read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 06:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805346#M915268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T06:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805347#M915269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will depend upon the content of the internal table if whole column for a field is empty and it is the only key to read the table it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at this case it will work as this is one of three keys avilable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a whole if a key can identify a unique record from an internal table binary serch will work otherwise not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 06:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search/m-p/3805347#M915269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T06:29:39Z</dc:date>
    </item>
  </channel>
</rss>

