Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM to Manipulate date Range

Former Member
0 Likes
566

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....

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
532
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...

3 REPLIES 3
Read only

JozsefSzikszai
Active Contributor
0 Likes
533
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...

Read only

Former Member
0 Likes
532

Hi,

Yes

If date in date_range

is 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.

Read only

Former Member
0 Likes
532

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