<?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/2079751#M431383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you coding this inside an exit? If yes, I do not see the need for a loop in that case..&lt;/P&gt;&lt;P&gt;If not, and if the z-table is not as huge as ekko, you could try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT tb_zcontractwflow.&lt;/P&gt;&lt;P&gt;READ TABLE tb_ekko WITH KEY ebeln = tb_zcontractwflow-ebeln.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;DELETE tb_ekko index sy-tabix.&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;MODIFY tb_zcontractwflow FROM TABLE tb_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 15:03:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-28T15:03:39Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079748#M431380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two DB tables 'ekko' and 'zcontractwflow' with a field EBELN (PO#) in them. If any new PO# is created in the ekko table it shud automatically be added to the zcontractwflow. I used the following logic:- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort tb_zcontractwflow by ebeln seqnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at tb_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      read table tb_zcontractwflow with key&lt;/P&gt;&lt;P&gt;      ebeln = tb_ekko-ebeln binary search.&lt;/P&gt;&lt;P&gt;      if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        tb_zcontractwflow-ebeln = tb_ekko-ebeln.&lt;/P&gt;&lt;P&gt;        insert zcontractwflow from tb_zcontractwflow.&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; But it has performance issues due the 'loop at tb_ekko' as the ekko has over 180,000 records. What do u suggest other than LOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 14:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079748#M431380</guid>
      <dc:creator>shilpik20</dc:creator>
      <dc:date>2007-03-28T14:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079749#M431381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;          You first select all the records from EKKO and from zcontractwflow.&lt;/P&gt;&lt;P&gt;delete all the records from ekko if the same records exists in zcontractwflow.&lt;/P&gt;&lt;P&gt;Now ul have less number of records in EKKO.&lt;/P&gt;&lt;P&gt;then insert all the EKKO records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashok...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 14:59:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079749#M431381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T14:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079750#M431382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Shilpik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can think about the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since purchase order numbers are generated using a specific number range,&lt;/P&gt;&lt;P&gt;the succeeding numbers will be greater than the preceeding one. Hence, if &lt;/P&gt;&lt;P&gt;we can sort the internal tables in descending order, and then loop the tb_ekko &lt;/P&gt;&lt;P&gt;table, the loop passes will be very few. Once the record is found in tb_zcontractflow, we can exit the &lt;/P&gt;&lt;P&gt;loop assuming that remaining records were existing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sort tb_zcontractwflow by ebeln seqnr descending.
sort tb_ekko by ebeln seqnr descending.

loop at tb_ekko. 
       read table tb_zcontractwflow with key
                           ebeln = tb_ekko-ebeln binary search.
       if sy-subrc &amp;lt;&amp;gt; 0.
              tb_zcontractwflow-ebeln = tb_ekko-ebeln.
              insert zcontractwflow from tb_zcontractwflow.
        else.
              exit.
        endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sajan Joseph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 15:02:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079750#M431382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T15:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079751#M431383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you coding this inside an exit? If yes, I do not see the need for a loop in that case..&lt;/P&gt;&lt;P&gt;If not, and if the z-table is not as huge as ekko, you could try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT tb_zcontractwflow.&lt;/P&gt;&lt;P&gt;READ TABLE tb_ekko WITH KEY ebeln = tb_zcontractwflow-ebeln.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;DELETE tb_ekko index sy-tabix.&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;MODIFY tb_zcontractwflow FROM TABLE tb_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 15:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/2079751#M431383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T15:03:39Z</dc:date>
    </item>
  </channel>
</rss>

