Performance issue in report programming..

Hi,
I am using one customized Function Module  whithin a loop of internal table containing fields of PROJ table for about 200 records . And in  the source code of function module there is set of select queries for different tables like COSS COSP , AUFK , PRPS , BPJA PRHI , AFPO , AFKO etc . so due to that my performance of a report is very low , So how can i improve it .
Is there any other way to change a code.
regards
Chetan

Hi  John ,
I am using SAP ECC 6.0 .
The report  is used to update a  ztable which is already created for Project System plan data .
So i am calling function module  which will return a internal table , I am appending this to other internal table and refreshing it , like this I  am doing for each project within a loop of PROJ internal table , finaly by using the final itab I am modifying the ztable fields.
Code is as below..
select pspid from proj client specified into corresponding fields of
          table t_itab1 where mandt = sy-mandt
                          and pspnr in s_pspnr
                          and vbukr = p_vbukr
                          and prctr in s_prctr.
loop at t_itab1.
    l_pspid = t_itab1-pspid.
CALL FUNCTION 'ZPS_FUN_BUDGETS'
      EXPORTING
        L_PSPID       = l_pspid
        L_VBUKR       = p_vbukr
      TABLES
        T_DATA        = t_itab2 .
  loop at t_itab2.
      append t_itab2 to t_itab.
    endloop.
    clear   : t_itab2.
    refresh : t_itab2.
  endloop.
LOOP AT t_itab.
***MODIFY ZTABLE.*****
ENDLOOP.
Regards
Chetan

