Skip to Content
Former Member
Jan 04, 2008 at 11:34 AM

Using Ranges instead of For all entries..


Hi All,

I have a two select quires which is taking a long time on the Production server. the query is as follows:-

select distinct addrnum ktext into table i_t499s

from t499s

for all entries in i_anlz

where werks = i_anlz-werks

and stand = i_anlz-stort.

if not i_t499s[] is initial.

delete i_t499s where adrnr is initial.

sort i_t499s ascending by adrnr.



select distinct addrnumber street city1 city2

country region post_code1 taxjurcode

into table i_adrc

from adrc

for all entries in i_t499s

where addrnumber = i_t499s-adrnr

and date_from <= sy-datum

and date_to >= sy-datum

and country = 'US'.

Will the usage of the Selection options RANGES i both the above quires improve the performance ???