2007 Jun 28 6:38 AM
I've been using the FM calculate_date and detected that this FM producers wrong dates in some cases. SAP declares this FM as internal use only and will not fix the problem.
I'm now a little bit in trouble of finding an <b>official</b> FM module doing date calculations, does anybody know some of those? please do not post FM which are declared as internal use, i will not reward points on those useless answers.
I've been using the FM calculate_date and detected that this FM producers wrong dates in some cases. SAP declares this FM as internal use only and will not fix the problem.
I'm now a little bit in trouble of finding an <b>official</b> FM module doing date calculations, does anybody know some of those? please do not post FM which are declared as internal use, i will not reward points on those useless answers.
2007 Jun 28 6:43 AM
Hi,
Use this FM SD_DATETIME_DIFFERENCE
Import parameters Value
DATE1 20.05.2007
TIME1 12:00:00
DATE2 23.05.2007
TIME2 12:00:00
Export parameters Value
DATEDIFF 3
TIMEDIFF 0
EARLIEST 1
regards
Shiva
2007 Jun 28 6:45 AM
Hi Rainer,
If you want to add or subtract a number of days from a date.
Use date1 = date1 + 30.
this will add 30 days to the date1.
or use date2 = date2 - 10.
this will give a date 10 days prior to date2.
<b>Reward points, if helpful.</b>
Regards,
Atin
Message was edited by:
Atin Rastogi
2007 Jun 28 6:45 AM
hi rainer,
u can try this fm DAYS_BETWEEN_TWO_DATES.
otherwise write ur own coding for the date calculations as per the requirement.
Regards..
Arun.
2007 Jun 28 6:46 AM
Hi Rainer ,
Please see the FM DATE_IN_FUTURE and RP_CALC_DATE_IN_INTERVAL.
Regards
Arun
2007 Jun 28 6:49 AM
hi,
Check these Fm s
RELATIVE_DATE_CALCULATE
BCA_US_DATES_CALC_DATE
u might have specified date calc based on which scenario??
Thanks,
Deepti
2007 Jun 28 6:58 AM
Hi,
DATE_IN_FUTURE Calculate a date N days in the future.
Regards
Aparna
2007 Jun 28 6:58 AM
i think you are trying to add months and days with a date. If i am not wrong you can do like this... it may work
data : vdate like sy-datum.
vdate = sy-datum.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = '+3'
olddate = vdate
IMPORTING
NEWDATE = vdate
.
vdate = vdate + 5.
write : / vdate.
here i am adding 3months and 5 days with the current date.
vdate must be type d.
regards
shiba dutta
2007 Jun 28 12:42 PM
2007 Jun 28 3:04 PM
All of the mentioned FM are in the state 'Not released' and there for will have no support from SAP. As i stated, i dont wanna have there are plenty of them... i', looking for a released one.
2007 Jun 28 3:25 PM
I don't know of any released date calculation FMs. Unreleased FMs are the meat and potatoes of ABAPERS,
But date arithmetic isn't that difficult. Why don't you just wite your own routine? What exactly are you trying to calculate?
Rob
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |