<?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: Performance issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685863#M1101591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dd&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Nov 2008 12:43:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-26T12:43:13Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685858#M1101586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moved by moderator to the correct forum.  Please use a more meaningful subject in future.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here below the code the Loop under Read statement i have used and have to use the binary search where have to use can any one suggest me to execute it fast .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT gvt_item   BY vbeln posnr.
  Read table gvt_item with key vbeln = ls_header-vbeln
                             posnr = ls_header-posnr.
   if sy-subrc = 0.
      wa_index = sy-tabix.

      gvt_item-zz_crm_id = ls_header-zz_crm_id.
      gvt_item-ktext     = ls_header-ktext.
      gvt_item-faksk     = ls_header-faksk.
      gvt_item-fpbez     = ls_header-fpbez.
      gvt_item-bezeich   = ls_header-bezeich.
      gvt_item-faksp     = ls_header-faksp.
      gvt_item-anndat    = ls_header-anndat.
      gvt_item-candat    = ls_header-candat.
      gvt_item-stats     = ls_header-stats.
      gvt_item-autte     = ls_header-autte.
      gvt_item-cmana     = ls_header-cmana.
      gvt_item-ename     = ls_header-ename.
      gvt_item-pstyv     = ls_header-pstyv.
      gvt_item-fpart     = ls_header-fpart.

* Insert by BRDK933549, modify the anniversary logic

* End of BRDK933549

      MODIFY gvt_item INDEX sy-tabix
             TRANSPORTING zz_crm_id ktext faksk fpbez bezeich
              faksp anndat candat stats autte cmana ename pstyv fpart.

    Endif.
*    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Nov 16, 2008 8:22 AM &lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt; Don't forget to put  tages around your code to keep the formatting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2008 04:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685858#M1101586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-15T04:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685859#M1101587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do F1 on binary search. &lt;/P&gt;&lt;P&gt;And post thread at their relevant place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2008 05:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685859#M1101587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-15T05:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685860#M1101588</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 gvt_item BY vbeln posnr. .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop XXXXXX.&lt;/P&gt;&lt;P&gt;Read table gvt_item with key vbeln = ls_header-vbeln&lt;/P&gt;&lt;P&gt;                                          posnr = ls_header-posnr &lt;/P&gt;&lt;P&gt;                                          binary search.&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;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sree,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2008 21:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685860#M1101588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-15T21:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685861#M1101589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The absolute fastest way, if you've a reasonable amount of data is to us ASSIGNING for your read - you can change the data directly in the table, and a HASHED table - no BINARY SEARCH required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming your data is of type "table_type".  First, define your table to be HASHED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gvt_time TYPE HASHED TABLE OF table_type WITH NON-UNIQUE KEY vbeln posnr.

FIELD-SYMBOLS: &amp;lt;ls_wa&amp;gt; TYPE LINE OF table_type.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  Read table gvt_item with TABLE key vbeln = ls_header-vbeln
                             posnr = ls_header-posnr ASSIGNING &amp;lt;ls_wa&amp;gt;.
   if sy-subrc = 0.
"     wa_index = sy-tabix.
 
      &amp;lt;ls_wa&amp;gt;-zz_crm_id = ls_header-zz_crm_id.
      &amp;lt;ls_wa&amp;gt;-ktext     = ls_header-ktext.
      &amp;lt;ls_wa&amp;gt;-faksk     = ls_header-faksk.
      &amp;lt;ls_wa&amp;gt;-fpbez     = ls_header-fpbez.
      &amp;lt;ls_wa&amp;gt;-bezeich   = ls_header-bezeich.
      &amp;lt;ls_wa&amp;gt;-faksp     = ls_header-faksp.
      &amp;lt;ls_wa&amp;gt;-anndat    = ls_header-anndat.
      &amp;lt;ls_wa&amp;gt;-candat    = ls_header-candat.
      &amp;lt;ls_wa&amp;gt;-stats     = ls_header-stats.
      &amp;lt;ls_wa&amp;gt;-autte     = ls_header-autte.
      &amp;lt;ls_wa&amp;gt;-cmana     = ls_header-cmana.
      &amp;lt;ls_wa&amp;gt;-ename     = ls_header-ename.
      &amp;lt;ls_wa&amp;gt;-pstyv     = ls_header-pstyv.
      &amp;lt;ls_wa&amp;gt;-fpart     = ls_header-fpart.
 
* Insert by BRDK933549, modify the anniversary logic
 
* End of BRDK933549
 
"     MODIFY gvt_item INDEX sy-tabix
"           TRANSPORTING zz_crm_id ktext faksk fpbez bezeich
"           faksp anndat candat stats autte cmana ename pstyv fpart.
 
    Endif.
"    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note, the use of tables with header-lines is bad programming practice.  Avoid where possible.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 07:37:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685861#M1101589</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-11-16T07:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685862#M1101590</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;    Just place binary search after read stmt.&lt;/P&gt;&lt;P&gt;    remember when soring the table before reading it, use 'binary search' for fast execution. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  Read table gvt_item with key vbeln = ls_header-vbeln
                             posnr = ls_header-posnr binary search.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks,&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2008 04:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685862#M1101590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-18T04:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685863#M1101591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dd&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 12:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/4685863#M1101591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T12:43:13Z</dc:date>
    </item>
  </channel>
</rss>

