Skip to Content
Product Information
Author's profile photo Murali Shanmugham

Using SAP Cloud Platform Serverless runtime to build light weight extensions

My first blog post for 2020 and I have lots to share on what’s going on with Extension Factory in SAP Cloud Platform.

For those who are new to this topic, I would recommend you to this blog post “Making development of extensions easier – SAP Cloud Platform Extension Factory”. In short, Extension Factory on SAP Cloud Platform is a cloud-native framework to extend SAP Solutions. It offers several benefits which includes

  • Standardized and secure way to quickly connect with different SAP solutions
  • Central registry to discover and consume all the APIs and events of the registered solutions
  • Deployment of extension applications on different runtimes in the choice of hyperscaler
  • One developer experience across all the SAP solutions

The picture below shows all the components that are part of the Extension Factory are. As of today, the Extension Factory can be used to extend S/4HANA Cloud, SuccessFactors and C/4HANA solutions. The rest of the solutions are in the roadmap. There are also several blog posts which explain the concepts behind CAP/RAP programming models and the Cloud SDK. The focus of this blog post is on the available runtimes and in particular the serverless runtime.

As of today, we have the following runtimes which are available to build extensions.

  • Application Runtime (Cloud Foundry runtimes like Java, Nodejs, etc)
  • ABAP Environment
  • Serverless runtime

There are many blog posts which show how to build S/4HANA Cloud & SuccessFactors extensions using Application Runtime (Cloud Foundry).

As of today, C/4HANA solutions support setting up of a Kubernetes-based runtime in a Bring Your Own License model and installation of open-source project Kyma. C/4HANA customers can subscribe to a Kubernetes environment either in GCP or Azure and deploy Kyma on top of it. To know more about this option, here is a blog post on this topic “Getting Started with the SAP Cloud Platform Extension Factory on GCP“ In the above picture, Kyma runtime is being marked as “Planned Innovation” as there will be an option for customers to obtain a fully managed Kubernetes based environment in SAP Cloud Platform to leverage Kyma. This is in the roadmap.

When you plan to build extension applications for S/4HANA Cloud & SuccessFactors using Application runtime, remember to check the availability in your region.

You will be able to find these services in your subaccount entitlements, only after you register the S/4HANA Cloud or SuccessFactors system in the “Systems” menu of the Global Subaccount. It took me a while to find this.

Extension Factory serverless runtime

Let’s move on to Extension Factory serverless runtime. This runtime has just been made available and as of today it comprises of Functions and OData Provisioning service. More serverless capabilities will be added in the near future. You may recall that Functions as a service was available in beta for a while. This service is now generally available within the Extension Factory. This blog post “SAP Cloud Platform Extension Factory, serverless runtime is GA now!” covers the reason behind the rebranding and how this aligns with the revised strategy for SAP Cloud Platform. An important aspect to point out is that the serverless runtime provides a light weight options to easily extend SAP Solutions. Its based on the same technology standard which will be available in the upcoming Kyma runtime. Hence, customers will have a choice to decide how much of ease and flexibility they want when building extensions and can also port their customizations to the Kyma runtime in the future where they will have more flexibility with additional responsibilities.

There are plenty of blogs which show how to use the functions service in a business scenario context. In this section, I will just walk through the steps to show you how to get started. Since this service is not yet available in trial landscape, I will explain with screenshots so that you get an understanding of how this service can be used.

Assign entitlements:

Ensure that you have the “Extension Factory Serverless runtime” entitlement in your Cloud Found based subaccount.

Create Service Instance:

Within your space, navigate to the Service Marketplace and create an instance for the “Extension Factory Serverless runtime”

Enable Subscription:

Switch back to the subaccount menus and under subscription, enable the “Extension Center”

Before accessing the application, you would need to assign permissions. Navigate to the Role Collection menu under security and create a new role collection with the required roles. In the below screenshot, I have added all the roles related to Functions and OData Provisioning service.

Assign Permissions:

Before accessing the application, you would need to assign permissions. Navigate to the Role Collection menu under security and create a new role collection with the required roles. In the below screenshot, I have added all the roles related to Functions and OData Provisioning

Finally, in the Trust Configuration menu, select your Identity Provider and assign the Role Collection to your user account (email address)

Once the roles have been assigned, you can launch the Extension Center from the subscriptions menu. This will launch the Extension Center in a new window.

In the Extensions menu, click on “New Extension” to launch the wizard.

Select from the available templates. As of today, there are only two templates.  Select the template with function and trigger

Provide a name for the extension and select the nodejs runtime

Provide a name for the function

Select the Trigger type as HTTP or timer and provide a name for the trigger.

Once you have completed providing the details in the wizard, the system will generate a project and will provide you with the below screen where you can customize your extension. You can add multiple functions and triggers and also configure it in such a way that one function can invoke another function too. Notice the availability of Secrets and ConfigMaps. Those familiar with Kubernetes would be excited to see how these underlying capabilities are surfaced in the workbench for the developers to store secrets and name/value pairs.

To know more about the structure of the project and relevance of these files, you can read about it in the SAP Help documentation. May be this a topic for my next blog. To invoke this HTTP trigger-based function, I need to obtain the URL from the respective trigger details

Make a note of the Trigger URL

Access the URL from any browser/REST client to view the output of the function.

I would also like to point you to the github sample codes where you can find lot of sample projects for different scenarios. You can also follow instructions to install CLI’s and deploy functions via command line.

Metrics & Pricing aspects:

SAP Cloud Platform Serverless runtime is available in CPEA (Cloud Platform Enterprise Agreement) contract like most of the other services. You can use the estimator to identify the regions where this service is made available as well as calculate the “capacity units” which is a combination of several parameters like persistence, memory etc. You can click on the “capacity units” link to do the sizing on your own.

In the next blog post, I will cover the another capability available in Extension Factory, serverless runtime – OData Provisioning :  “SAP Cloud Platform Extension Factory now includes OData Provisioning service (Cloud Foundry)

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Pieter Janssens
      Pieter Janssens

      It would be good to have an example which uses a CF destination and I'm confused how dependencies can be used: