This video discusses how to handle date functionalities in Core Data Services (CDS) views and table functions in SAP HANA. It provides a detailed guide on how to get the current date for further calculations and how to use different date functions.
After watching this video, you will learn:
- How to get the current date in CDS views and table functions: The presenter explains that there is no specific function to get the current date in ABAP CDS views. However, this can be achieved by using a parameter variable with the `@Environment.systemField: ‘SYSTEM_DATE’` annotation.
- How to use the current date for further calculations: The presenter demonstrates how to use the current date parameter in calculations, such as adding a certain number of days to the current date.
- The presenter also explains how to use different date functions in CDS views and table functions. These functions include `ADD_DAYS`, which adds a specified number of days to a date, and `DAYS_BETWEEN`, which calculates the number of days between two dates.
- How to handle errors when using date functions: The presenter shows how to use the third parameter of the `ADD_DAYS` function to specify what should happen if an error occurs. The possible values for this parameter are ‘FAIL’, ‘NULL’, ‘INITIAL’, and ‘UNCHANGED’.
- The presenter also demonstrates how to use the `CASE` statement to perform conditional calculations based on the current date.
The video is practical and detailed, showing each step at the system level. It is intended for those who wish to learn about date functionalities in CDS views and table functions in SAP HANA.