How to do performance tuning in SRM procurement?

Our SRM procurement is very slow.
Could you share your experience in tuning SRM procurement?
Thanks!

Hi,
Please go throught this .
Rebuild the indexes of the following tables on a regular basis:
ARFCSSTATE
ARFCSDATA
TRFCQOUT
TRFCQIN
TRFCQSTATE
TRFCQDATA
ARFCRSTATE
This will significantly reduce the database load and therefore result in reduced database response times, in
particular for all index accesses against the qRFC tables.
Implementation: See SAP Notes 407125 and 332677 for instructions.
For oracle 8i.
See SAP Note 332677 for advantages and disadvantages of the different methods.
The index rebuild might take up to several minutes for large tables and should be carried out during times
with low RFC traffic.
For oracle 9i or higher
The Size of the tRFC and qRFC Tables can vary for Applications that use this Functionality frequently. For Databases which use a CBO (Cost Based Optimizer) and that do not keep the Database Statistics current incorrect access paths may be chosen. This can lead to very long Runtimes.
Download the pre-generated statistics for the RFC tables TRFCQIN, TRFCQOUT,ARFCSSTATE, ARFCSDATA, ARFCRSTATE, QREFTID, TRFCQDATA, and TRFCQSTATE from SAP Note 1020260 and import them into your Oracle database using the instructions in the SAP Note. Ensure that the statistics are not overwritten by the next run of the BR tools by following the instructions in the SAP Note
Close the post if you are answered.
Regards,
Chetan.

