<?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: SAP-ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456770#M215878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;first you need to determine the runtime of your program.for this you need to use&lt;/P&gt;&lt;P&gt;runtime analysis.the corresponding transaction is se30.&lt;/P&gt;&lt;P&gt;thie will give you an overview of the time that your program is taking at the&lt;/P&gt;&lt;P&gt;application server and database server level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the your program is taking more time at the database server level then you can&lt;/P&gt;&lt;P&gt;easily find out the correponding worst select clause by using SQL Trace.the corresponding &lt;/P&gt;&lt;P&gt;transaction is ST05.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if your program is taking more time at the application server level then it would be&lt;/P&gt;&lt;P&gt;mostly due to nested loops or other poor logic for validations used in your report.&lt;/P&gt;&lt;P&gt;you could replace this with a better one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jul 2006 07:00:19 GMT</pubDate>
    <dc:creator>abdul_hakim</dc:creator>
    <dc:date>2006-07-20T07:00:19Z</dc:date>
    <item>
      <title>SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456766#M215874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i want to improve performance of abap reports what are methods i have to fallow?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2006 03:11:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456766#M215874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-21T03:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456767#M215875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following methods are helpful to improve performance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Review your queries and redesign them for more efficiency.&lt;/P&gt;&lt;P&gt;Like : Prefer mass select than select-endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)Minimize the no of loops in your code(If you can).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)System performance gets down if no of queries is more.Try to fetch the required data in a single firing only.(Infact more than 23 queries in your program will throw dump)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)You can appraise the performance of your block of code through an SAP tool se38-&amp;gt;environment-&amp;gt;examples-&amp;gt;performance examples.Among diff alternatives choose the one which takes minimum time to execute.&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;Amiya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2006 03:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456767#M215875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-21T03:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456768#M215876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;GOOD&lt;/P&gt;&lt;P&gt;Performance tuning for Data Selection Statement  &lt;/P&gt;&lt;P&gt;For all entries&lt;/P&gt;&lt;P&gt;The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of  &lt;/P&gt;&lt;P&gt;entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the  &lt;/P&gt;&lt;P&gt;length of the WHERE clause.  &lt;/P&gt;&lt;P&gt;The plus &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Large amount of data  &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data  &lt;/P&gt;&lt;P&gt;Fast internal reprocessing of data  &lt;/P&gt;&lt;P&gt;Fast  &lt;/P&gt;&lt;P&gt;The Minus &lt;/P&gt;&lt;P&gt;Difficult to program/understand  &lt;/P&gt;&lt;P&gt;Memory could be critical (use FREE or PACKAGE size)  &lt;/P&gt;&lt;P&gt;Some steps that might make FOR ALL ENTRIES more efficient: &lt;/P&gt;&lt;P&gt;Removing duplicates from the the driver table  &lt;/P&gt;&lt;P&gt;Sorting the driver table  &lt;/P&gt;&lt;P&gt;If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement: &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_tab &lt;/P&gt;&lt;P&gt;  WHERE mykey &amp;gt;= i_tab-low and &lt;/P&gt;&lt;P&gt;        mykey &amp;lt;= i_tab-high.&lt;/P&gt;&lt;P&gt;Nested selects&lt;/P&gt;&lt;P&gt;The plus: &lt;/P&gt;&lt;P&gt;Small amount of data  &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data  &lt;/P&gt;&lt;P&gt;Easy to code - and understand  &lt;/P&gt;&lt;P&gt;The minus: &lt;/P&gt;&lt;P&gt;Large amount of data  &lt;/P&gt;&lt;P&gt;when mixed processing isn&amp;#146;t needed  &lt;/P&gt;&lt;P&gt;Performance killer no. 1 &lt;/P&gt;&lt;P&gt;Select using JOINS&lt;/P&gt;&lt;P&gt;The plus &lt;/P&gt;&lt;P&gt;Very large amount of data  &lt;/P&gt;&lt;P&gt;Similar to Nested selects - when the accesses are planned by the programmer  &lt;/P&gt;&lt;P&gt;In some cases the fastest  &lt;/P&gt;&lt;P&gt;Not so memory critical  &lt;/P&gt;&lt;P&gt;The minus &lt;/P&gt;&lt;P&gt;Very difficult to program/understand  &lt;/P&gt;&lt;P&gt;Mixing processing and reading of data not possible  &lt;/P&gt;&lt;P&gt;Use the selection criteria &lt;/P&gt;&lt;P&gt;SELECT * FROM SBOOK.                    &lt;/P&gt;&lt;P&gt;  CHECK: SBOOK-CARRID = 'LH' AND        &lt;/P&gt;&lt;P&gt;                  SBOOK-CONNID = '0400'.         &lt;/P&gt;&lt;P&gt;ENDSELECT.                              &lt;/P&gt;&lt;P&gt;SELECT * FROM SBOOK                      &lt;/P&gt;&lt;P&gt;  WHERE CARRID = 'LH' AND                &lt;/P&gt;&lt;P&gt;        CONNID = '0400'.                 &lt;/P&gt;&lt;P&gt;ENDSELECT.                               &lt;/P&gt;&lt;P&gt;Use the aggregated functions &lt;/P&gt;&lt;P&gt;C4A = '000'.               &lt;/P&gt;&lt;P&gt;SELECT * FROM T100         &lt;/P&gt;&lt;P&gt;  WHERE SPRSL = 'D' AND    &lt;/P&gt;&lt;P&gt;        ARBGB = '00'.      &lt;/P&gt;&lt;P&gt;  CHECK: T100-MSGNR &amp;gt; C4A. &lt;/P&gt;&lt;P&gt;  C4A = T100-MSGNR.        &lt;/P&gt;&lt;P&gt;ENDSELECT.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MAX( MSGNR ) FROM T100 INTO C4A  &lt;/P&gt;&lt;P&gt; WHERE SPRSL = 'D' AND                 &lt;/P&gt;&lt;P&gt;       ARBGB = '00'.                   &lt;/P&gt;&lt;P&gt;Select with view&lt;/P&gt;&lt;P&gt;SELECT * FROM DD01L                     &lt;/P&gt;&lt;P&gt;  WHERE DOMNAME LIKE 'CHAR%'            &lt;/P&gt;&lt;P&gt;        AND AS4LOCAL = 'A'.             &lt;/P&gt;&lt;P&gt;  SELECT SINGLE * FROM DD01T            &lt;/P&gt;&lt;P&gt;    WHERE   DOMNAME    = DD01L-DOMNAME  &lt;/P&gt;&lt;P&gt;        AND AS4LOCAL   = 'A'            &lt;/P&gt;&lt;P&gt;        AND AS4VERS    = DD01L-AS4VERS  &lt;/P&gt;&lt;P&gt;        AND DDLANGUAGE = SY-LANGU.      &lt;/P&gt;&lt;P&gt;ENDSELECT.                              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM DD01V                     &lt;/P&gt;&lt;P&gt; WHERE DOMNAME LIKE 'CHAR%'            &lt;/P&gt;&lt;P&gt;       AND DDLANGUAGE = SY-LANGU.      &lt;/P&gt;&lt;P&gt;ENDSELECT.                              &lt;/P&gt;&lt;P&gt;Select with index support&lt;/P&gt;&lt;P&gt;SELECT * FROM T100             &lt;/P&gt;&lt;P&gt; WHERE     ARBGB = '00'       &lt;/P&gt;&lt;P&gt;       AND MSGNR = '999'.     &lt;/P&gt;&lt;P&gt;ENDSELECT.                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T002.              &lt;/P&gt;&lt;P&gt;  SELECT * FROM T100             &lt;/P&gt;&lt;P&gt;    WHERE     SPRSL = T002-SPRAS &lt;/P&gt;&lt;P&gt;          AND ARBGB = '00'       &lt;/P&gt;&lt;P&gt;          AND MSGNR = '999'.     &lt;/P&gt;&lt;P&gt;  ENDSELECT.                     &lt;/P&gt;&lt;P&gt;ENDSELECT.                       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select &amp;#133; Into table&lt;/P&gt;&lt;P&gt;REFRESH X006.                  &lt;/P&gt;&lt;P&gt;SELECT * FROM T006 INTO X006.  &lt;/P&gt;&lt;P&gt;  APPEND X006.                 &lt;/P&gt;&lt;P&gt;ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T006 INTO TABLE X006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with selection list&lt;/P&gt;&lt;P&gt;SELECT * FROM DD01L               &lt;/P&gt;&lt;P&gt;  WHERE DOMNAME LIKE 'CHAR%'      &lt;/P&gt;&lt;P&gt;        AND AS4LOCAL = 'A'.       &lt;/P&gt;&lt;P&gt;ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DOMNAME FROM DD01L     &lt;/P&gt;&lt;P&gt; INTO DD01L-DOMNAME          &lt;/P&gt;&lt;P&gt; WHERE DOMNAME LIKE 'CHAR%'  &lt;/P&gt;&lt;P&gt;       AND AS4LOCAL = 'A'.   &lt;/P&gt;&lt;P&gt;ENDSELECT&lt;/P&gt;&lt;P&gt;Key access to multiple lines&lt;/P&gt;&lt;P&gt;LOOP AT TAB.           &lt;/P&gt;&lt;P&gt; CHECK TAB-K = KVAL.  &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 TAB WHERE K = KVAL.      &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;&lt;/P&gt;&lt;P&gt;Copying internal tables&lt;/P&gt;&lt;P&gt;REFRESH TAB_DEST.               &lt;/P&gt;&lt;P&gt;LOOP AT TAB_SRC INTO TAB_DEST.  &lt;/P&gt;&lt;P&gt;  APPEND TAB_DEST.              &lt;/P&gt;&lt;P&gt;ENDLOOP.                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TAB_DEST[] = TAB_SRC[].&lt;/P&gt;&lt;P&gt;Modifying a set of lines&lt;/P&gt;&lt;P&gt;LOOP AT TAB.              &lt;/P&gt;&lt;P&gt;  IF TAB-FLAG IS INITIAL. &lt;/P&gt;&lt;P&gt;    TAB-FLAG = 'X'.       &lt;/P&gt;&lt;P&gt;  ENDIF.                  &lt;/P&gt;&lt;P&gt;  MODIFY TAB.             &lt;/P&gt;&lt;P&gt;ENDLOOP.                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TAB-FLAG = 'X'.                   &lt;/P&gt;&lt;P&gt;MODIFY TAB TRANSPORTING FLAG      &lt;/P&gt;&lt;P&gt;           WHERE FLAG IS INITIAL. &lt;/P&gt;&lt;P&gt;Deleting a sequence of lines&lt;/P&gt;&lt;P&gt;DO 101 TIMES.                &lt;/P&gt;&lt;P&gt;  DELETE TAB_DEST INDEX 450. &lt;/P&gt;&lt;P&gt;ENDDO.                       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TAB_DEST FROM 450 TO 550.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linear search vs. binary&lt;/P&gt;&lt;P&gt;READ TABLE TAB WITH KEY K = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE TAB WITH KEY K = 'X' BINARY SEARCH.&lt;/P&gt;&lt;P&gt;Comparison of internal tables&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE: TAB1 LINES L1,       &lt;/P&gt;&lt;P&gt;                TAB2 LINES L2.       &lt;/P&gt;&lt;P&gt;                                     &lt;/P&gt;&lt;P&gt;IF L1 &amp;lt;&amp;gt; L2.                         &lt;/P&gt;&lt;P&gt;  TAB_DIFFERENT = 'X'.               &lt;/P&gt;&lt;P&gt;ELSE.                                &lt;/P&gt;&lt;P&gt;  TAB_DIFFERENT = SPACE.             &lt;/P&gt;&lt;P&gt;  LOOP AT TAB1.                      &lt;/P&gt;&lt;P&gt;    READ TABLE TAB2 INDEX SY-TABIX.  &lt;/P&gt;&lt;P&gt;    IF TAB1 &amp;lt;&amp;gt; TAB2.                 &lt;/P&gt;&lt;P&gt;      TAB_DIFFERENT = 'X'. EXIT.     &lt;/P&gt;&lt;P&gt;    ENDIF.                           &lt;/P&gt;&lt;P&gt;  ENDLOOP.                           &lt;/P&gt;&lt;P&gt;ENDIF.                               &lt;/P&gt;&lt;P&gt;                                     &lt;/P&gt;&lt;P&gt;IF TAB_DIFFERENT = SPACE.            &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;IF TAB1[] = TAB2[].   &lt;/P&gt;&lt;P&gt; " ...               &lt;/P&gt;&lt;P&gt;ENDIF.                &lt;/P&gt;&lt;P&gt;Modify selected components&lt;/P&gt;&lt;P&gt;LOOP AT TAB.            &lt;/P&gt;&lt;P&gt; TAB-DATE = SY-DATUM.  &lt;/P&gt;&lt;P&gt; MODIFY TAB.           &lt;/P&gt;&lt;P&gt;ENDLOOP.                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA-DATE = SY-DATUM.                     &lt;/P&gt;&lt;P&gt;LOOP AT TAB.                            &lt;/P&gt;&lt;P&gt; MODIFY TAB FROM WA TRANSPORTING DATE. &lt;/P&gt;&lt;P&gt;ENDLOOP.                                &lt;/P&gt;&lt;P&gt;Appending two internal tables&lt;/P&gt;&lt;P&gt;LOOP AT TAB_SRC.               &lt;/P&gt;&lt;P&gt;  APPEND TAB_SRC TO TAB_DEST.  &lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND LINES OF TAB_SRC TO TAB_DEST.&lt;/P&gt;&lt;P&gt;Deleting a set of lines&lt;/P&gt;&lt;P&gt;LOOP AT TAB_DEST WHERE K = KVAL.  &lt;/P&gt;&lt;P&gt;  DELETE TAB_DEST.                &lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TAB_DEST WHERE K = KVAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tools available in SAP to pin-point a performance problem&lt;/P&gt;&lt;P&gt;The runtime analysis (SE30)&lt;/P&gt;&lt;P&gt;SQL Trace (ST05)&lt;/P&gt;&lt;P&gt;Tips and Tricks tool &lt;/P&gt;&lt;P&gt;The performance database&lt;/P&gt;&lt;P&gt;Optimizing the load of the database&lt;/P&gt;&lt;P&gt;Using table buffering&lt;/P&gt;&lt;P&gt;Using buffered tables improves the performance considerably. Note that in some cases a stament can not be used with a buffered table, so when using these staments the buffer will be bypassed. These staments are: &lt;/P&gt;&lt;P&gt;Select DISTINCT  &lt;/P&gt;&lt;P&gt;ORDER BY / GROUP BY / HAVING clause  &lt;/P&gt;&lt;P&gt;Any WHERE clasuse that contains a subquery or IS NULL expression  &lt;/P&gt;&lt;P&gt;JOIN s  &lt;/P&gt;&lt;P&gt;A SELECT... FOR UPDATE  &lt;/P&gt;&lt;P&gt;If you wnat to explicitly bypass the bufer, use the BYPASS BUFFER addition to the SELECT clause. &lt;/P&gt;&lt;P&gt;Use the ABAP SORT Clause Instead of ORDER BY&lt;/P&gt;&lt;P&gt;The ORDER BY clause is executed on the database server while the ABAP SORT statement is executed on the application server. The datbase server will usually be the bottleneck, so sometimes it is better to move thje sort from the datsbase server to the application server. &lt;/P&gt;&lt;P&gt;If you are not sorting by the primary key ( E.g. using the ORDER BY PRIMARY key statement) but are sorting by another key, it could be better to use the ABAP SORT stament to sort the data in an internal table. Note however that for very large result sets it might not be a feasible solution and you would want to let the datbase server sort it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avoid ther SELECT DISTINCT Statement&lt;/P&gt;&lt;P&gt;As with the ORDER BY clause it could be better to avoid using SELECT DISTINCT, if some of the fields are not part of an index. Instead use ABAP SORT + DELETE ADJACENT DUPLICATES on an internal table, to delete duplciate rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GO THROUGH THIS LINK&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm" target="test_blank"&gt;http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2006 03:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456768#M215876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-21T03:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456769#M215877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivasa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After u create a report, just click on Program(Menu)-&amp;gt;Check-&amp;gt;Code Inspector.&lt;/P&gt;&lt;P&gt;U will get a list of all the errors &amp;amp; warnings regarding the report's performance.&lt;/P&gt;&lt;P&gt;A best &amp;amp; foolproof method to follow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 06:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456769#M215877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T06:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456770#M215878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;first you need to determine the runtime of your program.for this you need to use&lt;/P&gt;&lt;P&gt;runtime analysis.the corresponding transaction is se30.&lt;/P&gt;&lt;P&gt;thie will give you an overview of the time that your program is taking at the&lt;/P&gt;&lt;P&gt;application server and database server level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the your program is taking more time at the database server level then you can&lt;/P&gt;&lt;P&gt;easily find out the correponding worst select clause by using SQL Trace.the corresponding &lt;/P&gt;&lt;P&gt;transaction is ST05.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if your program is taking more time at the application server level then it would be&lt;/P&gt;&lt;P&gt;mostly due to nested loops or other poor logic for validations used in your report.&lt;/P&gt;&lt;P&gt;you could replace this with a better one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456770#M215878</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-07-20T07:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456771#M215879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use transaction se30&lt;/P&gt;&lt;P&gt;For sql use transaction st05.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456771#M215879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456772#M215880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key to improve the performance of any abap code is that minimize the database acces as much as possible,&lt;/P&gt;&lt;P&gt;This can be done by using into table more often then using select endselect.&lt;/P&gt;&lt;P&gt;Moreover preferably use joins instead of actually coding them.&lt;/P&gt;&lt;P&gt;Get all the data at once in the internal table and read the table entry required as and when required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get only the required data from the database by using&lt;/P&gt;&lt;P&gt;For all entries addition instead of getting more data and then deleting it later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use proper keys to retrieve data from the database.&lt;/P&gt;&lt;P&gt;Avoid using logical db.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunmit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456772#M215880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456773#M215881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  To improve the performace of ABAP code you need to check the performance of the code mainly the database accesses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use ST05, here is a link to the detail documentation of ST05&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/5a/ace273ca0211d194b500a0c94260a5/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/5a/ace273ca0211d194b500a0c94260a5/frameset.htm&lt;/A&gt;&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;kinshuk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 07:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456773#M215881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T07:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456774#M215882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For all entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause. &lt;/P&gt;&lt;P&gt;The plus &lt;/P&gt;&lt;P&gt;&amp;#149;	Large amount of data &lt;/P&gt;&lt;P&gt;&amp;#149;	Mixing processing and reading of data &lt;/P&gt;&lt;P&gt;&amp;#149;	Fast internal reprocessing of data &lt;/P&gt;&lt;P&gt;&amp;#149;	Fast &lt;/P&gt;&lt;P&gt;The Minus &lt;/P&gt;&lt;P&gt;&amp;#149;	Difficult to program/understand &lt;/P&gt;&lt;P&gt;&amp;#149;	Memory could be critical (use FREE or PACKAGE size) &lt;/P&gt;&lt;P&gt;Some steps that might make FOR ALL ENTRIES more efficient: &lt;/P&gt;&lt;P&gt;&amp;#149;	Removing duplicates from the driver table &lt;/P&gt;&lt;P&gt;&amp;#149;	Sorting the driver table  &lt;/P&gt;&lt;P&gt;&amp;#149;	If possible, convert the data in the driver table to ranges so a BETWEEN statement is used instead of and OR statement: &lt;/P&gt;&lt;P&gt;               FOR ALL ENTRIES IN i_tab&lt;/P&gt;&lt;P&gt;                  WHERE mykey &amp;gt;= i_tab-low and&lt;/P&gt;&lt;P&gt;             mykey &amp;lt;= i_tab-high.&lt;/P&gt;&lt;P&gt;Nested selects&lt;/P&gt;&lt;P&gt;The plus: &lt;/P&gt;&lt;P&gt;&amp;#149;	Small amount of data &lt;/P&gt;&lt;P&gt;&amp;#149;	Mixing processing and reading of data &lt;/P&gt;&lt;P&gt;&amp;#149;	Easy to code - and understand &lt;/P&gt;&lt;P&gt;The minus: &lt;/P&gt;&lt;P&gt;&amp;#149;	Large amount of data &lt;/P&gt;&lt;P&gt;&amp;#149;	when mixed processing isn&amp;#146;t needed &lt;/P&gt;&lt;P&gt;&amp;#149;	Performance killer no. 1 &lt;/P&gt;&lt;P&gt;Select using JOINS&lt;/P&gt;&lt;P&gt;The plus &lt;/P&gt;&lt;P&gt;&amp;#149;	Very large amount of data &lt;/P&gt;&lt;P&gt;&amp;#149;	Similar to Nested selects - when the accesses are planned by the programmer &lt;/P&gt;&lt;P&gt;&amp;#149;	In some cases the fastest &lt;/P&gt;&lt;P&gt;&amp;#149;	Not so memory critical &lt;/P&gt;&lt;P&gt;The minus &lt;/P&gt;&lt;P&gt;&amp;#149;	Very difficult to program/understand &lt;/P&gt;&lt;P&gt;&amp;#149;	Mixing processing and reading of data not possible &lt;/P&gt;&lt;P&gt;Use the selection criteria&lt;/P&gt;&lt;P&gt;SELECT * FROM SBOOK.                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK: SBOOK-CARRID = 'LH' AND        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  SBOOK-CONNID = '0400'.         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.                              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SBOOK                      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHERE CARRID = 'LH' AND                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CONNID = '0400'.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.                               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the aggregated functions&lt;/P&gt;&lt;P&gt;C4A = '000'.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T100         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHERE SPRSL = 'D' AND    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ARBGB = '00'.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK: T100-MSGNR &amp;gt; C4A. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  C4A = T100-MSGNR.        &lt;/P&gt;&lt;P&gt;ENDSELECT.                 &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT MAX( MSGNR ) FROM T100 INTO C4A  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHERE SPRSL = 'D' AND                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       ARBGB = '00'.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with view&lt;/P&gt;&lt;P&gt;SELECT * FROM DD01L                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHERE DOMNAME LIKE 'CHAR%'            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        AND AS4LOCAL = 'A'.             &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE * FROM DD01T            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHERE   DOMNAME    = DD01L-DOMNAME  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        AND AS4LOCAL   = 'A'            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        AND AS4VERS    = DD01L-AS4VERS  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        AND DDLANGUAGE = SY-LANGU.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.                              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM DD01V                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHERE DOMNAME LIKE 'CHAR%'            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       AND DDLANGUAGE = SY-LANGU.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.                              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select with index support&lt;/P&gt;&lt;P&gt;SELECT * FROM T100             &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHERE     ARBGB = '00'       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       AND MSGNR = '999'.     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM T002.              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM T100             &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHERE     SPRSL = T002-SPRAS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          AND ARBGB = '00'       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          AND MSGNR = '999'.     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDSELECT.                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.                       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Select &amp;#133; Into table&lt;/P&gt;&lt;P&gt;REFRESH X006.                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T006 INTO X006.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND X006.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM T006 INTO TABLE X006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Select with selection list&lt;/P&gt;&lt;P&gt;SELECT * FROM DD01L               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WHERE DOMNAME LIKE 'CHAR%'      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        AND AS4LOCAL = 'A'.       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT DOMNAME FROM DD01L     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; INTO DD01L-DOMNAME          &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHERE DOMNAME LIKE 'CHAR%'  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       AND AS4LOCAL = 'A'.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key access to multiple lines&lt;/P&gt;&lt;P&gt;LOOP AT TAB.           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CHECK TAB-K = KVAL.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; " ...                &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOOP AT TAB WHERE K = KVAL.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  " ...                          &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Copying internal tables&lt;/P&gt;&lt;P&gt;REFRESH TAB_DEST.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TAB_SRC INTO TAB_DEST.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND TAB_DEST.              &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TAB_DEST[] = TAB_SRC[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modifying a set of lines&lt;/P&gt;&lt;P&gt;LOOP AT TAB.              &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF TAB-FLAG IS INITIAL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TAB-FLAG = 'X'.       &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;  MODIFY TAB.             &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TAB-FLAG = 'X'.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY TAB TRANSPORTING FLAG      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           WHERE FLAG IS INITIAL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Deleting a sequence of lines&lt;/P&gt;&lt;P&gt;DO 101 TIMES.                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE TAB_DEST INDEX 450. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.                       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DELETE TAB_DEST FROM 450 TO 550.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Linear search vs. binary&lt;/P&gt;&lt;P&gt;READ TABLE TAB WITH KEY K = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;READ TABLE TAB WITH KEY K = 'X' BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comparison of internal tables&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE: TAB1 LINES L1,       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                TAB2 LINES L2.       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF L1 &amp;lt;&amp;gt; L2.                         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TAB_DIFFERENT = 'X'.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.                                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TAB_DIFFERENT = SPACE.             &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;LOOP&lt;/P&gt;&lt;P&gt; AT TAB1.                      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE TAB2 INDEX SY-TABIX.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF TAB1 &amp;lt;&amp;gt; TAB2.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TAB_DIFFERENT = 'X'. EXIT.     &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;&lt;/P&gt;&lt;P&gt;ENDIF.                               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF TAB_DIFFERENT = SPACE.            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  " ...                              &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF TAB1[] = TAB2[].   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; " ...               &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;Modify selected components&lt;/P&gt;&lt;P&gt;LOOP AT TAB.            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TAB-DATE = SY-DATUM.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODIFY TAB.           &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WA-DATE = SY-DATUM.                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT TAB.                            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODIFY TAB FROM WA TRANSPORTING DATE. &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;Appending two internal tables&lt;/P&gt;&lt;P&gt;LOOP AT TAB_SRC.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND TAB_SRC TO TAB_DEST.  &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;APPEND LINES OF TAB_SRC TO TAB_DEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting a set of lines&lt;/P&gt;&lt;P&gt;LOOP AT TAB_DEST WHERE K = KVAL.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE TAB_DEST.                &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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DELETE TAB_DEST WHERE K = KVAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Tools available in SAP to pin-point a performance problem&lt;/P&gt;&lt;P&gt;&amp;#149;                The runtime analysis (SE30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;                SQL Trace (ST05)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;                Tips and Tricks tool &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;                The performance database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Optimizing the load of the database&lt;/P&gt;&lt;P&gt;Using table buffering&lt;/P&gt;&lt;P&gt;Using buffered tables improves the performance considerably. Note that in some cases a statement can not be used with a buffered table, so when using these statements the buffer will be bypassed. These statements are: &lt;/P&gt;&lt;P&gt;&amp;#149;	Select DISTINCT &lt;/P&gt;&lt;P&gt;&amp;#149;	ORDER BY / GROUP BY / HAVING clause &lt;/P&gt;&lt;P&gt;&amp;#149;	Any WHERE clause that contains a sub query or IS NULL expression &lt;/P&gt;&lt;P&gt;&amp;#149;	JOIN s &lt;/P&gt;&lt;P&gt;&amp;#149;	A SELECT... FOR UPDATE &lt;/P&gt;&lt;P&gt;If you wan t to explicitly bypass the buffer, use the BYPASS BUFFER addition to the SELECT clause. &lt;/P&gt;&lt;P&gt;Use the ABAP SORT Clause Instead of ORDER BY&lt;/P&gt;&lt;P&gt;The ORDER BY clause is executed on the database server while the ABAP SORT statement is executed on the application server. The database server will usually be the bottleneck, so sometimes it is better to move the sort from the database server to the application server. &lt;/P&gt;&lt;P&gt;If you are not sorting by the primary key ( E.g. using the ORDER BY PRIMARY key statement) but are sorting by another key, it could be better to use the ABAP SORT statement to sort the data in an internal table. Note however that for very large result sets it might not be a feasible solution and you would want to let the database server sort it. &lt;/P&gt;&lt;P&gt;Avoid the SELECT DISTINCT Statement&lt;/P&gt;&lt;P&gt;As with the ORDER BY clause it could be better to avoid using SELECT DISTINCT, if some of the fields are not part of an index. Instead use ABAP SORT + DELETE ADJACENT DUPLICATES on an internal table, to delete duplicate rows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 09:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456774#M215882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T09:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456775#M215883</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;Performance wise you can use SE30 and ST05 transaction.&lt;/P&gt;&lt;P&gt;SE30 will show you time taken by ABAP and by Database ...&lt;/P&gt;&lt;P&gt;always database time should be less .... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perrm extended program check ... this will show all syntaax and cosmatic error ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 10:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456775#M215883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T10:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAP-ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456776#M215884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at below link. It gives the details abt the performance tuning tips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0db4c9-0e01-0010-b68f-9b1408d5f234"&amp;gt;Performance Tuning Tips&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 10:23:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-abap/m-p/1456776#M215884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T10:23:15Z</dc:date>
    </item>
  </channel>
</rss>

