‎2008 May 26 11:12 AM
hello All,
I trying to update the time value from timestamp using FM
CALL FUNCTION 'RKE_TIMESTAMP_CONVERT_INPUT'
EXPORTING
i_date = sy-datum
i_dayst = sy-dayst
i_time = sy-uzeit
i_tzone = sy-tzone
IMPORTING
e_timestmp = l_timestamp
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
l_timestamp + 30.
But it is not incresing the time value. I want to change the date according to time value.Is anybody having the idea for this. Please help me out in this. thanks for reply.
‎2008 May 26 11:17 AM
Hello.
FM 'RKE_TIMESTAMP_CONVERT_INPUT' only converts date and time to timestamp format.
If you want to change time, you should update a time variable (instead of sy-uzeit) and then convert to timestamp.
Like:
DATA: lv_time TYPE uzeit.
lv_time = sy-uzeit.
ADD 30 to lv_time.
CALL FUNCTION 'RKE_TIMESTAMP_CONVERT_INPUT'
EXPORTING
i_date = sy-datum
i_dayst = sy-dayst
i_time = LV_TIME
i_tzone = sy-tzone
IMPORTING
e_timestmp = l_timestamp
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
Best regards.
Valter Oliveira.
Edited by: Valter Oliveira on May 26, 2008 11:18 AM
‎2008 May 26 11:17 AM
Hello.
FM 'RKE_TIMESTAMP_CONVERT_INPUT' only converts date and time to timestamp format.
If you want to change time, you should update a time variable (instead of sy-uzeit) and then convert to timestamp.
Like:
DATA: lv_time TYPE uzeit.
lv_time = sy-uzeit.
ADD 30 to lv_time.
CALL FUNCTION 'RKE_TIMESTAMP_CONVERT_INPUT'
EXPORTING
i_date = sy-datum
i_dayst = sy-dayst
i_time = LV_TIME
i_tzone = sy-tzone
IMPORTING
e_timestmp = l_timestamp
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
Best regards.
Valter Oliveira.
Edited by: Valter Oliveira on May 26, 2008 11:18 AM
‎2008 May 26 11:20 AM
Hey thanks for your reply,
But i am using the FM to get the timestamp and now i want to increase it by 30 mins.
I just want to know how i can do this.
‎2008 May 26 11:22 AM
Hey Valter Oliveira ,
But as we are updating the sy-uzeit by 30 mins we should also update the date so i have to look into that factor also.
Really thanks for your reply.
‎2008 May 26 11:26 AM
Hello.
Yes, I was just giving example. But you must check if adding time, the date must add too. If it's 23:50 and you add 30 minutes, you must add 1 day to you date.
If you want to change timestamp itself, a way is to convert timestamp to date/time, modify, and then convert to timestamp agains. I'll check if there is a FM to change timestamp itself directly.
Best regards.
Valter Oliveira.
‎2008 Jul 22 8:34 AM