Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Report taking too much time to execute

0 Kudos

time.txt

This program will take 15 to 20 min for execution. how to compress its execution time from 15 min to 1min.

Thanks in advance

7 REPLIES 7

FredericGirod
Active Contributor

Run your program using transaction SAT (with less data), and check what is consuming too much time

matt
Active Contributor

Do an SQL trace.

shantraj
Explorer
0 Kudos

Try Below . Write delete code outside the loop.

 DELETE it_final WHERE zsn_bcn_pror = 0.   "Write this line outside the loop.
    LOOP AT it_final assigning field-symbol(<lfa_final>).
*      WA_FINAL-LV_BATCH = <lfa_final>-ZSN_BCN_PROR.
      lvzgrade = <lfa_final>-zgrade+1(3).
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = <lfa_final>-zsn_bcn_pror
        IMPORTING
          output = <lfa_final>-zsn_bcn_pror.
      CONCATENATE <lfa_final>-zsn_bcn_pror lvzgrade INTO wa_final-lv_batch.
    ENDLOOP.<br>

0 Kudos

What is this code ? what is the link with the subject ? do you know the code Ritika used ? What is the link between field exit and performance ?

Yes, She does added the code, please check the Attached Txt file.

matt
Active Contributor
0 Kudos

One obvious gain is that wherever your use READ TABLE, define that internal table as HASHED with a unique key of the field you are reading on. If the values are not unique, you can use a SORTED table with a non-unique key.

At the moment all your internal tables are STANDARD, meaning reads are sequential; as data volumes increase your program will get slower and slower.

You may also benefit from secondary keys on your internal table definitions.

Sandra_Rossi
Active Contributor
0 Kudos

It's impossible to know what the issue is as nobody has access to your system. You need to learn how to analyze by yourself (SAT, SQL trace). Better ask a question how to use SAT.