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: 

Performance of Big Report Programs

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

hi,

you can put trace on a large report program.

in transaction ST05 you can do it

0 Kudos

Hi,

But how i cannot wait for 10 hours and open the session and some time session is also timeout.

Regards,

Harsh

Former Member
0 Kudos

Hi Goel,

this report is for what ? .

regards

Prabhu

Former Member
0 Kudos

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

0 Kudos

Hi Shobna,

Thanks for reply but my question is not answered as one of the Transaction Code which is provided by SAP in system is taking 10 long hours to execute but when we run that in background we can only know the time that in total how much time it is taking but we want to trace the program which we are scheduling in background so that in the night if i schedule the program and also the trace in background and when i come in morning the trace as well as the output i will get.

Please if there is any option if we can put a trace for background job plz tell me.

Thanks,

Harsh

0 Kudos

You can do it. But just turn it on for the user running the job.

Rob

Former Member
0 Kudos

hi

If you want to create a background job, then you need to use SM36 transaction by giving the program name and a variant for that program, variant is nothing but the selection screen values. You can monitor the same job in SM37 transaction.

You can set the frequency for the job to execute like hourly, daily or monthly depending upon your requirement.

thnks

Former Member
0 Kudos

Hi,

USe SM37 tcode for Background job.

Regards,

Deepthi.