Similar Messages

  • How to Achieve Performance Tuning In BPM Studio

    Please Tell me how to achieve performance Tuning in BPm Project . let me know do have any documentation for this .
    Thanks in Advance .

    *5. Group Automatic Activities in a Single Transactional Boundary*
    When you have several automatic activities in a sequence, recognize this as a potential performance improvement opportunity. The default behavior of Oracle BPM is during each Automatic activity's execution:
    1. Initiate the transaction
    2. Read the work item instance's variable information from the Engine's database
    3. Execute the logic in the Automatic activity
    4. If no system exception occurs, commit the transaction and write the instance variable information back to the Engine's database
    Many times you'll instead want to speed execution when there are several Automatic activities in a sequence. If three Automatic activities are in a sequence, then the four items listed above will occur three times. By grouping these into a single transactional boundary, instead of 12 steps you would have:
    1. Initiate the transaction
    2. Read the work item instance's variable information from the Engine's database
    3. Execute the logic in the first Automatic activity
    4. Execute the logic in the second Automatic activity
    5. Execute the logic in the third Automatic activity
    6. If no system exception occurs, commit the transaction and write the instance variable information back to the Engine's database
    This grouping of Automatic activities into a single transactional boundary can be done in one of these three ways:
    1. Create a Group around the sequence of Automatic activities (lasso the three activities) -> right mouse click inside the dotted line -> click "Create a Group with Selection" -> click "Runtime" in the upper left corner -> click the checkbox "Is Atomic".
    2. Instead of placing the Automatic actiivities in the process, add them in a Procedure and then call the Procedure from a new Automatic activity in the process.
    3. In Oracle BPM 10g you can enable "Greedy" execution for the process by right mouse clicking the process's name in the Project Navigator tab -> click "Properties" -> click the "Advanced" tab -> click the "Enable Greedy Execution" radio button.
    Dan

  • How to do performance tuning in EXadata X4 environment?

    Hi,  I am pretty new to exadata X4 and we had a database (oltp /load mixed) created and data loaded. 
    Now the application is testing against this database on exadata.
    However they claimed the test results were slower than current produciton environment. and they send out the explain plan, etc.
    I would like advices from pros here what are specific exadata tuning technics I can perform to find out why this is happening.
    Thanks a bunch.
    db version is 11.2.0.4

    Hi 9233598 -
    Database tuning on Exadata is still much the same as on any Oracle database - you should just make sure you are incorporating the Exadata specific features and best practice as applicable. Reference MOS note: Oracle Exadata Best Practices (Doc ID 757552.1) to help configuring Exadata according to the Oracle documented best practices.
    When comparing test results with you current production system drill down into specific test cases running specific SQL that is identified as running slower on the Exadata than the non-Exadata environment. You need to determine what is it specifically that is running slower on the Exadata environment and why. This may also turn into a review of the Exadata and non-Exadata architecture. How is application connected to the database in the non-Exadata vs Exadata environment - what's the differences, if any, in the network architecture in between and the application layer?
    You mention they sent the explain plans. Looking at the actual execution plans, not just the explain plans, is a good place to start... to identify what the difference is in the database execution between the environments. Make sure you have the execution plans of both environments to compare. I recommend using the Real Time SQL Monitor tool - access it through EM GC/CC from the performance page or using the dbms_sql_tune package. Execute the comparison SQL and use the RSM reports on both environments to help verify you have accurate statistics, where the bottlenecks are and help to understand why you are getting the performance you are and what can be done to improve it. Depending on the SQL being performed and what type of workload any specific statement is doing (OLTP vs Batch/DW) you may need to look into tuning to encourage Exadata smart scans and using parallelism to help.
    The SGA and PGA need to be sized appropriately... depending on your environment and workload, and how these were sized previously, your SGA may be sized too big. Often the SGA sizes do not usually need to be as big on Exadata - this is especially true on DW type workloads. DW workload should rarely need an SGA sized over 16GB. Alternatively, PGA sizes may need to be increased. But this all depends on evaluating your environment. Use the AWR to understand what's going on... however, be aware that the memory advisors in AWR - specifically for SGA and buffer cache size - are not specific to Exadata and can be misleading as to the recommended size. Too large of SGA will discourage direct path reads and thus, smart scans - and depending on the statement and the data being returned it may be better to smart scan than a mix of data being returned from the buffer_cache and disk.
    You also likely need to evaluate your indexes and indexing strategy on Exadata. You still need indexes on Exadata - but many indexes may no longer be needed and may need to be removed. For the most part you only need PK/FK indexes and true "OLTP" based indexes on Exadata. Others may be slowing you down, because they avoid taking advantage of the Exadata storage offloading features.
    You also may want evaluate and determine whether to enable other features that can help performance including configuring huge pages at the OS and DB levels (see MOS notes: 401749.1, 361323.1 and 1392497.1) and write-back caching (see MOS note: 1500257.1).
    I would also recommend installing the Exadata plugins into your EM CC/GC environment. These can help drill into the Exadata storage cells and see how things are performing at that layer. You can also look up and understand the cellcli interface to do this from command line - but the EM interface does make things easier and more visible. Are you consolidating databases on Exadata? If so, you should look into enabling IORM. You also probably want to at least enable and set an IORM objective - matching your workload - even with just one database on the Exadata.
    I don't know your current production environment infrastructure, but I will say that if things are configured correctly OLTP transactions on Exadata should usually be faster or at least comparable - though there are systems that can match and exceed Exadata performance for OLTP operations just by "out powering" it from a hardware perspective. For DW operations Exadata should outperform any "relatively" hardware comparable non-Exadata system. The Exadata storage offloading features should allow you to run these type of workloads faster - usually significantly so.
    Hope this helps.
    -Kasey

  • How does a basis adimn support SRM procurement?

    We newly installed SRM for our procurement.
    Support is an on-going effort.  However we do not know what is specific for basis people to support procurement?
    Please share your experience. Thanks!

    SRM admin does many tasks for us.
    user profile and roles authorisation control on every user in SRM
    for development copying production systems datas
    monitoring /scheduling srm jobs
    monitoring srm queues
    system performance monitoring like table space etc.
    key creation for developers
    opening the conncetion to sap if you create a oss messages
    sm21 /st22 logs and take up to the correct department for escalations
    He/She monitors and control whole syatemstakes care of transport request / sap note implemetations/ patch upgrade etc. cetc..
    takes care of net work connectivity betwenn all our interfaces
    br
    muthu

  • Performance Tuning in N70

    Hi.. I procure N70 last week.. I installed lotz of software and uninstalled some.. now I feel, its slower then previous. Please tell me how to do performance tuning in my mobile?Message Edited by vasanthtt on 13-Sep-2006
    06:44 AM

    Make a phone backup, and format the phone. The restore and install only the ones you want... but not a normal thing, the slow after install. See, with FExplorer if You have some running processes on background.

  • Performance Tuning in XI

    Hi experts,
    Can anybody tell me how to do performance tuning in XI? If any one has document plz give the link.
    Regards,
    venky

    Hi,
    XI have provided the Performance monitoring options  to fine tune the performance in RWB.
    Refer
    Try performance tuning :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/70ada5ef-0201-0010-1f8b-c935e444b0ad
    http://help.sap.com/saphelp_nw04/helpdata/en/9e/6921e784677d4591053564a8b95e7d/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/489f5844-0c01-0010-79be-acc3b52250fd
    XI Performance Testing Tool
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/70ada5ef-0201-0010-1f8b-c935e444b0ad#search=%22XI%20sizing%20guide%22
    /people/sap.user72/blog/2004/11/28/how-robust-is-sap-exchange-infrastructure-xi
    XI Performance issues
    Thanks
    Swarup

  • Performance tuning in BPEL and ESB

    Hi,
    Any one can tell me how to do Performance tuning in BPEL and ESB.
    How to create WEB SERVICES in BPEL

    Hi',
    Performance tuning in BPEL and ESB.
    ***This is very big topic I can give you 2 points here
    In BPEL we should avoid the use of duplicate variable, the best way to do this is, when ever we are creating a new variable
    we need to ask can we reuse variable from inside the process, example when creating the input/output variable in Invoke activity
    we need to check if we can use some existing variable instead of creating new.
    All the DB related operation should be performed in 1 single composite.
    How to create WEB SERVICES in BPEL
    Not sure what you want to ask here, as BPEL is itself a webservice.
    -Yatan

  • Performance tuning in ODI

    Hi,
    Can any help how to do performance tuning in ODI. What are the procedure for performance tuning. What needs to checked for performace tuning. Is there any document for ODI performace tuning.
    Thanks,
    Gnanamanju

    Hi Gnanamanju,
    Let me try to contribute a little,
    ODI performance strategy tells,
    1. Its recommended to run the AGENT in the target host rather than source. In case if your target is a remote host.
    2.Selecting appropriate KMs to load data, for example, if its a simple file to oracle transfer, its recommended to use native DB utilities like SQLLDR, External Table and so on.
    3. In case, if your staging and target are on the same server then make sure in Physical architecture your selected the correct schema (Data Schema and Work Schema)
    4. Right area of execution of joins and filters. If your source has more records then use the filter condition to be executed on SOURCE rather staging.
    5. Increase the Array Fetch Size and Batch Fectch Size of your Data server ( so that agent can accordingly fetch/insert the data)
    And more....
    Thanks,
    Guru

  • SAP CRM Performance tuning

    From where can I get information or documents how to do performance tuning in SAP CRM?

    Hi, Performance Tuning a SAP system is unique in every environment, also there are many area's in SAP to tune even area's outside SAP, eg... your Operating System/Network/Client Machines/Virtual Landscape/Cloud.
    I recommend that you engage in a performance testing execise which will identify what area of your SAP Landscape needs tuning, first you need to identify the bottleneck before you can tune it.
    The way the question was posed is exactly the same as wanting to fix a car but you have no idea which part of the car to fix...
    *LoadRunner is an excellent tool to simulate virtual work load on an SAP environment*
    Regards
    Sodick25
    http://www.2createawebsite.co.za
    Edited by: Sodick25 on Aug 15, 2011 11:58 AM
    Edited by: Sodick25 on Aug 15, 2011 11:59 AM

  • Performance tuning of a customised Transaction Code which for interface

    Hii All ,
    I am new to performance tuning  please guide me How to do performance tuning of Custom T-code through I am aware of all T-codes for performance tuning.
    Please guide hoe to do it and what are basic need to before to start Performance tuning ?
    Thanks
    ABAP Pro
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Locked by: Thomas Zloch on Jun 7, 2011 9:37 AM

    I recommend :
    1. use SQL tracing with DBMS_MONITOR and then TKPROF on raw SQL trace file
    2. call the function as it used in your production environment
    See good examples in http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php (just refer to DBMS_MONITOR examples and TKPROF).
    Note that SQL trace will only trace SQL and not PL/SQL. If SQL elapsed time does not match function call elapsed time close enough, you need to use DBMS_PROFILER to know where PL/SQL non SQL code elapsed time is used.
    I don't recommend using EXPLAIN PLAN because it has known limitations http://docs.oracle.com/cd/E11882_01/server.112/e16638/ex_plan.htm#PFGRF94673 (others have said "EXPLAIN PLAN lies" - you can google for this expression ....).
    Edited by: P. Forstmann on 10 févr. 2012 19:44

  • Performance tuning documents

    Hi all,
    could you guys provide me the links or documents for SAP r/3 performance tuning.
    Performance tuning for SRM, and others..
    jag

    Hi Jagadish
       Check the link below:
       http://sap-img.com/abap/abap-fine-tuning.htm
       Reward points if it helps.
    Regards
    Karan

  • How Modularization Technique imrpove performance tuning?

    Can you please tell me that how a Modularization Technique can help us to do the performance tuning?
    Regards,
    Subhasish

    Modularization makes the program more legible and readable. ie It's noting but building up Perform....FORMS for the execution of "lines of code" .
    However it may effect your performance if you have not Modularized them properly. As a best practice and for better performance, sap code executes from top to bottom.
    Then writing the FORM--ENDFORM in the beginning and making the PERFORM call from the bottom is not a best practice of writing code and that will effect the performance.
    As a better practice to improve the performance, it is suggested to write the FORMS below and closest to the place from where it is called.
    rgds,
    TM.

  • How to increase performance in webi report?

    Hi Experts,
    I have create report top of universe with 1 query.But inside report i created multiple tabs.Data also less but while executing the report it will take so much time. How should decrease the waiting time.
    I followed performance optimization:
    1. ALL formula created in Bex itself.
    2.Enable Query Stripping
    3. Remove auto width and auto height.
    4.scheduling the report.
    Please tell another some performance tuning.

    You'll want to determine where the time is being spent.  You can trace the BW side to see how long it is taking on that end but it is probably the design of the report that is taking the time.  Are you using a UNV universe going to a BEx query or a BICs based connection?
    Query Stripping is automatically on for BI 4.0 SP5+ for BICs connectivity.  There are also a number of optimizations that can help improve performance in the newer Support Packages. 
    Determining where the bottleneck is is the first step.
    thanks
    Jb

  • Report running for long time & performance tuning

    Hi All,
    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    (2). Can you tell me about performance tuning in BO ?
    please help me.....
    Thanks
    Kumar

    (1). WebI report is running for long time.so what are the steps i need to check for it ?
    The first step is to see if the problem lies in the query on the data source or in webi itself. Depending on the data source there are different ways to extract the query and try to run it against the database. Which source does your report uses?
    (2). Can you tell me about performance tuning in BO ?
    I would recommend to start by reading the administrator's guide. There is a section about how to improve performance.
    Regards,
    Stratos

  • HOW TO IMPROVE PERFORMANCE

    HI ALL ,,,
    MY SELECT STATEMENT IS LIKE THIS. IN SM30 ITS SHOWING THAT ITS HAS TAKE THE MAXIMUM TIME. SO HOW CAN I REDUCE THE HITING DB TABLE TIME OR IMPROVE THE PERFORMANCE?
    IF LT_JCDS[] IS NOT INITIAL.
        SELECT  OBJNR
                WKGBTR
                BELNR
                WRTTP
                BEKNZ
                PERIO
                GJAHR
                VERSN
                KOKRS
                VRGNG
                GKOAR
                BUKRS
                REFBZ_FI
                MBGBTR
                FROM COEP
          INTO CORRESPONDING FIELDS OF TABLE LT_COEP
          FOR ALL ENTRIES IN LT_JCDS
          WHERE KOKRS EQ 'DXES'
          AND  OBJNR EQ LT_JCDS-OBJNR
          AND GJAHR <= SO_GJAHR-LOW
          AND  VERSN eq '000'
          AND ( VRGNG EQ 'COIN'  OR VRGNG EQ 'RKU1' OR  VRGNG EQ 'RKL').
          IF SY-SUBRC <> 0.
           MESSAGE  e000(8i) WITH 'DATA NOT FOUND IN "CO Object: Line Items (by Period)"'.
         ENDIF.
      ENDIF.

    Hi
    see these points
    Ways of Performance Tuning
    1.     Selection Criteria
    2.     Select Statements
    •     Select Queries
    •     SQL Interface
    •     Aggregate Functions
    •     For all Entries
    Select Over more than one Internal table
    Selection Criteria
    1.     Restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code using CHECK statement. 
    2.     Select with selection list.
    Points # 1/2
    SELECT * FROM SBOOK INTO SBOOK_WA.
      CHECK: SBOOK_WA-CARRID = 'LH' AND
             SBOOK_WA-CONNID = '0400'.
    ENDSELECT.
    The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list
    SELECT  CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
      WHERE SBOOK_WA-CARRID = 'LH' AND
                  SBOOK_WA-CONNID = '0400'.
    Select Statements   Select Queries
    1.     Avoid nested selects
    2.     Select all the records in a single shot using into table clause of select statement rather than to use Append statements.
    3.     When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary index.
    4.     For testing existence , use Select.. Up to 1 rows statement instead of a Select-Endselect-loop with an Exit. 
    5.     Use Select Single if all primary key fields are supplied in the Where condition .
    Point # 1
    SELECT * FROM EKKO INTO EKKO_WA.
      SELECT * FROM EKAN INTO EKAN_WA
          WHERE EBELN = EKKO_WA-EBELN.
      ENDSELECT.
    ENDSELECT.
    The above code can be much more optimized by the code written below.
    SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
        FROM EKKO AS P INNER JOIN EKAN AS F
          ON PEBELN = FEBELN.
    Note: A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. One should therefore use nested SELECT loops  only if the selection in the outer loop contains very few lines or the outer loop is a SELECT SINGLE statement.
    Point # 2
    SELECT * FROM SBOOK INTO SBOOK_WA.
      CHECK: SBOOK_WA-CARRID = 'LH' AND
             SBOOK_WA-CONNID = '0400'.
    ENDSELECT.
    The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list and puts the data in one shot using into table
    SELECT  CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
      WHERE SBOOK_WA-CARRID = 'LH' AND
                  SBOOK_WA-CONNID = '0400'.
    Point # 3
    To choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields . In certain scenarios, it is advisable to check whether a new index can speed up the performance of a program. This will come handy in programs that access data from the finance tables.
    Point # 4
    SELECT * FROM SBOOK INTO SBOOK_WA
      UP TO 1 ROWS
      WHERE CARRID = 'LH'.
    ENDSELECT.
    The above code is more optimized as compared to the code mentioned below for testing existence of a record.
    SELECT * FROM SBOOK INTO SBOOK_WA
        WHERE CARRID = 'LH'.
      EXIT.
    ENDSELECT.
    Point # 5
    If all primary key fields are supplied in the Where condition you can even use Select Single.
    Select Single requires one communication with the database system, whereas Select-Endselect needs two.
    Select Statements           contd..  SQL Interface
    1.     Use column updates instead of single-row updates
    to update your database tables.
    2.     For all frequently used Select statements, try to use an index.
    3.     Using buffered tables improves the performance considerably.
    Point # 1
    SELECT * FROM SFLIGHT INTO SFLIGHT_WA.
      SFLIGHT_WA-SEATSOCC =
        SFLIGHT_WA-SEATSOCC - 1.
      UPDATE SFLIGHT FROM SFLIGHT_WA.
    ENDSELECT.
    The above mentioned code can be more optimized by using the following code
    UPDATE SFLIGHT
           SET SEATSOCC = SEATSOCC - 1.
    Point # 2
    SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
      WHERE CARRID = 'LH'
        AND CONNID = '0400'.
    ENDSELECT.
    The above mentioned code can be more optimized by using the following code
    SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
      WHERE MANDT IN ( SELECT MANDT FROM T000 )
        AND CARRID = 'LH'
        AND CONNID = '0400'.
    ENDSELECT.
    Point # 3
    Bypassing the buffer increases the network considerably
    SELECT SINGLE * FROM T100 INTO T100_WA
      BYPASSING BUFFER
      WHERE     SPRSL = 'D'
            AND ARBGB = '00'
            AND MSGNR = '999'.
    The above mentioned code can be more optimized by using the following code
    SELECT SINGLE * FROM T100  INTO T100_WA
      WHERE     SPRSL = 'D'
            AND ARBGB = '00'
            AND MSGNR = '999'.
    Select Statements       contd…           Aggregate Functions
    •     If you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates yourself.
    Some of the Aggregate functions allowed in SAP are  MAX, MIN, AVG, SUM, COUNT, COUNT( * )
    Consider the following extract.
                Maxno = 0.
                Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
                 Check zflight-fligh > maxno.
                 Maxno = zflight-fligh.
                Endselect.
    The  above mentioned code can be much more optimized by using the following code.
    Select max( fligh ) from zflight into maxno where airln = ‘LF’ and cntry = ‘IN’.
    Select Statements    contd…For All Entries
    •     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.
         The plus
    •     Large amount of data
    •     Mixing processing and reading of data
    •     Fast internal reprocessing of data
    •     Fast
         The Minus
    •     Difficult to program/understand
    •     Memory could be critical (use FREE or PACKAGE size)
    Points to be must considered FOR ALL ENTRIES
    •     Check that data is present in the driver table
    •     Sorting the driver table
    •     Removing duplicates from the driver table
    Consider the following piece of extract
    Loop at int_cntry.
           Select single * from zfligh into int_fligh
    where cntry = int_cntry-cntry.
    Append int_fligh.
    Endloop.
    The above mentioned can be more optimized by using the following code.
    Sort int_cntry by cntry.
    Delete adjacent duplicates from int_cntry.
    If NOT int_cntry[] is INITIAL.
                Select * from zfligh appending table int_fligh
                For all entries in int_cntry
                Where cntry = int_cntry-cntry.
    Endif.
    Select Statements    contd…  Select Over more than one Internal table
    1.     Its better to use a views instead of nested Select statements.
    2.     To read data from several logically connected tables use a join instead of nested Select statements. Joins are preferred only if all the primary key are available in WHERE clause for the tables that are joined. If the primary keys are not provided in join the Joining of tables itself takes time.
    3.     Instead of using nested Select loops it is often better to use subqueries.
    Point # 1
    SELECT * FROM DD01L INTO DD01L_WA
      WHERE DOMNAME LIKE 'CHAR%'
            AND AS4LOCAL = 'A'.
      SELECT SINGLE * FROM DD01T INTO DD01T_WA
        WHERE   DOMNAME    = DD01L_WA-DOMNAME
            AND AS4LOCAL   = 'A'
            AND AS4VERS    = DD01L_WA-AS4VERS
            AND DDLANGUAGE = SY-LANGU.
    ENDSELECT.
    The above code can be more optimized by extracting all the data from view DD01V_WA
    SELECT * FROM DD01V INTO  DD01V_WA
      WHERE DOMNAME LIKE 'CHAR%'
            AND DDLANGUAGE = SY-LANGU.
    ENDSELECT
    Point # 2
    SELECT * FROM EKKO INTO EKKO_WA.
      SELECT * FROM EKAN INTO EKAN_WA
          WHERE EBELN = EKKO_WA-EBELN.
      ENDSELECT.
    ENDSELECT.
    The above code can be much more optimized by the code written below.
    SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
        FROM EKKO AS P INNER JOIN EKAN AS F
          ON PEBELN = FEBELN.
    Point # 3
    SELECT * FROM SPFLI
      INTO TABLE T_SPFLI
      WHERE CITYFROM = 'FRANKFURT'
        AND CITYTO = 'NEW YORK'.
    SELECT * FROM SFLIGHT AS F
        INTO SFLIGHT_WA
        FOR ALL ENTRIES IN T_SPFLI
        WHERE SEATSOCC < F~SEATSMAX
          AND CARRID = T_SPFLI-CARRID
          AND CONNID = T_SPFLI-CONNID
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    The above mentioned code can be even more optimized by using subqueries instead of for all entries.
    SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
        WHERE SEATSOCC < F~SEATSMAX
          AND EXISTS ( SELECT * FROM SPFLI
                         WHERE CARRID = F~CARRID
                           AND CONNID = F~CONNID
                           AND CITYFROM = 'FRANKFURT'
                           AND CITYTO = 'NEW YORK' )
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    1.     Table operations should be done using explicit work areas rather than via header lines.
    2.     Always try to use binary search instead of linear search. But don’t forget to sort your internal table before that.
    3.     A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
    4.     A binary search using secondary index takes considerably less time.
    5.     LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
    6.     Modifying selected components using “ MODIFY itab …TRANSPORTING f1 f2.. “ accelerates the task of updating  a line of an internal table.
    Point # 2
    READ TABLE ITAB INTO WA WITH KEY K = 'X‘ BINARY SEARCH.
    IS MUCH FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY K = 'X'.
    If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
    Point # 3
    READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
    Point # 5
    LOOP AT ITAB INTO WA WHERE K = 'X'.
    ENDLOOP.
    The above code is much faster than using
    LOOP AT ITAB INTO WA.
      CHECK WA-K = 'X'.
    ENDLOOP.
    Point # 6
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
    The above code is more optimized as compared to
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1.
    7.     Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
    8.    If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
    9.    "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to “ LOOP-APPEND-ENDLOOP.”
    10.   “DELETE ADJACENT DUPLICATES“ accelerates the task of deleting duplicate entries considerably as compared to “ READ-LOOP-DELETE-ENDLOOP”.
    11.   "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to “  DO -DELETE-ENDDO”.
    Point # 7
    Modifying selected components only makes the program faster as compared to Modifying all lines completely.
    e.g,
    LOOP AT ITAB ASSIGNING <WA>.
      I = SY-TABIX MOD 2.
      IF I = 0.
        <WA>-FLAG = 'X'.
      ENDIF.
    ENDLOOP.
    The above code works faster as compared to
    LOOP AT ITAB INTO WA.
      I = SY-TABIX MOD 2.
      IF I = 0.
        WA-FLAG = 'X'.
        MODIFY ITAB FROM WA.
      ENDIF.
    ENDLOOP.
    Point # 8
    LOOP AT ITAB1 INTO WA1.
      READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
      IF SY-SUBRC = 0.
        ADD: WA1-VAL1 TO WA2-VAL1,
             WA1-VAL2 TO WA2-VAL2.
        MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
      ELSE.
        INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
      ENDIF.
    ENDLOOP.
    The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
    LOOP AT ITAB1 INTO WA.
      COLLECT WA INTO ITAB2.
    ENDLOOP.
    SORT ITAB2 BY K.
    COLLECT, however, uses a hash algorithm and is therefore independent
    of the number of entries (i.e. O(1)) .
    Point # 9
    APPEND LINES OF ITAB1 TO ITAB2.
    This is more optimized as compared to
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    Point # 10
    DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
    This is much more optimized as compared to
    READ TABLE ITAB INDEX 1 INTO PREV_LINE.
    LOOP AT ITAB FROM 2 INTO WA.
      IF WA = PREV_LINE.
        DELETE ITAB.
      ELSE.
        PREV_LINE = WA.
      ENDIF.
    ENDLOOP.
    Point # 11
    DELETE ITAB FROM 450 TO 550.
    This is much more optimized as compared to
    DO 101 TIMES.
      DELETE ITAB INDEX 450.
    ENDDO.
    12.   Copying internal tables by using “ITAB2[ ] = ITAB1[ ]” as compared to “LOOP-APPEND-ENDLOOP”.
    13.   Specify the sort key as restrictively as possible to run the program faster.
    Point # 12
    ITAB2[] = ITAB1[].
    This is much more optimized as compared to
    REFRESH ITAB2.
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    Point # 13
    “SORT ITAB BY K.” makes the program runs faster as compared to “SORT ITAB.”
    Internal Tables         contd…
    Hashed and Sorted tables
    1.     For single read access hashed tables are more optimized as compared to sorted tables.
    2.      For partial sequential access sorted tables are more optimized as compared to hashed tables
    Hashed And Sorted Tables
    Point # 1
    Consider the following example where HTAB is a hashed table and STAB is a sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    This runs faster for single read access as compared to the following same code for sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE STAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    Point # 2
    Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
    LOOP AT STAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.
    This runs faster as compared to
    LOOP AT HTAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.

