‎2006 Feb 25 10:58 PM
Hi All,
I have a posting date whose value for eg (12/31/2005). i want to calculate whether it is 60-90 days lesser than the system date. how to achieve this in abap.
Thanks
‎2006 Feb 25 11:05 PM
REPORT YCHATEST.
DATA:DIFF TYPE I.
PARAMETER : P_DATE LIKE SY-DATUM.
DIFF = SY-DATUM - P_DATE.
IF DIFF GT 60 AND DIFF LT 90.
WRITE : / 'true'.
ELSE.
WRITE : / 'false'.
ENDIF.
Reward points if helpful and close the thread
‎2006 Feb 25 11:05 PM
REPORT YCHATEST.
DATA:DIFF TYPE I.
PARAMETER : P_DATE LIKE SY-DATUM.
DIFF = SY-DATUM - P_DATE.
IF DIFF GT 60 AND DIFF LT 90.
WRITE : / 'true'.
ELSE.
WRITE : / 'false'.
ENDIF.
Reward points if helpful and close the thread
‎2006 Feb 25 11:55 PM
‎2006 Feb 26 12:25 AM
You could also do something like this.
report zrich_0001.
ranges: r_datum for sy-datum.
parameters: p_datum type sy-datum.
r_datum-sign = 'I'.
r_datum-option = 'BT'.
r_datum-low = sy-datum - 90.
r_datum-high = sy-datum - 60.
append r_datum.
if p_datum in r_datum.
Write:/ 'Yep the date is in the range'.
else.
Write:/ 'Nop the date is not in the range'.
endif.
Regards,
Rich Heilman
‎2006 Feb 26 12:51 AM