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 issues in ABAP programs

Former Member
0 Kudos

What are the statements which might cause performance issues in an ABAP program.

15 REPLIES 15

ThomasZloch
Active Contributor
0 Kudos
DO.
ENDDO.

What I'm trying to say is, search this forum and SDN in general for lots of available, valuable information on this topic.

Thomas

former_member194613
Active Contributor
0 Kudos

mainly operation with internal tables, if the internal tables become

large.

Sooner or larger you will encounter task where large table must be compared or connected.

Then you should not use

loop at itab1

read table itab2

with a standard table itab2

Either use a sorted table or a binary search with the standard table.

Rest of the problems is not related to the statements, but to the people calling them.

Call too often and you run into problems.

Siegfried

Former Member
0 Kudos

you should avoild nested loops and nested selects. they cause performance issues.

Former Member
0 Kudos

ENDSELECT

former_member194613
Active Contributor
0 Kudos

> you should avoild nested loops and nested selects. they cause performance issues

There are recommendations of this type which make sense ,Avoid smoking, it can kill you',

but already 'Avoid driving, it can kill you', is also true, but not really practical.

The same holds for 'avoid nested loops and nested selects'.

Nested loops are unavoidable, but actually not a problem, just use sorted tables and everything is o.k.

Nested selects, use Joins or For all entries and it works usually fine.

And whether you use SELECT INTO TABLE or SELECT ... ENDSELECT the difference is smaller than many people expect.

Siegfried

Former Member
0 Kudos

Hi,

Any Code/Statement, raising the no of Database Interaction's/Database WP's can lead to performance issues.

Stick to the Principle....Minimum no of Database Operation's at the RUN TIME......

raymond_giuseppi
Active Contributor
0 Kudos

Really, perform some [search at sdn for you keywords|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_weblog&query=abapperformancestatement&adv=false&sortby=cm_rnd_rankvalue].

Regards

P561888
Active Contributor
0 Kudos

Hi,

1.Dont Use the select and endselect.

2. For the joining ,insteated of using the inner join better use the for all entries .

3. Dont write the select statements in the loop.

4.For the seelct qurey ,use index

5.Sort the internal table before using the for all entries.

6. Read the internal table with binary search.

7.Use the move rather than move-corresponding

8.Check the return code :The return code should always be checked after any database table read/update statements.

Regards,

Bharani

0 Kudos

2. For the joining ,insteated of using the inner join better use the for all entries .

this has been discussed here numerous times, however the consequence was different...

5.Sort the internal table before using the for all entries.

I wonder if that makes any difference, however I would hear some expert opinion about the topic, my question is slightly different: in case of FOR ALL ENTRIES does it matter if the internal tables (the one which contains the values for comparison) is STANDARD or SORTED (or HASHED)?

8.Check the return code :The return code should always be checked after any database table read/update statements.

that has nothing to do with performace...

former_member194613
Active Contributor
0 Kudos

> 5.Sort the internal table before using the for all entries.

only if delete adjacent duplicates is applied.

And this recommended if there can be duplicates, not if it comes from a select with unique key.

The list of recommedation above is actually quite useless!

Actually I thought the question refers more to pure ABAP statements not to database.

But I guess as often it is an interview question, so better answer what people expect, otherwise they might be confused.

Siegfried

Former Member
0 Kudos

Please search the forum before asking basic questions like this.

And responders beware:

Rob

Former Member
0 Kudos

Hi,

in SDN there is a section called WIKI in that if u go to Abap Development section u can find a section related to Performance. there u have very nice article regarding Performance Tuning.hope that article might give u a better insight.

after clicking on WIKI section the path is My Home > ABAP Development > Performance

abaper007.

Former Member
0 Kudos

Hi,

In R/3 you have Tips & Tricks you can see the statements which cause performance issues. It gives you the comparative statements that can be used and the time taken for implementation. The following link provides you few of the performance tips

http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_AggregateFunctions.asp

Regards,

Sumalatha

Former Member
0 Kudos

This message was moderated.

0 Kudos

>

> Hi....

>

> The Statements which can cause performance issues are as following:

> 1.)The 'INTO TABLE' clause

> 2.)Modifying a group of lines

> 3.)Appending two internal tables

> 4.)Table buffering

> 5.)Use of 'For all' entries

> 6.)Use of structure of 'where' clause

> 7.)Proper use of 'Move' statement

> 8.)Proper use of 'Inner join'

> 9.)Use of 'ABAP Sort' instead of 'Order By'

sorry, but this is total rubbish...