Similar Messages

  • Performance issue in customized program

    Hi,
    We have a performance issue in customized program.
    In this program he used do-enddo twice. I mean nested do-endo.
    How can we increase the performance.
    And when we did the code inspector it displays 9 errors 'Char. strings w/o text elements will not be translated'.
    Is there any performance issue for this error?
    Regards,
    Chandu.

    >  'Char. strings w/o text elements will not be translated'.
    > Is there any performance issue for this error?
    No, this is just not so clean programming. As for the rest, Please Read before Posting in the Performance and Tuning Forum and learn how to find out where the showstoppers really are.
    Thomas

  • Performance issue in customized program with do-enddo

    Hi,
    We have a performance issue in customized program.
    In this program he used do-enddo twice. I mean nested do-endo.
    How can we increase the performance.
    And when we did the code inspector it displays 9 errors 'Char. strings w/o text elements will not be translated'.
    Is there any performance issue for this error?
    Regards,
    Chandu.
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Oct 20, 2009 12:42 PM

    >  'Char. strings w/o text elements will not be translated'.
    > Is there any performance issue for this error?
    No, this is just not so clean programming. As for the rest, Please Read before Posting in the Performance and Tuning Forum and learn how to find out where the showstoppers really are.
    Thomas

  • Using Reference Cursor Performance Issue in Report

    Hi,
    Are reference cursor supposed to be faster than a normal query? The reason why I am asking is because I am using a reference cusor query in the data model and it has a performance issue on the report, it's taking quite a while to run than If I just run the same reference cursor query in sql*plus. The difference is significantly big. Any input is very much appreciated!
    Thanks,
    Marilyn

    From the metalink bug 4372868 on 9.0.4.x. It was fixed on 10.1.2.0.2 and does not have a backport for any 9.0.4 version.
    Also the 9.0.4 version is already desupported. Please see the note:
    Note 307042.1
    Topic: Desupport Notices - Oracle Products
    Title: Oracle Reports 10g 9.0.4 & 9.0.4.x
    Action plan:
    If you are still on 9.0.4 and later version of oracle reports and have no plan yet to migrate to 10.1.2.0.2 version use the same query you are using in your reference cursor and use it as a plain SQL query in your reports data model.

  • Performance issue of report

    Hi Friends,
    Can you please give me the exact answer for the below question.
    Suppose my report program is taking long time to execute, what are the reasons that may effect the report.
    and what are the remedies should i follow, please provide appropriate answer.
    Advance thanks,
    Chandra.

    hi,,
    Go to tranx SE30 here you will get Tips and Trciks for the performance tuning.
    Check it carefully and check whether you can do something for improving performance of you code.
    It will help you a lot and will reduce your Execution time.
    If you are using READ TABLE command in your program then you can check whether you can use HASHED TABLE it will improve performance of your code a lot but it has some restrictions.
    I will explain some of the points to improve the performance of the report try to write code according to that ok.
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement, SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING", creates more coding but is more effcient.
    Reward points if helpful.
    regards,
    rekha

  • Performance issue with report

    Hello
    i am making a change to an existing custom report.I have to pull all the orders except CANCELLED Orders for a parameters passed by user.
    I made a change as FLOW_STATUS_CODE<>'CANCELLED' in rdf.The not equal is causing performance issues...and it is taking lot of time to complete.
    can any one sujjest what will be the best to use in place of not equal.
    Thanks

    Is there an index on column FLOW_STATUS_CODE?
    Run your query in sqlplus through explain plan, and check the execution plan if a query has performance issues.
    set pages 999
    set lines 400
    set trimspool on
    spool explain.lst
    explain plan for
    <your statement>;
    select * from table(dbms_xplan.display);
    spool offFor optimization questions you'd better go to the SQL forum.

  • Performance issue webi report-BOXI3.1

    Hi,
    We have a requirement for a report where we will give user a set of objects (26 u2013 31) to do analysis using interactive viewing feature. Here we are facing severe performance issues and memory issues as the data that we are calling is huge( around 6 million records). At the report level we will be summarizing the data.
    No of rows in the report is depending on the no of objects.
    Mode of view : Interactive view.
    Note:
    1. Objects which are using in conditional level those have indexes.
    2. No of report level variable are two.
    3. Version of Business objects: BOXI3.1
    4. OS: Sun Solaris
    Please let me know if there are any means by which the memory requirements for the report can be minimized/ performance of the report can be improved.
    Thanks,
    Subash

    Subash,
    At the report level we will be summarizing the data ... any means by which the memory requirements for the report can be minimized/ performance of the report can be improved
    Is there any way that you can summarize this on the database side versus the report level?  The database should be sized with memory and disk space properly to handle these types of summarizations versus expecting the application to perform it.
    Thanks,
    John

  • Performance of Big Report Programs

    Hi SAP Experts,
    I want to know whether we can put the trace on the Report Programs which are taking on almost around 10 hours to execute or how can we put a trace on background jobs.
    Thanks and Regards,
    Harsh Goel

    Hi Harsh,
    The problem with the report will be mostly due to the select queries.
    So better do one thing, execute your program in debug mode, keep a break point before the select query, activate the trace in ST05 transaction and after executing the select query deactivate the trace
    Now look in display trace for the time it takes for the query.
    you can follow the same method for each query and check which query takes a long time and rectify that.
    To reduce ABAP/4 program runtime, always follow the ABAP/4 program optimization techniques given below:
    1. Avoid 'SELECT *'. Instead use select with field names i.e. SELECT f1 f2 f3 and so on.
    2. Use table (primary) keys (as far as possible) in the WHERE clause of the select statements. Else, check for secondary indexes.
    3. Avoid nested selects or nested loops.
    4. Use binary search wherever possible.
    5. Avoid use of joins in the select queries.
    5. You can evaluate the performance using GET RUN TIME command for small pieces of program. Try using this statement for SELECT queries to know how much time your SELECT query takes to execute.
    Example
    DATA: gv_runtime1       TYPE i,
          gv_runtime2       TYPE i,
          gv_final          TYPE i.
    GET RUN TIME FIELD gv_runtime1.
    SELECTu2026u2026
    GET RUN TIME FIELD gv_runtime2.
    gv_final = gv_runtime2 - gv_runtime1.
    WRITE: 'Execution time=', gv_final.
    If you still have any doubts please let me know.
    Regards,
    Shobana.K
    Edited by: Shobana k on Sep 18, 2008 8:27 AM

  • Performance Issue with Concurrent Program

    Hi Gurus,
    I have a loader program which updates some information in the OM sales orders, this is been done using oe_order_pub.process_order and I do not see any performance issue in the package.
    Using this program i had tried to update some huge number of orders uand it gets completed in few minutes, but at times this program runs for more than 6-7 hours even with
    Pls could anyone advise what could be the issue with this?
    Thanks & Regards,
    Genoo

    I have a loader program which updates some information in the OM sales orders, this is been done using oe_order_pub.process_order and I do not see any performance issue in the package.
    Using this program i had tried to update some huge number of orders uand it gets completed in few minutes, but at times this program runs for more than 6-7 hours even with
    Pls could anyone advise what could be the issue with this?Do you have the statistics collected up to date?
    Can you find any errors in the database log file?
    Any locks in the database?
    Any invalid objects?
    Please enable trace and generate the TKPROF file once the program is completed.
    Thanks,
    Hussein

  • Performance issue in Report (getting time out error)

    Hi experts,
    I am doing Performance for a Report (getting time out error)
    Please see the code below and .
    while looping internal table IVBAP after 25 minutes its showing  time out error at this poit ->
    SELECT MAX( ERDAT ) .
    please send alternate code for this .
    Advance thanks
    from
    Nagendra
    Get Sales Order Details
    CLEAR IVBAP.
    REFRESH IVBAP.
    SELECT VBELN POSNR MATNR NETWR KWMENG WERKS FROM VBAP
       INTO CORRESPONDING FIELDS OF TABLE IVBAP
         FOR ALL ENTRIES IN IVBAK
           WHERE VBELN =  IVBAK-VBELN
           AND   MATNR IN Z_MATNR
           AND   WERKS IN Z_WERKS
           AND   ABGRU = ' '.
    Check for Obsolete Materials - Get Product Hierarhy/Mat'l Description
      SORT IVBAP BY MATNR WERKS.
      CLEAR: WK_MATNR, WK_WERKS, WK_PRDHA, WK_MAKTX,
             WK_BLOCK, WK_MMSTA, WK_MSTAE.
      LOOP AT IVBAP.
          CLEAR WK_INVDATE.                                   "I6677.sn
          SELECT MAX( ERDAT ) FROM VBRP INTO WK_INVDATE WHERE
          AUBEL EQ IVBAP-VBELN AND
          AUPOS EQ IVBAP-POSNR.
          IF SY-SUBRC = 0.
              MOVE WK_INVDATE TO IVBAP-INVDT.
              MODIFY IVBAP.
          ENDIF.                                               "I6677.e n
          SELECT SINGLE * FROM MBEW WHERE             "I6759.sn
          MATNR EQ IVBAP-MATNR AND
          BWKEY EQ IVBAP-WERKS AND
          BWTAR EQ SPACE.
          IF SY-SUBRC = 0.
             MOVE MBEW-STPRS TO IVBAP-STPRS.
             IVBAP-TOT = MBEW-STPRS * IVBAP-KWMENG.
             MODIFY IVBAP.
          ENDIF.                                      "I6759.en
        IF IVBAP-MATNR NE WK_MATNR OR IVBAP-WERKS NE WK_WERKS.
          CLEAR: WK_BLOCK, WK_MMSTA, WK_MSTAE, WK_PRDHA, WK_MAKTX.
          MOVE IVBAP-MATNR TO WK_MATNR.
          MOVE IVBAP-WERKS TO WK_WERKS.
          SELECT SINGLE MMSTA FROM MARC INTO MARC-MMSTA
            WHERE MATNR = WK_MATNR
            AND   WERKS = WK_WERKS.
          IF NOT MARC-MMSTA IS INITIAL.
            MOVE '*' TO WK_MMSTA.
          ENDIF.
          SELECT SINGLE LVORM PRDHA MSTAE MSTAV FROM MARA
            INTO (MARA-LVORM, MARA-PRDHA, MARA-MSTAE, MARA-MSTAV)
            WHERE MATNR = WK_MATNR.
          IF ( NOT MARA-MSTAE IS INITIAL ) OR
             ( NOT MARA-MSTAV IS INITIAL ) OR
             ( NOT MARA-LVORM IS INITIAL ).
             MOVE '*' TO WK_MSTAE.
          ENDIF.
          MOVE MARA-PRDHA TO WK_PRDHA.
          SELECT SINGLE MAKTX FROM MAKT INTO WK_MAKTX
            WHERE MATNR = WK_MATNR
              AND SPRAS = SY-LANGU.
        ENDIF.
        IF Z_BLOCK EQ 'B'.
          IF WK_MMSTA EQ ' ' AND WK_MSTAE EQ ' '.
            DELETE IVBAP.
            CONTINUE.
          ENDIF.
        ELSEIF Z_BLOCK EQ 'U'.
          IF WK_MMSTA EQ '' OR WK_MSTAE EQ ''.
            DELETE IVBAP.
            CONTINUE.
          ENDIF.
        ELSE.
          IF WK_MMSTA EQ '' OR WK_MSTAE EQ ''.
            MOVE '*' TO WK_BLOCK.
          ENDIF.
        ENDIF.
        IF WK_PRDHA IN Z_PRDHA.                                    "I4792
          MOVE WK_BLOCK TO IVBAP-BLOCK.
          MOVE WK_PRDHA TO IVBAP-PRDHA.
          MOVE WK_MAKTX TO IVBAP-MAKTX.
          MODIFY IVBAP.
        ELSE.                                                     "I4792
          DELETE IVBAP.                                           "I4792
        ENDIF.                                                    "I4792
        IF NOT Z_ALNUM[] IS INITIAL.                              "I9076
          SELECT SINGLE * FROM MAEX                               "I9076
            WHERE MATNR = IVBAP-MATNR                             "I9076
              AND ALNUM IN Z_ALNUM.                               "I9076
          IF SY-SUBRC <> 0.                                       "I9076
            DELETE IVBAP.                                         "I9076
          ENDIF.                                                  "I9076
        ENDIF.                                                    "I9076
      ENDLOOP.

    Hi Nagendra!
    Get Sales Order Details
    CLEAR IVBAP.
    REFRESH IVBAP.
    check ivbak is not initial
    SELECT VBELN POSNR MATNR NETWR KWMENG WERKS FROM VBAP
    INTO CORRESPONDING FIELDS OF TABLE IVBAP
    FOR ALL ENTRIES IN IVBAK
    WHERE VBELN = IVBAK-VBELN
    AND MATNR IN Z_MATNR
    AND WERKS IN Z_WERKS
    AND ABGRU = ' '.
    Check for Obsolete Materials - Get Product Hierarhy/Mat'l Description
    SORT IVBAP BY MATNR WERKS.
    CLEAR: WK_MATNR, WK_WERKS, WK_PRDHA, WK_MAKTX,
    WK_BLOCK, WK_MMSTA, WK_MSTAE.
    avoid select widin loop. instead do selection outside loop.u can use read statement......and then loop if required.
    LOOP AT IVBAP.
    CLEAR WK_INVDATE. "I6677.sn
    SELECT MAX( ERDAT ) FROM VBRP INTO WK_INVDATE WHERE
    AUBEL EQ IVBAP-VBELN AND
    AUPOS EQ IVBAP-POSNR.
    IF SY-SUBRC = 0.
    MOVE WK_INVDATE TO IVBAP-INVDT.
    MODIFY IVBAP.
    ENDIF. "I6677.e n
    SELECT SINGLE * FROM MBEW WHERE "I6759.sn
    MATNR EQ IVBAP-MATNR AND
    BWKEY EQ IVBAP-WERKS AND
    BWTAR EQ SPACE.
    IF SY-SUBRC = 0.
    MOVE MBEW-STPRS TO IVBAP-STPRS.
    IVBAP-TOT = MBEW-STPRS * IVBAP-KWMENG.
    MODIFY IVBAP.
    ENDIF. "I6759.en
    IF IVBAP-MATNR NE WK_MATNR OR IVBAP-WERKS NE WK_WERKS.
    CLEAR: WK_BLOCK, WK_MMSTA, WK_MSTAE, WK_PRDHA, WK_MAKTX.
    MOVE IVBAP-MATNR TO WK_MATNR.
    MOVE IVBAP-WERKS TO WK_WERKS.
    SELECT SINGLE MMSTA FROM MARC INTO MARC-MMSTA
    WHERE MATNR = WK_MATNR
    AND WERKS = WK_WERKS.
    IF NOT MARC-MMSTA IS INITIAL.
    MOVE '*' TO WK_MMSTA.
    ENDIF.
    SELECT SINGLE LVORM PRDHA MSTAE MSTAV FROM MARA
    INTO (MARA-LVORM, MARA-PRDHA, MARA-MSTAE, MARA-MSTAV)
    WHERE MATNR = WK_MATNR.
    IF ( NOT MARA-MSTAE IS INITIAL ) OR
    ( NOT MARA-MSTAV IS INITIAL ) OR
    ( NOT MARA-LVORM IS INITIAL ).
    MOVE '*' TO WK_MSTAE.
    ENDIF.
    MOVE MARA-PRDHA TO WK_PRDHA.
    SELECT SINGLE MAKTX FROM MAKT INTO WK_MAKTX
    WHERE MATNR = WK_MATNR
    AND SPRAS = SY-LANGU.
    ENDIF.
    IF Z_BLOCK EQ 'B'.
    IF WK_MMSTA EQ ' ' AND WK_MSTAE EQ ' '.
    DELETE IVBAP.
    CONTINUE.
    ENDIF.
    ELSEIF Z_BLOCK EQ 'U'.
    IF WK_MMSTA EQ '' OR WK_MSTAE EQ ''.
    DELETE IVBAP.
    CONTINUE.
    ENDIF.
    ELSE.
    IF WK_MMSTA EQ '' OR WK_MSTAE EQ ''.
    MOVE '*' TO WK_BLOCK.
    ENDIF.
    ENDIF.
    IF WK_PRDHA IN Z_PRDHA. "I4792
    MOVE WK_BLOCK TO IVBAP-BLOCK.
    MOVE WK_PRDHA TO IVBAP-PRDHA.
    MOVE WK_MAKTX TO IVBAP-MAKTX.
    MODIFY IVBAP.
    ELSE. "I4792
    DELETE IVBAP. "I4792
    ENDIF. "I4792
    IF NOT Z_ALNUM[] IS INITIAL. "I9076
    SELECT SINGLE * FROM MAEX "I9076
    WHERE MATNR = IVBAP-MATNR "I9076
    AND ALNUM IN Z_ALNUM. "I9076
    IF SY-SUBRC 0. "I9076
    DELETE IVBAP. "I9076
    ENDIF. "I9076
    ENDIF. "I9076
    endloop.
    U have used many select queries widin loop-endloop which is a big hindrance as far as performance is concerned.Avoid such practice.
    Thanks
    Deepika

  • Performance Issue Crystal Report and Oracle

    Hello,
    We have one procedure that takes 3 input parameters and returns Cursor from Procedure that is used to design the report. There is no caluculation involved here and cursor is opended dynamically. We are using Oracle Native connection.
    When we click on preview button it takes lots of time ( >10 Mins) to show complete data. While we call the same procedure in application and generate HTML report using Cursor returned it is done in < 15 Seconds. Can some point me where to look into to improve the performance of Crystal Report.
    DB: Oracle 10G
    CR: Version XI

    Hi Vadiraja
    The performance of a report is related to:
    External factors:
    1. The amount of time the database server takes to process the SQL query.
    ( Crystal Reports send the SQL query to the database, the database process it, and returns the data set to Crystal Reports. )
    2. Network traffics.
    3. Local computer processor speed.
    ( When Crystal Reports receives the data set, it generates a temp file to further filter the data when necessary, as well as to group, sort, process formulas, ... )
    4. The number of record returned
    ( If a sql query returns a large number of records, it will take longer to format and display than if was returning a smaller data set.)
    Report design:
    1. Where is the Record Selection evaluated.
    Ensure your Record Selection Formula can be translated in SQL, so the data can be filter down on the server, otherwise the filtering will be done in a temp file on the local machine which will be much slower.
    They have many functions that cannot be translated in SQL because they may not have a standard SQL for it.
    For example, control structure like IF THEN ELSE cannot be translated into SQL. It will always be evaluated in Crystal Reports. But if you use an IF THEN ELSE on a parameter, it will convert the result of the condition to SQL, but as soon as uses database fileds in the conditions it will not be translated in SQL.
    2. How many subreports the report contains and in section section they are located.
    Minimise the number of subreports used, or avoid using subreports if possible because
    subreports are reports within a report, and if you have a subreport in a details section, and the report returns 100 records, the subreport will be evaluated 100 times, so it will query the database 100 times. It is often the biggest factor why a report takes a long time to preview.
    3. How many records will be returned to the report.
    Large number of records will slow down the preview of the reports.
    Ensure you only returns the necessary data on the report, by creating a Record Selection Formula, or basing your report off a Stored Procedure, or a Command Object that only returns the desired data set.
    4. Do you use the special field "Page N of M", or "TotalPageCount"
    When the special field "Page N of M" or "TotalPageCount" is used on a report, it will have to generate each page of the report before it displays the first page, therfore it will take more time to display the first page of the report.
    If you want to improve the speed of a report, remove the special field "Page N of M" or "Total Page Count" or formula that uses the function "TotalPageCount". If those aren't use when you view a report it only format the page requested.
    It won't format the whole report.
    5. Link tables on indexed fields whenever possible.
    6. Remove unused tables, unused formulas, unused running totals from the report.
    7. Suppress unnecessary sections.
    8. For summaries, use conditional formulas instead of running totals when possible.
    9. Whenever possible, limit records through selection, not suppression.
    10. Use SQL expressions to convert fields to be used in record selection instead of using formula functions.
    For example, if you need to concatenate 2 fields together, instead of doing it in a formula, you can create a SQL Expression Field. It will concatenate the fields on the database server, instead of doing in Crystal Reports. SQL Expression Fields are added to the SELECT clause of the SQL Query send to the database.
    11. Using one command as the datasource can be faster if you returns only the desired data set.
    It can be faster if the SQL query written only return the desired data.
    12. Perform grouping on server
    This is only relevant if you only need to return the summary to your report but not the details. It will be faster as less data will be returned to the reports.
    Regards
    Girish Bhosale

  • Performance issue - Pricing Report

    Hi Experts,
    I have developed an ALV report and I need to improve the performance in production.
    I have a relatively complex issue here. I have to fetch data for pricing from a pricing condition from all the respective underlying condition tables (AXXX). Then for every material, I have to display the material class classification characteristics and their values maintained in the material master as well as batch classification characteristics and their corresponding values maintained for every batch.
    For example:
    In this way, if the condition is having 10 materials, every material has say 10 material class characteristic and 12 batch class characteristics then the total number of rows in the out put should be 130 (one for material and 12 rows for classifications).
    How can I optimize the output so that the performance is optimized.
    I am also fetching other data for the output like stock and sales order quantity against every material.
    I have tried minimizing loops and used select for all entries(I have read a few threads which suggests otherwise). Read statements use binary search. No select * queries.
    Warm Regards,
    Abdullah

    I would not sign a lot of the recommendations going around here. Seems like a complex report you are doing there, so here is my personal generic recommendations:
    - always use index when selecting from database tables
    - avoid redundant database accesses to unbuffered tables, only read fields you really need for processing
    - use sorted or hashed tables for reads or loops and access them by key
    - use ASSIGNING rather than INTO when reading or looping (small gain)
    - use SE30 and if necessary ST05 to fine tune if not yet satisfied with the runtime
    Thomas

  • Performance issue in abap program

    hi,
    how can we improve the performance of  abap program

    hi,
    read the follwing links
    ABAP provides few tools to analyse the perfomance of the objects, which was developed by us.
    Run time analysis transaction SE30
    This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05
    by using this tool we can analyse the perfomance issues related to DATABASE calls.
    Perfomance Techniques for improve the perfomance of the object.
    1) ABAP/4 programs can take a very long time to execute, and can make other processes have to wait before executing. Here are some tips to speed up your programs and reduce the load your programs put on the system:
    2) Use the GET RUN TIME command to help evaluate performance. It's hard to know whether that optimization technique REALLY helps unless you test it out.
    3) Using this tool can help you know what is effective, under what kinds of conditions. The GET RUN TIME has problems under multiple CPUs, so you should use it to test small pieces of your program, rather than the whole program.
    4) Generally, try to reduce I/O first, then memory, then CPU activity. I/O operations that read/write to hard disk are always the most expensive operations. Memory, if not controlled, may have to be written to swap space on the hard disk, which therefore increases your I/O read/writes to disk. CPU activity can be reduced by careful program design, and by using commands such as SUM (SQL) and COLLECT (ABAP/4).
    5) Avoid 'SELECT *', especially in tables that have a lot of fields. Use SELECT A B C INTO instead, so that fields are only read if they are used. This can make a very big difference.
    6) Field-groups can be useful for multi-level sorting and displaying. However, they write their data to the system's paging space, rather than to memory (internal tables use memory). For this reason, field-groups are only appropriate for processing large lists (e.g. over 50,000 records). If you have large lists, you should work with the systems administrator to decide the maximum amount of RAM your program should use, and from that, calculate how much space your lists will use. Then you can decide whether to write the data to memory or swap space.
    Use as many table keys as possible in the WHERE part of your select statements.
    7)Whenever possible, design the program to access a relatively constant number of records (for instance, if you only access the transactions for one month, then there probably will be a reasonable range, like 1200-1800, for the number of transactions inputted within that month). Then use a SELECT A B C INTO TABLE ITAB statement.
    8) Get a good idea of how many records you will be accessing. Log into your productive system, and use SE80 -> Dictionary Objects (press Edit), enter the table name you want to see, and press Display. Go To Utilities -> Table Contents to query the table contents and see the number of records. This is extremely useful in optimizing a program's memory allocation.
    9) Try to make the user interface such that the program gradually unfolds more information to the user, rather than giving a huge list of information all at once to the user.
    10) Declare your internal tables using OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to be accessing. If the number of records exceeds NUM_RECS, the data will be kept in swap space (not memory).
    11) Use SELECT A B C INTO TABLE ITAB whenever possible. This will read all of the records into the itab in one operation, rather than repeated operations that result from a SELECT A B C INTO ITAB... ENDSELECT statement. Make sure that ITAB is declared with OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to access.
    12) If the number of records you are reading is constantly growing, you may be able to break it into chunks of relatively constant size. For instance, if you have to read all records from 1991 to present, you can break it into quarters, and read all records one quarter at a time. This will reduce I/O operations. Test extensively with GET RUN TIME when using this method.
    13) Know how to use the 'collect' command. It can be very efficient.
    14) Use the SELECT SINGLE command whenever possible.
    15) Many tables contain totals fields (such as monthly expense totals). Use these avoid wasting resources by calculating a total that has already been calculated and stored.
    Some tips:
    1) Use joins where possible as redundant data is not fetched.
    2) Use select single where ever possible.
    3) Calling methods of a global class is faster than calling function modules.
    4) Use constants instead of literals
    5) Use WHILE instead of a DO-EXIT-ENDDO.
    6) Unnecessary MOVEs should be avoided by using the explicit work area operations
    see the follwing links for a brief insifght into performance tuning,
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_Introduction.asp
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f7c454211d189710000e8322d00/frameset.htm
    regards
    Rohan

  • Performance issue in Report.

    Hello DBAs,
    We have a report which usually takes around 2 hours to complete in our instances "A" and "B".
    We created an index (CREATE INDEX xxexh_order_lines_n2 ON oe_order_lines_all (TRUNC(last_update_date));
    ) in instance A and the report now takes only 10 minutes to complete.
    We created the same index in instance B but the problem is still the same.
    Please provide your feedback as to what do I need to check/compare between the 2 instances to find out the the failure of the index in the latter one.
    Thanks in advance,
    Vijay
    Edited by: user12092839 on Oct 13, 2010 4:37 AM

    Pl post details of OS, database and EBS versions.
    Is one instance cloned from the other ? Pl trace the concurrent program on both instances and post the tkprof output that includes the explain plan.
    MOS Doc 453527.1 - How To Trace a Concurrent Request And Generate TKPROF File
    HTH
    Srini

  • Reg : Performance Issue in Report

    Hi All,
    I need Some our ideas to reduce my performance in an program for the below scenario,
    i have two internal tables say for example i1 and i2.
    i1 has 30,000 records.
    i2 has 2,00,000 records.
    now i want to find out whether that 30,000 records exists in the 2,00,000 records for that i have written a piece of code as follows,
    loop at i1.
    loop at i2 where matnr = i1-matnr.
    if yes
    appending.
    endloop.
    endloop.
    am getting the output but it's very time consuming it takes more than 20 minutes.
    Is there any option to compare internal tables without looping even i use read instead of second loop it does the same.
    Can any one suggest me how to make a performance faster.
    Regards,
    Suresh.

    Suresh Wrote:Hi All,
    I need Some our ideas to reduce my performance in an program for the below scenario,
    Sorry am not aware how we can reduce the performance of program!! there is lots of way to reduce the performance.
    i know only about increase the performance of any program.
    sort :
    i1 by matnr,
    i2 by matnr.
    loop at i2.
    read table i1 with key matnr = i2-matnr binary search.
    if sy-subrc = 0.
    appending.
    endif.
    endloop.
    Amit.

