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 related issues

Former Member
0 Likes
834

Hi,

I am new to ABAP and want to know various performance related issues that might occur in case of coding in ABAP as we generally in case of JAVA and other programming languages.

I want to know how an ABAP program consumes memory and what are the effects on performance and so on.

What are the steps to be taken so that we can tune the performance.

Experts please help me as i am working on real time.

With regards,

Abir.

1 ACCEPTED SOLUTION
Read only

Former Member
6 REPLIES 6
Read only

Former Member
Read only

Former Member
0 Likes
803

Hi abir,

1. want to know various performance related issues that might occur in case of coding in ABAP

a) A select query is taking very long time

to execute

b) The logic is poorly written

using internal tables, and hence taking long time.

2. What are the steps to be taken so that we can tune the performance

a) Instead of using Select *,

use select field1 field 2

(only required fields should be selected)

b) Instead of reading data in a loop,

and increasing the database reads,

we should try to read the full data

in one shot, in one single internal table.

(then we can do our operations/logic on this

internal table)

c) Try to use Where conditions

regards,

amit m.

Read only

Former Member
0 Likes
803

Hi Abir,

1. Sorting the internal tables and Binary Search for Read statements

2. Clear/ Free internal tables and Variables

3. Avoid using Joins for more than 3 tables in one select statement

4. Avoid Hard coding

5. Exception handling after calling function modules

6. While using “For all Entries”, check whether the internal table has values or not

7. Use “into table” instead of “into corresponding fields of table”

8. Select the required fields instead of “Select * from”.

9. Check for Code inspector errors and warnings.

Read only

Former Member
0 Likes
803

Hai Abir

the following are the Performance Realated

and go through the following Link

http://www.sapgenie.com/abap/performance.htm

it is having very good Examples and Detailed Description about each

1) For all entries

2) Nested selects

3) Select using JOINS

4) Use the selection criteria

5) Use the aggregated functions

6) Select with view

7) Select with index support

😎 Select … Into table

9) Select with selection list

10) Key access to multiple lines

11) Copying internal tables

12) Modifying a set of lines

13) Deleting a sequence of lines

14) Linear search vs. binary

15) Comparison of internal tables

16) Modify selected components

17) Appending two internal tables

18) Deleting a set of lines

19) Tools available in SAP to pin-point a performance problem

20) Optimizing the load of the database

Thanks & regards

Sreenivasulu P

Read only

Former Member
0 Likes
803

Hi,

Following are the different tools provided by SAP for performance analysis of an ABAP object

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

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.

hope this helps u.

rgds,

latheesh