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 |
Why bapi need then bdc ? : abap bdc
By using which FM we can upload data into Infotype
What are the parameters used in each function?
difference between primary index and secondary index.when we use secondary index in reports?
What is the structure of CTU PARAMS ?
What Methods are using in Perform tuning
What is the last entry in all bdc tables? : abap bdc
Can we call reports and transactions from interactive reporting lists?
Explain how do you use structures in the abap programs?
We execute the BDC program in foreground and got list in C drive. If the same program we can execute in back ground what happen?
In BDC,i have 3 transaction and one flat file with data for all those 3 transaction requires........i want to process these 3 transaction at a time using that single flat file,if 3rd transaction fails to upload the record,can we roll back the remaining 2 transaction or we can't?Is it possible in BDC,How?
How do we assign dynamic views while creating material master and generating bdc? : abap bdc