06-01-2009 3:28 PM
Hi,
Hi,
I need to use the ranges in the where clause.
I have performance issue in the select query so I want to use the key field of the table AFRu-RUECK
In where clause using Ranges..so that it will select all the ranges...
Select Single rueck
rmzhl
iedd
aufnr
stokz
stzhl
from afru into table et_afru
where
aufnr = i_aufnr and
stokz = space and
stzhl = 0.
Can anybody help me with the syntax...
Regards,
Kittu
06-01-2009 3:33 PM
Hi,
Example:
Ranges:R_rueck for AFRu-RUECK.
Select Single rueck
rmzhl
iedd
aufnr
stokz
stzhl
from afru into table et_afru
where
rueck in r_rueck and
aufnr = i_aufnr and
stokz = space and
stzhl = 0.
06-01-2009 4:02 PM
Hi,
hope these will not use...
try to check the index for where condition fields..and try to force by using index hints..
Example:
Data :R_rueck TYPE RANGE OF AFRu-RUECK, "add this
R_RMZHL TYPE RANGE OF AFRu-RMZHL. "add this
Select Single rueck
rmzhl
iedd
aufnr
stokz
stzhl
from afru into table et_afru
where
rueck in r_rueck and "add this
RMZHL in r_RMZHL "add this
aufnr = i_aufnr and
stokz = space and
stzhl = 0.
Prabhudas
06-01-2009 4:39 PM
Hi Vishnu,
Thank you for your quick response!
So does it mean that R_rueck will contain the lower and higher range of the values in it..?
I mean will it be filled automatically with the values....
Regards,
Kittu
06-01-2009 5:26 PM
yes..
if nothing is mentioned in select options or ranges ..default it will take all values..
06-02-2009 9:14 AM
Hi Kittu,
If you want to Pass the lower and higher values to the ranges use below code.(Like filling the select-options).
Example:
r_rueck-sign = 'I'.
r_rueck-option = 'BT'.
r_rueck-low = '0000013578'.
r_rueck-high = '0000014000'.
APPEND r_rueck.
CLEAR r_rueck.
If you are not passing any values to ranges,it will take all vaues.
06-03-2009 1:13 PM
Hello,
Thank you very much for your quick response!
I appreciate all your suggestion!
Regards,
Kittu