‎2009 Mar 13 2:34 PM
Hi experts,
What are the best way and possible alternative way for
Select and Endselect statements.
While handling much data.
EX:SELECT *from dbtable into itab.
after this statement i will call one fm say "zfm"
i will process one fm.
after that i have put loop on itab of which is having much data
which is giving out put of fm.
after that i put ENDSELECT
It is taking too much time is there any alternative process will give us faster out put.
Thanks.
‎2009 Mar 13 2:42 PM
Use a select to populate the itab with no endselect (into table itab), and then use a loop to iterate throught it to do what you need to do.
‎2009 Mar 13 2:46 PM
Normally using SELECT and ENDSELECT is not optimal for performance. So better would be to select all the data into an internal table at once. However, as you are saying, this FM you are using is returning a lot of entries in internal table.
Have you already figured out where it is 'hurting' performance wise? Is it the SELECT ENDSELECT (shouldn't be if there are only a few records to be selected), or is it the FM retrieving a lot of data, or is it the LOOP ENDLOOP?
But for starters, get rid of the SELECT ENDSELECT. The rest is hard to say, without any code extract.
‎2009 Mar 13 2:46 PM
This question has been asked and answred many times. Please search before asking.
Rob