10-07-2008 5:27 AM
Hi ,
my requirement is i have two dates and times like :
04.10.2008 11:30:00 and 05.10.2008 12:30
hw can i calculate the difference between times ? Is there any function module which fulfill this requirement?
I have already tried the FM 'SD_CALC_DURATION_FROM_DATETIME'
but the problem is hw can i convert the output format to time type , i have given the variable which is of same type like the one used in FM. But i am getting some RunTime error saying unable to interpret '5:00' as a number.
can any one give me solution for this ...
Waiting for ur reply....
Regards
Srinath
10-07-2008 5:44 AM
hi Srinath,
Declare a variable of type p (Packed decimal).
Now subtract the two dates and assign the result to this variable. it wil get stored in date format only...
hope ur query is resolved. get back if u need further assistance.
10-07-2008 5:44 AM
check the function
SCOV_TIME_DIFF
Import parameters Value
IM_DATE1 2008-01-01
IM_DATE2 2008-01-01
IM_TIME1 10:00:00
IM_TIME2 11:30:00
Export parameters Value
EX_DAYS 0
EX_TIME 01:30:00
10-07-2008 5:45 AM
hi,
The below function module is quite useful for you.
CCU_TIMESTAMP_DIFFERENCE
10-07-2008 5:47 AM
10-07-2008 5:49 AM
Hi Srinath,
If you are using the TimeStamp then use the below FM
TIMESTAMP_DURATION_DETERMINE
Thanks,
Chidanand