Maybe you are looking for

  • I have 8 gb on my macbook pro, but it sometimes only recognizes 4 gb. Whats going on?

    I have 8 gb on my macbook pro, but it sometimes only recognizes one of the banks and thus only 4 gb. I was about to open my Macbook Pro mid 2010 2.66 up but it went back up to 8 gb of ram. I also noticed that the macbook would go to sleep and not wak

  • Question about servlet.xml setting

    <?xml version="1.0" encoding="UTF-8"?> <!-- Example Server Configuration File --> <Server port="8025" shutdown="TEARSDOWN"> <!-- Comment these entries out to disable JMX MBeans support used for the administration web application --> <Listener classNa

  • Address Book unexpected application close

    Hi, Does anyone know of any limitations of Address Book regarding number of contacts in the database? I have about 16,000 contacts, and when I try to have Address Book "Find Duplicate Records", it terminates unexpectedly. What's the deal? Ron

  • Location of video captured from within iMovie?

    When capturing video directly from iMovie using the built in iSight in my macbook Pro, where are the video files saved on the mac? Thanks.

  • Standards Recommendations for build applications

    Hello, I'd like to know if there is some "Standards & Guidelines" document to build applications using HTMLDB. I know there are How-tos, etc, is there any document that explain or describes techniques or standards to build better applications? Thanks