‎2008 Apr 30 5:15 AM
Dear Friends,
Kindly clarify whether can we use comparision operators for a field belonging to select-options.
Following is the scenario:
In my selection-screen I have posting date in select-options as s_budat.
In the Select statement I have to pickup all those documents whose clearing date is less than the range in s_budat or in other words less than s_budat-low.
I have written it as following at present
where budat <= s_budat.
shall it give me the desired result?
Pls suggest.
Regards,
Alok.
‎2008 Apr 30 5:18 AM
Hi,
select-options s_budat for budat no-intervals.
in initialization event populate like below
initialization .
s_budat-option = LT.
s_budat-sign = 'I'.
append s_budat.
select ........ where budat in s_budat.
‎2008 Apr 30 5:18 AM
‎2008 Apr 30 5:19 AM
Hello Alok
A date can be inside or outside a range but not not less than a range.
In your case you should use a simple parameter:
PARAMETERS:
p_budat TYPE d.
START-OF-SELECTION.
SELECT * FROM ....
WHERE ( budat < p_budat ).
...
Regards
Uwe
‎2008 Apr 30 5:19 AM
Deffinately it will work.See the following code for example :
Select-Options s_budat for budat.
Start-Of-Selection.
Select * from XYZ into table ITAB where budat <= s_budat-low.
*ITAB is u r internal table
*XYZ is a DB table from where u have data.
Thats it,it will work for sure.
Reward if found helpful.
‎2008 Apr 30 5:19 AM
Hello Alok-
Select-option is an internal table you cannot compare with EQ or <> keywords this type of comparision is possible with parameters.So first pull all the records by IN keyword and later delete the records as per your requirement.
Cheers,
~Srini.....
‎2008 Apr 30 5:20 AM
hi,
use like this
in select options use no intervals edition
select-options s_budat for budat no-intervals.
in initialization event populate like below
initialization .
s_budat-option = LT.
s_budat-sign = 'I'.
append s_budat.
select ........ where budat in s_budat.
regards
prasanth