05-19-2008 3:32 PM
Hi all,
Is there any function module to get the Local time of the user
as like SY-timlo..
Thanks a lot in advance
Regards,
Lakshma
05-19-2008 3:35 PM
05-19-2008 3:40 PM
05-19-2008 3:43 PM
05-19-2008 4:12 PM
Hi,
I think there is no function for that.
Have a look at this small code sample.
It is for sy-uname but making a function from ist shouldn't be very difficult:
REPORT test.
DATA:
tst LIKE ttzdata-timestamp,
tstp8(8) TYPE p,
i_logdat TYPE uslogond,
tzone LIKE i_logdat-tzone,
d LIKE sy-datum,
t LIKE sy-uzeit.
CALL FUNCTION 'TZ_UTC_SYSTEMCLOCK'
IMPORTING
UTC_DATE =
UTC_TIME =
utc_timestamp = tst. .
CALL FUNCTION 'SUSR_USER_READ'
EXPORTING
user_name = sy-uname
WITH_TEXT =
IMPORTING
user_logondata = i_logdat
USER_DEFAULTS = i_defaults
USER_ADDRESS =
REF_USER =
ALIAS =
TABLES
USER_PARAMETERS =
EXCEPTIONS
USER_NAME_NOT_EXISTS = 1
INTERNAL_ERROR = 2
OTHERS = 3
.
tzone = i_logdat-tzone.
IF tzone = ''.
tzone = sy-zonlo.
ENDIF.
tstp8 = tst.
CONVERT TIME STAMP tstp8 TIME ZONE tzone INTO DATE d TIME t.
regards
Walte Habich
05-19-2008 4:18 PM
Hi,
You can find the current users local date/time as follows:
SY-DATLO Local Date for Current User
SY-TIMLO Local Time of Current User
SY-ZONLO Time Zone of Current User
check the FM : SUSR_USER_READ
Paramter : USER_LOGONDATA -TZONE
Regards
Kiran Sure