SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Create an ABAP Managed Database Procedure (AMDP) and Analyze Its Performance

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).

Overview

🎓 intermediate 45 min. ABAP DevelopmentIntermediateSAP NetweaverSAP BTP ABAP EnvironmentSAP Business Technology Platform

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
Julie Plummer J Julie Plummer March 21, 2023
Created by March 9, 2023
Contributors

Prerequisites

Prerequisites

Steps

Intro

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

  1. Select your project. From the context menu, choose New > ABAP Package.

    Image depicting step2-package
    Image depicting step2-package

  2. Enter a name and description for your package, then choose Next.

    Image depicting step2b-package-name
    Image depicting step2b-package-name

  3. Create or assign a transport request and choose Finish.

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 `main` of the interface if_oo_adt_classrun
+
Step 8 Check your code
+
Step 9 Format, save, activate, and test your code
+
Step 10 Set the Run configuration to ABAP Console
+
Step 11 Open the AMDP tab
+
Step 12 Test yourself
+
Step 13 More Information
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 13
1. Create an ABAP package 2. Create an ABAP class 3. Add two interfaces 4. Create structures and table types 5. Add method definitions 6. Implement get_flights 7. Implement the method `main` of the interface if_oo_adt_classrun 8. Check your code 9. Format, save, activate, and test your code 10. Set the Run configuration to ABAP Console 11. Open the AMDP tab 12. Test yourself 13. More Information

Learn more →