Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
martinfrick
Product and Topic Expert
Product and Topic Expert







Important Links


General

SAP BTP, Cloud Foundry Runtime scenario

SAP BTP, Kyma Runtime scenario



Sustainable SaaS (SusaaS) sample application


Inspired by a recent partner co-innovation project with The Boston Consulting Group (BCG), this is the first post of a series on building a multitenant Software as a Service (SaaS) application on SAP Business Technology Platform (BTP) using CAP and the SAP BTP, Cloud Foundry Runtime.

The use of the Cloud Application Programming Model (CAP) in the Cloud Foundry environment is the scenario's main focus. If you are interested in building Multitenant SaaS applications on SAP BTP using CAP, based on the SAP BTP, Kyma Runtime, please check the following blog post.

In addition to this introduction and overview blog, three more posts on dedicated technical follow-ups are available.

We highly suggest checking out the GitHub repository supplied alongside this article. It includes detailed instructions for setting up the multitenant SaaS sample application described in this post in your personal SAP BTP environment. Please be aware that the Expert Features are still WIP so the GitHub repository and relevant documentation parts will be further improved. Okay, let’s keep the introduction brief and start right away with some history!

A tiny history of Software as a Service


In the beginning, the SAP space was formless and empty, and darkness covered everything. So, on the third day SAP created the Business Technology Platform and a place for Cloud development was born.

As a result, developers in prehistoric tribes all over the world began to learn about SAP BTP and the benefits it provides to humanity. The first applications were created in Pangaea's many regions, such as eu10 and ap20. As the new SAP world was discovered by more and more indigenous people, incredible developments like SAP HANA Cloud and SAP Integration Suite were made available.

As time went on, even the wisest and oldest chiefs embraced SAP BTP as an established “fireplace” to gather around and code the newest applications, but there was one question that kept coming up, more loudly each time.

If a clever team from one tribe creates a helpful new product on SAP BTP, why not make a mint selling it to others who are willing to pay a monthly price for the new technology but may lack the time or abilities to do things themselves?

At this point, the concept of "Cave solutions as a Service" emerged. Since its inception, this concept and SAP BTP have developed, and these kinds of solutions are now known as "Software as a Service."

Software as a Service in an SAP BTP context


This historical context will help explain why today's blog post on the enigmatic and mythical subject of creating multitenant "Software as a Service" (SaaS) applications on SAP BTP is so important for our customers and partners.

While many SAP customers are already using the SAP Business Technology Platform for developing SAP-related enterprise applications or extensions, most tribes continue to keep them hidden in their own technological caverns. As in the traditional On-Premise world, innovations and useful tools are developed by customers and partners and deployed to environments that only dedicated employees or teams are allowed to access. This makes some people happy, but we all know that happiness is the only thing on earth that grows when shared, thanks to Albert Schweitzer.

So why not let other teams and tribes around the globe make use of development efforts and fantastic new solutions – and of course (yes - nothing has changed since we sat around the fire) – charge them a fair price for the use? Particularly for developments that don’t disclose any proprietary tribe secrets or confidential cave systems but provide fair value to other hunters and gatherers.

Today, a subject that was not given much attention in the community during the early days of SAP BTP is receiving a lot more. Software as a Service (SaaS) apps are being published on the SAP Store by an increasing number of SAP partner and customer tribes. Specialized frameworks are built to enable partners in publishing and commercializing their own SAP BTP solutions, particularly with cross-tribe initiatives like SAP Industry Cloud.

It does not matter if you are a lone warrior or a member of an established tribe. Whether you already have an SAP BTP solution helpful for other businesses or are working on an innovative idea that might wind up in a SaaS product - this technical blog series and the included GitHub sample repository will give you a solid introduction to get started!

Multitenant SaaS applications on SAP BTP


Let us have a quick recap, to make sure everyone is on board! What is the general concept behind multitenant SaaS applications, and why is SAP BTP a great foundation for the creation of fresh innovations?

Most of us are familiar with Software as a Service from a B2C (Business to Cave) perspective, looking at consumer applications like Dropbox, Office365, or Adobe Cloud. A vendor creates, maintains, and sells subscriptions of a standardized, reusable piece of software to thousands of consumers.






F. Flintstone - “Thousands of consumers? - Reminds me of the big fire-sale after the brilliant invention of firestones in the early days ante firestone (A. F.)!”

