<?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 out error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007037#M957244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have many entries in the internal table try to reduce the no. of entries, if that internal table data is not used further.&lt;/P&gt;&lt;P&gt;In your case delete all the entries from the temp table if HKONT is not in 1,2,3 constants declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of using nested loop sort the inner internal table and use read statement. if you have more than 1 entry with that key field. after processing 1 record delete that record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2008 11:04:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-09T11:04:13Z</dc:date>
    <item>
      <title>time out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007034#M957241</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;&lt;/P&gt;&lt;P&gt;LOOP AT ist_mseg INTO wa_mseg.&lt;/P&gt;&lt;P&gt;      LOOP AT ist_bseg_temp INTO wa_bseg_temp&lt;/P&gt;&lt;P&gt;      WHERE ebeln = wa_mseg-ebeln AND ebelp = wa_mseg-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF ( wa_bseg_temp-hkont = c_hkont1 OR wa_bseg_temp-hkont  = c_hkont2 OR wa_bseg_temp-hkont  = c_hkont5 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          wa_price_diff-matnr = wa_mseg-matnr.&lt;/P&gt;&lt;P&gt;          wa_price_diff-dmbtr = wa_bseg_temp-dmbtr.&lt;/P&gt;&lt;P&gt;          wa_price_diff-belnr = wa_bseg_temp-belnr.&lt;/P&gt;&lt;P&gt;          wa_price_diff-bukrs = wa_bseg_temp-bukrs.&lt;/P&gt;&lt;P&gt;          wa_price_diff-gjahr = wa_bseg_temp-gjahr.&lt;/P&gt;&lt;P&gt;          wa_price_diff-buzei = wa_bseg_temp-buzei  .   " added by srinivas on 13/05/08&lt;/P&gt;&lt;P&gt;          wa_price_diff-shkzg = wa_bseg_temp-shkzg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          APPEND wa_price_diff TO ist_price_diff.&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;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in one of my report , it is taking more than 40  min &amp;amp; giving time out error .&lt;/P&gt;&lt;P&gt;here ist_mseg_temp table has 230000(23 lakhs records ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i  reduce the execution time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz give me any suggestions .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance  .&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;srinivas .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:51:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007034#M957241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T10:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: time out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007035#M957242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use READ statement with binary search instead of inner loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SORT IST_BSEG_TEMP BY EBELN EBELP.

LOOP AT ist_mseg INTO wa_mseg.
READ TABLE ist_bseg_temp INTO wa_bseg_temp WITH KEY 
ebeln = wa_mseg-ebeln ebelp = wa_mseg-ebelp BINARY SEARCH.

IF ( wa_bseg_temp-hkont = c_hkont1 OR wa_bseg_temp-hkont = c_hkont2 OR wa_bseg_temp-hkont = c_hkont5 ).

wa_price_diff-matnr = wa_mseg-matnr.
wa_price_diff-dmbtr = wa_bseg_temp-dmbtr.
wa_price_diff-belnr = wa_bseg_temp-belnr.
wa_price_diff-bukrs = wa_bseg_temp-bukrs.
wa_price_diff-gjahr = wa_bseg_temp-gjahr.
wa_price_diff-buzei = wa_bseg_temp-buzei . " added by srinivas on 13/05/08
wa_price_diff-shkzg = wa_bseg_temp-shkzg.

APPEND wa_price_diff TO ist_price_diff.

ENDIF.

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007035#M957242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T10:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: time out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007036#M957243</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;Instead of nested loop use read statement. clear work areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ist_mseg INTO wa_mseg.&lt;/P&gt;&lt;P&gt;read  ist_bseg_temp INTO wa_bseg_temp&lt;/P&gt;&lt;P&gt;WHERE ebeln = wa_mseg-ebeln AND ebelp = wa_mseg-ebelp binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( wa_bseg_temp-hkont = c_hkont1 OR wa_bseg_temp-hkont = c_hkont2 OR wa_bseg_temp-hkont = c_hkont5 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_price_diff-matnr = wa_mseg-matnr.&lt;/P&gt;&lt;P&gt;wa_price_diff-dmbtr = wa_bseg_temp-dmbtr.&lt;/P&gt;&lt;P&gt;wa_price_diff-belnr = wa_bseg_temp-belnr.&lt;/P&gt;&lt;P&gt;wa_price_diff-bukrs = wa_bseg_temp-bukrs.&lt;/P&gt;&lt;P&gt;wa_price_diff-gjahr = wa_bseg_temp-gjahr.&lt;/P&gt;&lt;P&gt;wa_price_diff-buzei = wa_bseg_temp-buzei . " added by srinivas on 13/05/08&lt;/P&gt;&lt;P&gt;wa_price_diff-shkzg = wa_bseg_temp-shkzg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_price_diff TO ist_price_diff.&lt;/P&gt;&lt;P&gt;clear:  wa_price, wa_mseg.&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>Mon, 09 Jun 2008 10:57:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007036#M957243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T10:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: time out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007037#M957244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have many entries in the internal table try to reduce the no. of entries, if that internal table data is not used further.&lt;/P&gt;&lt;P&gt;In your case delete all the entries from the temp table if HKONT is not in 1,2,3 constants declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of using nested loop sort the inner internal table and use read statement. if you have more than 1 entry with that key field. after processing 1 record delete that record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 11:04:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007037#M957244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T11:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: time out error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007038#M957245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi good morning ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using read statement it is reading only first record , but there is number  of records related to it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i need all those records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u give me any other alternative to avoid nested loop .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks ,&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;&lt;/P&gt;&lt;P&gt;srinivas .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 04:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-out-error/m-p/4007038#M957245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-10T04:15:22Z</dc:date>
    </item>
  </channel>
</rss>

