<?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: REGARDING PERFORMANCE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480587#M558825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.You can avoid &amp;lt;b&amp;gt;into corresponding&amp;lt;/b&amp;gt;  if your itab structure is accordingly.&lt;/P&gt;&lt;P&gt;2.Before the second selection statement you should check whether ITAB is initial or not. If ITAB is initial youe second selection will pull all the entries from AUFK.  &lt;/P&gt;&lt;P&gt;3. Similarly for 3rd selection&lt;/P&gt;&lt;P&gt;4 Use this code&lt;/P&gt;&lt;P&gt;LOOP AT IT_CRHD.&lt;/P&gt;&lt;P&gt;R_OBJID-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;R_OBJID-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;R_OBJID-LOW = IT_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;APPEND R_OBJID.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF. before the first selcetion and add condition accordingly so that you can avoid statement DELETE ITAB WHERE NOT GEWRK IN R_OBJID &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.try to use one loop at itab only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Antony Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward poits if find helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2007 11:21:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-06T11:21:12Z</dc:date>
    <item>
      <title>REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480579#M558817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt; I have an report i have to chk for the performance tuning i have checked for the index and secondary feilds evry thing is ok and the final table is sorted and binary search has been done.wht should i do to increse the performance of this report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points for sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 08:40:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480579#M558817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T08:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480580#M558818</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 are many things to check like checking the select queries. If you can paste your code then we can suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 08:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480580#M558818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T08:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480581#M558819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT-OPTIONS AUFNR FOR AFIH-AUFNR.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS EQUNR FOR AFIH-EQUNR.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS ILART FOR AFIH-ILART.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS INGPR FOR AFIH-INGPR MEMORY ID IHG.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS IWERK FOR AFIH-IWERK.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS IPHAS FOR AFIH-IPHAS DEFAULT '2' OPTION LE SIGN I&lt;/P&gt;&lt;P&gt;NO-DISPLAY.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS GSTRP FOR AFKO-GSTRP DEFAULT '19990101' TO SY-DATUM&lt;/P&gt;&lt;P&gt;NO-DISPLAY.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS AUART FOR AUFK-AUART.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS KTEXT FOR AUFK-KTEXT.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS SWERK FOR ILOA-SWERK OBLIGATORY MEMORY ID SWK.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS TPLNR FOR ILOA-TPLNR.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS STORT FOR ILOA-STORT.&lt;/P&gt;&lt;P&gt;PARAMETERS : P_ARBPL LIKE CRHD-ARBPL MATCHCODE OBJECT CRAM.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: END OF BLOCK PROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR EQUNR ILART ILOAN INGPR IWERK GEWRK&lt;/P&gt;&lt;P&gt;       FROM  AFIH&lt;/P&gt;&lt;P&gt;       INTO  CORRESPONDING FIELDS OF TABLE ITAB&lt;/P&gt;&lt;P&gt;       WHERE AUFNR IN AUFNR&lt;/P&gt;&lt;P&gt;       AND   EQUNR IN EQUNR&lt;/P&gt;&lt;P&gt;       AND   ILART IN ILART&lt;/P&gt;&lt;P&gt;       AND   IPHAS IN IPHAS&lt;/P&gt;&lt;P&gt;       AND   INGPR IN INGPR&lt;/P&gt;&lt;P&gt;       AND   IWERK IN IWERK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;  MESSAGE I000(YW) WITH ' No Data Found For The Selection'.&lt;/P&gt;&lt;P&gt;  STOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR AUART KTEXT OBJNR&lt;/P&gt;&lt;P&gt;       INTO TABLE I_AUFK&lt;/P&gt;&lt;P&gt;       FROM AUFK&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;       WHERE AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;       AND AUART IN AUART&lt;/P&gt;&lt;P&gt;       AND KTEXT IN KTEXT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;  SORT I_AUFK BY AUFNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ILOAN SWERK TPLNR STORT&lt;/P&gt;&lt;P&gt;       FROM ILOA&lt;/P&gt;&lt;P&gt;       INTO TABLE I_ILOA&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;       WHERE ILOAN = ITAB-ILOAN&lt;/P&gt;&lt;P&gt;       AND SWERK IN SWERK&lt;/P&gt;&lt;P&gt;       AND TPLNR IN TPLNR&lt;/P&gt;&lt;P&gt;       AND STORT IN STORT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;  SORT I_ILOA BY ILOAN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR GSTRP&lt;/P&gt;&lt;P&gt;       FROM AFKO&lt;/P&gt;&lt;P&gt;       INTO TABLE I_AFKO&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;       WHERE AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;       AND   GSTRP IN GSTRP.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;  SORT I_AFKO BY AUFNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT P_ARBPL IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT OBJID WERKS ARBPL&lt;/P&gt;&lt;P&gt;  FROM CRHD INTO TABLE IT_CRHD&lt;/P&gt;&lt;P&gt;  WHERE WERKS IN SWERK&lt;/P&gt;&lt;P&gt;  AND   ARBPL = P_ARBPL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_CRHD.&lt;/P&gt;&lt;P&gt;    R_OBJID-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;    R_OBJID-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;    R_OBJID-LOW = IT_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;    APPEND R_OBJID.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;DELETE ITAB WHERE NOT GEWRK IN  R_OBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: I_AUFK, I_ILOA, I_AFKO.&lt;/P&gt;&lt;P&gt;  READ TABLE I_AUFK&lt;/P&gt;&lt;P&gt;       WITH KEY AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;       BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    ITAB-AUART = I_AUFK-AUART.&lt;/P&gt;&lt;P&gt;    ITAB-KTEXT = I_AUFK-KTEXT.&lt;/P&gt;&lt;P&gt;    ITAB-OBJNR = I_AUFK-OBJNR.&lt;/P&gt;&lt;P&gt;    MODIFY ITAB.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    DELETE ITAB .&lt;/P&gt;&lt;P&gt;    CONTINUE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE I_ILOA&lt;/P&gt;&lt;P&gt;       WITH KEY ILOAN = ITAB-ILOAN&lt;/P&gt;&lt;P&gt;       BINARY SEARCH.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    ITAB-SWERK = I_ILOA-SWERK.&lt;/P&gt;&lt;P&gt;    ITAB-TPLNR = I_ILOA-TPLNR.&lt;/P&gt;&lt;P&gt;    ITAB-STORT = I_ILOA-STORT.&lt;/P&gt;&lt;P&gt;    MODIFY ITAB.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    DELETE ITAB .&lt;/P&gt;&lt;P&gt;    CONTINUE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE I_AFKO&lt;/P&gt;&lt;P&gt;       WITH KEY AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;       BINARY SEARCH.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    ITAB-GSTRP = I_AFKO-GSTRP .&lt;/P&gt;&lt;P&gt;    MODIFY ITAB.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    DELETE ITAB .&lt;/P&gt;&lt;P&gt;    CONTINUE.&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;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;  W2 = SY-DATUM - ITAB-GSTRP .&lt;/P&gt;&lt;P&gt;  CLEAR W7 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 61 AND W2 &amp;lt; 91 .&lt;/P&gt;&lt;P&gt;    W7 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W8 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 91 AND W2 &amp;lt; 181 .&lt;/P&gt;&lt;P&gt;    W8 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W9 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 181 AND W2 &amp;lt; 366 .&lt;/P&gt;&lt;P&gt;    W9 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W10 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 366 .&lt;/P&gt;&lt;P&gt;    W10 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W6 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 31 AND W2 &amp;lt; 61 .&lt;/P&gt;&lt;P&gt;    W6 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W5 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 15 AND W2 &amp;lt; 31 .&lt;/P&gt;&lt;P&gt;    W5 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W4 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;gt;= 8 AND W2 &amp;lt; 15 .&lt;/P&gt;&lt;P&gt;    W4 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLEAR W3 .&lt;/P&gt;&lt;P&gt;  IF W2 &amp;lt; 8 .&lt;/P&gt;&lt;P&gt;    W3 = 1 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  ITAB-W3 = W3.&lt;/P&gt;&lt;P&gt;  ITAB-W4 = W4.&lt;/P&gt;&lt;P&gt;  ITAB-W5 = W5.&lt;/P&gt;&lt;P&gt;  ITAB-W6 = W6.&lt;/P&gt;&lt;P&gt;  ITAB-W7 = W7.&lt;/P&gt;&lt;P&gt;  ITAB-W8 = W8.&lt;/P&gt;&lt;P&gt;  ITAB-W9 = W9.&lt;/P&gt;&lt;P&gt;  ITAB-W10 = W10.&lt;/P&gt;&lt;P&gt;  MODIFY ITAB.&lt;/P&gt;&lt;P&gt;  LOOP AT T02 WHERE SWERK1 = ITAB-SWERK AND INGPR1 = ITAB-INGPR&lt;/P&gt;&lt;P&gt;                AND STORT1 = ITAB-STORT.&lt;/P&gt;&lt;P&gt;    T02-W3 = T02-W3 + W3.&lt;/P&gt;&lt;P&gt;    T02-W4 = T02-W4 + W4.&lt;/P&gt;&lt;P&gt;    T02-W5 = T02-W5 + W5.&lt;/P&gt;&lt;P&gt;    T02-W6 = T02-W6 + W6.&lt;/P&gt;&lt;P&gt;    T02-W7 = T02-W7 + W7.&lt;/P&gt;&lt;P&gt;    T02-W8 = T02-W8 + W8.&lt;/P&gt;&lt;P&gt;    T02-W9 = T02-W9 + W9.&lt;/P&gt;&lt;P&gt;    T02-W10 = T02-W10 + W10.&lt;/P&gt;&lt;P&gt;    MODIFY T02.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;    T02-SWERK1 = ITAB-SWERK.&lt;/P&gt;&lt;P&gt;    T02-INGPR1 = ITAB-INGPR.&lt;/P&gt;&lt;P&gt;    T02-STORT1 = ITAB-STORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    T02-W3 = W3.&lt;/P&gt;&lt;P&gt;    T02-W4 = W4.&lt;/P&gt;&lt;P&gt;    T02-W5 = W5.&lt;/P&gt;&lt;P&gt;    T02-W6 = W6.&lt;/P&gt;&lt;P&gt;    T02-W7 = W7.&lt;/P&gt;&lt;P&gt;    T02-W8 = W8.&lt;/P&gt;&lt;P&gt;    T02-W9 = W9.&lt;/P&gt;&lt;P&gt;    T02-W10 = W10.&lt;/P&gt;&lt;P&gt;    APPEND T02.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 08:50:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480581#M558819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T08:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480582#M558820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are there any other things to chk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 08:52:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480582#M558820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T08:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480583#M558821</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;Since you have lot of MODIFY and DELETE statements on the Internal tables my suggestion would be to use FILED-SYMBOLS in the statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will increase the performance since you will avoid the unwanted COPY operation involved in MODIFY(Moving from Headerline to table etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 08:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480583#M558821</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-06T08:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480584#M558822</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;No i don't think there is anything left to check but few suggestions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you are selecting all the key fields from all the table.&lt;/P&gt;&lt;P&gt;See if it is possible to avaoid two time LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also when you use DELETE and MODIFY use INDEX it will improve the performance considerably.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 09:01:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480584#M558822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T09:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480585#M558823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the performance tuning of any Report following are some useful points:-&lt;/P&gt;&lt;P&gt;1) The run-time analysis tool (Transaction SE30) can be used to evaluate the hit lists of the top CPU consumers, table accesses, and to get a general idea of the coding run during the program execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) SELECT INTO preferred to SELECT APPEND ENDSELECT &lt;/P&gt;&lt;P&gt;When an internal table needs to be created  directly from one database table, the SELECT INTO is used to fill the internal table.  It is faster to use the INTO TABLE version of a SELECT statement than to use APPEND statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Avoid SELECT&amp;#133; ORDER BY.  Put records into an internal table and SORT is preferred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) SELECT FOR ALL ENTRIES used outside of loops, with a READ used inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5)The ordering of the WHERE statements match the arrangement of the keys in the table records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Fields compared in the WHERE clause of SELECT statements have similar types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Whenever possible, the full table key is specified and SELECT SINGLE is specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; SELECT only the required fields from a table. Avoid using SELECT *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9) When a full key is unknown and only one record is needed, use UP TO 1 ROWS in the SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10) Always check that the internal table is not empty before using it in the SELECT &amp;#133;&amp;#133; FOR ALL ENTRIES IN &amp;#133; &amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11) Avoid using nested SELECTs. Use data dictionary VIEW, Inner-Joins or Left Outer Joins if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12) Avoid using SELECTs inside a LOOP. Select all required data into internal table(s) first and do the processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;13) Specify the key fields when performing the READ operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14) When performing direct reads, the BINARY SEARCH is used only when the internal table contains more than 500 rows and must be sorted by the key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;15) SORT ITAB ORDER BY is preferred over SORT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;16) A number other than zero is only specified for the OCCURS parameter if the required storage is less than 8KB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 09:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480585#M558823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T09:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480586#M558824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the view CAUFV instead of the tables AFKO and AUFK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move the assignment of fixed values outside of your loops. Thus:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;R_OBJID-SIGN = 'I'.
