‎2007 Sep 21 4:56 AM
How to use between statement in IF statement.
if date is in betweem 12.07.2007 & 31.12.9999.
thanks in advance
‎2007 Sep 21 4:59 AM
Hi,
v_date = sy-datum.
If v_date >20070712 and v_date < 99991231.
Reward if useful.
Regards,
naveen
‎2007 Sep 21 4:59 AM
Hi,
v_date = sy-datum.
If v_date >20070712 and v_date < 99991231.
Reward if useful.
Regards,
naveen
‎2007 Sep 21 5:00 AM
Why don't you populate a ranges for DATE with low value and high value. Sign = 'I' and option eq 'BT'.
if DATE in R_DATE
your logic
Endif.
Let me know if this helps.
‎2007 Sep 21 5:02 AM
hi
use this if statement....
if <condn1> and <condn2>.
-
-
endif.
condn1 -> greater than the given date
condn2 -> lesser than the given date
thanks,
reward if helpful....
‎2007 Sep 21 5:12 AM
hi,
say v_date has the value to be checked.
v_date type dats.
if v_date gt '12072007' and v_date lt '31129999'.
*your Logic
endif.
Please ensure the format of the date you pass is same as the one you compare to.
‎2007 Sep 21 5:15 AM
Hi,
Try this,
DATA: i1 TYPE i VALUE 5.
IF i1 BETWEEN 1 AND 19 .
WRITE:/ i1.
ENDIF.
Thanks,
Dharmishta
Message was edited by:
Dharmishta Suryavanshi
‎2007 Sep 21 5:29 AM
hi vibhuti,
the code would be like :
data : req_date type dats.
req_date = sy-datum.
if req_date between '12072007' and '31129999'.
(your data)
endif.
regard's,
sohi.
‎2007 Sep 21 5:45 AM
HI,
data:v_date type date.
if v_date between '2.03..2008' and '09.08.2008'.
endif.
‎2007 Sep 21 7:51 AM
Hi Vibhuti,
Check the below code.
data: v_date type sy-datum value '20070921'.
if v_date between '20070901' and '20070930'.
write:/ 'Yes'.
else.
write:/ 'No'.
endif.