<?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 improve performace in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664322#M614793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hallow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i improve this performace for this select loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT zempkostlprice_rec INTO wa_zem.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE ktext&lt;/P&gt;&lt;P&gt;          FROM cskv&lt;/P&gt;&lt;P&gt;          INTO wa_zem-ktext&lt;/P&gt;&lt;P&gt;          WHERE resrc IN g_r_resrc.&lt;/P&gt;&lt;P&gt;&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;          MODIFY zempkostlprice_rec  FROM wa_zem TRANSPORTING ktext.&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2007 08:19:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-28T08:19:03Z</dc:date>
    <item>
      <title>improve performace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664322#M614793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hallow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i improve this performace for this select loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT zempkostlprice_rec INTO wa_zem.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE ktext&lt;/P&gt;&lt;P&gt;          FROM cskv&lt;/P&gt;&lt;P&gt;          INTO wa_zem-ktext&lt;/P&gt;&lt;P&gt;          WHERE resrc IN g_r_resrc.&lt;/P&gt;&lt;P&gt;&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;          MODIFY zempkostlprice_rec  FROM wa_zem TRANSPORTING ktext.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 08:19:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664322#M614793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T08:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: improve performace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664323#M614794</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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;put the select single outside of the loop, if the g_r_resrc is not changing within &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;your loop&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: gt_cskv LIKE STANDARD TABLE OF cskv,&lt;/P&gt;&lt;P&gt;wa_cskv LIKE LINE OF gt_cskv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ktext&lt;/P&gt;&lt;P&gt;FROM cskv&lt;/P&gt;&lt;P&gt;INTO TABLE gt_cskv&lt;/P&gt;&lt;P&gt;WHERE resrc IN g_r_resrc AND &lt;/P&gt;&lt;P&gt;spras = sy-langu.   "to avoid duplicated entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT zempkostlprice_rec INTO wa_zem.&lt;/P&gt;&lt;P&gt;READ TABLE gt_cskv TO wa_cskv&lt;/P&gt;&lt;P&gt;WITH KEY resrc = wa_zem-resrc.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE wa_cskv-ktext TO wa_zem-ktext.&lt;/P&gt;&lt;P&gt;MODIFY zempkostlprice_rec FROM wa_zem TRANSPORTING ktext.&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;It will be good now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamás&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Tamás Nyisztor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 08:23:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664323#M614794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T08:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: improve performace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664324#M614795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A small correction to Tamas's Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT ktext " SINGLE not necessary
FROM cskv
INTO TABLE gt_cskv
WHERE resrc IN g_r_resrc AND 
spras = sy-langu.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope Tamas does not mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 08:42:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664324#M614795</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-08-28T08:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: improve performace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664325#M614796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please in the performance forum you should recommend performance improvements, not how to make it worse!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_cskv LIKE STANDARD TABLE OF cskv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ktext&lt;/P&gt;&lt;P&gt;FROM cskv&lt;/P&gt;&lt;P&gt;INTO TABLE gt_cskv&lt;/P&gt;&lt;P&gt;WHERE resrc IN g_r_resrc AND &lt;/P&gt;&lt;P&gt;spras = sy-langu. "to avoid duplicated entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT zempkostlprice_rec INTO wa_zem.&lt;/P&gt;&lt;P&gt;READ TABLE gt_cskv TO wa_cskv&lt;/P&gt;&lt;P&gt;WITH KEY resrc = wa_zem-resrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a typical example for quadratic coding, which is the worst you can do!!!!!&lt;/P&gt;&lt;P&gt;Plus the select single it will not even be functionally correct!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The nested loop works fine if the table gt_cskv is a hashed table or a sorted table with unique key resrc! Or a standard table with binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The single is a bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But these things are not the performance, it will be related to the SQL execution plan for the view. Is the view really properly supported by indexes. Did you check the SQL trace?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 08:56:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664325#M614796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T08:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: improve performace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664326#M614797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea, just forget the single in the code &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; It has to be removed of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *   "it is the best way I think&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 09:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664326#M614797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T09:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: improve performace</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664327#M614798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The single is a simple bug!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The nested loop is a big bug, worse than the original.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the 10 points is a joke.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 11:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/improve-performace/m-p/2664327#M614798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T11:15:35Z</dc:date>
    </item>
  </channel>
</rss>

