2009 Nov 23 10:26 AM
Hello Friends,
here is a question.......i want to add 02 seconds to system time and get into the variable and i am passing that variable to a FM
in my code....
just tell me how to add seconds to current system time..
i have done like this but giving runtime error.
DATA : WA_TIME TYPE IMRG-ITIME
WA_TIME = SY-UZEIT + '00:00:02'
Hello Friends,
here is a question.......i want to add 02 seconds to system time and get into the variable and i am passing that variable to a FM
in my code....
just tell me how to add seconds to current system time..
i have done like this but giving runtime error.
DATA : WA_TIME TYPE IMRG-ITIME
WA_TIME = SY-UZEIT + '00:00:02'
2009 Nov 23 10:30 AM
check class cl_abap_tstmp method ADD & TD_ADD
i think this thread is waiting to get locked
Edited by: ksd on Nov 23, 2009 4:01 PM
2009 Nov 23 10:33 AM
Hi,
Refer:
DATA : v_uzeit TYPE sy-uzeit.
START-OF-SELECTION.
v_uzeit = sy-uzeit + 1.
WRITE : sy-uzeit, '--', v_uzeit.
Hope this helps you.
Regards,
Tarun
2009 Nov 23 10:33 AM
hi,
You can directly add number '2' to it. Time will increase by 2 seconds. try like this.
DATA : WA_TIME TYPE IMRG-ITIME.
WA_TIME = SY-UZEIT + 2.
write: wa_time, sy-uzeit.
regards,
Veeresh
2009 Nov 23 1:28 PM
Yes you can use sy-uzeit as it gives the Current Time of Application Server. and adding 2(without any quotes) will work fine.
DATA : WA_TIME TYPE IMRG-ITIME.
WA_TIME = SY-UZEIT + 2.
write: wa_time, sy-uzeit.
Hope it will help.
Thanks
Tanmaya Gupta
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |