Skip to Content
author's profile photo Former Member
Former Member

hw to reduce the report execution time?

Hi Friends

Iam wrking performance tuning. my requirement is to reduce the execution time.

i removed usage os "TYPE and complex innerjoins that is defined on morethan 4 tables"

now if i see in the runtime analysis the databasetime reduced from 90% to 50% and abap time is incresed 5% to 40 % but the toatl cpu time increased from 19540 to 39678. then definetly exection time will increase

could tell me how to decrease the excution time.

thanks in advance.

regards

priya

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

11 Answers

  • Posted on Dec 08, 2005 at 09:44 AM

    Hi Priya,

    Removing joins and putting multiple selects is never a good practice.

    try to use tyes and remove "data:begin of" also avoid using loop under loop and select under loop , loop under select,multiple select on same table, slect *,select-endselect, into corresponding fields etc.

    You can check your program with SLIN and st05 for more reasons.

    Regards,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2005 at 09:45 AM

    Hi,

    The performance issue is mainly due to the operations performed at the database level.

    Once ur performance is well at the database level and application server level then you can go ahead.

    I am an SAP document for Performance tuning.

    If you provide ur mail then i can forward it to you.

    REgards,

    Abdul

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 09:47 AM

    Hi priya,

    Performance can be enhanced by applying suitable presummarization :

    . Report-specific frozen report data



    You create report-specific frozen report data by executing the report in the background and by choosing the Rebuild frozen report data option in the selection

    · Report-specific summarization data



    Report-specific summarization data is created automatically the first time you call up a report using the Use summarization data option. The initial execution of the report should be performed in the background. The next time you execute the report, the summarization data is read and, if necessary, supplemented by current data, that is, current line items (if the appropriate option has been selected for the report). This current status is displayed in the report. In addition, the summarization data is updated accordingly.

    · Summarization datathat is valid across CO-PA

    summarization levels are valid throughout Profitability Analysis. As with summarization data, current line items can be read automatically. Summarization levels aggregate the entire database, not just the data that is relevant for a report. You have to build them manually.

    Hope this helps u,

    Regards,

    Nagarajan.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2005 at 10:01 AM

    Hi Priya,

    As u removed usage of TYPE and complex innerjoints to reduce the database time …. U have to follow few steps to reduce ABAP time as well.

    1. Avoid nested looping ..

    2. use where in select query instead of using select * ....

    3. use case instead of if.

    4. Use aggregate functions for calculations/summations in the SELECT

    5. Use SELECT SINGLE instead of SELECT-ENDSELECT whenever possible.

    Regards,

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2005 at 10:12 AM

    Hi,

    Try to reduce the number od database interactions.Try running the program in background.

    Avoid Select statements inside the loop.This will interact with database multiple times.

    Kindly reward points by clicking the star on the left of reply,if it helps you.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 10:28 AM

    Hi Priya,

    1. Reduce the number of loops and endloops in your program. Make use of <b>Read statement</b> whenever you have a set of primary keys available for search. Use binary search to reduce the processing time furthur. Don't forget to sort the table before using Read with binary search.

    2. Avoid going for loop inside a loop. instead you may also use <b>loop ... where <conditions></b>

    3. When writing a <b>select...for all entries in</b>, try using all the primary keys. If not, transfer the data to a temporary internal table, and delete all adjacent duplicates comparing the fields that you use for selection condition.

    This is my two cents worth suggestion. I hope, you find it useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2005 at 10:31 AM

    Hi,

    I think the time is getting increased as you use many loop statements for processing data after removing JOIN statements.

    This can be reduced by using sy-tabix.

    for example:

    loop at itab1.

    loop at itab2 where vbeln = itab1-vbeln

    and posnr = itab1-posnr.

    < ur code >

    endloop.

    endloop.

    This takes a lot of time.

    Instead you can use the following code.

    sort itab1 by vbeln.

    Sort itab2 by vbeln posnr.

    loop at itab1.

    read table itab2 with key vbeln = itab1-vbeln

    posnr = itab1-posnr.

    if sy-subrc = 0.

    loop at itab2 from gv_tabix.

    if itab2-vbeln <> itab1-vbeln or

    itab2-posnr <> itab1-posnr.

    exit.

    else.

    < ur code >

    endif.

    endloop.

    endif.

    endloop.

    This takes very less time. Processing records gets reduced by using this logic.

    regards,

    Sailaja.

    Reward points if answer helps you.

    Message was edited by: Sailaja N.L.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2005 at 07:34 AM

    Hi Folks

    Thanks alot for your valuable informations.

    i applied the all the tecnics,finally the acess time of database is decreasing but totaly exections time is not changed.and incase of joins execution time is little good than multiple select statements.

    but my prblm is to reduce the execution time,and is the time displayed in runtime analysis (se30) tells the execution time?

    Thanks in advace.

    regards

    priya

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi priya,

      As u said use ur select statements with care bcoz that reduces a lot of execution time.

      statements that reduce ur execution time :

      Use select -- into corresponding fields

      select -- single ..........

      Hope this help u,

      Regards,

      Nagarajan.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2005 at 09:26 AM

    hi priya,

    try using indexes for tables for faster execution and use search algorithms for retrieving data from tables.

    regs,

    jaga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2005 at 09:34 AM

    hi

    It is worth analyzing your SQL statements. to do this, you should use the Performance Trace and Runtime Analysis tools (Test menu in the ABAP Workbench). In particular, the SQL Trace in the Performance Trace shows you which parts of Open SQL statements are processed where, and how long they take.

    regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.