Regarding performance of a report

Hi friends,
In the loop statement I am using modify statement for updating the data in the internal table .
I have to improve the performance of a report.
is there any alternative for Improving teh performance.,
Regards,
Jayan

HI
If u r modifying Ztable no probelm  because we will be having small amount of data .
IF u r updating standard table Do like below .
First collect all the records which you want to update to table into one internal table .
Then update the table with that internal table ..
IT will be better when you are updating standard table .
I think this will  help you ..
If u r not understood copy paste ur code i can solve ur probelm ...

Similar Messages

  • Performance of a Report Based On VirtualProvider

    Dear BW experts,
    We have created a new BEx 3.x report, which contains about 6 queries, and 2 pre queries.
    The report runs very slowly, the upload time is about 40 seconds.
    The report itself contains one tab with 11 tables.
    The MultiProvider that the queries are based on is a virtual InfoCube, so we can't use aggregates.
    Could someone advice us how to optimize the performance of the report?
    Thanks you in advance.
    Best Regards,
    Inbal.

    Hi,
    Query variables are not passed only to the virtual provider by default, i.e enter dataset of the extractor is pulled the data manager and then it is filtered out which could the issue for the long runtimes.
    If the datasource of the virtual provider has selections then we could passed those from the query to the datasource while query execution at the inverse start routine and reduce the amount of data actual pulled by the virtual provider and hence improve the performance of the query.
    Below is the link to the sap documentation on inverse routine.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/45/f5af4a4db53482e10000000a1553f6/content.htm
    Thanks,
    Arun

  • 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

  • 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 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

  • How to optimize the performance of crystal report?

    Hi,
    -I have to design a crystal report with best possible optimization. Optimization is main concern since report will run against 1-2 million data set. Though I am using parameter to fetch only the required data, required data can go till 1 million records.
    -Based on the input passed by the user I have to group the data in report. And for each selected parameter the Detail section I am printing is different. For example:-If user selects store then detail section is different and if user select Host then detail section will be different.
    -Report can be grouped by Time Field also. So to full fill this requirement I would have to create a sub report since other parameters are of string type and can be used in one formula to get parameter based grouping in report. However If I try to return Time filed from the same formula I get the errors the "Return type should be of String typeu201D. This forces me to create sub report for Time based grouping. If user selects Time Field to be grouped on, all the information in the main report gets suppressed and only the sub report gets printed.
    If user select store, Host and User in parameter to be grouped on, sub report gets suppressed.
    Now with the above mentioned points I tried to optimize the report in following way.
    -Printing 1 million records in the report does not make sense; hence we wanted to show the summary of all the records in chart section but wanted to print just 5000 records in detailed section. Suppressing detailed section after 5000 records does not help much since suppressing just saves the time in printing and does not limit the number of records to be fetched from the DB.I have a subreport also so it fetches the data 2 times from the DB hence makes the performance of the report worse.
    To solve this problem I used command object and put the charts in the subreport and detail in main report.
    In main report's Command Object I limited the number to records to be fetched from the DB to 5000 using rownum<5000 but in subreport's Command Object I did not set any limit in the query but I am doing all my aggregation in SQL which means do summary operation in DB and get only summarized data from DB.
    -To solve section problem I am using Template object (new feature added in CR 2008).In which I am returning the field based on the "Group By" parameter selected by user.
    -For time Field I have created two sub reports, one for chart and other one for details in the same way described in point one(Printing 1 million recordsu2026u2026).
    After implementing these points my crystal reports performance improved drastically. The report that was taking 24 minute to come back now taking only 2 minutes.
    However I want my report to come back with one minute. It returns if I remove the sub reports for Time Based Grouping but I can not do so.
    My questions here are,
    -Can I stop Subreport from fetching the data from DB if itu2019s suppressed?
    -I believe using Conditional Template Object is a better option rather than having multiple detailed sections to print the data for a selected Group. However any suggestion here to improve the performance will be appreciable.
    -since crystal report does not provide any option to limit the number of records to be fetched from DB, I am forced to use command object with rownum in where condition.
        Please let me know about other option(s) to get this done...If there is any.
    I am using Crystal report 2008.And we have developed our application the use JRC to export crystal report in PDF.
    Regards,
    Amrita
    Edited by: Amrita Singh on May 12, 2009 11:36 AM

    1) I have to design a crystal report with best possible optimization. Optimization is main concern since report will run against 1-2 million data set. Though I am using parameter to fetch only the required data, required data can go till 1 million records.
    2) Based on the input passed by the user I have to group the data in report. And for each selected parameter the Detail section I am printing is different. For example:-If user selects store then detail section is different and if user select Host then detail section will be different.
    3) Report can be grouped by Time Field also. So to full fill this requirement I would have to create a sub report since other parameters are of string type and can be used in one formula to get parameter based grouping in report. However If I try to return Time filed from the same formula I get the errors the "Return type should be of String typeu201D. This forces me to create sub report for Time based grouping. If user selects Time Field to be grouped on, all the information in the main report gets suppressed and only the sub report gets printed.
    If user select store, Host and User in parameter to be grouped on, sub report gets suppressed.
    Now with the above mentioned points I tried to optimize the report in following way.
    1) Printing 1 million records in the report does not make sense; hence we wanted to show the summary of all the records in chart section but wanted to print just 5000 records in detailed section. Suppressing detailed section after 5000 records does not help much since suppressing just saves the time in printing and does not limit the number of records to be fetched from the DB.I have a subreport also so it fetches the data 2 times from the DB hence makes the performance of the report worse.
    To solve this problem I used command object and put the charts in the subreport and detail in main report.
    In main report's Command Object I limited the number to records to be fetched from the DB to 5000 using rownum<5000 but in subreport's Command Object I did not set any limit in the query but I am doing all my aggregation in SQL which means do summary operation in DB and get only summarized data from DB.
    2)To solve section problem I am using Template object (new feature added in CR 2008).In which I am returning the field based on the "Group By" parameter selected by user.
    Edited by: Amrita Singh on May 12, 2009 12:26 PM

  • Performance analysis of report or transaction

    Hello Experts,
    How do we analyse the performance of a report or a transacton in SAP. I want to know thetransactions and the steps that needs to be followed in order to get this.
    points are guaranteed...
    thanks
    sankar

    hi,
    SE30 - gives you a run time analysis and points out the issues more at design time.
    ST05 - Is the most useful if you want to track time taken for execution of each of the sections.
    SM50 - Will give you a work process overview, not sure at a program level how can it help you.
    Some times you will have to use a combination of SE30 and ST05.
    I would like to use St05 personally.
    SQL Trace (ST05) we use for performance tuning
    In se38,you have a report and you want to test the performance of that report
    ST05 tells about the summary of sql statements used in that program.
    -Go to Tcode ST05
    -Select Trace on
    -In se38,Execute your report-
    -Come back to st05 and select Trace off
    -Select Trace list.
    Now you check your select stmnts and how much time taking
    -Some columns showing pink color are expensive select stmnts
    You have so many options inside to check for summary and also index..
    http://help.sap.com/saphelp_47x200/helpdata/en/f2/31adaa810c11d288ec0000e8200722/frameset.htm
    ST02 --> Memory management
    ST03 --> Dialog Service
    OS06 --> Operating System
    SCI --> Code Inspector
    Regards
    Reshma

  • PERFORMANCE of this REPORT object

    Hi Experts
    I have a REPORT object, having a few SELECT Queries in it. I need to analyze the PERFORMANCE of this REPORT object.
    How can I analyze the performance of a SELECT Query alone in it - that is time taken to execute this SELECT Query alone?
    How can I find the total execution time taken by the REPORT object?
    Plz suggest.
    BD

    Hi Bobby,
    TYPES : BEGIN OF gtyp_rbkp,
              belnr TYPE re_belnr,
              gjahr TYPE gjahr,
              budat TYPE budat,
              usnam TYPE usnam,
              lifnr TYPE lifre,
              ivtyp TYPE ivtyp,
              lieffn TYPE lieffn,
            END OF gtyp_rbkp.
    DATA : gt_rbkp TYPE STANDARD TABLE OF gtyp_rbkp,
          gs_rbkp type gtyp_rbkp.
    DATA: gv_str_j TYPE i,
    gv_end_j TYPE i,
    gv_run_time_join TYPE p DECIMALS 2.
    constants : lc_a type char1 value 'A'.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-015.
    SELECT-OPTIONS : so_belnr FOR gs_rbkp-belnr,
                     so_gjahr FOR gs_rbkp-gjahr NO-EXTENSION NO INTERVALS,
                     so_usnam FOR gs_rbkp-usnam,
                     so_lifnr FOR gs_rbkp-lifnr,
                     so_budat FOR gs_rbkp-budat NO-EXTENSION OBLIGATORY
                                                DEFAULT sy-datum.
    SELECTION-SCREEN: END OF BLOCK b1.
    start-of-selection.
    write: 'testing performance'.
    get RUN TIME FIELD gv_str_j.
    SELECT belnr
             gjahr
             budat
             usnam
             lifnr
             ivtyp
             lieffn
        FROM rbkp
        INTO TABLE gt_rbkp
        WHERE belnr IN so_belnr
          AND gjahr IN so_gjahr
          AND budat IN so_budat
          AND usnam IN so_usnam
          AND lifnr IN so_lifnr.
      IF sy-subrc EQ 0.
    **delete entries from GT_RBKP where IVTYP ne A(Invoice from Parking Function)
        DELETE gt_rbkp WHERE ivtyp NE lc_a.
      ENDIF.
    get RUN TIME FIELD gv_end_j.
    Now get the runtime.
    gv_run_time_join = ( gv_end_j - gv_str_j ) / 1000000 .
    write:/ 'Report RunTime with delete is ', gv_run_time_join, 'seconds'.
    clear : gv_str_j, gt_rbkp[], gv_end_j.
    Hope this will help you.
    Regards,
    Phani

  • Regarding Performance tunning...

    HI Experts,
    can you suggest me, how exactly performance is checked.
    what is the measure we considered for performance check.
    what are ideals status of the performance check for a certain program.
    that is, how much should be database use, abap use and the system
    use in the program.
    i checked my program in t-code SE30, and it is showing almost
    above 90% use of database and very less use of abap and
    almost no use of system.
    so please tell me exactly how much it should be...
    Thanks in advance.
    Regard,
    vijay chavan

    Hi
    these are the ways of checking performance of a report
    Tools for Performance Analysis
    Run time analysis transaction SE30
    SQL Trace transaction ST05
    Extended Program Check (SLIN)
    Code Inspector ( SCI)
    <b>Run time analysis transaction SE30</b> :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    <b>SQL Trace transaction ST05</b>: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    <b>Extended Program Check</b>
    This can be called in through transaction SE38 or through transaction SLIN. This indicates possible problems that may cause performance problems.
    <b>Code Inspector (SCI)</b>
    You can call the Code Inspector from the ABAP Editor (SE38), the Function Builder (SE37), the Class Builder (SE24), or as a separate transaction (SCI).
    The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.
    <b>Run time analysis transaction SE30</b>
    <b>steps</b>
    In Transaction SE30, fill in the transaction name or the program name which needs to be analyzed for performance tuning.
    For our case, let this be “ZABAP_PERF_TUNING”
    Run time analysis transaction SE30
    After giving the required inputs to the program, execute it. After the final output list has been displayed, PRESS the “BACK” button.
    On the original SE30 screen, now click on “ANALYZE” button.
    The percentage across each of the areas ABAP/ Database/System shows the percentage of total time used for those areas and load on these areas while running the program . The lesser the database load faster the program runs.
    <b>SQL Trace – ST05</b>
    <b>steps</b>
    <u>Starting the Trace:</u>
    To analyze a trace file, do the following:
    Choose the menu path Test &#61614; Performance Trace in the ABAP Workbench or go to Transaction ST05. The initial screen of the test tool appears. In the lower part of the screen, the status of the Performance Trace is displayed. This provides you with information as to whether any of the Performance Traces are switched on and the users for which they are enabled. It also tells you which user has switched the trace on.
    Using the selection buttons provided, set which trace functions you wish to have switched on (SWL trace, enqueue trace, RFC trace, table buffer trace).
    If you want to switch on the trace under your user name, choose Trace on. If you want to pass on values for one or several filter criteria, choose Trace with Filter. Typical filter criteria are: the name of the user, transaction name, process name, and program name.
    Now run the program to be analyzed.
    Stopping the Trace:
    To deactivate the trace:
    Choose Test &#61614;Performance Trace in the ABAP Workbench. The initial screen of the test tool appears. It contains a status line displaying the traces that are active, the users for whom they are active, and the user who activated them.
    Select the trace functions that you want to switch off.
    Choose Deactivate Trace. If you started the trace yourself, you can now switch it off immediately. If the performance trace was started by a different user, a confirmation prompt appears before deactivation-
    <u>Analyzing a Sample trace data:</u>
    PREPARE: Prepares the OPEN statement for use and determines the access method.
    OPEN: Opens the cursor and specifies the selection result by filling the selection fields with concrete values.
    FETCH: Moves the cursor through the dataset created by the OPEN operation. The array size displayed beside the fetch data means that the system can transfer a maximum package size of 392 records at one time into the buffered area.
    <b>Reward if useful</b>

  • XI/PI performance/stress test report

    Dear friends,
    Does anybody have the XI performance/stress test report or the template for the reference? I need to write a report, but currently still don't have any idea about the content in this document.
    Thanks so much for every kind help.
    Regards,
    Bean

    Sorry guys, but I mean a document and not SAP transactions

  • How to check the performance of a report

    plz tell me all the ways to check the performance of a report
    if u send me the step wise then it will be really helpful to me
    awaiting for u r reply

    I. Non Database Performance
    Dead Code (Program -> Check -> Extended Prog. Check) - unused subroutines appear as warnings under PERFORM/FORM interfaces. - unused variables appear as warnings under Field attributes. Transaction code is SLIN. This will also catch literals (section III below).
    When possible use MOVE instead of MOVE-CORRESPONDING (move bseg to *bseg or move t_prps[] to t_prps2[] if you want to copy entire table or t_prps to t_prps2 if you only want to copy header line.)
    Code executed more than once should be placed in a form routine.
    SORT and READ TABLE t_tab WITH KEY ... BINARY SEARCH when possible especially against non-buffered table (Data Dictionary -> Technical Info)
    SORT tables BY fields
    Avoid unnecessary moves to table header areas.
    Subroutine parameters should be typed for efficiency and to help prevent coding and runtime errors.
    II. Database Performanc
    Avoid ORDER BY unless there is index on the columns - sort internal table instead
    SELECT SINGLE when possible
    SELECT fields FROM database table INTO TABLE t_tab (an internal table) - Lengthy discussion.
    Views (inner join) are a fast way to access information from multiple tables. Be aware that the result set only includes rows that appear in both tables.
    Use subqueries when possible.
    "FOR ALL ENTRIES IN..." (outer join) are very fast but keep in the mind the special features and 3 pitfalls of using it.
    (a) Duplicates are removed from the answer set as if you had specified "SELECT DISTINCT"... So unless you intend for duplicates to be deleted include the unique key of the detail line items in your select statement. In the data dictionary (SE11) the fields belonging to the unique key are marked with an "X" in the key column.
    (b) If the "one" table (the table that appears in the clause FOR ALL ENTRIES IN) is empty, all rows in the "many" table (the table that appears in the SELECT INTO clause ) are selected. Therefore make sure you check that the "one" table has rows before issuing a select with the "FOR ALL ENTRIES IN..." clause.
    (c) If the 'one' table (the table that appears in the clause FOR ALL ENTRIES IN) is very large there is performance degradation Steven Buttiglieri created sample code to illustrate this.
    Where clause should be in order of index See example.
    This is important when there are multiple indexes for a table and you want to make sure a specific index is used. This will change when we convert from a "rules based" Oracle optimizer to a "cost based" Oracle optimizer. You should be aware of a bug in Oracle, lovingly referred to as the "3rd Column Blues". Click here for more information on indexes.
    Where clause should contain key fields in an appropriate db index or buffered tables. As long as we are using the Oracle Cost Based Optimizer, be aware fo the "Third Column Blues", an Oracle bug.
    Avoid nested SELECTs (SELECT...ENDSELECT within another SELECT...ENDSELECT). Load data in internal tables instead. See item 3 above.
    Use SQL statistical functions when possible (max, sum, ...)
    Delete all rows from a table. A where clause is mandatory. Specifying the client is the most efficient way.
    Put Check statements into where clause - caveat: Make sure that the index is still being used after you add the additional selection criteria. If the select statement goes from using an index to doing a db scan (reading each row in the database without going through an index) get it out of the where clause and go back to using "Check"!
    III. Literals
    Codes ('MD') should use contants (c_medical)
    Longer text should use text elements. Sample code is a good example because it uses the text element in conjunction with the hard coded text. This documents the text element and provides for the possibility of multi-language support.
    IV. Miscellaneous
    Use CASE statement instead of IF...ELSEIF when possible (It is only possible in equality tests)
    Nested If - encounter most likely to fail first (specific to general)
    And - encounter most likely to fail first (specific to general)
    OR's - encounter most likely to succeed first (general to specific)
    Variables should use Like when possible
    Subroutine usage - don't place decision to execute in the subroutine
    If not ( t_prps[] is initial ) (instead of describe table t_prps lines sy-tfill, if sy-tfill > 0...)
    New document types confirmed with the configuration team via MIT-ABAP mail list prior to coding a report to access the data.
    Dates need to be properly formatted using the user's default settings. For the explanation of the BDC example check out the developer's standards.
    regards,
    suryaprakash.

  • Urgent query regarding performance

    hi
    i have one query regarding performance.iam using interactive reporting and workspace.
    i have all the linsence server,shared services,and Bi services and ui services and oracle9i which has metadata installed in one system(one server).data base which stores relationaldata(DB2) on another system.(i.e 2 systems in total).
    in order to increase performance i made some adjustments
    i installed hyperion BI server services, UI services,license server and shared services server such that all web applications (that used web sphere 5.1) such as shared services and UI services in server1(or computer1).and remaining linsence and bi server services in computer2 and i installed database(db2) on another computer3.(i.e 3 systems in total)
    my query : oracle 9i which has metadata where to install that in ( computer 1 or in computer 2 )
    i want to get best performance.where to install that oracle 9i which has metadata stored in it.
    for any queries please reply mail
    [email protected]
    9930120470

    You should know that executing a query is always slower the first time. Then Oracle can optimise your query and store it temporary for further executions. But passing from 3 minutes to 3 seconds, maybe your original query is really, really slow. Most of the times I only win few milliseconds. If Oracle is able to optimize it to 3 seconds. You must clearly rewrite your query.
    Things you should know to enhance your execution time : try to reduce the number of nested loops, nested loops give your an exponential execution time which is really slow :
    for rec1 in (select a from b) loop
      for  rec2 in (select c from d) loop
      end loop;
    end loop;Anything like that is bad.
    Try to avoid Cartesian products by writing the best where clause possible.
    select a.a,
             b.b
    from  a,
            b
    where b.b > 1This is bad and slow.

  • 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

  • How to improve the query performance in to report level and designer level

    How to improve the query performance in to report level and designer level......?
    Plz let me know the detail view......

    first its all based on the design of the database, universe and the report.
    at the universe Level, you have to check your Contexts very well to get the optimal performance of the universe and also your joins, keep your joins with key fields, will give you the best performance.
    at the report level, try to make the reports dynamic as much as you can, (Parameters) and so on.
    and when you create a paremeter try to get it match with the key fields in the database.
    good luck
    Amr

  • Low Performance in the report with cell defition

    Hi all,
    In one of our queries (3.5), we had to use lots of cell definition. And after execution of the report, it stays in "Formatting Result Area" and "Retrieving Result from BW Server" for a very long time (about 30 minutes).
    There is already aggregate on the infoprovider and report uses it.
    Is there any way to increase reporting performance of a report with lots of cell definitions ?
    Thanks
    SP

    Arun,
    Can you please explain what is precalculation and how to use it in Bex?
    Thanks in advance.
    SP

Maybe you are looking for

  • FileVault Doesn't Work With Case-Sensitive Journaling?

    Hello, I'm not finding anything on this topic via searches. Bought Leopard, erased the hard drive, installed Leopard with Case-Sensitive Journaling, and now Leopard won't enable FileVault. This is being done on a MBP bought in August 2007; another MB

  • Scan of multiple serial numbers in outbound delivery

    Hi gurus, I need to record several serial numbers in an outbound delivery (VL02N) at the picking time into "Extras" / "Serial Numbers". At that time, a pop up appears to record SNs. To achieve this, I'm using a scanner for better efficiency. My probl

  • IOS 8.0.2 iPad 2 showing "no service" until I reboot

    I have upgraded my two iPad 2s with AT&T GSM to 8.0.2. My wife and I now regularly get a "No Service" for AT&T GSM until we complete a reboot. Everything else works great. This is an intermittent problem that occurs at least once a day.

  • Pair of sound issues

    I have two very weird and frustrating problems regarding sound on my iMac G5. First, certain Flash content will not generate sound at all. The computer has no problem playing sound from movies embedded in websites or mp3s, etc but for some reason emb

  • Enable secure session cookie on Sun ONE Web Server 6.1

    How can I enable secure session cookie (JSESSIONID) on Sun ONE Web Server 6.1?. For 6.0 is <session-cookie is-secure="true"/> inside the <web-app> tags in web-apps.xml but I'm not able to find this setting for 6.1.