08-22-2006 3:21 PM
hi,
Can any one tell me are there any function modules to perform add, diff(minus) operation on time fields?
please let me know if you know any.
thanks in advance,
Prasad Babu.
08-22-2006 3:23 PM
08-22-2006 3:24 PM
Hello,
You can directly perform these operation on the time fields,
Like
data: t1 type t,
t2 type t,
diff type i.
diff = t2 - t1.
Regards,
Naimesh
08-22-2006 3:24 PM
Hi,
Try <b>CCU_TIMESTAMP_DIFFERENCE</b>
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
timestamp1 = timestamp1
timestamp2 = timestamp2
IMPORTING
difference = diff
EXCEPTIONS
OTHERS = 1.
Check out these threads
Regards,
Santosh
08-22-2006 3:25 PM
08-22-2006 3:29 PM
Hi Prasad,
Please check this FM.
<b>TIMECALC_DIFF
SCSM_TIME_DIFF_GET
SCOV_TIME_DIFF
SRET_TIME_DIFF_GET</b>
Hope this will help.
Regards,
Ferry Lianto
08-22-2006 3:36 PM
Hi Prasad,
You cannot add two time fields.
However, you can add a time field and a number(seconds).
data: new_time type t,
time type t,
secs type i.
new_time = time + secs.
You can subtract two time fields.
secs = new_time - time. "the difference will always be in seconds.
regards,
ravi