A SaaS product that is well-designed and has low TCO benefits both parties. Particularly when technological resources like storage, compute units, and memory are shared among multiple customer tenants (multitenant). As a result, the marginal costs of integrating a new tribe are minimized because savvy tribes can sell the same good to an almost infinite number of nearby caves without making any changes. By doing this, customers can enjoy a price that is far lower than that of a standalone, self-hosted service.


Evolution of Software as a Service


Although the concept of "Software as a Service" is nothing new and has been around for a while, it was not always simple to create SaaS apps. Fortunately, things have improved since the days of murky, cryptic wall murals, which date back to when our ancestors taught their offspring how to create SaaS applications. Visit the Get the idea of a SaaS application documentation of the related GitHub repository to learn more about IaaS, PaaS, and SaaS. For now, let us assume you are familiar with the SaaS basics and have a look at the SAP BTP example.

Many SAP BTP clients utilize SaaS products from SAP such as SAP Integration Suite, SAP Analytics Cloud, SAP Data Warehouse Cloud, or SAP Event Mesh. Due to the increasing demand from partners and customers, SAP has improved its development tools for interested developers out there yearning for innovation, by offering services like SAP HANA Cloud or SAP Event Mesh for multitenant use, or by giving developers access to libraries and frameworks to create their own SaaS applications.

This blog post series (heavily influenced by ancient experts and contemporary witnesses) will focus on the Cloud Foundry environment and demonstrate how to create your own SaaS application by utilizing SAP BTP standard tools and libraries like:

  • The CAP framework, which provides SaaS-related libraries and functionality out-of-the-box

  • SAP HANA Cloud, a perfect database fit for a multitenant SaaS application

  • API features of SAP Integration Suite that allow you to manage and monitor your SaaS APIs

  • SAP Fiori Elements as a dynamic but standardized user interface technology

  • the user management features of SAP Identity Authentication Service

  • and a ton more!


In our example, we will demonstrate how simple it is to share powerful but pricy resources like an SAP HANA Cloud database among several tenants. With each new customer, this will lower the cost of services, simplify maintenance, and increase the profitability of your SaaS application.

Software as a Service advantages of SAP BTP


While there exists a plethora of platforms and environments that may be used to create new applications, SAP BTP is a wonderful option for creating SaaS solutions within the SAP ecosphere for several reasons. Before providing you with a brief summary of the SaaS solution built in this blog post series, let us at least discuss some major differentiators, even though wise men from the early days would not recommend anything else.

  • SAP SaaS offerings


SAP BTP provides a very simple onboarding process for non-SAP developers to SaaS development tools and concepts, as demonstrated by a recent partner collaboration with The Boston Consulting Group (details available soon). The first prototype of your application can be up and running in no time thanks to well-established frameworks like CAP and services like SAP HANA Cloud designed to streamline the procedures of developing SaaS apps.




  • SAP integration scenarios


SAP BTP is the recommended platform for building integration scenarios for SAP solutions. Whether you want to connect to cloud solutions like SAP SuccessFactors or need a link to an on-premise system like SAP S/4HANA, your integration will run safely and smoothly thanks to services like SAP Cloud Connector and SAP Private Link. All things considered, using SAP BTP to build and host your SaaS solution will give your users significant freedom when connecting their own SAP products to your SaaS application.




  • SAP BTP services


SAP Event Mesh and SAP Integration Suite are just two samples of SAP BTP services made to work with and complement other SAP products. There are numerous connectors and out-of-the-box content that will make your job as a developer easier if your SaaS offering is intended to work with other SAP solutions. Combining enterprise capabilities like Application Logging, Autoscaling, Alert Notifications, CI/CD, and Custom Domain service, flawlessly linked with development frameworks like CAP, you will be able to kick-start your project.




  • SAP-certified applications


As a partner, you can get your multitenant SaaS application certified by SAP and sell them in the SAP Store. As the one-stop shop for the latest SaaS solutions, your software will be featured here among other outstanding developments. An SAP-certified application will give your clients confidence in the reliability and features offered by your solution and let them know that it was developed using SAP best practices.




  • Hyperscaler agnostic


Your multitenant SaaS application can be deployed with a minimal additional effort to environments like Google Cloud Platform, AWS, and Microsoft Azure giving you the greatest flexibility to choose among various hyperscalers.




  • Multi-Region deployment


