Application Development and Automation 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: 
Read only

Measuring Performance of the Program

Former Member
0 Likes
2,587

Hi Peers,

There is an task of resolving the performance issue with an Report Program.

It's taking long time in the production system .

I Optimized the code by placing a few select stmts and a nested loop outside the loop in which they were.

I would like measure in terms of time taken in the foreground.

When I measure using SE30 , the Test data being the same , it gives different results on different runs and .I suppose it becoz of other transactions taking the Servers time. And the same with SM36.

Is it possible to test the performance of the code in terms of execution time without the disturbance of the other transactions.

Please let me know.

Thanks & Regards,

Daniel

Hi Peers,

There is an task of resolving the performance issue with an Report Program.

It's taking long time in the production system .

I Optimized the code by placing a few select stmts and a nested loop outside the loop in which they were.

I would like measure in terms of time taken in the foreground.

When I measure using SE30 , the Test data being the same , it gives different results on different runs and .I suppose it becoz of other transactions taking the Servers time. And the same with SM36.

Is it possible to test the performance of the code in terms of execution time without the disturbance of the other transactions.

Please let me know.

Thanks & Regards,

Daniel

7 REPLIES 7
Read only

Former Member
0 Likes
1,244

I don't think so actually, because as long as the report is executed inside R/3, all running processes should affect the performance of your report....

SE30 is a good tool, and difference between runs should not be that bigger....

Try to use Field-Symbols on your LOOPS....Don't use Nested Loops, Don't use SELECT-ENDSELECT stmts.....and try to find all keys and indexes for Data access....

Greetings,

Blag.

Read only

0 Likes
1,244

Hi Alvaro,

When I run in the fore ground it is getting timed out.

So when I run it in the Back Grnd (SM 36) the execution time is varying from 8 secs to 5719 sec which is huge diff.

Even I wonder how is that happening.

Thanks,

Daniel

Read only

0 Likes
1,244

time set up by basis for foreground and back ground..

for ur program max it will run 1 hour to 2 hour in foreground..

try to run tst system by using st05 and you could find out time taken by each query

Read only

alex_m
Active Contributor
0 Likes
1,244

Also use the ST05 to optimise your SQL.

Read only

Former Member
0 Likes
1,244

I think you'll find that quite often a statement runs much more quickly the second time it is executed due to non SAP buffering. See the following to see how I get around it:

/people/rob.burbank/blog/2006/11/16/performance--what-will-kill-you-and-what-will-leave-you-with-only-a-flesh-wound

Rob

Read only

Former Member
0 Likes
1,244

Yes you need to test at peak time ,use ST05 transaction to find out time taken by each query.

else if you get chance to move dummy program to prd system,then use

get run time field f1. statement.

see the example program..

tables : mara.

data : f1 type i,

f2 type i,

f3 type i.

start-of-selection.

get run time field f1.

select * from mara into mara.

endselect.

get run time field f2.

f3 = f2 - f1.

write:/ f3.

if possible create secondary index and then use in ur select query.

Thanks

Seshu

Read only

Former Member
0 Likes
1,244

Daniel,

Go to the transaction ST05 and Click on the Option "TRACE ON".

Go to your report's transaction, run the report, go back to ST05 and click on the option "TRACE OFF".

After this, click on "LIST TRACE" and you will be able to see the detail of the SQL comands you ahve executed.

You can change the Trace Modes on ST05 to ahve more/less detail on your performance tracing.

Reward points if helpful.

Regards.

Felipe