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 tuning

Former Member
0 Kudos

Hi Folks,

1.how do we start/do the performance tuning?

2.we can adjust/re-built the select statments if they are taking much processing time..but is there any thing else where we can improve the performance other than select satements in the program?

Regards,

Raja.

10 REPLIES 10

Former Member
0 Kudos

Hi,

Take a look at these blogs

/people/rich.heilman2/blog/2006/03/07/using-field-symbols-in-loop-statements--performance-boost

/people/sergio.ferrari2/blog/2006/01/18/simple-abap-benchmark

/people/rob.burbank/blog/2006/02/07/performance-of-nested-loops

/people/harry.dietz/blog/2005/10/28/performance-improvement-hints-3-internal-table--fill-and-read

/people/harry.dietz/blog/2005/11/03/performance-improvement-hints-4-loop-at-itab-where

/people/harry.dietz/blog/2005/10/11/performance-improvement-hints-date-time-timestamps

Regards

Ravi

Note : Please mark the helpful answers

abdul_hakim
Active Contributor
0 Kudos

>>1.how do we start/do the performance tuning?

execute se30 and give your program name or transaction code and then execute.when finished you can analyse how much time your program is taking at the application server and database server level.you will get the time in micro seconds.

if you want to know which select query is taking much time then you need to do the sql trace using the transaction st05.

Please go thru the documents in http://help.sap.com

>>.we can adjust/re-built the select statments if they are taking much processing time..but is there any thing else where we can improve the performance other than select satements in the program?

Primarily the performance issue generally come from the program taking much time at the database server level.Remember we can have only one database.

dont use select * instead use select with the respective field addition.don't use select single if you intend to read more than once from the same table.dont use select statement between loop and endloop.avoid joins whenever possible use select for all entries or views instead.

you can also fine tune your program at the application server level.

here are the tips.

use loop at assigning variant if the loop pass is more than 10 this will improve the performance when compared to loop at itab into variant.

dont use nested loops like.

loop at itab1.

loop at itab2.

endloop.

endloop.

instead use

loop at itab1.

read table itab2...

endloop.

Hope this will clarify your basic doubts regarding performacne tuning...

Cheers,

Abdul Hakim

Former Member
0 Kudos

Hi hakim,

thanks for quick reply...

i know the ptuning at data server level.

i can't understand application server level...cud u plz explain that ..

please mention any other concers at app server level other than the one you mentioned...

Regards,

Raja.

0 Kudos

hi

your open sql statements will perform operations at the database server level..right..while the other other ABAP statements like LOOP,ENDLOOP etc will perform operation at the applciation server level.so i told that you can avoid nested LOOPs.

Cheers,

Abdul Hakim

former_member927251
Active Contributor
0 Kudos

Hi Raja,

I have a very good PDF on this. Please give me your email id, I will send the same to you.

<b>Also, reward points if it helps in any way.</b>

Regards,

Amit Mishra

Former Member
0 Kudos

hi,

check this link:

www.thespot4sap.com/articles/ SAPABAPPerformanceTuning_ABAPSort.asp - 21k -

regards,

keerthi.

Former Member
0 Kudos

Hi Amit,

please do send me the PDF , as it wud be most useful for me.

my mail-id is rajagurrala@gmail.com

Regards,

Raja.

0 Kudos

Hi Raja,

I have sent you the PDF. Please check and confirm.

<b><b>Also, reward points if it helps.</b></b>

Regards,

Amit Mishra

Former Member
0 Kudos

Hi,

A task can be completed either by calling a class or a function module. Calling methods of a global class is faster than calling a function module.

Calling local methods is nearly identical to calling global methods in terms of performance.

Fields of type-I should be used for typical integral variables.

If you are dealing with type-I or integral type-P fields, then use numeric literals or named constants with a number type instead of character strings.

It is preferable to use constants instead of literals.

For arithmetic operations, number types should be used instead of the type-N fields. Type-N fields should be used only for pure digit strings that are not intended for calculations e.g. the pin code for a city.

Use WHILE instead of a DO-EXIT-ENDDO construction. WHILE statements are easier to understand and faster in execution.

It is preferable to use CASE statements over IF statements. CASE statements bring clarity to the conditional constructs and are a little faster than IF statements.

For the calling of routines, PERFORM i Of ... statement can be a much faster alternative to using CASE or IF constructs.

If you specify the type for formal parameters in your source code, the ABAP/4 compiler can optimize your code more thoroughly. In addition, the risk of using the wrong sequence of parameters in a PERFORM statement is much less.

If you specify the type of field-symbols and formal parameters in your source code, the ABAP/4 compiler can optimize your code better.

Unnecessary MOVEs should be avoided by using the explicit work area operations.

rgds,

latheesh