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: 

Is there any Program for Perfornance Calculation?

Former Member
0 Kudos

Hi,

Is there any standard program for calculating ABAP program performance? Please help me in this.

Thanks in Advance.

Siva Sankar.

9 REPLIES 9

gopi_narendra
Active Contributor
0 Kudos

SE30 shows the run time analysis of a program

You can use ST05 also.

Regards

Gopi

0 Kudos

Hi Gopi,

Thanks for ur quick reply. I know these transactions, but how to use to calculate performance of a report program.

Thanks,

Siva Sankar.

0 Kudos

goto SE30 --> give in program name <progname> and press execute

now clikc on Analyze button which shows you the performance of ABAP Database and SAP R/3 System

for ST05, run two sessions

1st session - run the ST05 by pressing the Tace On

2nd session - execute the program

now in 1st session - Trace Off

and press List Trace

This shows you the time taken for each SQL

Regards

Gopi

Former Member
0 Kudos

hi,

you can check your program through

1.st05,runtime analysis

2.extended check

3.code inspector

given by sap.

yes there are a few programs available for that yopu have to search the sdn blog section,and create the program in ur server and then check.there is such a program in my server.

it requires that whether ur client permits you to create such programs in his dev server

thanks

vivekanand

0 Kudos

Hi Vivek,

Can you send me the code please. I mean copy that code and send it to me.

Thanks,

Siva Sankar.

former_member194613
Active Contributor
0 Kudos

what is the performance of a report???

What would you like to calculate?

You could define 100% as optimal performance, and larger percentages if the program takes longer, i.e. 200% if it takes twice as long. Then the calculation would be simple.

However, what is the optimal performance? That is not defined.

The only thing you can do, is to use the traces and check the results, and find out whether you can do something faster. But you will never know how much faster a program could be.

Siegfried

Former Member
0 Kudos

Hi siva,

check the documentation of this new tool for performance analysis ,

Tcode is ST30

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50bec015-14f1-2910-6080-9874b349...

Former Member
0 Kudos

Hi

These are the main performance points where u have to look

there is no program for this

reward if usefull

Performance Tuning is nothing but optimizing the performance of your program through various techniques thus increasing the productivity of the user.

Purpose


In this world of SAP programming, ABAP is the universal language . Often due to the pressure of schedules and deliveries, the main focus of making a efficient program takes a back seat. An efficient program is one which delivers the required output to the user in a finite time as per the complexity of the program, rather than hearing the comment “I put the program to run , have my lunch and come back to check the results”

Use


Leaving aside the hyperbole, a performance optimized ABAP Program has the following uses:
Saves the time of the end user.
Increases the productivity of the user.
In turn keeps the user and hence the management happy.

Challenges


Performance of a program is also often limited due to hardware restrictions, which is out of the scope of this tutorial.

Ways of Performance Tuning
Selection Criteria
Select Statements
Select Queries
SQL Interface
Aggregate Functions
For all Entries
Select Over more than one Internal table
Internal tables
4. Typing
5. Control Statements (If, Case, While..)
6. Field Conversion
7. ABAP Objects
8. Tools for Performance Analysis

Selection Criteria


Restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code using CHECK statement. 
Select with selection list.
Note: It is suggestible to make at least on field mandatory in Selection-Screen as mandatory fields restrict the data selection and hence increasing the performance.

SELECT * FROM SBOOK INTO SBOOK_WA.
CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.
The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list

SELECT CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
WHERE SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.


Select Statements Select Queries


Avoid nested selects
Select all the records in a single shot using into table clause of select statement rather than to use Append statements.
When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary index.
For testing existence , use Select.. Up to 1 rows statement instead of a Select-Endselect-loop with an Exit.
Use Select Single if all primary key fields are supplied in the Where condition .

Point # 1

SELECT * FROM EKKO INTO EKKO_WA.

SELECT * FROM EKAN INTO EKAN_WA

WHERE EBELN = EKKO_WA-EBELN.

ENDSELECT.

ENDSELECT.

The above code can be much more optimized by the code written below.

SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB

FROM EKKO AS P INNER JOIN EKAN AS F

ON PEBELN = FEBELN.

Note: A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. One should therefore use nested SELECT loops only if the selection in the outer loop contains very few lines or the outer loop is a SELECT SINGLE statement.

Point # 2



SELECT * FROM SBOOK INTO SBOOK_WA.
CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.
The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list and puts the data in one shot using into table
SELECT CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
WHERE SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.


Point # 3


To choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields . In certain scenarios, it is advisable to check whether a new index can speed up the performance of a program. This will come handy in programs that access data from the finance tables.

Point # 4


SELECT * FROM SBOOK INTO SBOOK_WA
UP TO 1 ROWS
WHERE CARRID = 'LH'.
ENDSELECT.
The above code is more optimized as compared to the code mentioned below for testing existence of a record.
SELECT * FROM SBOOK INTO SBOOK_WA
WHERE CARRID = 'LH'.
EXIT.
ENDSELECT.

Point # 5

If all primary key fields are supplied in the Where condition you can even use Select Single. Select Single requires one communication with the database system, whereas Select-Endselect needs two.

former_member184551
Contributor
0 Kudos

Hi Siva

Go to se30, write the name of ur program or tcode and execute from there.

after execution go back, u will be taken to the se30 screen again, press the evaluate button right at the bottom, that will show u a graph with % age, showing the database access and the abap memory used, the lower this is the better is the performance of ur program. In case its v high , say more than 50 to 60 % then check the list (on the app toolbar) , this list will diplay all the components of ur report, all the database statements that u might have used (select update or insert), all the func modules, all the subroutines, single out the one taking the largest chunk of %age and then check it out what might be going wrong in that component.

Its a kind of an analysis tool for ur program and can be very helpful in pin pointing performance problems.

Thanks

Please reward points for helpful answers !