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

Timestamp in Select-Options

mustafa_74199
Participant
0 Likes
3,632

Hi,

I need to develop a report which takes a time interval (in timestamp format) from the user. But when i check in debug, i see that the low and high values taken from user are always 1 or 2 hours backwarded. I think it is smt about timezone.

Any idea?

  SELECT-OPTIONS: so_ch_on FOR /scmtms/d_sf_rot-changed_on.

Best Regards

Mustafa

1 ACCEPTED SOLUTION
Read only

MateuszAdamus
Active Contributor
3,113

Hello mustafa_74199

Timestamps are always in UTC timezone. Hence the difference.

You can use SY-ZONLO to get user's timezone and convert timestamp to local date and time.

Here is a good blog about it: https://blogs.sap.com/2016/08/29/about-time-stamps/

Kind regards,
Mateusz

Hello mustafa_74199

Timestamps are always in UTC timezone. Hence the difference.

You can use SY-ZONLO to get user's timezone and convert timestamp to local date and time.

Here is a good blog about it: https://blogs.sap.com/2016/08/29/about-time-stamps/

Kind regards,
Mateusz
4 REPLIES 4
Read only

MateuszAdamus
Active Contributor
3,114

Hello mustafa_74199

Timestamps are always in UTC timezone. Hence the difference.

You can use SY-ZONLO to get user's timezone and convert timestamp to local date and time.

Here is a good blog about it: https://blogs.sap.com/2016/08/29/about-time-stamps/

Kind regards,
Mateusz
Read only

0 Likes
3,113

Hi Mateusz,

Many thanks for the answer.

Read only

Sandra_Rossi
Active Contributor
3,113

You see in debug that the value entered by the user is changed by the system, because the column changed_on of table /scmtms/d_sf_rot (SE11) has a data type which has a domain /BOFU/TSTMP whose conversion exit/routine is TSTLC. The corresponding function module is implicitly called by the system to do the conversion to UTC.

Read only

3,113

Hi Sandra,

Many thanks for the answer.