Difference between SAP CAP and SAP RAP

by | Jun 13, 2021 | ABAP RAP

Home » SAP » ABAP » ABAP RAP » Difference between SAP CAP and SAP RAP

Preface – This post is part of the SAP ABAP RAP series.


SAP has introduced various programming models helping the organizations via development of efficient applications that meets their business needs. Over time, with changing requirements and technologies, these programming models have evolved from DYNPRO and list programming models for SAP GUI based applications to WEB DYNPRO model for web-based applications and thereafter to SAP ABAP programming model for SAP Fiori.

While SAP ABAP programming model for SAP Fiori is a key advantage in terms of evolving landscape, flexibility and efficient modelling for SAP Fiori, SAP HANA; lacks certain criteria like simplicity and typed access to business entities which seems to be the basic need for application development. Here RAP, a new programming model by SAP, fills the gap.

SAP ABAP RAP provides the intrinsic approach to build SAP Fiori based applications that are optimized for S/4 HANA and can run over on-premise as well as on the cloud.

We have been writing codes in different languages (such as ABAP, CDS, UI5/FIori and OData) at different platform (SAP NetWeaver, SAP Editor, HANA Studio, and SAP Web IDE) to achieve CRUD operation on business data. These all have their own limitation such as source independent development, platform independent development, etc. To remove dependency on multiple platforms and to combine SAP and open-source tools at a single platform, SAP came with Cloud Application Programming Model.

What is SAP CAP?

SAP Cloud Application Programming Model, also known as SAP CAP is a frameworks of tools, languages and libraries (both open source and SAP tools and technologies) designed efficiently with SAP best practices to help developers to minimize coding efforts, develop reusable peace of codes in form of micro services and to focus on designing and implementing business/enterprise specific logics.

SAP CAP Architecture


SAP ABAP RESTful Application Programming Model (RAP) was introduced by SAP Cloud Platform ABAP environment and is available with 1808 release and higher.

The RESTful Application Programming model is built on the top of the semantic data model (CDS) and the transactional services are exposed in behaviour definition and implementation in implementing behaviour class. It also allows adapting the existing applications to be modelled which is intended to be used over a long time.  You can start from scratch (greenfield implementation) or you can reuse existing business logic (brownfield implementation).

One can develop the following end-to-end scenarios:

  • SAP Fiori service
  • Service consumption
  • Web APIs

What is SAP RAP

Difference between SAP CAP and SAP RAP

Type of ServiceOnly Cloud Service.Both on Premise and Cloud Services.
TechnologyOpen Source + SAP Stack (HANA DB, CAP CDS, SAP UI5).SAP CDS and SAP ABAP (or ABAP on Cloud).
Data BaseThe data base can be only HANA Database (on cloud).The data base can be either SAP conventional S4HANA or HANA Database (on cloud).
Application LayerApplication layer can be Node.js or Java.Application layer is ABAP.
FrontendUI development is supported.Only APIs are generated, UI development is not part of RAP architecture.
DeploymentIt can be deployed only on Cloud Foundry as a single package (MTA.yaml that consists Database + Micro services + UI) or two package (UI is separated in this case).The RAP is hosted via ABAP on cloud, which can be also only deployed over cloud foundry. But the UI application consuming the services generated by SAP RAP can be deployed over either Neo or Cloud Foundry.
ABAP Reports SupportThe services generated by CAP can be used by ABAP reports via external HTTP request calls.The services generated by SAP RAP can be used directly in ABAP Reports via Entity Manipulation Language (EML).
OData SupportSAP CAP only supports OData V4. But it can utilize plugins to downgrade the services to OData V2.You can create both OData V2 and V4 services.
Development IDESAP CAP can be developed using SAP Business Application Studio (BAS) or Visual Studio.SAP RAP can be developed using HANA Studio/Eclipse in case of on-premise as well as ABAP on cloud.



Read more about SAP CAP on its official documentation: https://cap.cloud.sap/docs/

Learn about SAP CAP on GoCoding tutorials: https://gocoding.org/sap-cloud-application-programming/

Read more about SAP RAP on its official documentation: https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/289477a81eec4d4e84c0302fb6835035.html

Learn about SAP RAP on GoCoding tutorials: https://gocoding.org/sap-abap-rap/


Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.