If required, your SaaS application can be set up in a variety of different geographical locations. This enables minimal local latency and adherence to local requirements or regulations your SaaS customers might have.


These are just a few of the benefits of creating SaaS solutions on SAP BTP. By deploying an example application to your own SAP BTP account using Free (Tier) services in just a few minutes, you will discover in future posts how simple it is to get started with your own SaaS solution. A SaaS application? – Using SAP BTP Free (Tier) services? – In a few minutes? – That seems impossible! We will demonstrate why it is not!

Software as a Service sample use-case


Before exploring some architecture details and the different application versions, let’s have a brief look at what this simple SaaS product will look like once deployed to your own SAP BTP environment.

Based on the latest partnership news between SAP and BCG on the topic of sustainable enterprises (details available soon), the application developed in this series provides a sample SaaS sustainability solution. The idea is to give SaaS subscribers the ability to examine the sustainability facets of their products, such as circularity measurements, sales-related key figures, or recycling data related to raw materials.

The sample application allows subscribers to create Projects to which an Administrator can assign Members to. Members can then create Assessments related to certain products and review sustainability indicators like material, recyclability, and sales data.








Sample App - Main menu



Sample App - Sustainability Assessment



Even though the application doesn’t make any sustainability recommendations, it will still give you an idea of how simple it is to develop solutions and innovations for in-demand topics, especially if your app is built on common data available in well-adopted SAP solutions like SAP S/4HANA or SAP ECC.








Sample App - In-App User Management



Sample App - Project Member Management



The sample SaaS application is built in a way that handles user management and role assignment within the application itself, avoiding the need for access to the SAP BTP platform. Additionally, using the SaaS APIs, subscribers can push data from their own SAP systems like SAP S/4HANA. The required sample data is available in NetWeaver systems containing the so-called Enterprise Procurement Model (EPM). This allows you to import e.g., Sales and Product data in an automated fashion.








Sample App - Prefill with SAP S/4HANA data



Sample App - Prefilled assessment



As you can see in the screenshots, this data can then be loaded into the application to prefill the product-related assessments. The data can also be kept up to date within the SaaS application or uploaded using basic POST requests if you don't have access to an SAP system.

With these solution screenshots in mind, let’s look under the hood of the sample project in the next chapter.

Software as a Service sample architecture


The application created for this series of blogs and made available in a GitHub repository includes many of the components and functionalities needed for an SAP BTP SaaS architecture. You will deploy the sample solution in accordance with SAP best practices to your personal SAP BTP global account and generate new subscriber tenants by creating subscriptions in additional subaccounts.

You can get a sense of what to anticipate while implementing the entire scenario from the solution diagram below. While the most important artifacts have been highlighted, we highly recommend getting detailed architecture insights and learning more about the various solution components by visiting the related documentation in our GitHub repository (click here).

Sample SaaS Application Architecture


As you can see, the architecture contains a lot of exciting SAP BTP services, and the great news is - almost all of the components used in the scenario offer Free Tier service plans! So you can start your free exploration journey today using your own Pay-As-You-Go (PAYG) account in SAP BTP! If required, the Tutorial Navigator offers a great step-by-step guide on how to set up a free PAYG account. While we highly recommend a PAYG or CPEA account to accomplish the full end-to-end scenario, the whole use case can also be discovered by all SAP BTP Trial developers. It allows you to get a feature-packed SAP BTP SaaS application up and running within minutes! Last but not least, even most of the Expert Features topics can be set up using either Free Tier or Trial service plans! 

The Basic Version that contains the majority of features and lets you run an end-to-end SaaS application in your own SAP BTP environment (PAYG, CPEA or even Trial). An SAP HANA Cloud-based database layer, a Node.js service layer that is built as a CAP application, and a Fiori Elements user interface are included. In addition to the usage of numerous enterprise-ready services like Autoscaling, Logging, and Alert Notification, this Basic Version also includes a multitenant SaaS API. It enables subscribers to upload data to their tenant database container instances. The Basic Version is also important for those of you who are interested in automation. It provides intriguing puzzle pieces for tenant onboarding, including the creation of sample destinations, routes, and users as well as the registration, and deployment of API service broker instances.

