2005 Nov 08 7:17 PM
Hello,
i´m executing a simple loop using a range in the where condition.
eg. loop at itab into wa_tab
where racct in r_range.
Values in r_range are
sign - 'I'
option 'EQ'
low '0000311001'
high '0000315004'
The loop only finds the 'low' entry and then ends although both numbers are in the itab. If I change option to 'BT' the loop will find all those numbers between low and high.
What am i overlooking?
Thank you,
Kevin
2005 Nov 08 7:20 PM
EQ is intended for single values - 000311001 only or 000315004 only.
BT is intended for values with a "distance" between them.
2005 Nov 08 7:20 PM
EQ is intended for single values - 000311001 only or 000315004 only.
BT is intended for values with a "distance" between them.
2005 Nov 08 7:38 PM
2005 Nov 08 7:22 PM
Put 'BT' instead of 'EQ in the option of range type.
Cheers,
Satya
2005 Nov 08 7:27 PM
Do you want it to find those values only? Then you must add both of the values to the range table like so.
range-sign = 'I'.
range-option = 'EQ'.
range-low = '0000311001'.
append range.
range-sign = 'I'.
range-option = 'EQ'.
range-low = '0000315004'.
append range.
Here you are specifying single values. You only want when you get a hit for 311001 or 315004.
Regards,
Rich Heilman
2005 Nov 08 7:24 PM
If you want only the two records, you need the following in your table:
sign - 'I'
option 'EQ'
low '0000311001'
append r_range.
sign - 'I'
option 'EQ'
low '0000315004'
append r_range.Rob
2005 Nov 08 7:25 PM
If you don't want range and need more single selection append individual entry to range with 'EQ' Option.
2005 Nov 08 7:32 PM
Kevin,
Best option is :
1. Create Ranges
2. Use <b>Ranges in the Database Selection</b> instead at Internal Table Validation.
Example:
select * from MKPF into table itab where mblnr in r_range.
Thanks
Kam
Message was edited by: Kam
Message was edited by: Kam