<?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: ABAP Time limit exceeded Dump in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821091#M350917</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;  It is a case of select query taking too much time.&lt;/P&gt;&lt;P&gt;You can avoid the select statement inside the loop and use for all entries statement instead. Anyway, this doesn't guarantee the execution within the limit you set(which is i hour as of now). You should better run this program in background. background jobs can run for any long.&lt;/P&gt;&lt;P&gt;SORT IT_BSAK BY BELNR.&lt;/P&gt;&lt;P&gt;SELECT BUKRS GJAHR AWKEY INTO  table it_bkpf&lt;/P&gt;&lt;P&gt;FROM BKPF&lt;/P&gt;&lt;P&gt;for all entries in it_bsak&lt;/P&gt;&lt;P&gt;WHERE STBLG = IT_BSAK-BELNR&lt;/P&gt;&lt;P&gt;AND bukrs = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;AND gjahr = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_BSAK.&lt;/P&gt;&lt;P&gt;read table it_bkpf with key belnr = it_bsak-belnr bukrs = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;                                       gjahr = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;DELETE IT_BSAK WHERE BELNR = IT_BSAK-BELNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jan 2007 15:19:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-04T15:19:45Z</dc:date>
    <item>
      <title>ABAP Time limit exceeded Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821090#M350916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;I am getting the dump like this as &lt;/P&gt;&lt;P&gt;The program "Z##########" has exceeded the maximum permitted runtime&lt;/P&gt;&lt;P&gt; without&lt;/P&gt;&lt;P&gt;interruption, and has therefore been terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Error analysis&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a certain length of time, the program is terminated. In the case&lt;/P&gt;&lt;P&gt;of a work area, this means that&lt;/P&gt;&lt;P&gt;- endless loops (DO, WHILE, ...),&lt;/P&gt;&lt;P&gt;- database accesses producing an excessively large result set,&lt;/P&gt;&lt;P&gt;- database accesses without a suitable index (full table scan)&lt;/P&gt;&lt;P&gt;do not block the processing for too long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system profile "rdisp/max_wprun_time" contains the maximum runtime of a&lt;/P&gt;&lt;P&gt; program. The&lt;/P&gt;&lt;P&gt;current setting is 3600 seconds. Once this time limit has been exceeded,&lt;/P&gt;&lt;P&gt;the system tries to terminate any SQL statements that are currently&lt;/P&gt;&lt;P&gt;being executed and tells the ABAP processor to terminate the current&lt;/P&gt;&lt;P&gt;program. Then it waits for a maximum of 60 seconds. If the program is&lt;/P&gt;&lt;P&gt;still active, the work process is restarted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;successfully processed, the system gives it another 3600 seconds.&lt;/P&gt;&lt;P&gt;Hence the maximum runtime of a program is at least twice the value of&lt;/P&gt;&lt;P&gt;the system profile parameter "rdisp/max_wprun_time".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;How to correct the error&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should usually execute long-running programs as batch jobs.&lt;/P&gt;&lt;P&gt;If this is not possible, increase the system profile parameter&lt;/P&gt;&lt;P&gt; "rdisp/max_wprun_time".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on the cause of the error, you may have to take one of the&lt;/P&gt;&lt;P&gt;following measures:&lt;/P&gt;&lt;P&gt;- Endless loop: Correct program;&lt;/P&gt;&lt;P&gt;- Dataset resulting from database access is too large:&lt;/P&gt;&lt;P&gt;  Instead of "SELECT * ... ENDSELECT", use "SELECT * INTO internal table&lt;/P&gt;&lt;P&gt;  (for example);&lt;/P&gt;&lt;P&gt;- Database has an unsuitable index: Check index generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may able to find an interim solution to the problem&lt;/P&gt;&lt;P&gt;in the SAP note system. If you have access to the note system yourself,&lt;/P&gt;&lt;P&gt;use the following search criteria:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Source code extract&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR SKFBT BUDAT XREF1 DMBTR SHKZG INTO CORRESPONDING FIELDS OF&lt;/P&gt;&lt;P&gt; TABLE IT_BSAK&lt;/P&gt;&lt;P&gt; FROM BSAK&lt;/P&gt;&lt;P&gt; WHERE BUKRS = IT_BSIS-BUKRS&lt;/P&gt;&lt;P&gt; AND   BELNR NE IT_BSIS-BELNR&lt;/P&gt;&lt;P&gt; AND  AUGBL  =  IT_BSIS-BELNR&lt;/P&gt;&lt;P&gt; AND  AUGGJ  = IT_BSIS-GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SORT IT_BSAK BY BELNR.&lt;/P&gt;&lt;P&gt;    LOOP AT IT_BSAK.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;&amp;gt; SELECT SINGLE GJAHR AWKEY INTO (W_GJAHR, W_AWKEY)&lt;/P&gt;&lt;P&gt;                              FROM BKPF&lt;/P&gt;&lt;P&gt;                              WHERE STBLG = IT_BSAK-BELNR&lt;/P&gt;&lt;P&gt;                                AND bukrs   = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;                               AND gjahr   = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;            DELETE IT_BSAK WHERE BELNR = IT_BSAK-BELNR.&lt;/P&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt; Note:- Dump is coming at marked  -&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt;&amp;gt; position.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 15:08:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821090#M350916</guid>
      <dc:creator>Privete_member__1259949</dc:creator>
      <dc:date>2007-01-04T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Time limit exceeded Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821091#M350917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;  It is a case of select query taking too much time.&lt;/P&gt;&lt;P&gt;You can avoid the select statement inside the loop and use for all entries statement instead. Anyway, this doesn't guarantee the execution within the limit you set(which is i hour as of now). You should better run this program in background. background jobs can run for any long.&lt;/P&gt;&lt;P&gt;SORT IT_BSAK BY BELNR.&lt;/P&gt;&lt;P&gt;SELECT BUKRS GJAHR AWKEY INTO  table it_bkpf&lt;/P&gt;&lt;P&gt;FROM BKPF&lt;/P&gt;&lt;P&gt;for all entries in it_bsak&lt;/P&gt;&lt;P&gt;WHERE STBLG = IT_BSAK-BELNR&lt;/P&gt;&lt;P&gt;AND bukrs = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;AND gjahr = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_BSAK.&lt;/P&gt;&lt;P&gt;read table it_bkpf with key belnr = it_bsak-belnr bukrs = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;                                       gjahr = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;DELETE IT_BSAK WHERE BELNR = IT_BSAK-BELNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 15:19:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821091#M350917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T15:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Time limit exceeded Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821092#M350918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if your selection criteria would return a huge amount of data then it is better to schedule such jobs in background as it would take long time ot execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The SELECT statments might not frames properly and hence it takes long time to execute, say many joins, infinite loops, etc. Try to avoid such statments and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Besides you are using select inside a loop, which will kill your performance, please note that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please go through these tips,&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;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 15:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821092#M350918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T15:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Time limit exceeded Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821093#M350919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kapoor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think the dump is due to looping of too many records which inturm gets timed out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead try out this code.&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR SKFBT BUDAT XREF1 DMBTR SHKZG INTO CORRESPONDING FIELDS OF&lt;/P&gt;&lt;P&gt;TABLE IT_BSAK&lt;/P&gt;&lt;P&gt;FROM BSAK&lt;/P&gt;&lt;P&gt;WHERE BUKRS = IT_BSIS-BUKRS&lt;/P&gt;&lt;P&gt;AND BELNR NE IT_BSIS-BELNR&lt;/P&gt;&lt;P&gt;AND AUGBL = IT_BSIS-BELNR&lt;/P&gt;&lt;P&gt;AND AUGGJ = IT_BSIS-GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create an internal table with two required fields.&lt;/P&gt;&lt;P&gt;SELECT GJAHR AWKEY INTO table it_bkpf.&lt;/P&gt;&lt;P&gt;FROM BKPF&lt;/P&gt;&lt;P&gt;for all entries in IT_BSAK&lt;/P&gt;&lt;P&gt;WHERE STBLG = IT_BSAK-BELNR&lt;/P&gt;&lt;P&gt;AND bukrs = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;AND gjahr = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT IT_BSAK BY BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_BSAK..&lt;/P&gt;&lt;P&gt;read it_bkpf with key STBLG = IT_BSAK-BELNR&lt;/P&gt;&lt;P&gt;AND bukrs = it_bsak-bukrs&lt;/P&gt;&lt;P&gt;AND gjahr = it_bsak-gjahr.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;DELETE IT_BSAK WHERE BELNR = IT_BSAK-BELNR.&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;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sateesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 15:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821093#M350919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Time limit exceeded Dump</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821094#M350920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would change the second select to select the actual document rather than the reversing document and then use the reversing document form there to do another select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 15:39:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-time-limit-exceeded-dump/m-p/1821094#M350920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T15:39:43Z</dc:date>
    </item>
  </channel>
</rss>

