‎2007 Dec 20 4:52 AM
Hi gurus!!
I have a report where in i am putting the values in select-options. but yj eproblem i have is when i am not putting any values i am getting the correct output.
but with the same data i am putting the values in low or high i am not getting any data..
so i think i need to put all the entrioes of the select option in an internal table or ranges i dont know and then we give some code like
ranges : ra_stotal for ztsd120-zlow.
ra_stotal-sign = 'I'.
ra_stotal-option = 'BT'.
ra_stotal-low = zlow-low.
ra_stotal-high = zlow-high.
append ra_stotal.
clear ra_stotal.
Can anyone tell me if this is what i got to do if so how?
or is there some other way out?
‎2007 Dec 20 4:57 AM
Hi,
Using Range is the absolute method which u r using u can go for select options directly why do u want to go wit the range method....Select options will inernally create this structure so u will not be facing with the issues...
Regards,
Sana.
‎2007 Dec 20 4:59 AM
hi,
SELECT-OPTIONS :ra_stotal for ztsd120-zlow,
use this.. it will solve your problem..
thnx,
reward if useful
‎2007 Dec 20 4:59 AM
Hi,
Try like this
ranges : ra_stotal for ztsd120-zlow.
INITIALIZATION.
ra_stotal-sign = 'I'.
ra_stotal-option = 'BT'.
ra_stotal-low = zlow-low.
ra_stotal-high = zlow-high.
append ra_stotal.
clear ra_stotal.
START OF SELECTION.
select f1 f2 from table itno itab
where stotal in ra_stotal.
Regards,
pRashant
‎2007 Dec 20 5:05 AM
Hi,
As suggested select-options will take care whether you are giving values in high or low.
If you are giving values in low, then it will take the specific value only.
If you are giving values in high, it wil take o for low and the value for high.So internally program will fetch the data for the range 0 to the value specified in high.
‎2007 Dec 20 5:16 AM
Hi,
There is no need for any range as Select Option it self behaves as a Range.
Just make sure that while getting the data from the table in where clause you are saying
Select....
,......
where zlow in so_zlow.
This should fix ur problem.
Please revert back if still there are issues.
regards,
Lalit
‎2007 Dec 20 5:38 AM
Hi,
We need not use any ranges for that...only select-options is enough. You can directly use the query and in condition use IN operator.
Eg. select * from table into It_tab where condition in s_xxx.
This is fetch you the required data.
Regards,
Ramesh.
‎2007 Dec 20 5:49 AM
Hi Mona,
Please check the below code in BOLD letter....
I guess you are having a problem in SELECT-OPTIONS because ...might be u r using EQ in where condition of your select query. Whenever u r using SELECT-OPTIONS, it should be "IN" in the where condition.
Eg:- SELECT <field names>
FROM MARA
INTO TABLE <it_tablename>
WHERE matnr IN s_matnr.
Reward points for helpful answers.
Regards,
HK.