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
What are the types of search helps? : sap abap data dictionary
What are the personnel administration related Infotypes
What is an update task? : abap modularization
What is sql trace? : abap data dictionary
What are the differences between sap memory and abap memory?
What is the difference between leave transaction and call transaction?
How do you document abap/4 programs? Do you use program documentation menu option?
i want to add 2 records to a table but the last field in the table is 1000 char long.Is it possible?if yes how?
Explain open dataset in sap abap?
What abap statement will trigger list generation?
How do u set up background jobs in SAP? What r the steps? What are the event driven batch jobs?
What is generic area buffering in abap?
What is your approach to find exit and BAdi?
where do we store all custom programs in SD module?
Hi All , Would be providing online trainings for SAP ABAP , guidance with real time experience examples , guidance in profile prepartion . Any one intrested please contact on 8978890047.