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: 
Raja
Product and Topic Expert
Product and Topic Expert

In this blog, I am going to share the list of common questions and answers on SAP BTP. To make it easy, I have categorized it in multiple volumes.

Part 1 — SAP BTP — General Topics 

Part 2— SAP BTP — Application Development, Programming Models and Multitenancy [Current Blog]

Part 3 — SAP BTP — Security 

Part 4 — SAP BTP — DevOps [To be published 21st May ]

Part 5 — SAP BTP — Side by side Extensibility [To be published 28st May ]

This is part 2,  where we will explore questions and answers on Application Development, Programming Models and Multitenancy topics in SAP BTP.

Raja_0-1715073101138.png

 

Q: Can you explain what SAP Cloud Application Programming Model is?

Answer:

SAP Cloud Application Programming Model is

  • not a specific product but a framework, a set of tools, languages and libraries.  
  • It brings together SAP’s own technologies like SAP Business Application Studio, Core Data Services (CDS), SAP HANA and open source technologies like Node.js or Java 
  •  And lets you efficiently and rapidly build enterprise services and business applications in a full-stack development approach 
  • It allows you to focus on your business domain while relieving you from the tedious tasks which are necessary for all the cloud applications.  

The CAP framework features a mix of open-source and SAP technologies such as CDS, SAP HANA, SAP Cloud SDK, Node.js, Java etc.

 

Q: Explain the concept of SAP Core Data Services (CDS).

Answer:

Core Data Services (CDS) is a universal modeling language.

It is a

  • Definition language to create data models and service definitions. 
  • It originated from SAP HANA CDS, then ABAP CDS and now it’s found its way to SAP Cloud Application Programming Model. 
  • It allows you to define database artifacts and service definitions in database or language agnostic way.  
  • CDS compiler converts the declarative statements into runtime artifacts needed for your target environment. For example, CDS view for database artifacts, takes the input from configuration file to identify the database (for example SQLite or SAP HANA) and automatically converts CDS views to database table and so on.  
  • Further, CDS enables you to easily declare your services on top of database model by writing very few lines in declarative way. Based on the configuration provided, CAP automatically converts it to Java based or Node.js based OData service.

 

Q: What is Core Schema Notation (CSN) in CAP? How it’s related to CDS?

Answer:

CSN is a compact JSON representation of CDS models.

Although, CSN is similar to JSON schema, it has much more capabilities to capture complete models and service definitions.  

When we build/compile CDS models, it generates corresponding CSN format.

CSN is ideal and optimized format for sharing model definitions. We can easily generate target models for example OData/EDM interfaces or OpenAPI interfaces or persistence model for SQL/NoSQL from CSN.

Note: CSN is not pronounced each character separately, like “See Es En”, but as “Season”.

 

Q: Explain major components of CAP.

Answer:

Raja_1-1715073144671.png

 

Core Data Services (CDS)

CDS is the data modeling infrastructure, also known as the backbone of the Programming Model, that provides you with the means to capture service definitions and data models. For service definitions and data models, the Definition Language (CDL) is used.

Service SDKs

SAP Cloud Application Programming Model has libraries available for both Java and Node.js, which you can use to provide and consume services through synchronous and asynchronous APIs.

The SDKs include out-of-the-box integration to lower-level platform services, such as authentication and credential-flows or on and off-boarding of SaaS tenants.

Development Tools

SAP provides a holistic web-based development environment called the SAP Business Application Studio, which is equipped and pre-configured with all required tools for CAP development. Besides that, local development in VS Code or Java-specific-IDEs is also supported.

Databases

For the persistency layer of your CAP application, you can choose between several available database options. SAP HANA Cloud is the go-to choice. However, other technologies such as PostgreSQL or SQlite (for local development) are possible.

Frontends

As a fullstack framework, CAP is open to a variety of frontend technologies. SAP Fiori is fully supported, but other UI frameworks such as Vue.js, Angular, or React can be put on top of your service.

Infrastructure

Two stacks are available: Java and Node.js. Deployments are possible to SAP BTP, Cloud Foundry Runtime, or SAP BTP, Kyma runtime.

Platform Services

