<?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 Performance Issue in the code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822903#M42852</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;
  &lt;P&gt;The below code is taking lot of time. How can i improve the performance for this code -&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SELECT venum AS venum,
 exidv AS exivd
 INTO TABLE @DATA(it_vekp)
 FROM vekp
 FOR ALL ENTRIES IN @it_vepo
 WHERE venum = @it_vepo-unvel.


 LOOP AT it_vekp INTO DATA(wa_vekp).
  UPDATE vekp SET erlkz = 'X' WHERE venum = wa_vekp-venum.
   IF sy-subrc = 0.
   COMMIT WORK.
 ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Feb 2019 10:35:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-02-21T10:35:59Z</dc:date>
    <item>
      <title>Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822903#M42852</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
  &lt;P&gt;The below code is taking lot of time. How can i improve the performance for this code -&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SELECT venum AS venum,
 exidv AS exivd
 INTO TABLE @DATA(it_vekp)
 FROM vekp
 FOR ALL ENTRIES IN @it_vepo
 WHERE venum = @it_vepo-unvel.


 LOOP AT it_vekp INTO DATA(wa_vekp).
  UPDATE vekp SET erlkz = 'X' WHERE venum = wa_vekp-venum.
   IF sy-subrc = 0.
   COMMIT WORK.
 ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Feb 2019 10:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822903#M42852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-02-21T10:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822904#M42853</link>
      <description>&lt;P&gt;Babu - this is not an answer to your question but a comment on the code you shared:&lt;/P&gt;&lt;P&gt;Hard updates to SAP-tables like you do here are not a good idea and shouldn't be done as you run at least the risks of a) creating inconsistencies and b) circumvent tracking of table changes.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 11:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822904#M42853</guid>
      <dc:creator>BaerbelWinkler</dc:creator>
      <dc:date>2019-02-21T11:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822905#M42854</link>
      <description>&lt;P&gt;maybe you should just have a look at your course book. Pretty sure there is a chapter in, that a commit work should not be placed at that line...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 11:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822905#M42854</guid>
      <dc:creator>Florian</dc:creator>
      <dc:date>2019-02-21T11:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822906#M42855</link>
      <description>&lt;P&gt;Also, if you corrupt your database somehow, then SAP will charge you $$$$ to fix, and you may well be violating license conditions.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 12:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822906#M42855</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-02-21T12:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822907#M42856</link>
      <description>&lt;P&gt;Hi Badu, &lt;/P&gt;&lt;P&gt;Despite all the comments about your question, and by the way, they are totally right, if we look just on the performance side, using update inside a loop is not a good idea (without even mention the commit!). Try to use modify, like below, and check if performance improves.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select *
  into table @data(it_vekp)
  from vekp
  for all entries in @it_vepo
 where venum = @it_vepo-unvel.

data ls_vekp like line of it_vekp.
ls_vekp-erlkz = 'X'.

modify it_vekp from ls_vekp transporting erlkz where erlkz is initial.
modify vekp from table it_vekp.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rafael&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822907#M42856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-02-21T14:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822908#M42857</link>
      <description>&lt;P&gt;Your solution doesn't compile because the components of IT_VEKP (3 columns as far as I can see) don't correspond to (all) the columns of VEKP.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To use MODIFY vekp, you must use an internal table with all the columns of VEKP.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:28:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822908#M42857</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-02-21T18:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822909#M42858</link>
      <description>&lt;P&gt;Please provide the execution plan (SQL EXPLAIN) of both the SELECT and UPDATE.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 18:30:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822909#M42858</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-02-21T18:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822910#M42859</link>
      <description>&lt;P&gt;Well observed @Sandra Rossi, changed to asterisk.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 20:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822910#M42859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-02-21T20:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822911#M42860</link>
      <description>&lt;P&gt;Check &lt;/P&gt;&lt;P&gt;@it_vepo&lt;/P&gt;&lt;P&gt;is not empty.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 09:12:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822911#M42860</guid>
      <dc:creator>ged_hurst</dc:creator>
      <dc:date>2019-04-03T09:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822912#M42861</link>
      <description>&lt;P&gt;You can also restrict the data set adding erlkz = space.&lt;/P&gt;&lt;P&gt;Less data to process. &lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 12:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-the-code/m-p/822912#M42861</guid>
      <dc:creator>r010101010</dc:creator>
      <dc:date>2019-04-05T12:37:18Z</dc:date>
    </item>
  </channel>
</rss>

