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 Stored Procedures

Leveraging SQLScript in Stored Procedures, User Defined Functions, and User Defined Libraries

Overview

🎓 intermediate 15 min. SAP HANAIntermediateSqlSAP HANA CloudSAP Business Application Studio

You will learn

  • โœ”How to create a small procedure get_po_header_data with two implicit SELECT queries
Rich Heilman R Rich Heilman December 2, 2022
Created by February 1, 2021
Contributors

Prerequisites

Prerequisites

Steps

Step 1 Import Tables & Data
โ€”

  1. If you have not done so yet, create a new HANA Database Project in the SAP Business Application Studio. For more information about how to do this, complete step 1 from the Create an SAP HANA Database Project tutorial.

  2. Next, download the data.zip file from here. We will use predefined tables with sample data for all of the SQLScript tutorials in this group.

  3. Right click on the src and choose Import Project, choose the data.zip file that you have downloaded.

    Data.zip
    Data.zip

  4. The imported files should now show in the newly created data folder.

    Imported Files
    Imported Files

  5. In the SAP HANA Projects section, click the Deploy button.

    Deploy
    Deploy

  6. You will then see the deployment log.

    Deployment Log
    Deployment Log

  7. Next, open the Database Connections folder, and click the Open HDI Container button.

    Open HDI Container
    Open HDI Container

  8. The SAP HANA Database Explorer will be opened, click on the Tables folder, and view the database tables that have been created.

    Tables
    Tables

Step 2 Create New Procedure
+
Step 3 Add Code and Deploy
+
Step 4 Run Procedure and Check Results
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Import Tables & Data 2. Create New Procedure 3. Add Code and Deploy 4. Run Procedure and Check Results

Learn more →