2020 Nov 28 3:00 AM
How to Convert timestamp data into user time zone like UTC+9:00 in cds views
2020 Dec 05 5:17 PM
Hi,
Goto Tcode SU01 Enter your username ,
Click on Change icon
Goto Defaults tab
Change your Time Zone Using f4 help option like ( UTC +9:00) format , Please refer the below screen shots.
Save the changes
In view try to execute below code
abap_user_timezone( $session.user,$session.client,'FAIL' )
output:-
This is your UTC + 9 Time zone output refer screen shot
Goto SU01 tcode
Reset your system previous time zone format.
How to Convert timestamp data into user time zone like UTC+9:00 in cds views
2020 Nov 28 8:27 AM
Use these functions, depending on your ABAP version (here, the latest one): https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abencds_date_time_fun...
(and user time zone function is described in subchapter https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abencds_timezone_func...
2020 Dec 01 2:51 PM
Hi,
Using This syntax : - tstmp_current_utctimestamp() as count_time
After creating view go to SU01 t-code enter your username and go to edit mode and select default tab , change the timezone value UTC+9 select from f4 functionality . save it come back and execute view.
2020 Dec 01 3:23 PM
Thank you for your replay,
I followed your steps but i didn't got any difference while I'm doing.
This is the result of previously when i executed:

This is the output when i followed your steps:

2020 Dec 05 5:17 PM
Hi,
Goto Tcode SU01 Enter your username ,
Click on Change icon
Goto Defaults tab
Change your Time Zone Using f4 help option like ( UTC +9:00) format , Please refer the below screen shots.
Save the changes
In view try to execute below code
abap_user_timezone( $session.user,$session.client,'FAIL' )
output:-
This is your UTC + 9 Time zone output refer screen shot
Goto SU01 tcode
Reset your system previous time zone format.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |