<?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: Problem with read table with binary search in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434612#M544474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arora,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always use BINARY SEARCH with read statement and before using the binary search SORT the internal table.&lt;/P&gt;&lt;P&gt;in your case&lt;/P&gt;&lt;P&gt;SORT &amp;lt;table&amp;gt; BY lclic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2007 03:03:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-26T03:03:03Z</dc:date>
    <item>
      <title>Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434610#M544472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;i am using the read table statement wth binary search but when i use with binary search as belwo a strange thing happens most oft he records get blank and the result of the report is not the same as that withouth using binary search&lt;/P&gt;&lt;P&gt;so where to use binary search and under which conditions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using &lt;/P&gt;&lt;P&gt;read table into wa_table &lt;/P&gt;&lt;P&gt;with key lclic = gt_itab-lclic binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls suggest when and how can we use binary search and any idea why the records are difrenet now thant the earlier and which is correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Arora&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 02:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434610#M544472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T02:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434611#M544473</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;sort itab by lclic.&lt;/P&gt;&lt;P&gt;Before reading,sort it using the same key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 02:43:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434611#M544473</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-26T02:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434612#M544474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arora,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always use BINARY SEARCH with read statement and before using the binary search SORT the internal table.&lt;/P&gt;&lt;P&gt;in your case&lt;/P&gt;&lt;P&gt;SORT &amp;lt;table&amp;gt; BY lclic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 03:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434612#M544474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T03:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434613#M544475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am already sorting the table by the key each time but still the records are diffrent?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;arora&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 03:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434613#M544475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T03:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434614#M544476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when you use read table with binary search &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use sort command ,then use binary search &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sort wa_table by iclic.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table into wa_table &lt;/P&gt;&lt;P&gt;with key lclic = gt_itab-lclic binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;do the further operation&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;clear :wa_table&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 03:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434614#M544476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T03:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434615#M544477</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;I think you are sort inside the loop.You should use it outside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by f1.&lt;/P&gt;&lt;P&gt;loop ....&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;read table itab into wa with key f1 = value 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;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;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jayanthi Jayaraman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 03:08:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434615#M544477</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-26T03:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434616#M544478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you jsut paste your code here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 03:14:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434616#M544478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T03:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434617#M544479</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;P&gt;also i have problem reading the BPext statement from gt_but001&lt;/P&gt;&lt;P&gt;as guid_mobj is not key &lt;/P&gt;&lt;P&gt;and this is the select i am using for it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF not gt_sagmeld[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gt_sagmeld_temp like gt_sagmeld.&lt;/P&gt;&lt;P&gt;gt_sagmeld_temp[] = gt_sagmeld[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort gt_sagmeld_temp by guid_mobj.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from gt_sagmeld_temp[] comparing guid_mobj.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;     select /sapsll/corpar~parno&lt;/P&gt;&lt;P&gt;            /sapsll/corpar~guid_mobj&lt;/P&gt;&lt;P&gt;               but000~partner   " pK&lt;/P&gt;&lt;P&gt;             but000~bpext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            into table gt_but001&lt;/P&gt;&lt;P&gt;    from    /sapsll/corpar&lt;/P&gt;&lt;P&gt;    INNER join but000  on  but000&lt;SUB&gt;partner = /sapsll/corpar&lt;/SUB&gt;parno&lt;/P&gt;&lt;P&gt;    for all entries in gt_sagmeld_temp&lt;/P&gt;&lt;P&gt;    where  /sapsll/corpar~guid_mobj = gt_sagmeld_temp-guid_mobj&lt;/P&gt;&lt;P&gt;    and    /sapsll/corpar~PAFCT = 'SH'.&lt;/P&gt;&lt;P&gt;also let me know how to read bpext from gt_but001 correctly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort gt_sagmeld by guid_lclic.&lt;/P&gt;&lt;P&gt;loop at gt_sagmeld into wa_sagmeld .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        move wa_sagmeld-amnt_flt to  gvsagmeldamntflt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         wa_sagmeld_outtab-amnt_flt = gvsagmeldamntflt.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       read table gt_but001 into wa_but001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     with key guid_mobj = wa_sagmeld-guid_mobj  binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_sagmeld_outtab-bpext = wa_but001-bpext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_sagmeld_outtab-bpext = wa_but001-bpext.        " &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         read table gt_sapsllcuit into wa_sapsllcuit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         with key guid_cuit = wa_sagmeld-guid_pobj binary search .&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;         Read table gt_corref into wa_corref with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         guid_pobj = wa_sapsllcuit-guid_cuhd binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        wa_sagmeld_outtab-refno = wa_corref-refno+20(20).   "&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        Read table gt_prt into wa_prt with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        guid_pr = wa_sapsllcuit-guid_pr binary search .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       gv_waprtxt = wa_prt-prtxt.&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;       Read table gt_prcon into wa_prcon with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       guid_pr = wa_sapsllcuit-guid_pr  binary search .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      gv_prcon_segck = wa_prcon-secgk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_sagmeld_outtab-secgk  = gv_prcon_segck+0(3).&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;    loop at gt_ctsnumt into wa_ctsnumt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    where guid_ctsnum = wa_corcts-guid_ctsnum and launr = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Read table gt_ctsnumt into wa_ctsnumt1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    With key guid_ctsnum = wa_corcts-guid_ctsnum&lt;/P&gt;&lt;P&gt;    launr = '0002'  binay search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        append wa_sagmeld_outtab to gt_sagmeld_outtab.&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;   IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Append wa_sagmeld_outtab to gt_sagmeld_outtab.&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;   clear wa_sagmeld_outtab.&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;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 07:12:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434617#M544479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T07:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434618#M544480</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;Basically sort all the tables before loop.clear the workarea before reading.&lt;/P&gt;&lt;P&gt;sort gt_sagmeld by guid_lclic.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sort gt_but001 by guid_mobj.&lt;/P&gt;&lt;P&gt;sort gt_sapsllcuit by guid_cuit .&lt;/P&gt;&lt;P&gt;sort gt_corref by guid_pobj.&lt;/P&gt;&lt;P&gt;sort gt_prt by guid_pr.&lt;/P&gt;&lt;P&gt;sort gt_prcon by guid_pr .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at gt_sagmeld into wa_sagmeld .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move wa_sagmeld-amnt_flt to gvsagmeldamntflt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-amnt_flt = gvsagmeldamntflt. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;clear wa_but001.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;read table gt_but001 into wa_but001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with key guid_mobj = wa_sagmeld-guid_mobj binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-bpext = wa_but001-bpext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-bpext = wa_but001-bpext. " &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;clear wa_sapsllcuit.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;read table gt_sapsllcuit into wa_sapsllcuit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with key guid_cuit = wa_sagmeld-guid_pobj binary search .&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;clear gt_corref.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Read table gt_corref into wa_corref with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guid_pobj = wa_sapsllcuit-guid_cuhd binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-refno = wa_corref-refno+20(20). "&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;clear wa_prt.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Read table gt_prt into wa_prt with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guid_pr = wa_sapsllcuit-guid_pr binary search .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gv_waprtxt = wa_prt-prtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear wa_prcon.&lt;/P&gt;&lt;P&gt;Read table gt_prcon into wa_prcon with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guid_pr = wa_sapsllcuit-guid_pr binary search .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gv_prcon_segck = wa_prcon-secgk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-secgk = gv_prcon_segck+0(3).&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...........&lt;/P&gt;&lt;P&gt;loop at gt_ctsnumt into wa_ctsnumt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where guid_ctsnum = wa_corcts-guid_ctsnum and launr = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table gt_ctsnumt into wa_ctsnumt1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With key guid_ctsnum = wa_corcts-guid_ctsnum&lt;/P&gt;&lt;P&gt;launr = '0002' binay search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_sagmeld_outtab to gt_sagmeld_outtab.&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;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append wa_sagmeld_outtab to gt_sagmeld_outtab.&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;clear wa_sagmeld_outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 07:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434618#M544480</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-26T07:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434619#M544481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arora,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You haven't sorted all your internal tables.Just SORT all of them and also check sy-subrc after read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table gt_but001 into wa_but001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with key guid_mobj = wa_sagmeld-guid_mobj binary search.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all useful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 07:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434619#M544481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T07:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434620#M544482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;let me try it and i will revert back and rewards points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also I HAVE also asked regarding the reading for the table gt_but001&lt;/P&gt;&lt;P&gt;i am not sure how to read the bpext from gt_but001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also thirdly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what diffrence does clear statment makes? and why there is necesary to sort it first also does hte statment i used give wrong data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 07:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434620#M544482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T07:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434621#M544483</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;Let me answer regarding clear and SORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you NOT clear the work area then next time you read the table then the work area will contain the old values. So for safer side clear the work area and the best practise is check sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT - Binary search work on the principle of SORT. So to work it properly only if you SORT the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and regarding gt_but001 I will just see if I can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 08:00:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434621#M544483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T08:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434622#M544484</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;i ahave made the changes as sort etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the below statement is giving error as there is loop insid the loop outer of sagmeld as u see in the code i pasted&lt;/P&gt;&lt;P&gt;the error is coming at on clearing gt_ctsnumt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error msg is  U MAY NOT DELETE OR OVEWRITE GT_CTSNUMT WITHIN A LOOP OVER ITSELF I SUPPOSE I HAVE TO PUT CLEAR OUTSIDE THE LOOP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at gt_ctsnumt into wa_ctsnumt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    where guid_ctsnum = wa_corcts-guid_ctsnum and launr = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   clear gt_ctsnumt.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    Read table gt_ctsnumt into wa_ctsnumt1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    With key guid_ctsnum = wa_corcts-guid_ctsnum&lt;/P&gt;&lt;P&gt;    launr = '0002' binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Concatenate wa_ctsnumt-text wa_ctsnumt1-text into gvctsnumtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_sagmeld_outtab-text = gvctsnumtext .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    append wa_sagmeld_outtab to gt_sagmeld_outtab.&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;   IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Append wa_sagmeld_outtab to gt_sagmeld_outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 08:16:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434622#M544484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T08:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434623#M544485</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;You should clear only workarea to avoid if there is any default values.&lt;/P&gt;&lt;P&gt;clear wa_ctsnumt1.&lt;/P&gt;&lt;P&gt;Read table gt_ctsnumt into wa_ctsnumt1...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just now I had seen my reply.In one place, I have mistakenly cleared internal table.Only we need to clear workarea before reading. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear &amp;lt;b&amp;gt;wa_corref&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;Read table gt_corref into wa_corref with key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guid_pobj = wa_sapsllcuit-guid_cuhd binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-refno = wa_corref-refno+20(20). "&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jayanthi Jayaraman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 08:18:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434623#M544485</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-26T08:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434624#M544486</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;Before using read, u should sort the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change ur code into following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table gt_itab into wa_table with key lclic = wa_table-lclic binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if its useful&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>Tue, 26 Jun 2007 08:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434624#M544486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T08:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434625#M544487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ALL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YA NOW I AM GETTING THE SAME VALUE AS BEFORE&lt;/P&gt;&lt;P&gt;BUT PLEASE ELOBORATE MORE ON BINARY SEARCH OPTION LIKE WHAT DOES IT DO AN DHOW IT IMPORVES PERFORMANCE AND WHY SORTING IS NECCESSARY BEFORE IT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALSO PLEASE ADDRESS MY BUT00 PROBLEM IF U WANT I CAN SEND THE CODE N SEPERATE MAIL AND DATABASE STRUCTURE I AM FACING SOME PROBLEM WITH A PERFRMANCE LOTS OF PROBLEMS AND I WILL REWARDS POINTS FOR ALL PROBLEMS SOLVED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REAGRDS&lt;/P&gt;&lt;P&gt;ARORA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 08:28:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434625#M544487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T08:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434626#M544488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya Jayanthi &lt;/P&gt;&lt;P&gt;i already has rectified that mistake the errro was coming becasue of that only and some data also missed so i checked and got it already&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but can you address on my but00 problem&lt;/P&gt;&lt;P&gt;my problem is to read bpext correctly as i have pasted the whole code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;consider a scenerio as below &lt;/P&gt;&lt;P&gt;int table in which data i already tehre gt_sagmeld (here primary key is guid_lclic)&lt;/P&gt;&lt;P&gt;and matching field for next select is guid_mobj &lt;/P&gt;&lt;P&gt;not corpar table is joined to butoo by parno.&lt;/P&gt;&lt;P&gt;and primary key of corpar is guid_corpar which has no link to gt_sagmeld&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and primary key of but00 is partner and it isjoined to corpar by but00-partner = corpar-parno&lt;/P&gt;&lt;P&gt;adn i need to read but00-bpext&lt;/P&gt;&lt;P&gt;pls see the below seelct statment for it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gt_Saglemd has data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gt_sagmeld_temp like gt_sagmeld.&lt;/P&gt;&lt;P&gt;gt_sagmeld_temp[] = gt_sagmeld[].&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from gt_sagmeld_temp[] comparing guid_mobj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select corpar~PAFCT &lt;/P&gt;&lt;P&gt;corpar~parno &lt;/P&gt;&lt;P&gt;into table gt_corpar&lt;/P&gt;&lt;P&gt;from corpar&lt;/P&gt;&lt;P&gt;for all entries in gt_sagmeld_temp&lt;/P&gt;&lt;P&gt;where /sapsll/corpar~guid_mobj = gt_sagmeld_temp-guid_mobj&lt;/P&gt;&lt;P&gt;and /sapsll/corpar~PAFCT = 'SH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort gt_corpar by parno.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from gt_corpar comparing parno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select but000~partner&lt;/P&gt;&lt;P&gt;but000~bpext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from but000 into table gt_but001&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;for all entries in gt_corpar&lt;/P&gt;&lt;P&gt;where but000~partner = gt_corpar-parno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the table gt_but001 contans the required bpext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i want to read it to outtab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reading...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at gt_satmeld into wa_gt_sagmeld&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some field selection....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now how to read the bpext in this loop from but001&lt;/P&gt;&lt;P&gt;as there is table corpar also and then but001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table gt_but000 into wa_but000&lt;/P&gt;&lt;P&gt;with key partner = corpar-parno&lt;/P&gt;&lt;P&gt;...but this will not work as firs i need to read corpar also so how to use the loop or what is procedure to read ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 09:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434626#M544488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T09:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434627#M544489</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;I am not sure whether I understood the requirement correctly.Anyway, I will try.&lt;/P&gt;&lt;P&gt;sort gt_corpar by guid_mobj.&lt;/P&gt;&lt;P&gt;sort gt_but000 by partner.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;loop at gt_sagmeld into wa_sagmeld .&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;clear wa_corpar.&lt;/P&gt;&lt;P&gt;read table gt_corpar into wa_corpar&lt;/P&gt;&lt;P&gt;with key guid_mobj = wa_sagmeld-guid_mobj binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;clear wa_but000.&lt;/P&gt;&lt;P&gt;read table gt_but000 into wa_but000&lt;/P&gt;&lt;P&gt;with key partner = wa_corpar-parno binary search.&lt;/P&gt;&lt;P&gt;wa_sagmeld_outtab-bpext = wa_but001-bpext.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jayanthi Jayaraman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 09:21:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434627#M544489</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-26T09:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434628#M544490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya Jayanthi &lt;/P&gt;&lt;P&gt;i was also tried the same t hing to read table gt_but000&lt;/P&gt;&lt;P&gt;i suppose it work but not sure for correct entries&lt;/P&gt;&lt;P&gt;as &lt;/P&gt;&lt;P&gt;i have one doubt regarding the read table statment&lt;/P&gt;&lt;P&gt;1) can someone send me link to it so that i can undserstand fully&lt;/P&gt;&lt;P&gt;2) whne such case as i told above guid_mobj is not the primary key but it is the only link between the wa_sagmeld and corpar&lt;/P&gt;&lt;P&gt;and corpar here also parno. is the link to but000- partner&lt;/P&gt;&lt;P&gt;but again par no is not the primary key again in corpar table so will this statement hold good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also Jayanthi&lt;/P&gt;&lt;P&gt;if possible can u send me ur mail id as i am facing some performance problem and read problem for a report for some slect even thogh iam usning for all entries etc and usnign no joins or where clause etc but stll for 14000 entries the program is stuccking at the select statment we are using for corpar?&lt;/P&gt;&lt;P&gt;maily i want if anyone can givve me performance improvement tips &lt;/P&gt;&lt;P&gt;for eg here for a single guid_lclic in the data in table legcon for guid_pobj is abt 15000 and for this 15000 records our above record gets executed for corpar then we are selecting bpext from but000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 09:37:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434628#M544490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with read table with binary search</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434629#M544491</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 the key field which you are using for read stateemnt is not the primary key,then there is possiblity of more than one record for the condition.So in such a situation loop should use d with where condition for the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using binary search for read statement after sorting the table based on the key field,the read statement will fetch the data faster.Basically for performance improvement, we use this method.&lt;/P&gt;&lt;P&gt;But if the condition which are passing is not a key field, then there are possiblities for more than one record.So loop should be use dwith where condition.&lt;/P&gt;&lt;P&gt;loop at itab into wa where f1 = value.&lt;/P&gt;&lt;P&gt;....&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;Check this link or use f1 help for more information.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/read_t01.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/read_t01.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 09:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-table-with-binary-search/m-p/2434629#M544491</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-06-26T09:53:05Z</dc:date>
    </item>
  </channel>
</rss>

