SAP CAP: Cloud Application Programming Model

SAP CAP: What is it, and how can I use it within my organization?

For several years now, SAP has made a new technology available for building custom applications. In addition to being able to build Fiori applications using existing technologies, we as developers can now also do so with CAP (Cloud Application Programming model). This probably raises the question: “Yet another new technology—do I need to learn it?” Read on to discover the added value of CAP.

What is CAP?

CAP is nothing more and nothing less than a framework of programming languages, code libraries, and tools that can be used to build large-scale applications. It implicitly draws on proven best practices and offers many out-of-the-box solutions for common tasks. This rather abstract definition already reveals an important aspect of CAP: it is a set of building blocks that can be used to build an application.

Examples of these out-of-the-box features include authentication and authorization within the application. With CAP, the focus is on the problem domain rather than on the technology itself. A developer does not need to worry about the precise technical implementation of, for example, the physical tables in the database. This is all handled implicitly through the definition of the data model in a fairly simple notation. As a result, the developer, together with the business experts, will need to carefully design this domain model, which automatically shifts the focus to functionality rather than the technical details.

The image below provides a good illustration of CAP within your organization:

INNOV8iON-CAP

The name (Cloud Application Programming) already indicates that the focus is on the cloud. However, a CAP application can easily read from and write to an on-premise system such as S/4HANA. CAP is ideal for combining data from different sources. A good use case for CAP is keeping your S/4HANA system clean. By running the custom application and custom data in the cloud —while still being able to work with data from the (on-premise) S/4HANA system, the developer builds an application that perfectly meets your needs without cluttering the (on-premise) S/4 system with custom code.

In addition, you have complete freedom to choose which technology to use for the user interface. Does your organization use SAP Fiori/SAPUI5 apps? If so, CAP integrates perfectly with them. If your organization uses a different user interface, such as Angular or React, that’s no problem at all—it works just as well as a UI for a CAP application.

Want to learn more about the benefits of Fiori for your organization? Then read this blog: The Five Main Benefits of SAP Fiori.

In summary, a CAP application is composed of various building blocks that can be used to create a full-stack application for a wide range of different use cases.

CAP: When to use it and when not to?

As described above, CAP is often one of the options for developing an application. It is ideal for keeping an (on-premise) S/4HANA system clean by running your custom code in the cloud as a CAP application. CAP applications are also suitable for combining data from various sources (such as an on-premise S/4HANA system, separate databases in the cloud, and other systems) into a single application.

However, using CAP does place certain demands on your system landscape. For example, to connect an on-premise S/4HANA system as a data source to a CAP application, you need an SAP Cloud Connector. Without the Cloud Connector, using CAP is much more difficult. As a result, scenarios where data is needed from only a single on-premise system are less suitable for using CAP applications. However, if a connector is already in place, it can, of course, be easily utilized.

This shows that you need to carefully consider whether using CAP is a good fit for your organization and whether the desired applications are suitable for it.

Benefits of the CAP

We can conclude that SAP CAP allows developers to select the building blocks from SAP and other vendors that are needed to build an application for a specific use case. By using these building blocks, the development of a CAP application is relatively flexible; the data model can be easily adapted or expanded as the business grows or requirements change. SAP refers to this as the “grow-as-you-go” concept. SAP CAP automatically offers many out-of-the-box capabilities, allowing developers to get a working application up and running relatively quickly with common functionalities that would otherwise have taken a long time to implement. Because CAP utilizes a wide range of well-known technologies from around the world, you are not dependent on a single vendor; there are always alternatives (bothproprietary and open source!). This prevents vendor lock-ins.

If you’re curious about CAP, please contact us to explore the possibilities for your organization. We can help you design and build these applications. We also offer training courses for your own developers. Read more about our academy here .