<?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 increment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717637#M1107788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;l&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2008 08:25:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-05T08:25:38Z</dc:date>
    <item>
      <title>Performance increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717633#M1107784</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 to correct forum by moderator.  Next time please post in the correct forum AND use a meaningful subject&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ba_sched_items[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get the appropriate condition record from A016 &lt;/P&gt;&lt;P&gt;SELECT evrtn evrtp kappl knumh&lt;/P&gt;&lt;P&gt;FROM a016&lt;/P&gt;&lt;P&gt;INTO TABLE it_a016&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ba_sched_items&lt;/P&gt;&lt;P&gt;WHERE evrtn = ba_sched_items-ebeln AND&lt;/P&gt;&lt;P&gt;kappl = c_purchasing AND&lt;/P&gt;&lt;P&gt;evrtp = ba_sched_items-ebelp AND&lt;/P&gt;&lt;P&gt;datbi &amp;gt;= sy-datum AND&lt;/P&gt;&lt;P&gt;datab &amp;lt;= sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_a016[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT it_a016 BY kappl knumh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get the appropriate values from KONP table &lt;/P&gt;&lt;P&gt;SELECT kbetr meins kpein kmein konwa kappl knumh&lt;/P&gt;&lt;P&gt;FROM konp&lt;/P&gt;&lt;P&gt;INTO corresponding fields of table it_konp&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_a016&lt;/P&gt;&lt;P&gt;WHERE kappl = it_a016-kappl AND&lt;/P&gt;&lt;P&gt;knumh = it_a016-knumh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_konp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_a016&lt;/P&gt;&lt;P&gt;WITH KEY kappl = it_konp-kappl&lt;/P&gt;&lt;P&gt;knumh = it_konp-knumh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;it_konp-evrtn = it_a016-evrtn.&lt;/P&gt;&lt;P&gt;it_konp-evrtp = it_a016-evrtp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Modify konp table with PO number&lt;/P&gt;&lt;P&gt;"and item number&lt;/P&gt;&lt;P&gt;MODIFY it_konp TRANSPORTING evrtn evrtp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT it_konp BY evrtn evrtp knumh.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*End Of Changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;For the 1st select statement and comparing to 2nd select statement it is taking lot of time to execute nearly 20 minutes it is taking ,&lt;/P&gt;&lt;P&gt;And i checked all the condition statements are primary key fields only and please verify and let me know whats the mistake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 13:28:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717633#M1107784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T13:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Performance increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717634#M1107785</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;In the First select statement you missed KEY Fields KSCHL EVRTN and the order also different in the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second select statement you missed one keyField KOPOS and also you used CORRESPONDING FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also in the Loop you are reading the table without all the KEY fields..these all factors are consuming more time and performance is poor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the above mention points and correct it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will perform better than previous one.&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;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 13:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717634#M1107785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T13:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717635#M1107786</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;Do the following changes it will improve the performance ... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

sort ba_sched_items by ebeln.
delete adjacent duplicates from ba_sched_item comparing ebeln.

*Get the appropriate condition record from A016 
SELECT evrtn evrtp kappl knumh
FROM a016
INTO TABLE it_a016
FOR ALL ENTRIES IN ba_sched_items
WHERE evrtn = ba_sched_items-ebeln AND
kappl = c_purchasing AND
evrtp = ba_sched_items-ebelp AND
datbi &amp;gt;= sy-datum AND
datab &amp;lt;= sy-datum.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the same before the second select query as well. Also read using BINARY SEARCH. Also ensure that before using BINARY SEARCH in read... the internal table which you are reading is SORTED based on the fields using which you are reading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 15:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717635#M1107786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T15:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717636#M1107787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And ya.. incase.. if you cant delete the duplicates present in the temporary table, then move the content of this internal table to another internal table of same type and delete the duplicates there...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 15:18:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717636#M1107787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T15:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance increment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717637#M1107788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;l&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-increment/m-p/4717637#M1107788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:25:38Z</dc:date>
    </item>
  </channel>
</rss>

