Do you use select statement in loop end loop, how will be
the performance? To improve the performance?

Answer Posted / sukhbir

Best option will be to select the data before loop and
inside loop use read statement.

select f1 f2 f3(key fields) from db into
iNtertab
for all entries in itab
where condition.
sort intertab by f1.
loop at itab.
read intertab with key f1 = itab-f1
binary search.
Endloop.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What’s value table?

790


After running a BDC program in background, next day morning when you see the results, few records are not updated(error records). What will you do then ?

1693


What is the function of the transport system and workbench organiser?

852


Explain the call transaction method? : abap bdc

801


What is meant by stacked list?

784


Which transaction code can I use to analyze the performance of abap program?

767


Explain the Importance of pa20? : abap hr

840


What are the attributes of a field that can be activated or deactivated during runtime?

755


how do you transport lsmw data from one system to another?

872


When the get cursor command used in interactive lists?

820


hi to all abap interview guys please notify this .. first if u have any doubts please go through google search or else please do debugging with some sample programs . but don't post even silly questions too. thanking you.

1751


A field containing quantity amounts (data type quan) must be assigned to a reference table and a reference field. Explain? : abap data dictionary

857


What are the names of the function modules that will be generated upon activation of a lock object?

758


What is a size category? : abap data dictionary

839


What is the difference between sum and collect?

1128