SAP BTP service can be integrated and consumed through SDKs.

 

Q: What is ABAP RESTful Application Programming Model (RAP)?

Answer:

The ABAP RESTful Application Programming Model (RAP) is an essential element of ABAP Cloud, the ABAP development model for building clean core compliant, cloud-ready business apps, services, and extensions on SAP BTP, SAP S/4HANA Cloud, and SAP S/4HANA.

RAP is the heart of ABAP Cloud for building transactional business apps, services, and extensions.

RAP consists of a set of concepts, tools, languages, and powerful frameworks that help developers to build innovative, cloud-ready SAP Fiori applications, local and Web APIs; and to easily extend SAP standard applications on the ABAP platform, in the cloud as well as on-premise.

 

Q: What is SAP Cloud SDK?

Answer:

The SAP Cloud SDK is a set of libraries that reduce the effort of building applications on the SAP BTP. It abstracts common tasks on SAP BTP so that you can concentrate on your business logic instead of writing boiler plate code. It comes in two flavors: Java and JavaScript/TypeScript.

The SAP Cloud SDK for Java allows us to develop, extend, and communicate with SAP solutions SAP S/4HANA Cloud, SAP SuccessFactors, and many others.

The SAP Cloud SDK for JavaScript helps us build cloud-based apps and extensions to SAP solutions using the power and flexibility of Node.js and its ecosystem.

 

Q: What is OData Service?

Answer:

OData (Open Data Protocol) is an industry-wised accepted standard that defines a set of best practices for building and consuming REST APIs. It allows users to query and update data, and build on web technologies like HTTP, Atom Publishing Protocol (AtomPub), and RSS (Really Simple Syndication).

OData helps applications to focus on business logic without worrying about the various API approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats, query options, etc. It provides guidance for tracking changes, defining functions/actions for reusable procedures, and sending asynchronous/batch requests.

 

Q: Explain the concepts of JSON and YAML?

Answer:

JSON (JavaScript Object Notation) is an open-standard format for data storage and exchange. It employs easy-to-read text to encapsulate data objects, which consist of key-value pairs and arrays. Frequently utilized for web applications to communicate with servers, JSON serves as a versatile data interchange medium.

JSON is fundamentally built upon two key structures:

  • A set of key-value pairs: This is often implemented as an 'object' in multiple programming languages.
  • A sequentially ordered series of values: Most languages interpret this as an 'array'.

An example of JSON:

{

"name":"John",

"age":30,

"car":null

}

YAML is a human-readable data serialization language that is often used for writing configuration files. YAML stands for yet another markup language.

YAML is a popular programming language because it is designed to be easy to read and understand. It can also be used in conjunction with other programming languages.

YAML filenames use the extension .yaml or .yml.

YAML is a strict JSON superset and includes additional features such as the notion of tagging data types, support for non-hierarchical data structures, the option to structure data with indentation, and multiple forms of scalar data quoting.

An example of YAML:

#Comment: This is an example YAML

---

employee:

  - name: raja #firstitem

  - company: sap

 

Q: Can you explain what is SAP HANA Cloud and how it’s different from SAP HANA on-premise?

Answer:

SAP HANA Cloud is a cloud-native implementation of SAP HANA. SAP HANA Cloud is a fully managed database as a service (DBaaS) offering SAP HANA’s in-memory power and performance. That means greater flexibility with independent compute and storage, elastic scale for unpredictable workloads, ease of scalability, and multi-cloud support to connect to your vendor of choice.

SAP HANA is an in-memory, column-oriented, relational database system. When implementing SAP HANA, organizations have the option to choose between on-premise installations and cloud-based deployments. In an on-premise installation of SAP HANA, the system is deployed in the company's own data center or on IT 's infrastructure.

 

Q: What is SAP Business Application Studio?

Answer:

SAP Business Application Studio is a cloud-based development environment available in SAP BTP. It enables us to build applications and extend SAP solutions with a fully integrated and feature-rich environment.

SAP Business Application Studio is based on Code-OSS, an open source used for building Visual Studio Code. Available as a cloud service, SAP Business Application Studio provides a desktop-like experience similar to leading IDEs, with command line and optimized editors.

