This video discusses two methods to sort data in Core Data Services (CDS) views in SAP HANA. It provides a detailed guide on how to perform sorting using a table function and the MAX function.
After watching this video, you will learn:
- The concept of sorting in CDS views: The presenter explains that the ORDER BY clause cannot be used directly in ABAP CDS, so alternative methods must be used.
- How to sort data using a table function: The presenter demonstrates how to create a table function and use the ORDER BY clause within it. This method allows you to sort data in ascending or descending order.
- How to sort data using the MAX function: The presenter explains that the MAX function can be used to retrieve the latest or maximum value from a dataset. This method is useful when you want to retrieve the latest record based on a specific field.
- The presenter also explains that the MAX function should be used with caution, as it may not be suitable for all business scenarios or large data volumes. The presenter suggests testing this method with your data to ensure it meets your business requirements.
- The presenter also demonstrates how to create two separate CDS views, one using the MAX function to retrieve the latest record, and another to retrieve additional information from other tables. This method allows you to retrieve a sorted dataset along with additional related data.
The video is practical and detailed, showing each step at the system level. It is intended for those who wish to learn about CDS Views and how to sort data in SAP HANA.