R_OBJID-OPTION = 'EQ'.
LOOP AT IT_CRHD.
  R_OBJID-LOW = IT_CRHD-OBJID.
  APPEND R_OBJID.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why have you got 2 loops on ITAB? 1 loop will allow the correct processing to be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear all the work fields W3 - W10 in one statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reformat all the IFs on W2 into 1 IF - ELSEIF condition. Thus:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF W2 &amp;gt;= 366 .
  W10 = 1 .
elseIF W2 &amp;gt;= 181.
  W9 = 1 .
elseIF W2 &amp;gt;= 91.
  W8 = 1 .
elseIF W2 &amp;gt;= 61.
  W7 = 1 .
elseIF W2 &amp;gt;= 31.
  W6 = 1 .
elseIF W2 &amp;gt;= 15.
  W5 = 1 .
elseIF W2 &amp;gt;= 8.
  W4 = 1 .
else.
  W3 = 1 .
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MattG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 10:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480586#M558824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T10:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480587#M558825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.You can avoid &amp;lt;b&amp;gt;into corresponding&amp;lt;/b&amp;gt;  if your itab structure is accordingly.&lt;/P&gt;&lt;P&gt;2.Before the second selection statement you should check whether ITAB is initial or not. If ITAB is initial youe second selection will pull all the entries from AUFK.  &lt;/P&gt;&lt;P&gt;3. Similarly for 3rd selection&lt;/P&gt;&lt;P&gt;4 Use this code&lt;/P&gt;&lt;P&gt;LOOP AT IT_CRHD.&lt;/P&gt;&lt;P&gt;R_OBJID-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;R_OBJID-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;R_OBJID-LOW = IT_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;APPEND R_OBJID.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF. before the first selcetion and add condition accordingly so that you can avoid statement DELETE ITAB WHERE NOT GEWRK IN R_OBJID &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.try to use one loop at itab only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Antony Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward poits if find helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:21:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480587#M558825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480588#M558826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few things u could probably do is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR EQUNR ILART ILOAN INGPR IWERK GEWRK&lt;/P&gt;&lt;P&gt;FROM AFIH&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE ITAB&lt;/P&gt;&lt;P&gt;WHERE AUFNR IN AUFNR&lt;/P&gt;&lt;P&gt;AND EQUNR IN EQUNR&lt;/P&gt;&lt;P&gt;AND ILART IN ILART&lt;/P&gt;&lt;P&gt;AND IPHAS IN IPHAS&lt;/P&gt;&lt;P&gt;AND INGPR IN INGPR&lt;/P&gt;&lt;P&gt;AND IWERK IN IWERK.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Avoid using into corresponging fields of. Instead have an internal table with the same fields in the same order.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE I000(YW) WITH ' No Data Found For The Selection'.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before using a select query with for all entries delete duplicate recordsfrom table itab.&lt;/P&gt;&lt;P&gt;For eg. move contents of itab in a temporary table itab_temp.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt; itab_temp[] = itab[].&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;          sort itab_temp on the basis of the fields which are coming in the where clause.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sort itab_temp by aufnr.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;delete all the adjacent duplicate records comparing aufnr&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete adjacent duplicates from itab_temp comparing aufnr .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now use itab_temp in the selevct query.&lt;/P&gt;&lt;P&gt;SELECT AUFNR AUART KTEXT OBJNR&lt;/P&gt;&lt;P&gt;INTO TABLE I_AUFK&lt;/P&gt;&lt;P&gt;FROM AUFK&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN &amp;lt;b&amp;gt;ITAB_temp&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE AUFNR = &amp;lt;b&amp;gt;ITAB_TEMP-AUFNR&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;AND AUART IN AUART&lt;/P&gt;&lt;P&gt;AND KTEXT IN KTEXT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;SORT I_AUFK BY AUFNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;same thing applies here&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;SELECT ILOAN SWERK TPLNR STORT&lt;/P&gt;&lt;P&gt;FROM ILOA&lt;/P&gt;&lt;P&gt;INTO TABLE I_ILOA&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;WHERE ILOAN = ITAB-ILOAN&lt;/P&gt;&lt;P&gt;AND SWERK IN SWERK&lt;/P&gt;&lt;P&gt;AND TPLNR IN TPLNR&lt;/P&gt;&lt;P&gt;AND STORT IN STORT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;SORT I_ILOA BY ILOAN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;same thing applies here&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR GSTRP&lt;/P&gt;&lt;P&gt;FROM AFKO&lt;/P&gt;&lt;P&gt;INTO TABLE I_AFKO&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;WHERE AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;AND GSTRP IN GSTRP.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;SORT I_AFKO BY AUFNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT P_ARBPL IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT OBJID WERKS ARBPL&lt;/P&gt;&lt;P&gt;FROM CRHD INTO TABLE IT_CRHD&lt;/P&gt;&lt;P&gt;WHERE WERKS IN SWERK&lt;/P&gt;&lt;P&gt;AND ARBPL = P_ARBPL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_CRHD.&lt;/P&gt;&lt;P&gt;R_OBJID-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;R_OBJID-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;R_OBJID-LOW = IT_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;APPEND R_OBJID.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;DELETE ITAB WHERE NOT GEWRK IN R_OBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: I_AUFK, I_ILOA, I_AFKO.&lt;/P&gt;&lt;P&gt;READ TABLE I_AUFK&lt;/P&gt;&lt;P&gt;WITH KEY AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;ITAB-AUART = I_AUFK-AUART.&lt;/P&gt;&lt;P&gt;ITAB-KTEXT = I_AUFK-KTEXT.&lt;/P&gt;&lt;P&gt;ITAB-OBJNR = I_AUFK-OBJNR.&lt;/P&gt;&lt;P&gt;MODIFY ITAB.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;use modify along with the index addition to make the process faster.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;DELETE ITAB .&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;never have a delete inside a loop it takes alot of time. Instead set a flag here and later on after the loop delete all those entries for which the flag is set&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CONTINUE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE I_ILOA&lt;/P&gt;&lt;P&gt;WITH KEY ILOAN = ITAB-ILOAN&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;ITAB-SWERK = I_ILOA-SWERK.&lt;/P&gt;&lt;P&gt;ITAB-TPLNR = I_ILOA-TPLNR.&lt;/P&gt;&lt;P&gt;ITAB-STORT = I_ILOA-STORT.&lt;/P&gt;&lt;P&gt;MODIFY ITAB.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;DELETE ITAB .&lt;/P&gt;&lt;P&gt;CONTINUE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE I_AFKO&lt;/P&gt;&lt;P&gt;WITH KEY AUFNR = ITAB-AUFNR&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;ITAB-GSTRP = I_AFKO-GSTRP .&lt;/P&gt;&lt;P&gt;MODIFY ITAB.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;DELETE ITAB .&lt;/P&gt;&lt;P&gt;CONTINUE.&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;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;W2 = SY-DATUM - ITAB-GSTRP .&lt;/P&gt;&lt;P&gt;CLEAR W7 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 61 AND W2 &amp;lt; 91 .&lt;/P&gt;&lt;P&gt;W7 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W8 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 91 AND W2 &amp;lt; 181 .&lt;/P&gt;&lt;P&gt;W8 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W9 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 181 AND W2 &amp;lt; 366 .&lt;/P&gt;&lt;P&gt;W9 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W10 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 366 .&lt;/P&gt;&lt;P&gt;W10 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W6 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 31 AND W2 &amp;lt; 61 .&lt;/P&gt;&lt;P&gt;W6 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W5 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 15 AND W2 &amp;lt; 31 .&lt;/P&gt;&lt;P&gt;W5 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W4 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;gt;= 8 AND W2 &amp;lt; 15 .&lt;/P&gt;&lt;P&gt;W4 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR W3 .&lt;/P&gt;&lt;P&gt;IF W2 &amp;lt; 8 .&lt;/P&gt;&lt;P&gt;W3 = 1 .&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ITAB-W3 = W3.&lt;/P&gt;&lt;P&gt;ITAB-W4 = W4.&lt;/P&gt;&lt;P&gt;ITAB-W5 = W5.&lt;/P&gt;&lt;P&gt;ITAB-W6 = W6.&lt;/P&gt;&lt;P&gt;ITAB-W7 = W7.&lt;/P&gt;&lt;P&gt;ITAB-W8 = W8.&lt;/P&gt;&lt;P&gt;ITAB-W9 = W9.&lt;/P&gt;&lt;P&gt;ITAB-W10 = W10.&lt;/P&gt;&lt;P&gt;MODIFY ITAB.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Use the index addition in modify&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;LOOP AT T02 WHERE SWERK1 = ITAB-SWERK AND INGPR1 = ITAB-INGPR&lt;/P&gt;&lt;P&gt;AND STORT1 = ITAB-STORT.&lt;/P&gt;&lt;P&gt;T02-W3 = T02-W3 + W3.&lt;/P&gt;&lt;P&gt;T02-W4 = T02-W4 + W4.&lt;/P&gt;&lt;P&gt;T02-W5 = T02-W5 + W5.&lt;/P&gt;&lt;P&gt;T02-W6 = T02-W6 + W6.&lt;/P&gt;&lt;P&gt;T02-W7 = T02-W7 + W7.&lt;/P&gt;&lt;P&gt;T02-W8 = T02-W8 + W8.&lt;/P&gt;&lt;P&gt;T02-W9 = T02-W9 + W9.&lt;/P&gt;&lt;P&gt;T02-W10 = T02-W10 + W10.&lt;/P&gt;&lt;P&gt;MODIFY T02.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;T02-SWERK1 = ITAB-SWERK.&lt;/P&gt;&lt;P&gt;T02-INGPR1 = ITAB-INGPR.&lt;/P&gt;&lt;P&gt;T02-STORT1 = ITAB-STORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T02-W3 = W3.&lt;/P&gt;&lt;P&gt;T02-W4 = W4.&lt;/P&gt;&lt;P&gt;T02-W5 = W5.&lt;/P&gt;&lt;P&gt;T02-W6 = W6.&lt;/P&gt;&lt;P&gt;T02-W7 = W7.&lt;/P&gt;&lt;P&gt;T02-W8 = W8.&lt;/P&gt;&lt;P&gt;T02-W9 = W9.&lt;/P&gt;&lt;P&gt;T02-W10 = W10.&lt;/P&gt;&lt;P&gt;APPEND T02.&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;Hope this Helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Geeta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:36:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480588#M558826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480589#M558827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to the above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently you may modify ITAB and then delete it so change this to&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB.
* CLEAR: I_AUFK, I_ILOA, I_AFKO.   "Not needed, all values are overwritten
  READ TABLE &amp;lt;b&amp;gt;I_CAUFV&amp;lt;/b&amp;gt;
      WITH KEY AUFNR = ITAB-AUFNR
      BINARY SEARCH.
  IF SY-SUBRC  &amp;lt;b&amp;gt;NE&amp;lt;/b&amp;gt;  0.
    DELETE ITAB .
