2008 Oct 21 4:00 AM
Hi ALL,
Is there any conditions of when to use the global or local time in the programs?
i.e. SY-DATUM(global date) instead of SY-DATLO(local date) and SY-UZEIT(global time) instead of SY-TIMLO(local time) in the programs.
Regards,
Anil
2008 Oct 21 7:22 AM
hi
it does depend on ur requiremnet..
bt it is still better to use global time coz it is the time by which ur database is working.. and sometimes when u use local time it doesnt match with ur database time which can lead to wrong judgement.. bt if u r not dealing with database at dat time u can also use local time depending on ur requiremnet
regards
palak
2008 Oct 21 4:04 AM
2008 Oct 21 4:07 AM
The only difference is local and global applicability.
The ABAP runtime environment clock is synchronized with the database server clock at regular intervals in order to calculate the local time of the SAP system. During the synchronization process, the ABAP runtime environment clock is set to the database server clock. Because this happens on all application servers in an SAP system, the ABAP runtime environment clock is synchronous with the clocks on all other application servers and with the database system clock, and thus shows the local time of the entire SAP system. The time zone on which the local time of an SAP system is based is the only entry in the database table TTZCU
~As found in forum.
2008 Oct 21 4:11 AM
Hi,
The following system fields are always set automatically. The GET TIME statement synchronizes the time on the application server with the time on the database server and writes it to the field SY-UZEIT. SY-DATUM and the system fields for the local timezone (SY-TIMLO,SY-DATLO, and SY-ZONLO) are also reset.
SY-DATLO
Useru2019s local date, for example 19981129, 19990628, u2026
SY-DATUM
Current application server date, for example 19981130, 19990627, u2026
SY-TIMLO
Useru2019s local time, for example 154353, 225312, u2026
SY-UZEIT
Current application server time. for example 164353, 215312, u2026
Regards,
Saba
2008 Oct 21 7:22 AM
hi
it does depend on ur requiremnet..
bt it is still better to use global time coz it is the time by which ur database is working.. and sometimes when u use local time it doesnt match with ur database time which can lead to wrong judgement.. bt if u r not dealing with database at dat time u can also use local time depending on ur requiremnet
regards
palak
2008 Oct 21 7:33 AM
Hi Palak,
can you explain me by giving some examples for "bt if u r not dealing with database at dat time u can also use local time depending on ur requirement".
Regards,
Anil
2008 Oct 21 8:11 AM
with ref to the above "bt if u r not dealing with database at dat time u can also use local time depending on ur requirement".
I mean example like any database tables ref:CDHDR (change document header) .
Regards,
Anil
2008 Oct 21 12:37 PM
Hi anil,
SY-DATUM, SY-DATLO,SY-UZEIT,SY-TIMLO are system fields which gets filled automatically when a program is executed.It completely depends what is the requirement of your program and what data you want..Generally we go for global dates and time.
-Luck,
Bhumika
2008 Oct 22 3:00 AM
closing thread.
Refer u201COSS notes 551368 - FAQ: Time zones in FI documentsu201D
2008 Oct 22 3:03 AM
refer 'OSS notes 551368 - FAQ: Time zones in FI documentsu201D