Performance techniques?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / thanks
Let's atlk about internal table
1) While fetching data from trasnparent table.
Fully used Index key.
2) befor deleting data from intrnal table, use Sort on
internal table..
3) while deleting particular field, do use the option
called comparing..you get this syntax in library.
4) Instead of multiple Loop statement, do use Loop + Read
table statement.
5) in your report, your main table is EKKO and based on
EKKO, you fetched the further data from EKPO and MARA..
here, if you failed to get the record from EKKO,
after select fields from EKKO..
if sy-subrc <> 0.
Exit.
ENDIF.
This comes out of the report, if you set any message like
information .."No data Exist", this would appear on the
screen.
6) Try to use for all entries syntax.
Is This Answer Correct ? | 2 Yes | 0 No |
Explain what is an rdbms?
How can you change the style of Logo or type of Logo?
What is the difference between Overloading and Overriding ? Which of them is possible in ABAP ?
5 Answers HCL, ITC Infotech, TCS,
what is the client on which u have worked? In real time ?
can we create secondary index for views?
Can you print decimals in type n?
Which FM do you use to find out who is reporting to whom
what are parameters of DDCinsert fun module ?
What type of transport requests?
what is the transaction code used for triggering sap script ?
How does the inventory get reduced after the delivery?
differtent types of messages?
5 Answers Deloitte, Enteg Technologies,