This video is a tutorial on handling client dependencies in CDS table functions in SAP. Here’s a summary of the key points:

  1. CDS Table Function: The presenter explains that when creating a CDS table function, there are two parts: the CDS entity where the function is defined, and the AMDP function implementation where the function is implemented in the AMDP class using SQLScript.
  2. Client Dependency: The presenter explains that by default, a CDS table function is client-dependent. However, it can be made client-independent using the annotation @ClientHandling.type. The presenter explains that the inherited client handling type is invalid for CDS table functions.
  3. Client-Dependent CDS Table Function: In a client-dependent CDS table function, the first field of the return table must be of type clnt. This field is used for implicit client handling and is not part of the final result. The presenter demonstrates this by creating a client-dependent CDS table function and showing that the client field is not included in the final result.
  4. Client-Independent CDS Table Function: In a client-independent CDS table function, the client field is not mandatory and can be omitted. If included, it acts as a normal field in the return table. The presenter demonstrates this by creating a client-independent CDS table function and showing that the client field is included in the final result.
  5. Performance Considerations: The presenter explains that it is recommended to pass the client field as a parameter in the SQLScript code for performance reasons. This is because the AMDP function runs directly on the database and does not go through the application server. By passing the client field as a parameter, the function only retrieves data from the specified client, which can improve performance.
  6. Demonstration: The presenter demonstrates how to use client-dependent and client-independent CDS table functions. He shows how to pass the client field as a parameter, how to use the client field in a SELECT statement, and how to display the retrieved data.

Leave your comment

Your email address will not be published. Required fields are marked *