Application Development 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: 

SY-DATLO

Former Member
0 Kudos

We have a problem who occurs on weekend period. We have used debug to find out that the field value of sy-datlo was the source of problem. On Saturday and Sunday the value of the field sy-datlo is set to next Monday. How can this append.

Best Regards,

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Is your time zone set up correctly?

f1 help.

<i>

Field:SY-DATLO

Definition

Local date, based on the local time zone of the user.

Notes

In the following cases, it is not possible to calculate the local date:

The time zone is not maintained in the user master record

or

The time zone in the user master record is invalid

or

Time zones are not active (table TTZCU).

If any of these cases occurs, the system date (SYST-DATUM) is returned.

ABAP system field documentation

Return ->

ABAP Editor

</i>

Regards,

Rich Heilman

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Is your time zone set up correctly?

f1 help.

<i>

Field:SY-DATLO

Definition

Local date, based on the local time zone of the user.

Notes

In the following cases, it is not possible to calculate the local date:

The time zone is not maintained in the user master record

or

The time zone in the user master record is invalid

or

Time zones are not active (table TTZCU).

If any of these cases occurs, the system date (SYST-DATUM) is returned.

ABAP system field documentation

Return ->

ABAP Editor

</i>

Regards,

Rich Heilman

Former Member
0 Kudos

Where did this happen? Is it a job that failed or is it some program that failed?

SY-DATLO is local date, based on the local time zone of the <b>user</b>. If something goes wrong with this, it is the timezone.

But the way you described, it looks like you are having this problem in a job, and it looks like the job is running only on weekdays based on calendar. If this is the case, check the job definition. There should be a calendar used there and that calendar might have Saturdays and Sundays marked as holidays.

Please give us some more information as to where you see this problem.

Srinivas

Former Member
0 Kudos

See OSS 481835 . It has a lot of info which will help you .

Also on Sunday ( for some time period) it may be possible that SY-DATLO points to Monday , depends on logon user and his time zone. But saturday is something

which is strange .

Cheers