Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Select and end select problem.

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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.

Sm1tje
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

This question has been asked and answred many times. Please search before asking.

Rob