Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

add seconds to system timing

former_member227140
Active Participant
0 Kudos

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'

4 REPLIES 4

kesavadas_thekkillath
Active Contributor
0 Kudos

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

I355602
Advisor
Advisor
0 Kudos

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

former_member673464
Active Contributor
0 Kudos

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

0 Kudos

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