In ABAP we have the following options for storing DATE/TIME values.
DATS: Date field (YYYYMMDD) stored as char(8)
TIMS: Time field (hhmmss), stored as char(6)
TIMESTAMP: DEC 15,0 Counter or amount field with comma and sign
TIMESTAMPL: DEC 21,7 Counter or amount field with comma and sign
Native HANA has Date types
Datetime types | DATE, TIME, SECONDDATE, TIMESTAMP |
None of the ABAP date types above will create a native HANA date type (interesting to know if that will come some time in the future?).
In the mean time, I would be interested to know for custom Z Column store tables, would the older Date & Time (two separate fields) be a better fit for HANA wrt storage and associated compression?
There may be performance benefits to use HANA native date comparisons functions e.g. (ADD_DAYS,ADD_MONTHS,ADD_SECONDS,ADD_YEARS,COALESCE,CURRENT_DATE,CURRENT_TIME....) etc
however as of now, these won't be available to ABAP generated tables or use in CDS views.
Ideally, we want to avoid the need for converting the data type in order to do a comparison, so as expected I can see the DATS & TIMESTAMP equivalent fields in HANA db (NVARCHAR & DECIMAL respectively) just do a simple comparison using their own native data types when queried from ABAP.
Any help appreciated..