The Advanced Version can be developed using an SAP BTP Pay-as-you-Go (PAYG) or CPEA account and includes components like SAP Identity Authentication Service (SAP IAS) for sophisticated security and user management. The Advanced Version enables your subscribers to onboard users without SAP Cloud Identity (S/P-users) credentials. You will also learn how to monitor and limit API traffic from a provider perspective, as well as how SaaS subscribers can set up push scenarios in source systems like SAP S/4HANA utilizing the multitenant SaaS API.

The Expert Features cover a wide range of topics, simplifying the development process for your SaaS application. These Features will enable you to take advantage of our most recent partner collaboration experiences, from the use of SAP Continuous Integration and Delivery and SAP Cloud Transport Management service for continuous deployment of your app to the management of your subscriber database containers. You will learn about multi-region deployments of your SaaS application and how to tackle topics like Custom Domain usage. The Expert Features will summarize it all and serve as the location for any further information and updates to the sample application.

After visual and technical insights on the outcome of this series, let us finish today’s story with some key differentiators compared to existing SaaS examples in the SAP BTP ecosphere.

Sample solution key differentiators


Although this sample application is undoubtedly not the first publication about SaaS application multi-tenancy, the following features set it apart from other rock paintings, blogs, and samples on creating SaaS apps on SAP BTP:

- Partner-validated based on the SaaS sample code and supported features

- Usage of standard frameworks (e.g., CAP, Fiori Elements) and tools (e.g., SAP API Management)

- Advanced security and central user management using SAP Identity Authentication Service

- Integration pattern besides SAP Cloud Connector based on a multitenant SaaS API

- Inclusion of various enterprise readiness features for a reliable SaaS application

- Samples for the automation of the consumer tenant onboarding process

- Advanced scenarios like multi-region deployment and custom domain challenges

- Using the latest SAP multitenant libraries (mtxs) and providing a shared database container sample

Summary and conclusion


Regardless of your level of SAP BTP knowledge or your level of familiarity with Software as a Service, this use-case aims to meet all target audiences. Nevertheless, the more you already know about SAP BTP, the simpler it will be for you to comprehend what is going on behind the scenes.

Therefore, we suggest you deploy the Basic Version to your environment and delve deeper into the Advanced Version and Expert Features once you are well-versed in how to use the Basic Version services and are familiar with the SaaS-related CAP features. On the other hand, if you're brand-new to SAP BTP, take your time and carefully review the Basic Version that has been provided before looking at the Advanced Version or Expert Features!

Overall, we are confident that you won't regret setting up the sample scenario yourself. Who knows? Maybe your own SaaS application will turn out to be the next big thing in the SAP Store!

To learn more about how SAP BTP is helping partners and businesses succeed, also check out the "Accelerating Innovation and Time to Market with SAP BTP" article, some recent partner success stories or, if you’re interested in SAP BTP software partnership opportunities with SAP, please visit SAP PartnerEdge, Build for more information.

Finally, at the end of this blog post, let me express a special thanks to all involved BCG colleagues and the whole SAP team with alperdedeoglu, uklasing, ajitkpanda, anirban.majumdar and james.rapp for contributing to this blog post, doing the end-to-end validation and providing the related sample application in GitHub. 

Further information


The development of SaaS apps has gained a lot of attention in recent years, and as a result, there are several additional resources and blogs that are both highly informative and useful. Check out a few of them below to find out more!

Co-Innovation project with The Boston Consulting Group

Circelligence by BCG: Innovate in the circular economy on SAP BTP

SAP Help

Developing Multitenant Applications in the Cloud Foundry Environment

Multitenancy in the ABAP Environment

SAP Discovery Center

Develop a Multitenant Extension Application in SAP BTP, Kyma Runtime

Extend a Kyma Based Multitenant Application With Day 2 Operations

Enrich a Kyma Based Multitenant Application with Additional Identity Features

SAP HANA Academy

SAP Business Technology Platform - Multitenant Business Applications

GitHub Repositories

https://github.com/SAP-samples/btp-cap-multitenant-saas

https://github.com/SAP-samples/btp-cf-multitenant-extension

https://github.com/SAP-samples/btp-kyma-multitenant-extension

https://github.com/SAP-samples/btp-kyma-day2-operations

Blogs

Fundamentals of Multitenancy in SAP BTP

Develop a Multitenant Extension Application in SAP BTP, Kyma Runtime

Develop and Register Multitenant Application to the SAP SaaS Provisioning Service on the SAP BTP

The hidden life of ServiceManager handled containers

Getting your head into Cloud Application Programming model multitenancy
10 Comments