<?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 Dynamic Read in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671993#M1448081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do you create your internal table "&amp;lt;FS_IT_CRV&amp;gt;" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i found this thread [here|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1570278"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the code lines of  David Klotz.&lt;/P&gt;&lt;P&gt;If you insert a sort statement before read and change read adding binary search it might work.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT &amp;lt;gt_itab&amp;gt; BY (ge_key_field1) (ge_key_field2) (ge_key_field3) .
* Finally, perform the search
  READ TABLE &amp;lt;gt_itab&amp;gt; ASSIGNING &amp;lt;gs_result&amp;gt;
          WITH KEY (ge_key_field1) = pa_cond1
                   (ge_key_field2) = pa_cond2
                   (ge_key_field3) = pa_cond3 BINARY SEARCH.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following code in my own program and it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT &amp;lt;wlf_t_data&amp;gt; BY (c_trkorr).
  read table &amp;lt;wlf_t_data&amp;gt; assigning &amp;lt;wlf_header&amp;gt; with key
         (c_trkorr) = 'DRR' binary search.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where   &amp;lt;wlf_t_data&amp;gt; is a dynamic table created by method create_dynamic_table of class cl_alv_table_create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cordialement,&lt;/P&gt;&lt;P&gt;Chaouki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Mar 2010 09:38:09 GMT</pubDate>
    <dc:creator>chaouki_akir</dc:creator>
    <dc:date>2010-03-20T09:38:09Z</dc:date>
    <item>
      <title>Binary Search in Dynamic Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671992#M1448080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      read table &amp;lt;fs_it_crv&amp;gt; assigning &amp;lt;fs_wa_crv&amp;gt; with key
                                  ('objty') = wa_plfh-objty
                                  ('objid') = wa_plfh-objid
                                  binary search.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If i use binary search system giving error while activating as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use explicit or implicit index operations on tables with&lt;/P&gt;&lt;P&gt;types "HASHED TABLE" or "ANY TABLE". "" has the type "ANY&lt;/P&gt;&lt;P&gt;TABLE". It is possible that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could i use Binary search in dynamic read&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 06:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671992#M1448080</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2010-03-20T06:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search in Dynamic Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671993#M1448081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do you create your internal table "&amp;lt;FS_IT_CRV&amp;gt;" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i found this thread [here|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1570278"&gt;&lt;/A&gt;;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the code lines of  David Klotz.&lt;/P&gt;&lt;P&gt;If you insert a sort statement before read and change read adding binary search it might work.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT &amp;lt;gt_itab&amp;gt; BY (ge_key_field1) (ge_key_field2) (ge_key_field3) .
* Finally, perform the search
  READ TABLE &amp;lt;gt_itab&amp;gt; ASSIGNING &amp;lt;gs_result&amp;gt;
          WITH KEY (ge_key_field1) = pa_cond1
                   (ge_key_field2) = pa_cond2
                   (ge_key_field3) = pa_cond3 BINARY SEARCH.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following code in my own program and it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT &amp;lt;wlf_t_data&amp;gt; BY (c_trkorr).
  read table &amp;lt;wlf_t_data&amp;gt; assigning &amp;lt;wlf_header&amp;gt; with key
         (c_trkorr) = 'DRR' binary search.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where   &amp;lt;wlf_t_data&amp;gt; is a dynamic table created by method create_dynamic_table of class cl_alv_table_create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cordialement,&lt;/P&gt;&lt;P&gt;Chaouki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 09:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671993#M1448081</guid>
      <dc:creator>chaouki_akir</dc:creator>
      <dc:date>2010-03-20T09:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search in Dynamic Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671994#M1448082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chaouki.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That Worked. Issue solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 09:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671994#M1448082</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2010-03-20T09:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search in Dynamic Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671995#M1448083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;don't you close the thread?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Mar 2010 21:39:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671995#M1448083</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-03-20T21:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Search in Dynamic Read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671996#M1448084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sandra,&lt;/P&gt;&lt;P&gt;I tried to close this thread. but could not able to , the following is error i am getting for the past 2 days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;An error has occured while assigning points. Please refresh the thread view and try again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Mar 2010 05:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/binary-search-in-dynamic-read/m-p/6671996#M1448084</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2010-03-21T05:29:48Z</dc:date>
    </item>
  </channel>
</rss>

