‎2008 May 25 9:19 AM
Hi Guru's,
Could any one please tell me what are performance steps we have to take while writing report program
Thanks & regards
Vardhan
‎2008 May 30 8:34 AM
Hi!!
Try reading this
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
http://www.erpgenie.com/abap/performance.htm
few tips:
1.Kindly see if u have mistakenly using select-endselect.
2.using select queries widin loop-endloop.
3.Following are the different tools provided by SAP for performance analysis of an ABAP object
4.considering performance we should try writing such code which hits database min number of times.
If the database percentage is less(min) ur code's perforamnce is better.
1. 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.
2. SQL Trace transaction ST05
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.
To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
Or else above mentioned links gives details about the performance tuning.
Hope this helps .Kindly rewrd if useful.
‎2008 May 25 1:29 PM
Hello.
This is a very generic topic. However I can give you some advices to increase performance when reporting.
ST05 and SE30
.use those transactions to measure your program performance
Database acesses:
.always use the keys and indexes that may exist in the tables.
.avoid using SELECT * .. instead use SELECT field1 field2
.if possible, use JOIN and FOR ALL ENTRIES
.avoid duplicates, i.e, avoid reading the same record twice
.use SELECT ... INTO TABLE, instead of SELECT/ENDSELECT
.etc...
Internal tables:
. if possible, use HASHED tables
. use work areas
. when modifying table, use adiction TRANSPORTING if you only want to modify some fields
.try to move blocks instead of line by line
Hopes this helps ...
Reward if helpfull.
Best regards.
Valter Oliveira.
Edited by: Valter Oliveira on May 25, 2008 1:31 PM
‎2008 May 25 8:37 PM
Hi Vishnu,
Here are some more points:
--> Always ensure that the selected data is as small as possible.
--> Try using "Select Single" instead of normal select if you want only one row of data.
--> Use Joins instead of Nested Select statements wherever possible.
--> Avoid unnecessary declarations of internal tables, work-areas etc.
--> Use ABAP System fields (like sy-datum, sy-index, sy-tfill etc) and avoid creating new variables where these can serve the purpose.
--> Use maximum number of table keys in the "WHERE" condition of select statements.
--> Binary Search is quite useful at times, use it to get good performance.
--> Use the "Total" fields that already exist in many tables, instead of recalculating the total.
These points will definitely increase the optimization of your code.
Please Reward if you find any of them useful.
Regards,
Kalyan Chakravarthy
‎2008 May 26 10:41 AM
‎2008 May 26 12:03 PM
hi
go to tcode se30
clik on tips & tricks on the application tool bar
then in the left hand side of the screen u find no of folders
just clik on
selec* vs selct f1,f2.....
just double clik on it then clik on measure run time
so that
u 'll get
which code is taking how much time
if it takes less time meansit's performance is better
so in any program u ve to modify the statement's acordingly so that
ur program will takes very less execution time .
just go through it
reward if useful
sachhidananda
‎2008 May 30 8:34 AM
Hi!!
Try reading this
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
http://www.erpgenie.com/abap/performance.htm
few tips:
1.Kindly see if u have mistakenly using select-endselect.
2.using select queries widin loop-endloop.
3.Following are the different tools provided by SAP for performance analysis of an ABAP object
4.considering performance we should try writing such code which hits database min number of times.
If the database percentage is less(min) ur code's perforamnce is better.
1. 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.
2. SQL Trace transaction ST05
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.
To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
Or else above mentioned links gives details about the performance tuning.
Hope this helps .Kindly rewrd if useful.