SAP

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

Creating Table User Defined Functions

Leverage SQLScript in stored procedures, user defined functions, and user defined libraries.

Overview

You will learn

  • How to transform a procedure to a table function.
Rich Heilman R Rich Heilman August 21, 2026
Created on February 11, 2021
Contributors

More from Rich Heilman

See all 20 tutorials by Rich Heilman →

Prerequisites

Prerequisites

Steps

Intro

There are application and scenarios where you need a table function instead of procedure to leverage the advantage of direct selects on the output, for example, filtering, sorting and grouping. In the following exercise, we show you how you can easily transform a procedure to a table function.


Step 1 Create new function

  1. Use what you have learned and return to the functions folder and create a new function called get_po_counts using the SAP HANA: Create Database Artifact command.

    New Function
    New Function

Step 2 Enter table function code
+
Step 3 Save, deploy, 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 3
1. Create new function 2. Enter table function code 3. Save, deploy, check results
Next