Open Source Blogs
Immerse yourself in SAP open source! Discover collaborative projects, insights into the latest technologies, and best practices in open source development.
Showing results for 
Search instead for 
Did you mean: 



What is a serverless function?

Serverless functions are single-purpose, programmatic functions that are hosted on managed infrastructure. These functions, which are invoked through the Internet, are hosted and maintained by cloud computing companies.


Benefits of serverless functions:

  1. Ensures quick deployments following a functional approach

  2. Enables scaling independent of the core applications

  3. Gives a possibility to revert changes without causing production system downtime

  4. Supports the complete asynchronous programming model

  5. Offers loose coupling of Event providers and consumers

  6. Enables flexible application scalability and availability


  • Your SAP S/4HANA systems may come with limited primary memory which does not allow all the extensions you need to be delivered from the SAP S/4HANA systems.

  • Using serverless functions, you can create such extensions without increasing memory consumption and code base of S/4HANA systems.

Implementation Steps:

This blog post demos the usage of Serverless Function which was done in a Proof of Concept for getting the Geocodes of a location based on its address components entered by the user in Business Partner Transaction and updating it in an SAP S/4HANA database.


We are going to follow the sequence of steps listed below. However, if you have already completed some of steps, you can skip them.

  1. Kyma Environment setup

  2. Creating first serverless function in Kyma

  3. Creating trigger and running it on the browser

  4. Integrating it with SAP S/4HANA system



  1. Access to SAP BTP Cockpit
    You need access to a productive account of SAP BTP Cockpit
    This service is available in Trial version of SAP BTP Cockpit

  2. Node.js/JavaScript
    Functions are written in JavaScript for Node.js runtime.
    As such, some knowledge is helpful, however, most of the tutorials can be followed without any knowledge.

  3. ABAP


In this blog post you will learn…

How to Setup your Kyma Account in SAP BTP Cockpit

(If you have already completed setup of Kyma Environment  please visit  Here  for next Steps)

Kyma Environment Setup


Step 1: Configure Kyma Runtime Environment.

Open this link to enter your SAP BTP Account:

  • In the left side menu, click on “Entitlements” button.

  • Enter “Kyma” in the search bar and check whether you have the required entitlements.

If you don’t have the required entitlements, then you need to add them by following the steps below:

  • Click Configure Entitlements.

  • Press Add Service Plans button to add the ‘Kyma Runtime’ entitlement to your list of entitlements.

  • Search for “Kyma”, click the trial checkbox and click on Add Service Plan button on the right.

  • Click Save.

  • Go to Overview tab on left-hand-side. You should see a tab named Kyma Environment.

Step 2: Enable the Kyma environment

  1. Click Enable Kyma to activate the Kyma environment.

  2. In the dialog box, enter the name of Cluster and press Create button.

Note: This step runs as a Background Process to create a new Kubernetes cluster which is being set up. The new cluster contains Kyma runtime and all its components that it will run on. This setup step might take up to 60 mins, so do not worry if you see no action on screen for an hour!

  1. After the Cluster is created, the below screen will appear where you can see your Kyma environment setup with a Name and Console URL.

Step 3: Assigning User to Role Collection

After Kyma runtime is enabled, the next step is to give your user access to the Kyma console UI.  Two different role collections are already created for you in the process of Kyma runtime activation. You just need to assign your user to one or both collections.

The role collections available to you are:

  • KymaRuntimeDeveloper role collection with the KymaRuntimeDeveloper role assigned

  • KymaRuntimeNamespaceAdmin role collection with the KymaRuntimeNamespaceAdmin role assigned

  • On the left navigation panel, click on Security tab and then on Role Collections.


  • Click on the KymaRuntimeNamespaceAdmin role collection to see the details of the role.




  • Press Edit button to assign your user to this role collection.

  • In the Users section, add your user in the KymaRuntimeNamespaceAdmin role. Provide the email address in the ID field.


  • Click  to add the user to the list.

  • Save changes by clicking the Save button.


  • You will see that you have successfully given your user the necessary roles.


In this blog post we saw about

  • What are serverless functions and need of serverless function.

  • SAP BTP Cockpit and how to create your Kyma Workspace in SAP BTP Cockpit.

Next Steps: 

We are going to see:

how to Create serverless function and deploy them using Kyma

how to  Integrate the Kyma serverless function in any SAP S/4HANA applications

For any queries and doubts please comment in comment section I will be more then happy to help you, also you can follow my profile to get updated of new blogs posts.
1 Comment
Top kudoed authors