<?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: Time exceed error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707467#M309774</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;Your code has perfomance issues. You cannot put big tables like BSEG and BSIS in a loop....IF you do that you will get time out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to do it is select whatever you want outside the loop in an internal table .. then use all entries on that internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plus you will have to use most of the primary keys if not all in tables like BSEG and BSIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the last part of the code you are doing select two times on the same table for the same conditions that is also not necessary.. use select once and take both the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainly in this code the performance has to be taken care of otherwise it will give time out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Nov 2006 16:42:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-07T16:42:46Z</dc:date>
    <item>
      <title>Time exceed error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707464#M309771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt; I have report which match with the production details, I cant get the one month data any disturbance, but of I select two month data it has 100000 records, problem  is it&amp;#146;s getting error time limit exceed I have put back ground process still the error is generating please  fine the code following,(loop),please help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_ITAB INTO WA_ITAB. &amp;#147;This has 10000 records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'OR' WA_ITAB-AUFNR INTO&lt;/P&gt;&lt;P&gt;    W_AUFNR.&lt;/P&gt;&lt;P&gt;*Settlement&lt;/P&gt;&lt;P&gt;    CLEAR W_SET_NO.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE BELNR INTO W_SET_NO&lt;/P&gt;&lt;P&gt;    FROM AUAK&lt;/P&gt;&lt;P&gt;    WHERE OBJNR = W_AUFNR.&lt;/P&gt;&lt;P&gt;    CLEAR W_DOC.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE BELNR INTO W_DOC&lt;/P&gt;&lt;P&gt;    FROM BKPF&lt;/P&gt;&lt;P&gt;    WHERE AWKEY = W_SET_NO AND BUKRS = COMP .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*double entry value.&lt;/P&gt;&lt;P&gt;    DATA CR LIKE BSIS-SHKZG.&lt;/P&gt;&lt;P&gt;    W_VALUE = 0.&lt;/P&gt;&lt;P&gt;    CLEAR CR.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE DMBTR INTO W_VALUE&lt;/P&gt;&lt;P&gt;    FROM BSIS&lt;/P&gt;&lt;P&gt;    WHERE BELNR = W_DOC AND BUKRS = COMP.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE MONAT INTO WA_ITAB-MONAT&lt;/P&gt;&lt;P&gt;    FROM BSIS&lt;/P&gt;&lt;P&gt;    WHERE BELNR = W_DOC AND BUKRS = COMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kanishka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 11:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707464#M309771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T11:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Time exceed error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707465#M309772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My first suggestion would be to remove the selects inside the loop..that's too expensive. You have to find a way to select the data outside the loop/endloop and that will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 13:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707465#M309772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T13:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Time exceed error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707466#M309773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that you are selecting against large tables without using keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the select against BKPF, you must at least add AWTYP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are selecting twice against BSIS using the same criteria. So you really only should do it once. But that SELECT also doesn't use an index. You should select ONCE against BSEG instead, using the BUKRS, BELNR and GJAHR that you get from the first (corrected) SELECT against BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 14:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707466#M309773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T14:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Time exceed error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707467#M309774</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;Your code has perfomance issues. You cannot put big tables like BSEG and BSIS in a loop....IF you do that you will get time out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to do it is select whatever you want outside the loop in an internal table .. then use all entries on that internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plus you will have to use most of the primary keys if not all in tables like BSEG and BSIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the last part of the code you are doing select two times on the same table for the same conditions that is also not necessary.. use select once and take both the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainly in this code the performance has to be taken care of otherwise it will give time out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 16:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-exceed-error/m-p/1707467#M309774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T16:42:46Z</dc:date>
    </item>
  </channel>
</rss>

