‎2007 Jan 09 12:34 AM
hi,
Is there any direct way/FM to add minutes to date and time..
keeping in mind that adding minutes may change the date ...
‎2007 Jan 09 2:30 AM
Hi Anuradha,
Pass the negative value to the same FM and check it out.
-Satya Priya
‎2007 Jan 09 12:41 AM
Use this FM.
DATA V_DATE TYPE SY-DATUM VALUE '20060726'.
DATA V_TIME TYPE SY-UZEIT VALUE '170746'.
DATA V_DATE1 TYPE SY-DATUM VALUE '20060726'.
DATA V_TIME1 TYPE SY-UZEIT VALUE '170746'.
CALL FUNCTION 'CATT_ADD_TO_TIME'
EXPORTING
idate = V_DATE
itime = V_TIME
stdaz = '2400' -->Specify hours with minutes
IMPORTING
EDATE = V_DATE1
ETIME = V_TIME1.
WRITE:/ V_DATE1, V_TIME1. -->Will contain new date and time afte adding STDAZ hours with mintues.
- Guru
Reward points for helpful answers
‎2007 Jan 09 1:33 AM
Can we likewise subtract also no of minutes from date also.?
‎2007 Jan 09 2:30 AM
Hi Anuradha,
Pass the negative value to the same FM and check it out.
-Satya Priya