Maybe you are looking for

  • Steps to empty SAPDB (MaxDB) log file

    Hello All, i am on Redhat Unix Os with NW 7.1 CE and SAPDB as Back end. I am trying to login but my log file is full. Ii want to empty log file but i havn't done any data backup yet. Can anybody guide me how toproceed to handle this problem. I do hav

  • MS-8850 locking up my computer

    i have a geforce2 ti (ms-8850) i downloaded the new drivers from nvidia and also from msi. my computer locks up when i run games with opengl support it doesn't always lock in the begining but within 30 seconds it will lock my computer up and i am for

  • IPAD 2 , DATA RECOVERY HELP

    Sorry, I have recently restored my IPAD2 with ITUNES and it upgraded to ios 7.1.1 as welll, ( coz I h had forgotten its passcode and now i do not have any back up files anywhere). I REALLy wanna know if its possible to recover some of my datas such a

  • Problem with emptying trash

    I downloaded an app from the mac app store earlier called disk diag which was very good and told me that i had 127.64gb in my trash so i deleted it, it then deleted all my trash but left 57 applications in there. whenever i tried to empty my trash be

  • Can't uninstalling EPM 11.1.1.3

    I have EPM 11.1.1.3 installed on a 32-bit Windows machine, I am having issues with the install and want to uninstall and start over again. When I go into the uninstall tool, I cal select the items that I want to uninstall, but as i click through, it