06-17-2008 1:26 PM
Hi all,
I want to substract user entered( in selection screen) minutes from sy-uzeit, so that i can use the result for further calculations.
Can any body help me which function module i can use?.
Thanks,
Arun
06-17-2008 1:29 PM
HI,
First make the user entered time to local formate like sy-uzeit, then directly subtract it from sy-uzeit. For dates also we can follow the same way.
Rgds,
Bujji
06-17-2008 1:29 PM
Hi
Use RSSM_SUBSTRACT_TIMESTAMPS or RSSM_SUBST_SECS_FROM_TIMESTMP or OII_CALC_DIFF_BT_TIMESTAMPS
06-17-2008 1:29 PM
you can directly subtract two time fields
data: v_seconds type i.
v_seconds = p_time - sy-uzeit.
write:/ v_seconds,
'Seconds'.
Regards,
Ravi
06-17-2008 1:33 PM
Hi,
You can do the same as follows :
data : v_uzeit like sy-uzeit
v_uzeit1 like sy-uzeit.
this v_uzeit1 is time entered by user. Convert this time into seconds by multiplying the same by 60.
v_uzeit = sy-uzeit.
v_uzeit = v_uzeit - v_uzeit1.
This should give you the required results.
Hope this helps!!!
regards,
Lalit Kabra