ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Date and Time Processing →  Character-Like Date Fields and Time Fields → 

Validity of Character-Like Date Fields and Time Fields

Character-like date fields and time fields of the types d and t can contain any alphanumeric characters.

The ABAP runtime environment checks the validity at the following points:

No checks are generally made on other assignments to character-like date fields and time fields not mapped to assignments of of numeric values, nor to other operand positions. As a consequence, invalid values are produced easily by character-like date fields and time fields, and then processed further.

Initial Value of Character-Like Date Fields

The initial value "00000000" of the data type d and the date 01.01.0001 have a special part to play here.

1 is the smallest number that is converted to a valid date, 02.01.0001, when assigning to a date field of type d. Assignments between valid character-like date fields and numeric fields can be reversed only from this date.

In lossless assignments, invalid values in source fields raise exceptions instead of producing the value 0 or "00000000". Here, the value "00010101", which is really part of the value range, is considered as invalid, while "00000000", not actually part of the value range, is considered to be valid. This means that the initial value "00000000" can be used by lossless assignments and all valid assignments between character-like date fields and numeric fields can be reversed.

Note

The validity of the content of character-like date fields and time fields must be verified before they are accessed.