AMDP Function and CDS Table function
With 7.5 release, SAP introduced AMDP functions alongside AMDP procedures.
This is how it works-
- Naming convention- AMDP stands for ABAP managed database procedure. So, what is AMDP procedure? AM procedure procedure. What is AMDP function? AM Procedure function ?
- AMDP functions are implemented in ABAP global class as a method. So, can you call it from other ABAP methods or programs? Answer is No. AMDP functions cannot consumed by ABAP directly.
- AMDP functions can be consumed via CDS table functions
- CDS table functions are implemented using AMDP functions
- CDS table functions can be consumed by CDS Views
- CDS table functions can be consumed by ABAP
- How to create this? First create DDL source for -CDS Table function leaving IMPLEMENTED BY section. Now create AMDP function. Now come back to CDS table function and complete IMPLEMENTED BY section. You have to follow this order.
- One more thing- CDS Views are supported on all databases but CDS table functions are supported only HANA.
Note: By the way i am really happy with CDS Views and their integration with ABAP, Fiori, Analytics..Great Job SAP 🙂
why do You think is not possible consume AMDP via ABAP?
Note i am not talking AMDP Procedure but rather about AMDP function. It is not possible to consume AMDP functions in ABAP directly. So ABAP developers need to access those indirectly via CDS Table Functions or CDS views
Scalar return AMDP function method can be called directly from an ABAP report. In the case of table return function, your statement is right it needs a CDS Table Functions and in ABAP objects you can consume only that CDS Table functions.