‎2008 Dec 02 2:38 PM
Hi all,
Im trying to check whether a particular date comes under a given date range.
In a select querry we directly give.... where date in s_date.... or itab_date[]. But this is not the case while checking this in an IF condition or anything else.
Any FM to check whether a particular date comes under a given date range or any FM which will
generate the list of dates will be help ful.
Note: in this case my range is a manually populated range. It has only one line as,
"I BT <date1> <date2>".
Please provide your valuable suggesstions....
‎2008 Dec 02 2:41 PM
IF date IN date_range=> this is a valid statement in ABAP, so if you still have problems with it, just copy the source code here for further analysis...
‎2008 Dec 02 2:41 PM
IF date IN date_range=> this is a valid statement in ABAP, so if you still have problems with it, just copy the source code here for further analysis...
‎2008 Dec 02 3:25 PM
Hi,
Yes
If date in date_rangeis valid stmt.
Check like this.
r_date-sign = 'I'.
r_date-option = 'BT'.
r_date-low = '20080909'.
r_date-high = '20081212'.
append r_date.
if sy-datum in r_date.
write:/ 'ok'.
endif.Rhea.
‎2008 Dec 02 3:46 PM
use ranges for that
RANGES: r_datum for sy-datum.
r_datum-sign = 'I'.
r_datum-option = 'BT'.
r_datum-low = low date
r_datum-high = high date
append r_datum.
now use this ranges in ur select query
Regards,
Ajay