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

Performance Tuning

Former Member
0 Likes
2,140

Hi,

Can anybody explain me how performance tuning is done in SAP.How to check the performance of the program?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,763

Hello Deepak,

A)

To Check performance of your program open ST05 Tcode and click on Activate Trace.

now execute your program and again come to ST05 and click on Deactivate Trace and press on Display trace.

it will display execution time of all the queries in your code.

B)

Also there is one more check called Run time analysis.

for this go to SE30

give your program and execute.

now click on back and press Evaluate button.

It will show you execution time in micro sec for

1. ABAP

2. Database

3.System

check your code whether your Database taking < 50% or not.

Less than 50% database time is preferable.

Hope Its Useful..

Kota

5 REPLIES 5
Read only

Former Member
0 Likes
1,763

Check this link ABAP Development Performance Tuning

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/performance%2btuning

ST05 & SE30 are Used in ABAP for Performance Optimization & Tunning of Code.

ST05 : Performance Analysis : is used to Analyze Overall dependency of Code.Means to Locate Tables used in Given Code.

SE30: Run Time Performance Analyse : is used to Understand DataBase Dependency of our Code.

Run time analysis transaction SE30 :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.

STEPS

Run time analysis transaction SE30

In Transaction SE30, fill in the transaction name or the program name which needs to be analyzed for performance tuning.

For our case, let this be “ZABAP_PERF_TUNING”

After giving the required inputs to the program, execute it. After the final output list has been displayed, PRESS the “BACK” button.

On the original SE30 screen, now click on “ANALYZE” button.

The percentage across each of the areas ABAP/ Database/System shows the percentage of total time used for those areas and load on these areas while running the program . The lesser the database load faster the program runs.

SQL Trace – ST05

Starting the Trace:

To analyze a trace file, do the following:

...

Choose the menu path Test &#61614; Performance Trace in the ABAP Workbench or go to Transaction ST05. The initial screen of the test tool appears. In the lower part of the screen, the status of the Performance Trace is displayed. This provides you with information as to whether any of the Performance Traces are switched on and the users for which they are enabled. It also tells you which user has switched the trace on.

Using the selection buttons provided, set which trace functions you wish to have switched on (SWL trace, enqueue trace, RFC trace, table buffer trace).

If you want to switch on the trace under your user name, choose Trace on. If you want to pass on values for one or several filter criteria, choose Trace with Filter.

Typical filter criteria are: the name of the user, transaction name, process name, and program name.

Now run the program to be analyzed.

Stopping the Trace:

To deactivate the trace:

...

Choose Test &#61614;Performance Trace in the ABAP Workbench. The initial screen of the test tool appears. It contains a status line displaying the traces that are active, the users for whom they are active, and the user who activated them.

Select the trace functions that you want to switch off.

Choose Deactivate Trace. If you started the trace yourself, you can now switch it off immediately. If the performance trace was started by a different user, a confirmation prompt appears before deactivation-

Analyzing a Sample trace data:

PREPARE: Prepares the OPEN statement for use and determines the access method.

OPEN: Opens the cursor and specifies the selection result by filling the selection fields with concrete values.

FETCH: Moves the cursor through the dataset created by the OPEN operation. The array size displayed beside the fetch data means that the system can transfer a maximum package size of 392 records at one time into the buffered area.

Read only

Former Member
0 Likes
1,763

Hi,

You can use tcode se30 for performance tunning.Or go to abap editor

menu path systems-->utilities

you will get code inspector,performance tuning,sql trace.

Hope this will help

Regards

Shibin

Read only

Former Member
0 Likes
1,763

Hi

U can check the performance of the Abap Pgm by Running Pgm in SE30 Transaction .

It display the result with Load on data Base / Abap and R/3 .

For Performance Tuning..

Go to SE38..

Then Environment --> Performance Examples...

U will get the Performance related examples ..

Hope it helps

Praveen

Read only

Former Member
0 Likes
1,764

Hello Deepak,

A)

To Check performance of your program open ST05 Tcode and click on Activate Trace.

now execute your program and again come to ST05 and click on Deactivate Trace and press on Display trace.

it will display execution time of all the queries in your code.

B)

Also there is one more check called Run time analysis.

for this go to SE30

give your program and execute.

now click on back and press Evaluate button.

It will show you execution time in micro sec for

1. ABAP

2. Database

3.System

check your code whether your Database taking < 50% or not.

Less than 50% database time is preferable.

Hope Its Useful..

Kota

Read only

Former Member
0 Likes
1,763

These steps can follow for performance tuning :

Run time analysis transaction SE30

This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.

SQL Trace transaction ST05

SQL trace provides the developer with the ability to analyze database select statements. Execute Tcode ST05

Turn on SQL trace, then execute the program which you want to analyze. > Turn off trace. > Click on list trace to view the details.

The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.

The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.

The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.

Check these threads.

http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801f89454211d189710000e8322d00/content.htm

http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html

For Run Time Analyser, check this thread.