Application Development and Automation 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: 
Read only

Update TimeStamp

Former Member
0 Likes
3,286

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.

1 ACCEPTED SOLUTION
Read only

valter_oliveira
Active Contributor
0 Likes
1,917

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

5 REPLIES 5
Read only

valter_oliveira
Active Contributor
0 Likes
1,918

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

Read only

0 Likes
1,917

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.

Read only

0 Likes
1,917

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.

Read only

0 Likes
1,917

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.

Read only

Former Member
0 Likes
1,917

Solved.