*  never have a delete inside a loop it takes alot of time. Instead set a flag here
*  and later on after the loop delete all those entries for which the flag is set
    CONTINUE.
  ENDIF.

  READ TABLE I_ILOA
      WITH KEY ILOAN = ITAB-ILOAN
      BINARY SEARCH.
  IF SY-SUBRC  NE  0.
    DELETE ITAB .
    CONTINUE.
  ENDIF.

*   Only OK records get to this point 
  ITAB-SWERK = I_ILOA-SWERK.
  ITAB-TPLNR = I_ILOA-TPLNR.
  ITAB-STORT = I_ILOA-STORT.
  ITAB-GSTRP = I_AFKO-GSTRP .
  ITAB-AUART = I_AUFK-AUART.
  ITAB-KTEXT = I_AUFK-KTEXT.
  ITAB-OBJNR = I_AUFK-OBJNR.
  MODIFY ITAB.
* use modify along with the index addition to make the process faster.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your T02 process can be simplified by the COLLECT command. Thus:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*LOOP AT T02 WHERE SWERK1 = ITAB-SWERK 
*  AND INGPR1 = ITAB-INGPR
*  AND STORT1 = ITAB-STORT.
*  T02-W3 = T02-W3 + W3.
*  T02-W4 = T02-W4 + W4.
*  T02-W5 = T02-W5 + W5.
*  T02-W6 = T02-W6 + W6.
*  T02-W7 = T02-W7 + W7.
*  T02-W8 = T02-W8 + W8.
*  T02-W9 = T02-W9 + W9.
*  T02-W10 = T02-W10 + W10.
*  MODIFY T02.
*  ENDLOOP.
*  IF SY-SUBRC NE 0.
T02-SWERK1 = ITAB-SWERK.
T02-INGPR1 = ITAB-INGPR.
T02-STORT1 = ITAB-STORT.

T02-W3 = W3.
T02-W4 = W4.
T02-W5 = W5.
T02-W6 = W6.
T02-W7 = W7.
T02-W8 = W8.
T02-W9 = W9.
T02-W10 = W10.
COLLECT T02.
*  APPEND T02.
*  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MattG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 13:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480589#M558827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T13:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: REGARDING PERFORMANCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480590#M558828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have anested loop:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT itab.
...
  LOOP AT t02 WHERE swerk1 = itab-swerk AND ingpr1 = itab-ingpr
  AND stort1 = itab-stort.
  ...
  ENDLOOP.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on the number of entries in these tables, you can replace the inner loop with a binary read followed by index reads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 13:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-performance/m-p/2480590#M558828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T13:24:46Z</dc:date>
    </item>
  </channel>
</rss>

