01-16-2009 8:07 AM
SELECT * INTO IT_XYZ FROM XYZ WHERE ABC IN (AAA, BBB).
In the above select statement, does it consider only the values AAA and BBB or all the values in between them ?
Search before posting further
Edited by: Vijay Babu Dudla on Jan 16, 2009 4:34 AM
01-16-2009 8:12 AM
Hi
It will include only value AAA and BBB.
To take value between them, use either select-option or ranges.
ranges : r_range for ztable-field_name.
r_range-sign = 'I'. "for inclusive
r_range-option = 'BT'. "for between
r_range-low = 'AAA'. "low value
r_range-high = 'BBB'. "high value
append r_range.
now use this range in query.
where ABC in r_range. "this will include all values between AAA and BBB
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
01-16-2009 8:08 AM
hi,
if you are using select-option it will take all the values between two mentioned values. please search forum first then post.
thanks,
anupama.
01-16-2009 8:09 AM
It will consider only the values that are provided in the list within the brackets
01-16-2009 8:09 AM
hi,
you can go for ranges. to get values between AAA,BBB
Thanks,
Naveen Inuganti
01-16-2009 8:12 AM
Hi
It will include only value AAA and BBB.
To take value between them, use either select-option or ranges.
ranges : r_range for ztable-field_name.
r_range-sign = 'I'. "for inclusive
r_range-option = 'BT'. "for between
r_range-low = 'AAA'. "low value
r_range-high = 'BBB'. "high value
append r_range.
now use this range in query.
where ABC in r_range. "this will include all values between AAA and BBB
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
01-16-2009 8:14 AM
Hi,
It is only seach for those two what u give inside the bracket in your query. Not all entires between these.
Thanks.
01-16-2009 8:14 AM
hi,
It will take values that are given in the value within the brackets..
to get a range of values you can use
Ranges or select-options ....
thanks
01-16-2009 8:15 AM
01-16-2009 8:16 AM
Hi,
Your query consider either AAA or BBB.
If you want the values in the range from AAA to BBB then use BETWEEN
SELECT * INTO IT_XYZ FROM XYZ WHERE ABC BETWEEN 'AAA and 'BBB'.
Regards,
Manoj Kumar P
01-16-2009 8:23 AM
Hi
Your query will consider only the values mentioned in brackets.
If you want to support a range of values or a set of distinct values, use Select-Options.
Then you can use the Select query with WHERE ABC IN seltab option.
Here you are checking if ABC with the values mentioned in Select-Options (seltab) that you create.
Check out this link for more details on usage:
http://help.sap.com/abapdocu/en/ABENWHERE_LOGEXP.htm
Hope this helps
Regards,
Jayanthi