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

Is the basic list deleted when the new list is created?

582


What are the data types of the external layer? : abap data dictionary

798


what are the problem we face during development( if we say v are in support(development)? what are the critical problems araises during LSMW updation and Smart form layout development for involce and po? very very important questions now a days commonly asking..plz plz reply me

1544


How do you restrict the data to be entered in the payroll area? : sap abap hr

533


Explain what are the different functions used in sap script?

550






Why do we use FOR ALL ENTRIES and what is the pre-requisite

926


What are the types of parameters in the function modules?

669


What is size category?

561


What is alv programming in abap?

644


what is 3 tire architecture and how does SAP utilizes this architecture. and how do netweaver came into picture?

1739


can anyone do BDC or BAPI for F-02 and F-04 transactions.If it LSMW also.Kindly let me know.

3047


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

670


What are the functional areas? User groups? And how does abap/4 query work in relation to these?

608


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

557


how 2 create the normal form by using functional module

2138