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 |
How do you write a function module in SAP? describe.
what client you are working?
how many type of index are there
What is Basic IDOC type?
What is the transaction code to modify the hr form
Can I execute user exits? If yes, how?
which one is efficient in following command to copy data from one itab1to another itab2 . both itab table has same structure. 1. move itab1 to itab2 2.move corresponding field of itab1 to itab2 3. itab2[] = itab2[] 4.appends line of itab1 to itab2..
can u send the results from report to sap memory?
2 Answers Bristle Cone, Cap Gemini, HP, Satyam, TCS, Wipro,
i am new for sapabap. i want to about sapabap it is easy to learn or not ple give me answer. i am feeling about programing. ple give me answer.
What do is landscape in sap project, I think its related to no. Of servers used, pls correct me if I am wrong, or what it is? : sap abap hr
What is collective search help? : sap abap data dictionary
Explain what is an rfc?