RAP_CDS_ODATAadvanced
AMDP
Learn ABAP Managed Database Procedures as a controlled way to execute SQLScript on SAP HANA from ABAP. Focus on AMDP methods, table functions, pushdown use cases, lifecycle, testing, performance evidence and the situations where simpler Open SQL or CDS is the better choice.
Overview
Learn ABAP Managed Database Procedures as a controlled way to execute SQLScript on SAP HANA from ABAP. Focus on AMDP methods, table functions, pushdown use cases, lifecycle, testing, performance evidence and the situations where simpler Open SQL or CDS is the better choice.
Lessons in this topic
- AMDP Part 1: SQLScript and Code PushdownUnderstand AMDP and code pushdown: what an AMDP is, how it relates to CDS and ABAP SQL, when database procedures are justified, and which rules apply to every AMDP.
- AMDP Part 2: Create Your First AMDP MethodCreate a working AMDP class and method in ADT, write SQLScript with input/output parameters, call it from ABAP, and understand when the database procedure is generated.
- AMDP Part 3: Procedures, Functions and Table Function ImplementationsKnow the three kinds of AMDP methods — procedures, scalar/table functions and CDS table function implementations — their syntax, how they are called, and when to use each.
- AMDP Part 4: Parameters, Internal Tables and Client HandlingPass data correctly between ABAP and SQLScript: allowed parameter types, internal tables as input, table variables, NULL and type differences, and safe client handling for tables and CDS views.
- AMDP Part 5: Debugging, Testing and Performance AnalysisTroubleshoot AMDP across two runtimes: debug SQLScript in ADT, analyze runtime errors, test AMDP logic with ABAP Unit, and find performance bottlenecks with SQL trace and HANA plan analysis.
- AMDP Part 6: AMDP in Clean Core and ABAP CloudUse AMDP responsibly under clean core: what ABAP Cloud allows (C4-released objects, own objects), what to avoid on-premise, and how to design AMDP so it survives upgrades.
Interview questions covered
- You inherit 25 AMDP classes. What do you review?
- How do you pass internal tables to an AMDP and handle client and NULL values correctly?
- What are the key clauses you expect in a basic HANA AMDP method and what does each one do?
- A report is slow because it aggregates millions of rows in ABAP. Would you move it directly to AMDP?
- What is AMDP, and where does it fit among the code pushdown options?
- Three AMDP procedures contain the same SQLScript block with slight differences, and reports show inconsistent numbers. What do you do?
- A nightly job calling an AMDP dumps occasionally with a database error. How do you analyze it?
- What are your design rules for AMDP in a clean-core S/4HANA project?
- A guideline requires all reporting logic in AMDP "for HANA performance". How do you respond?
- Explain the difference between AMDP procedures, AMDP functions and FOR TABLE FUNCTION methods.
- How do you test and tune AMDP code?
- Can AMDP be used in ABAP Cloud, and what are the restrictions?