Create an ABAP Managed Database Procedure (AMDP) and Analyze Its Performance
December 20, 2020
Intermediate
45 min.
Create an AMDP and analyze its runtime performance along with the performance of the executed SQL statements, using the AMDP Profiler in ABAP Development Tools (ADT).
You will learn
- How to create an ABAP class containing an ABAP Managed Database Procedure (
AMDP
) - How to run the ABAP Profiler on this class
Prerequisites
- You have one of the following:
- You have a sub-account with the entitlement SAP Cloud Platform, ABAP environment. For more details, see Getting Started with a Customer Account: Workflow in the ABAP Environment. You have also created an ABAP Cloud Project pointing to this ABAP environment. For more details, see Connect to the ABAP System
- You have a valid instance of SAP S/4HANA on-premise edition, version 1909 or higher. For a free Cloud Appliance Library (CAL) version, of SAP S/4HANA 1909, see SAP S/4HANA Fully-Activated Appliance
- You have installed ABAP Development Tools 3.0 or higher
- You have downloaded or pulled the ABAP Flight Reference Scenario. To pull this reference scenario from
Github
, see Downloading the ABAP Flight Reference Scenario
Throughout this tutorial, objects name include the suffix XXX
. Always replace this with your group number or initials.
You should be familiar with ABAP Managed Database Procedures (AMDP). Briefly, AMDP allows you to optimize your ABAP code (for ABAP on SAP HANA) by calling HANA database procedures from a global ABAP class.
For more details, see ABAP Managed Database Procedures (AMDP): Short introductory blog with two videos and code snippets
Step 1: Create an ABAP package
Step 2: Create an ABAP class
Step 3: Add two interfaces
Step 4: Create structures and table types
Step 5: Add method definitions
Step 6: Implement get_flights
Step 7: Implement the method convert_currency
Step 8: Implement the method `main` of the interface if_oo_adt_classrun
Step 9: Check your code
Step 10: Save, activate, and test your code
Step 11: Set the Run configuration to ABAP Console
Step 12: Open the AMDP tab
Step 13: Test yourself
More Information
-
SAP Help Portal: ABAP Managed Database Procedures (AMDP)
-
SAP Help Portal: Working with the AMDP Profiler
-
ABAP Keyword Documentation: AMDP - ABAP Managed Database Procedures
Navigate tutorial steps
-
Step 1: Create an ABAP package
-
Step 2: Create an ABAP class
-
Step 3: Add two interfaces
-
Step 4: Create structures and table types
-
Step 5: Add method definitions
-
Step 6: Implement get_flights
-
Step 7: Implement the method convert_currency
-
Step 8: Implement the method `main` of the interface if_oo_adt_classrun
-
Step 9: Check your code
-
Step 10: Save, activate, and test your code
-
Step 11: Set the Run configuration to ABAP Console
-
Step 12: Open the AMDP tab
-
Step 13: Test yourself
- Back to Top