SAP Business Application provides an excellent experience for developing a solution for SAP ecosystem. It extremely simplifies the developer experience, improves development as well as DevOps operations, and offers better time to market.

Raja_2-1715073144679.png

 

 

 

Q: Can you explain the concept of dev pace in SAP Business Application Studio?

Answer:

In SAP Business Application Studio, a dev space is a development environment with the tools, capabilities, and resources needed for developing your application.

A dev space provides tailored tools and pre-installed runtimes for your business scenario. This simplifies and saves time in setting up your development environment and allows you to efficiently develop, test, build, and run your solution locally or in the cloud.

Each dev space type contains a set of predefined extensions that help improve your experience.

 

Q: What is an SAP Business Application Studio extension?

Answer:

An SAP Business Application Studio extension is a set of tools that help you perform a specific development task. For example, the Java Tools extension provides you with the tools that you need to develop a Java application. The Fiori Tools extension includes the templates, CLI, and code completion required to create an SAP Fiori application.

During dev space creation, you can choose to add additional extensions to the dev space. The additional extensions provide additional tools to supplement the application with additional components for the scenario to your developer environment.

You can also add extensions to an existing dev space.

 

Q: Compared to other development environments, tell me some benefits of using SAP Business Application Studio?

Answer:

  • Provides a managed, preconfigured, hosted environment, optimized for SAP application development.
  • Can be centrally administered with tools, repositories, systems access, and company policies.
  • Offers a set of productivity tools, tailor made for SAP application development.
  • Provides guidance that helps developers to ramp up easily into SAP technologies.
  • Develop applications based on SAP opinionated technologies (SAP UI5, SAP HANA, SAP Mobile Development Kit (MDK), SAP Cloud Application Programming Model (CAP), SAP Fiori Elements, and best practices for application development.
  • Provides a consistent development experience across SAP development technologies.
  • Simplifies technical complexity by describing application logical components (Data Base, services, UI components) rather than files and folders.
  • Integrates with existing SAP solutions, systems, and services.
  • Provides easy access to Visual Studio Code-compatible extensions from open source Open VSX Registry.
  • Full SAP enterprise product support.

 

Q: Explain what multi-target application (MTA) is.

Answer:

An MTA is logically a single application, consisting of multiple related and interdependent parts (called modules) that are developed using different technologies or programming paradigms and designed to run on different target runtime environments, with a single, consistent lifecycle.

These modules can be written in different technologies and deployed to different targets respectively, but they all serve (different aspects of) a particular purpose for the application's users.

 

A module does not necessarily need to be code for execution in a runtime container. Instead, it could contain other artifacts required to make an application run. Consider, for instance, documents to be deployed to a documentation web server, or API metadata to be deployed to an API gateway, or configuration data to be deployed to a central registry.

 

Q: Why MTA applications are used in SAP BTP?

Answer:

A cloud solution usually composed of multiple software modules representing database entities, business logic, backend services, UI layer etc. For example, a typical solution on SAP BTP usually have a HANA module which contains database related artifacts (e.g., calculation views), a backend service (e.g., a CAP or Java or Node.js module), an SAP Fiori Launchpad module and an SAPUI5 module.

Raja_3-1715073144682.png

 

There are couple of challenges that we face with such applications having multiple modules.

Maintain dependencies during deployment

One of the main challenges we face with such application is deployment. If all the modules are built separately and have their corresponding deployment archive file, then we will have to make sure that the dependency is properly maintained during deployment. For example, if Java module is deployed before SAP HANA module, then it will fail because dependencies will not be found.

SAP BTP Service Instance Creation

Another challenge is related to the SAP BTP configurations and service instance creation. For example, if the application is using any SAP BTP services (e.g., Destination service or XSUAA service), then we need to make sure that the service instances are created before deploying the application. Even if service instances are created, the deployment might fail if the service instances are not properly mapped to the application.

Lifecycle maintenance

Lifecycle maintenance of individual modules separately is another big issue. If a module has been upgraded, we need to make sure that in all deployment other modules are using the updated version of each other.

Multitarget application (MTA) helps us to tackle these challenges.

 Multitarget Application (MTA) includes multiple modules of an application together as one single project. These individual modules although serves as building block of ONE application and share the same development lifecycle. However, the individual modules of MTA may be written in different languages. For example, an MTA project may contain:

  • A HANA module where we use HANA dependent language to create calculation views
  • A backend module implemented using SAP Cloud Programming Model
  • Business logics implemented in Java or Node.js or other language
  • SAPUI5 module to implement the UI

These modules can be deployed to different target platforms. For example, HANA module of MTA project may be deployed to SAP HANA Cloud while the other modules are deployed to SAP BTP, Cloud Foundry.

 

Q: Can you explain the role of MTA Descriptor (mta.yaml) in an MTA project?

Answer:

An MTA project has a file called MTA Descriptor (mta.yaml) that contains a list of all the modules and resources (e.g., SAP BTP Services or Environment Variables) and their dependency details. The complete metadata of all the modules and resources are maintained in this mta.yaml file. At the time of deployment, this file is used to automatically create the SAP BTP service instances, and interdependencies of all the modules and resources are maintained without any manual effort.

Raja_4-1715073144686.png

 

Q: What is the role of Connectivity Services in SAP BTP?

Answer:

The SAP Connectivity service provides a connectivity proxy that can be used to access on-premise resources through a Cloud Connector. Through the use of the SAP Destination service, you can retrieve and store the technical information about the target resource (destination) that you need to connect your application to a remote service or system (internet or cloud connector).

 

Raja_5-1715073144690.png

 

Q: What is the Cloud Connector and in which scenarios it is required?

Answer:

The Cloud Connector connects SAP on-premise backends (or even supported non-SAP systems) to SAP BTP subaccounts via an encrypted tunnel.

The connection is bidirectional. From an architectural point of view, the Cloud Connector is a possible single point of failure. For this purpose, there is also the possibility of high availability, monitoring, alerting, and more.

You need to set up the Cloud Connector in your landscape and connect it to your SAP BTP subaccounts. Then, you need to define which system resources are shared. You access resources shared through the Cloud Connector with consuming Destinations.

The Cloud Connector combines an easy setup with a clear configuration of the systems that are exposed to the SAP BTP, letting you use existing on-premise assets without exposing the entire internal landscape and act as a reverse invoke proxy between the on-premise network and SAP BTP.

 

Q: There is an app in SAP BTP which requires integration to a resource on the internet as well as SAP on-premise system. Can you explain how these 2 integrations will be setup?

Answer:

In principle, there are two types of connections to and from the SAP BTP:

  • Internet Connectivity.
  • Cloud to On-Premise Connectivity (or other way around).

Internet Connectivity is needed when you want to consume capabilities or data from a resource on the internet, while Cloud to On-Premise Connectivity is used when you want to utilize your existing on-premise landscape resources. The Internet Connectivity can be reached via HTTPS, while the connection to an on-premise system requires the Cloud Connector. The communication is bi-directional.

 

Raja_6-1715073144697.png

 

Q: Can you explain multitenant architecture?

Answer:

In multitenant architecture:

  • single instance of an application serves multiple customers
  • Each customer is called a tenant
  • Multiple customers (tenants) use the same computing resources – physically integrated but logically separated
  • Even though customers share resources, customers aren't aware of each other, and their data is kept totally separate

 

Raja_7-1715073144699.png

 

In case you further want to simplify:

To understand multitenancy, let’s take a real-life analogy. Think how a bank works.

  • Multiple people can store their money in one bank
  • Their assets are separate even though they're stored in the same place
  • Customers of the bank don't interact with each otherdon't have access to other customers' money, and aren't even aware of each other


Similarly, in multitenancy, customers use the same application instanceshare resources – while keeping their data separate and secure.

 

Q:. Elaborate how multitenant apps work in SAP BTP?

In SAP BTP, while deploying and accessing a multitenant app, we have concept of provider subaccount and consumer subaccount.

The Provider subaccount is the account where we deploy the multitenant app. Further, there are multiple Consumer subaccount, from where we can subscribe and consume the app.

In the multitenancy scenario in SAP BTP:

  • It’s application provider’s responsibility to deploy and maintain the application on BTP.
  • Application provider pays for the BTP resources.
  • Customers only subscribe and use the app.
  • Resources are shared among customers, but each customer’s data is separated securely

 

Raja_8-1715073144701.png

 

Raja_9-1715073144702.png

 

Q: What is the role/significance of SAP SaaS Provisioning service in SAP BTP?

Answer:

Once the multitenant app is developed, application provider needs to make it available for consumer by publishing it. This is done by using SAP SaaS Provisioning service.

 

  • SAP SaaS Provisioning service acts as a registry and helps us to publish the multitenant app to consumers.
  • It also enables us to automate the subscription and unsubscription process.
  • The service also maintains a list of all dependencies and subscriptions of an application.

 

To register the multitenant app with the SaaS Provisioning service, we need to:

  • Create a service instance of the SaaS Provisioning service (aka saas_registry)
  • And bind it to the application

 

Raja_10-1715073144704.png

 

Q: Explain different options available in SAP BTP for data separation in multitenancy scenario?

Answer:

There are mainly 3 ways to achieve data separation in SAP BTP.

  • Discriminator Column
  • Schema Separation
  • Database Instance Separation

Discriminator Column

  • Tables are shared between tenants, so you have one set of tables for the application
  • Simple and straightforward to define
  • A column in each table which effectively identifies the tenant id
  • At the application level you need to filter on tenant id for every CRUD operation. For example, when you are implementing INSERT or SELECT, you need to have a WHERE clause on TENANT ID.
  • Doesn't cost that much because you're just using a single schema potentially in a single database instance
  • High risk because it's very easy for you to make a mistake

Schema Separation

  • A dedicated schema or if it's HANA an HDI Container.
  • Recommended approach by sap.
  • Very flexible - you can have a single database instance, for example a single HANA Cloud instance. Each tenant will get their own dedicated HDI Container. So effective their own schema and tables.
  • Can easily backup individual schemes or HDI containers.
  • In terms of cost, you're still working with a single HANA instance or a single database instance so not much effect on cost.

Database Instance Separation

  • Technically, this is true data separation. A completely dedicated HANA cloud instance or whatever database you want to work with instance for each tenant.
  • More expensive.
  • You get a complete level of separation
  • Straightforward and simple backups because you're taking the entire database instance each time.


There's no strict right or wrong way, it's just a question of finding what's the most suitable and appropriate way for your application.

 

Raja_11-1715073144708.png

 

Q: Explain the concepts of Tenant Onboarding and Tenant Offboarding in multitenancy in SAP BTP.

Answer:

In a multi-tenant setup, tenant onboarding is the process of introducing new tenants into a SaaS environment.

When a consumer subscribes the multitenant application, the application must be notified that there is a new consumer.

As part of the application subscription, SAP SaaS Provisioning service provides two callbacks – getDependencies and onSubscription.

getDependencies

This provides dependencies to multitenant reuse services

onSubscription

This allows applications to perform the tenant setup in the application. The implementation depends on the approach to separation that you use for your application.

These callbacks help to achieve the tenant onboarding.

For example, whenever a consumer subscribes an application, this callback allows the application to perform tenant-specific onboarding steps, e.g. creating a new HANA schema.

 

Similarly, Tenant Offboarding is the process of offboard a tenant, which may include deleting a tenant’s data or stopping the tenant from accessing applications or data.

In SAP BTP, when a consumer unsubscribes the multitenant application, with the help of onSubscription method, a notification is sent to the application, which allows us to take care of data deletion and other clean-up activities.

The onSubscription callback is triggered for offboarding, with the HTTP “DELETE” method to indicate that this tenant must be removed.

Call Flow:

  1. From the consumers subaccount the subscription is initiated.
  2. Recursively, getDependencies callback is called, first for the application and then for all its dependent services and their dependencies.
  3. After the complete dependency tree is built, the onSubscription callback is called.
  4. After the tenant-specific persistence, if at all needed, and configuration is created, the application returns the tenant-specific application URL

 

Raja_12-1715073144712.png

If I have missed any important question, please let me know in comment.

Happy Learning!

Next Blog

Part 3 - SAP BTP Security [To be published]

 

1 Comment