<?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 problem with abap code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989949#M403963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is indeed this part that is causing the problem.&lt;/P&gt;&lt;P&gt;It is very surprising to me as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder why the programmer uses get time field...&lt;/P&gt;&lt;P&gt;why not just assign sy-uzeit to the itab field...&lt;/P&gt;&lt;P&gt;even though the program may run pass midnight. the date value should be correct as well...&lt;/P&gt;&lt;P&gt;so why need get time field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for a 15 minutes program.. this form is used 8 times. but only one part is causing problem&lt;/P&gt;&lt;P&gt;it took 7 minutes! that part is not within a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Charles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 08:06:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T08:06:36Z</dc:date>
    <item>
      <title>Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989940#M403954</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;I'm facing problems with a FI report. The batch job took approx 4hours for one variant and some variants can't even complete on time. For this case, out of the 4hrs, only 1 hour is due to SQL access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've traced the 3hr performance problem to a form which does calculation and sum of figures within loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be the problem... or what would be a good way to further investigate this?&lt;/P&gt;&lt;P&gt;So far I have only done performance tuning for programs due to inefficient SQL statements.&lt;/P&gt;&lt;P&gt;So, this is something new to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 09:45:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989940#M403954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T09:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989941#M403955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any experts in this area?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 09:52:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989941#M403955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T09:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989942#M403956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone? i'll reward generously. thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 10:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989942#M403956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T10:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989943#M403957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read is not the problem. it doesnt use read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some of the key abap used are:&lt;/P&gt;&lt;P&gt;within loop. ..&lt;/P&gt;&lt;P&gt;at new.&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;compute&lt;/P&gt;&lt;P&gt;modify&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what can cause several hours of processing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any experts? i'll reward generously. thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 10:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989943#M403957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T10:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989944#M403958</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;loops within loop mite be one cause...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk the link below:&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/HOME/ABAP" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/HOME/ABAP&lt;/A&gt;&lt;EM&gt;Performance&lt;/EM&gt;and+Tuning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if possible post ur code here...&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;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 12:03:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989944#M403958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T12:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989945#M403959</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;There can be many reason why your program is running for too long. Is there any way you can post your code here. This will be helpful to find the root cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 21:20:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989945#M403959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T21:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989946#M403960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Key things to check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Is the internal table sorted before the Loop.&lt;/P&gt;&lt;P&gt;2. Are nested loops used in the code - I feel that this is causing an issue.&lt;/P&gt;&lt;P&gt;3. Usage of Control break statements in nested loops to be avoided.&lt;/P&gt;&lt;P&gt;4. Selects within Loop are to be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above are the most common things that hinder the performace of the reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 03:24:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989946#M403960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T03:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989947#M403961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;found something interesting...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's something to do with this code..&lt;/P&gt;&lt;P&gt;&amp;amp; i think is the get time field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM timestamp  USING    value(itext) TYPE c.
  GET TIME FIELD ts-uzeit.
  MOVE sy-datum TO ts-datum.
  MOVE itext TO ts-event.
  APPEND ts. CLEAR ts.

  IF sy-batch EQ x
  OR write_ts EQ x.
    MESSAGE s020(nn) "&amp;amp;
     WITH itext.
  ENDIF.
ENDFORM.                    " timestamp

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 07:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989947#M403961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T07:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989948#M403962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This routine looks completely harmless. I just made a runtime analysis, in my system get time field needs 15 microseconds - nothing you have to worry about. Maybe for large tables TS the append needs sometimes a little bit longer - when new memory has to be allocated, but usually finding the values to be stored in an internal table takes longer than appending the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either you post bigger parts of the code, or you have to go on in your search for slow code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 07:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989948#M403962</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2007-03-13T07:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989949#M403963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is indeed this part that is causing the problem.&lt;/P&gt;&lt;P&gt;It is very surprising to me as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder why the programmer uses get time field...&lt;/P&gt;&lt;P&gt;why not just assign sy-uzeit to the itab field...&lt;/P&gt;&lt;P&gt;even though the program may run pass midnight. the date value should be correct as well...&lt;/P&gt;&lt;P&gt;so why need get time field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for a 15 minutes program.. this form is used 8 times. but only one part is causing problem&lt;/P&gt;&lt;P&gt;it took 7 minutes! that part is not within a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Charles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 08:06:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989949#M403963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T08:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989950#M403964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to your question: why get time field at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The time fields sy-uzeit and sy-datum are only updated in the beginning of a report (not every second) - and with the explicit command get time.&lt;/P&gt;&lt;P&gt;To avoid long running programs, which update DB with one single timestamp, a get time makes sense and is used to get different times for the DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As this usually takes only some microseconds, the usage is normally not a topic of discussion. Sounds more like the side-effect from a totally different problem, like swaping or network or anything else (I don't have an idea, what might cause get time to stop for minutes).&lt;/P&gt;&lt;P&gt;How did you come to the conclusion, get time needed 7 minutes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 10:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989950#M403964</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2007-03-13T10:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989951#M403965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I coded sy-uzeit to output at different points... so that i know how much time is taken for each part of the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-uzeit does changes... not only at the beginning of the report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 10:10:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989951#M403965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T10:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989952#M403966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Run the report .&lt;/P&gt;&lt;P&gt;Execute transaction sm50 . select the thread u are running and then go to menu program mode -&amp;gt; program -&amp;gt; debugging . This will lead u into the code where u can then check if there is a loop in the code or if a read etc is causing issues .&lt;/P&gt;&lt;P&gt;The transaction will also show u the time it takes for individual selects . keep pressing F8 on the transaction and you can see the selects whizzing by on the right hand side .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 12:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989952#M403966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T12:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989953#M403967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;narrowed down to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-batch EQ x  OR write_ts EQ x.&lt;/P&gt;&lt;P&gt;    MESSAGE s020(nn) WITH itext.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what's wrong with this. if it is a background job... it do this messaging a few time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 14:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989953#M403967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T14:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989954#M403968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are a few commands updating the time fields (maybe commit work - but after the table values are set, so of no use for the right entries in the table) - in general it's not reliable for time measurements with get time - command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you doing, when 'narrowing done' - I have the feeling, you are pointing at random places. E.g. when you debug and you have a long wait time for the if-statement (or the message s...), then it's maybe just a slow network connection and you are waiting 99% for GUI - which has absolutely nothing to do with runtime in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run a runtime analysis (SE30), write details to modularisation units and check for large net times (if more than 50% is ABAP and not DB). This should lead you to the right place. Also gathering data for internal tables is usefull - you might be right about this guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 22:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989954#M403968</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2007-03-13T22:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problem with abap code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989955#M403969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to add..  Too many decimal places can also lead to high ABAP time...also considering all this computing is done within loops.&lt;/P&gt;&lt;P&gt;Also check if you can modify or delete multiple lines at a time rather than doing it line by line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 13:52:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-with-abap-code/m-p/1989955#M403969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T13:52:14Z</dc:date>
    </item>
  </channel>
</rss>

