10-17-2008 8:12 AM
What are the statements which might cause performance issues in an ABAP program.
10-17-2008 8:15 AM
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
10-17-2008 10:02 AM
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
10-17-2008 10:11 AM
you should avoild nested loops and nested selects. they cause performance issues.
10-17-2008 10:29 AM
10-17-2008 11:21 AM
> 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
10-17-2008 12:51 PM
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......
10-17-2008 12:54 PM
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
10-17-2008 1:00 PM
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
10-17-2008 1:09 PM
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...
10-17-2008 1:32 PM
> 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
10-17-2008 2:33 PM
10-18-2008 10:43 AM
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.
10-18-2008 4:25 PM
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
10-20-2008 8:58 AM
10-20-2008 9:53 AM
>
> 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...