Performance techniques?

Answer Posted / ramesh

(1) Try not to delete a record from internal table with in
a loop. Every time when you delete a record from internal
table the index of the table is regenerated and this can be
a major performance issue. So if you have to delet a record
from internal table, create an additional column in the I.T
say del_ind and you want to delete the record for a
particular condition. then the code should go something
like this

loop at itab.

...
...
if <cond> .
itab-del_ind = 'x'.
modify itab transporting del_ind.
....
.......
endloop.

delete itab where del_ind = 'x' .


(2) Always sort the internal table by <key> and try to use
the statement Read table itab with key = <kwy> binary
search.

(3) Instead of joins use the for all entries option

(4) If the number of entries in the internal table are less
and you want to modify the internal table in loop, then its
better to go for field symbols than the regular
loop at itab.
.....
modify itab
,,,
endloop.

The overhead of reading the internal table record into itab
header can be avoided. Field symbol directly modifies the
record in the current loop pass

I will post more whenever i get free time again
Hope these are helpful

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What function does data dictionary perform?

574


What are smart forms?

596


How to eliminate duplicate entries in internal tables? : abap data dictionary

792


Explain the properties of selection screen?

654


What is a sequence of event-triggered in report?

638






Some Realtime Objects on Bdc.

2431


When, how and how would you control changes to standard SAP objects.

1431


what is 3 tire architecture and how does SAP utilizes this architecture. and how do netweaver came into picture?

1734


What is macro? : abap hr

644


What is the difference between abap and hr abap? : abap hr

615


Differentiate between transparent tables, cluster tables and pooled tables

574


in bdc session method. if u run the record in fore ground manually i have a 7 records but at the time of record processing first record produces the error how can u process records manually in fore ground please tell me any one knows?

1747


What are spa/gpa parameters (sap memory)?

731


What are the components of sap scripts? : abap hr

589


What is buffering allowed but switched off?

871