Everything in CAP / Java
82 of 738
Domain
Signals
Content: 2
Java: Answers in Java
More: SAP Community
Group by: Capability
EntryBySignalsLast activity
Error handlingSAP only
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client ApplicationsMessaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client ApplicationsGetting a message out of a CAP service and onto a Fiori elements object page in a draft scenario — errors, warnings and information, each of which the UI treats differently. Co-written with one of the people on the OData side, and it spends its length on the message container rather than on the handler that fills it.arley-triana-morin, published 2022-08-11
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client Applications
OData changed in @cap-js-community/odata-v2-adapter 1.10.0, 2023-04-05. Affects A recipe, Runnable code.
GraphQLUnmapped
SAP CAP function and action with Unstructured/Dynamic Type Input/OutputSAP CAP function and action with Unstructured/Dynamic Type Input/OutputA CAP action or function can take or return an unstructured type: annotate the service @protocol: 'rest', declare the parameter or return value as @open type object {}, and a handler shapes the payload however a given request needs, shown here with a bound action and a function that returns a different structure per input. The text states plainly that OData V4 and GraphQL services require a fixed structure for action and function parameters, so the dynamic type works only over CAP's REST protocol.published 2022-12-08
Metadata publishingSAP only
Importing an external data model using CDS Graphical Modeler for Visual Studio CodeImporting an external data model using CDS Graphical Modeler for Visual Studio CodeWalks through the CDS Graphical Modeler for Visual Studio Code: creating a "Customers" entity, importing an external OData model from an edmx file into the CDS model, and drawing a managed association from the new entity to an entity from the imported namespace. The import happens through the modeler's GUI rather than the cds import command, and the imported edmx becomes a CDS file the modeler can open directly.Xiao-fei_Song, published 2022-05-09
ODataSAP and community
Extend SAP SuccessFactors on SAP BTP with CAP - Create the CAP ServiceExtend SAP SuccessFactors on SAP BTP with CAP - Create the CAP ServiceWalks through writing a service definition in SAP Business Application Studio that projects entities from an existing CDS model: one entity gets @odata.draft.enabled because Fiori Elements only shows CRUD actions on a draft-enabled entity, and a read-only projection of an already-imported SuccessFactors OData entity fails with the generic handlers because the call is delegated to the remote service, so a custom handler is needed. Running cds watch then serves the entities, drafts and $metadata at the declared service path.published 2022-03-23
How to add OData v2 adapter proxy to your CAP projectHow to add OData v2 adapter proxy to your CAP projectThe problem is stated in one line — a UI5 application that only speaks OData v2 in front of a CAP service that speaks v4 — and the answer is a proxy in the middle rather than a rewrite of either end. Written while v4 support in the UI5 stack was still patchy, which is the whole reason the adapter exists.published 2020-06-30
How to add OData v2 adapter proxy to your CAP project
OData changed in @cap-js-community/odata-v2-adapter 1.10.0, 2023-04-05. Affects Runnable code.
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client ApplicationsMessaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client ApplicationsGetting a message out of a CAP service and onto a Fiori elements object page in a draft scenario — errors, warnings and information, each of which the UI treats differently. Co-written with one of the people on the OData side, and it spends its length on the message container rather than on the handler that fills it.arley-triana-morin, published 2022-08-11
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client Applications
OData changed in @cap-js-community/odata-v2-adapter 1.10.0, 2023-04-05. Affects A recipe, Runnable code.
Resolving date serialization issues when using an external OData v2 service with CAPResolving date serialization issues when using an external OData v2 service with CAPDates coming out of an external OData v2 service in a shape CAP does not expect, and what to do about it. A narrow bug report with a fix, and the kind of thing that costs an afternoon if nobody has written it down.pieterjanssens, published 2020-07-09
SAP CAP function and action with Unstructured/Dynamic Type Input/OutputSAP CAP function and action with Unstructured/Dynamic Type Input/OutputA CAP action or function can take or return an unstructured type: annotate the service @protocol: 'rest', declare the parameter or return value as @open type object {}, and a handler shapes the payload however a given request needs, shown here with a bound action and a function that returns a different structure per input. The text states plainly that OData V4 and GraphQL services require a fixed structure for action and function parameters, so the dynamic type works only over CAP's REST protocol.published 2022-12-08
OpenAPIUnmapped
Adding a Swagger UI to Your SAP Cloud Application Programming Model / Node.js ServiceAdding a Swagger UI to Your SAP Cloud Application Programming Model / Node.js ServiceThe problem stated from the other side of the wire: a CAP and HANA backend consumed by frontend developers with no SAP background, who said in the first meeting that they could not work from what the service offered. A browsable API page is the answer, and this is the post the Swagger UI plugin indexed here exists to serve.published 2020-01-23
Adding a Swagger UI to Your SAP Cloud Application Programming Model / Node.js Service
cds-swagger-ui-express has been through 11 major lines since this was published, most recently 0.9 (2024-07), 0.10 (2024-10), 0.11 (2026-02). Affects Runnable code.
Invoke OpenAPI-documented APIs remotely with SAP Cloud Application Programming ModelInvoke OpenAPI-documented APIs remotely with SAP Cloud Application Programming ModelThe other direction: consuming an API described by an OpenAPI document from CAP, rather than publishing one. Worth pairing with the plugin entries here, which all serve the outbound half.wittro, published 2022-08-30
Invoke OpenAPI-documented APIs remotely with SAP Cloud Application Programming Model
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects Runnable code.
Analytical queriesUnmapped
E2E: SAP Cloud Platform Internet of Things to SAP Analytics CloudE2E: SAP Cloud Platform Internet of Things to SAP Analytics CloudDevice data from ingestion to chart, with CAP occupying the middle: a CDS-defined persistence on HANA Cloud, and an OData service published from it for Analytics Cloud to consume live. The interesting choice is that CAP is used for the model rather than for business logic — there is barely any.Gunter, published 2020-08-31
SAP Data and Analytics Showcase - Develop a Machine Learning Application on SAP BTPSAP Data and Analytics Showcase - Develop a Machine Learning Application on SAP BTPThe overview post of a showcase written by three authors, setting out the dataset, the scenario and the solution map before any of it is built. Its job is to say which piece goes where across the SAP data and analytics portfolio; the CAP application is one station on that map rather than the subject.former_member10846, published 2022-08-12
SAP Data and Analytics Showcase – Use SAP Cloud Application Programming Model to Develop a Machine Learning Application on SAP BTPSAP Data and Analytics Showcase – Use SAP Cloud Application Programming Model to Develop a Machine Learning Application on SAP BTPThe instalment where the showcase becomes code: the CAP application built in Business Application Studio, and the sub-scenario it covers implemented step by step. The overview post is the one that says why this piece exists at all.former_member10846, published 2022-08-12
Data modellingSAP only
First Java Cap ApplicationFirst Java Cap ApplicationA step-by-step walkthrough of a first CAP Java project: com.sap.cds:cds-services-archetype scaffolds the initial Maven project, and the domain model is then rewritten in the db folder with entities, the cuid and managed aspects, associations, compositions and a CodeList, so a hand-coded event handler serving a single entity gives way to a service that CAP's generic persistence handling serves without custom code. It deploys that model to SQLite for local development — cds deploy --to sqlite, then a Spring profile pointing at the generated database file — and ends by adding an index.cds so the model and service can be published as a reusable npm module.bruce_wang3, published 2020-12-08
SAP CAP Recent Enhancements the HANA Dev Should Know AboutSAP CAP Recent Enhancements the HANA Dev Should Know AboutThomas Jung walks through CAP features for HANA database developers that landed through late 2021: doc comments in the data model (CDL comments propagated into generated database objects via the package.json cdsc.docs compiler option), and schema evolution reaching general availability in the November 2021 release, using the @cds.persistence.journal annotation and cds.hana.journal settings to generate incremental hdbmigrationtable migration scripts instead of dropping and recreating tables. It also walks through two features outside those two: window functions in view column definitions, added in the December 2021 release, and a beta assert_integrity setting that generates database foreign-key constraints from 1:1 associations and compositions.published 2022-02-15
Database connectorsSAP only
Distributed Resiliency of SAP CAP applications using SAP HANA Cloud (Multi-Zone Replication)Distributed Resiliency of SAP CAP applications using SAP HANA Cloud (Multi-Zone Replication)Resilience defined the way an operator would — failures happen in a complex landscape and should go unnoticed by the user — and then what multi-zone replication on HANA Cloud means for the CAP application in front of it.shanthakumar_krishnaswamy, published 2022-11-12
Extend SAP SuccessFactors on SAP BTP with CAP - Deploy to SAP HANA CloudExtend SAP SuccessFactors on SAP BTP with CAP - Deploy to SAP HANA CloudThe deployment instalment of the author's SuccessFactors extension series — the project already exists and the imported service is already modelled, so this is only the move onto HANA Cloud. Depends on the two posts before it and says so.ale_biagi, published 2022-03-29
First Java Cap ApplicationFirst Java Cap ApplicationA step-by-step walkthrough of a first CAP Java project: com.sap.cds:cds-services-archetype scaffolds the initial Maven project, and the domain model is then rewritten in the db folder with entities, the cuid and managed aspects, associations, compositions and a CodeList, so a hand-coded event handler serving a single entity gives way to a service that CAP's generic persistence handling serves without custom code. It deploys that model to SQLite for local development — cds deploy --to sqlite, then a Spring profile pointing at the generated database file — and ends by adding an index.cds so the model and service can be published as a reusable npm module.bruce_wang3, published 2020-12-08
Getting started with CAP on PostgreSQL (Node.js)Getting started with CAP on PostgreSQL (Node.js)Running CAP on PostgreSQL locally in 2020, when doing so meant the community packages cds-pg and cds-dbm. It now opens with a banner the author added later: @sap/cds 7.0.0 has native PostgreSQL support, use @cap-js/postgres instead, with a pointer to a step-by-step guide for it. Worth having for that banner as much as for the content — a post that tells you not to follow it is a dated fact about where the answer moved.published 2020-11-16
Getting started with CAP on PostgreSQL (Node.js)
cds-pg. Affects Runnable code.
How I migrated my on-prem xsa cds3+hana solution to cds6+sqliteHow I migrated my on-prem xsa cds3+hana solution to cds6+sqliteThree major CDS versions and a database swap in one move, done to get an old on-premise XSA application running somewhere cheap. The repository is linked, and the interest is in what broke between cds3 and cds6 rather than in the destination.alex_myakinkii, published 2022-08-07
How I migrated my on-prem xsa cds3+hana solution to cds6+sqlite
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects Runnable code.
How to create an API to run a HANA Cloud Stored Procedure in Cloud FoundryHow to create an API to run a HANA Cloud Stored Procedure in Cloud FoundryReaching past CDS to the database's own machinery — built-in algorithms, SQLScript procedures and functions — and putting an API in front of them. Long, and it is the case where the model is not where the logic belongs.gonzalo_hernan_sendra, published 2022-12-08
How to create an API to run a HANA Cloud Stored Procedure in Cloud Foundry
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects Runnable code.
PostgreSQL persistence adapter for CAP (Node.js)PostgreSQL persistence adapter for CAP (Node.js)The contradiction the adapter was built to resolve, stated plainly in 2020: CAP's core is open, non-intrusive and platform-agnostic, which is what would let it run outside SAP's world — except that HANA was the only officially supported production persistence and HANA exists only inside BTP. cds-pg is the answer to that, and this is the post that argues for it. Read now as the front end of a story whose other end is the 2023 post recording cds-pg's deprecation in favour of @cap-js/postgres.published 2020-08-20
PostgreSQL persistence adapter for CAP (Node.js)
cds-pg is archived. @cap-js/postgres answers the same capability. Affects Runnable code.
Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry (Node.js)Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry (Node.js)The deployment half of the pair, two weeks after the local one, and superseded the same way: it carries the same banner directing readers to @cap-js/postgres and the official documentation. The two together are the community PostgreSQL path as it stood before the core absorbed it.published 2020-11-30
Run and Deploy CAP with PostgreSQL on SAP BTP Cloud Foundry (Node.js)
cds-dbm. Affects Runnable code.
SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1Introduces SAP Cloud Application Programming Model as an open, opinionated framework that shoulders OData plumbing and database-specific code so a domain is modelled once in CDS, then builds a small bookshop project to show it: @sap/cds-dk's cds init scaffolds the project, cds watch serves it locally with live reload against an in-memory SQLite database, and a CatalogService projects a CDS domain model seeded from CSV files. The result is read as an OData service in the browser and exercised further through a Postman collection, with the optional @sap/vscode-cds extension noted for CDS syntax highlighting and completion in VS Code.rasai, published 2020-12-31
SFSFとHANA Cloudを使用するCAPのアプリケーション開発SFSFとHANA Cloudを使用するCAPのアプリケーション開発In Japanese. A hands-on taking data between SuccessFactors and HANA Cloud through a CAP application — the connection setup, the data and service models, then read and write logic, and a Cloud Foundry deploy. Long enough to carry its own table of contents.rasai, published 2022-12-14
SFSFとHANA Cloudを使用するCAPのアプリケーション開発
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects A recipe, Runnable code.
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbviewTesting your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbviewcds.test covers the service; this covers what is underneath it, where the artifact is an hdbprocedure or an hdbview that CDS never sees. That means a real HDI container, so most of the post is about where to get one and how to give CAP access to it — the tests are the easy part once that is true.Tristan, published 2022-08-30
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbview
Testing has changed 3 times since this was published, most recently in @cap-js/cds-test 1.0.0, 2026-04-23. Affects A recipe, Runnable code.
Upload data from excel in CAP (Node.js)Upload data from excel in CAP (Node.js)Mass upload from a spreadsheet, both halves shown: an entity marked @cds.persistence.skip to receive the file, an INSERT built from the parsed rows, and a list report extended with the upload button that starts it.KM11, published 2022-11-21
Upload data from excel in CAP (Node.js)
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects Runnable code.
Useful CAP CDS and Fiori Commands to Accelerate Development and DeploymentUseful CAP CDS and Fiori Commands to Accelerate Development and DeploymentA command-by-command walkthrough of @sap/cds-dk's cds add and fiori add generators: cds add xsuaa writes an XSUAA security configuration from the CDS model's authorization annotations, and cds add hana together with cds deploy --to hana switches persistence from the default SQLite database to SAP HANA Cloud. cds add mta and fiori add deploy-config, from @sap/generator-fiori, build the Cloud Foundry deployment descriptor together, adding a destination-service block and an xs-app.json that routes the Fiori app's calls through a named destination.TiaXu, published 2022-10-19
Schema evolutionCommunity only
How I migrated my on-prem xsa cds3+hana solution to cds6+sqliteHow I migrated my on-prem xsa cds3+hana solution to cds6+sqliteThree major CDS versions and a database swap in one move, done to get an old on-premise XSA application running somewhere cheap. The repository is linked, and the interest is in what broke between cds3 and cds6 rather than in the destination.alex_myakinkii, published 2022-08-07
How I migrated my on-prem xsa cds3+hana solution to cds6+sqlite
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects Runnable code.
SAP CAP Recent Enhancements the HANA Dev Should Know AboutSAP CAP Recent Enhancements the HANA Dev Should Know AboutThomas Jung walks through CAP features for HANA database developers that landed through late 2021: doc comments in the data model (CDL comments propagated into generated database objects via the package.json cdsc.docs compiler option), and schema evolution reaching general availability in the November 2021 release, using the @cds.persistence.journal annotation and cds.hana.journal settings to generate incremental hdbmigrationtable migration scripts instead of dropping and recreating tables. It also walks through two features outside those two: window functions in view column definitions, added in the December 2021 release, and a beta assert_integrity setting that generates database foreign-key constraints from 1:1 associations and compositions.published 2022-02-15
SearchSAP only
Case-insensitive filters in Fiori Elements (List report + CAP)Case-insensitive filters in Fiori Elements (List report + CAP)A blocker rather than a feature: filters on a List Report are case-sensitive, the business wanted them not to be, and the CAP backend is where it gets fixed. Node and Java both.Kishannaicker, published 2022-04-26
Async processingSAP only
SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)Calling an unsecured endpoint on a schedule is trivial; this is the same thing once the endpoint is protected. The interesting part is the caller — the Job Scheduling Service is not a person, so CAP's pseudo-roles are where the post spends its time, and $XSSERVICENAME has to match the scheduler's own instance name.former_member412792, published 2022-12-12
DestinationsSAP only
Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]The opening of a three-part series on reaching more than one S/4HANA system from one CAP application with the user's identity carried through. This part sets up the business problem; the propagation itself is in the parts that follow.mohit_bansal3, published 2022-11-25
BTP CAP : How to Connect to Remote Services Locally in CAP ApplicationBTP CAP : How to Connect to Remote Services Locally in CAP ApplicationThe same problem four years earlier: a CAP application that consumes a remote service, running locally against the real thing rather than against a mock.showkath_naseem, published 2022-12-12
Execute [OAuth2 client credentials] protected REST request with SAP CAP ApplicationExecute [OAuth2 client credentials] protected REST request with SAP CAP ApplicationA recipe, and the author calls it that — package.json, a .cds and a handler — for calling a remote service protected by OAuth2 client credentials from a CAP application. Short, complete, and addressed to CAP developers rather than to BTP administrators.Lachmish, published 2022-04-27
Execute [OAuth2 client credentials] protected REST request with SAP CAP Application
Authentication changed in CAP Java 3.0.1, 2024-07-26. Affects A recipe.
Extend SAP SuccessFactors on SAP BTP with CAP - Import SAP SuccessFactors OData Services definitionsExtend SAP SuccessFactors on SAP BTP with CAP - Import SAP SuccessFactors OData Services definitionsWalks through importing the ECEmployeeProfile and PLTUserManagement OData services from SAP API Business Hub into a CAP project: downloading their EDMX files, running cds import in SAP Business Application Studio to generate the CSN under srv/external, and pointing the resulting cds.requires entries at a destination. The second half creates a destination and an XSUAA service instance on BTP and binds their service keys into a default-env.json file so the project can reach SAP SuccessFactors during local development.published 2022-03-21
How to Access On-premise OData from the Business Application Studio - CAPM DevelopmentHow to Access On-premise OData from the Business Application Studio - CAPM DevelopmentA destination-naming constraint found the hard way and then corrected in public: the post carries its own update saying that with a CAPM app, a standard destination works through the studio's proxy as long as the name matches [a-z0-9-]. The update credits a comment on the post, so the correction and its source are both in the record.laszlo_kajan2, published 2020-06-02
How to Access On-premise OData from the Business Application Studio - CAPM Development
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects A recipe, Runnable code.
HTML5.Timeout for CAP destinations in mta.yaml longer than defaultHTML5.Timeout for CAP destinations in mta.yaml longer than defaultA page and a half about one property that has to be raised when a CAP destination is slower than the default allows — and it now opens with its own correction, dated October 2025, that the property is called timeout rather than HTML5.Timeout, credited to a commenter. The correction is why it is worth keeping.NilsJanen, published 2022-11-09
Invoke OpenAPI-documented APIs remotely with SAP Cloud Application Programming ModelInvoke OpenAPI-documented APIs remotely with SAP Cloud Application Programming ModelThe other direction: consuming an API described by an OpenAPI document from CAP, rather than publishing one. Worth pairing with the plugin entries here, which all serve the outbound half.wittro, published 2022-08-30
Invoke OpenAPI-documented APIs remotely with SAP Cloud Application Programming Model
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects Runnable code.
Part 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsPart 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsThe substantial part of a side-by-side extensibility series: CAP Node.js, Cloud SDK and Fiori elements against S/4HANA Cloud. Eighteen thousand characters, and the one to read if you only read one.former_member748, published 2020-12-01
Part 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elements
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
Part 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsPart 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsThe second part, continuing the same extension. Opens with a recap of the stack rather than of the steps, which makes it readable on its own.former_member748, published 2020-12-20
Part 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elements
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
Part 3: Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]Part 3: Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]The final part, and the one with the most CAP in it — the service consuming the propagated destinations, and what the handler sees. Read the three together; the series is one piece.mohit_bansal3, published 2022-11-25
Part 3: Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects A recipe.
Qualtrics integration with domain based authorization in CAP project on HANA cloudQualtrics integration with domain based authorization in CAP project on HANA cloudSurveys pulled from Qualtrics into a CAP application in real time, with the twist in the title: authorisation decided by the user's domain rather than by a role collection. A pattern that comes up whenever the audience is wider than the tenant.former_member69893, published 2022-09-30
Qualtrics integration with domain based authorization in CAP project on HANA cloud
Authorization has changed twice since this was published, most recently in CAP Java 3.7.1, 2025-01-30. Affects Runnable code.
SFSFとHANA Cloudを使用するCAPのアプリケーション開発SFSFとHANA Cloudを使用するCAPのアプリケーション開発In Japanese. A hands-on taking data between SuccessFactors and HANA Cloud through a CAP application — the connection setup, the data and service models, then read and write logic, and a Cloud Foundry deploy. Long enough to carry its own table of contents.rasai, published 2022-12-14
SFSFとHANA Cloudを使用するCAPのアプリケーション開発
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects A recipe, Runnable code.
Use SCP CF Destination service in NodeJs locallyUse SCP CF Destination service in NodeJs locallyReading a destination from a laptop, where the environment variable the destination service normally provides does not exist. A small gap with a real cost, since the alternative is deploying to test every change to a remote call.WouterLemaire, published 2020-05-28
Use SCP CF Destination service in NodeJs locally
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects Runnable code.
Useful CAP CDS and Fiori Commands to Accelerate Development and DeploymentUseful CAP CDS and Fiori Commands to Accelerate Development and DeploymentA command-by-command walkthrough of @sap/cds-dk's cds add and fiori add generators: cds add xsuaa writes an XSUAA security configuration from the CDS model's authorization annotations, and cds add hana together with cds deploy --to hana switches persistence from the default SQLite database to SAP HANA Cloud. cds add mta and fiori add deploy-config, from @sap/generator-fiori, build the Cloud Foundry deployment descriptor together, adding a destination-service block and an xs-app.json that routes the Fiori app's calls through a named destination.TiaXu, published 2022-10-19
Event MeshSAP only
[Blog Post] SAP Event Mesh – CAP based implementation of SAP Event Mesh in a Single-Tenant Scenario[Blog Post] SAP Event Mesh – CAP based implementation of SAP Event Mesh in a Single-Tenant ScenarioThe instalment of the Deep Dive series where the framework arrives. The earlier posts consumed Event Mesh over its REST API, so this one is explicitly a comparison: the same thing through CAP's messaging abstraction, with the three flavours — local, file-based and a real broker — named before the broker one is built.AyushKumar and vipul.khullar, published 2022-06-06
[Blog Post] SAP Event Mesh – CAP based implementation of SAP Event Mesh in a Single-Tenant Scenario
Event Mesh changed in @sap/cds 10.0.3, 2026-07-02. Affects A recipe, Runnable code.
Event Driven Architecture with Event Mesh - Part-1Event Driven Architecture with Event Mesh - Part-1Continues the author's own CDS entity-relationship example rather than starting a fresh one, which is the point of it — the same model gains events. Concepts first, then a message client and queue on BTP, then a Postman check that the queue works before any CAP code is written, and finally the emit from a CAP REST service.Avinash_Vaidya, published 2022-12-04
Event Driven Architecture with Event Mesh - Part-1
Event Mesh changed in @sap/cds 10.0.3, 2026-07-02. Affects A recipe, Runnable code.
Event-driven Extensions for SAP SuccessFactors on SAP BTP – Connecting the DotsEvent-driven Extensions for SAP SuccessFactors on SAP BTP – Connecting the DotsWalks through an event-driven extension for SAP SuccessFactors: Automated Configurations registers the SuccessFactors system against an SAP BTP account with an integration token, and a SuccessFactors custom integration then pushes events, such as an employee joining or leaving, to a topic in Event Mesh that a CAP application subscribes to. The SuccessFactors APIs themselves are downloaded as EDMX files from SAP API Business Hub and imported into the CAP project, the same EDMX-import path behind service integration, so CAP generates the client used to call them. A reference application, RunSmooth, ties Automated Configurations, Event Mesh and CAP together end to end.Former Member, published 2020-08-12
NotificationsSAP only
Receive Notifications from Amazon Simple Notification Service for SAP S/4HANA BTP Extension AppReceive Notifications from Amazon Simple Notification Service for SAP S/4HANA BTP Extension AppEmail notifications from a CAP application through Amazon SNS instead of anything SAP provides — a hyperscaler service used directly from the extension rather than through a BTP intermediary. The argument for it is stated as reach rather than cost: the extension gets the platform's services and the hyperscaler's at the same time.albertoliu1993, published 2022-10-14
Service integrationSAP only
CAP: Consume External Service - Part 1CAP: Consume External Service - Part 1Builds a CAP Node.js service from scratch that consumes the public NorthWind OData V4 service: cds import turns its EDMX metadata into a CSN model under srv/external, and a CatalogService projects Products from it with a custom READ handler that runs the request through cds.connect.to('NorthWind'). Shows the same projection working two ways — against a CSV mocked under srv/external/data with the <service>-<entity>.csv naming the framework expects, then against the real service once credentials.url is added to the CAP configuration and @sap-cloud-sdk/http-client is installed — and defers routing that connection through the Cloud Foundry Destinations service to the next post in the series.published 2020-05-26
Event-driven Extensions for SAP SuccessFactors on SAP BTP – Connecting the DotsEvent-driven Extensions for SAP SuccessFactors on SAP BTP – Connecting the DotsWalks through an event-driven extension for SAP SuccessFactors: Automated Configurations registers the SuccessFactors system against an SAP BTP account with an integration token, and a SuccessFactors custom integration then pushes events, such as an employee joining or leaving, to a topic in Event Mesh that a CAP application subscribes to. The SuccessFactors APIs themselves are downloaded as EDMX files from SAP API Business Hub and imported into the CAP project, the same EDMX-import path behind service integration, so CAP generates the client used to call them. A reference application, RunSmooth, ties Automated Configurations, Event Mesh and CAP together end to end.Former Member, published 2020-08-12
Extend SAP SuccessFactors on SAP BTP with CAP - Create the CAP ServiceExtend SAP SuccessFactors on SAP BTP with CAP - Create the CAP ServiceWalks through writing a service definition in SAP Business Application Studio that projects entities from an existing CDS model: one entity gets @odata.draft.enabled because Fiori Elements only shows CRUD actions on a draft-enabled entity, and a read-only projection of an already-imported SuccessFactors OData entity fails with the generic handlers because the call is delegated to the remote service, so a custom handler is needed. Running cds watch then serves the entities, drafts and $metadata at the declared service path.published 2022-03-23
Extend SAP SuccessFactors on SAP BTP with CAP - Import SAP SuccessFactors OData Services definitionsExtend SAP SuccessFactors on SAP BTP with CAP - Import SAP SuccessFactors OData Services definitionsWalks through importing the ECEmployeeProfile and PLTUserManagement OData services from SAP API Business Hub into a CAP project: downloading their EDMX files, running cds import in SAP Business Application Studio to generate the CSN under srv/external, and pointing the resulting cds.requires entries at a destination. The second half creates a destination and an XSUAA service instance on BTP and binds their service keys into a default-env.json file so the project can reach SAP SuccessFactors during local development.published 2022-03-21
SAP CAP: Consume SAP API Hub Sandbox Data as an external service Part- 1SAP CAP: Consume SAP API Hub Sandbox Data as an external service Part- 1Walks through consuming SAP API Business Hub's Business Partner sandbox API from a CAP Node.js project: @sap/cds-dk's cds import turns the downloaded EDMX into a CSN model and a cds.requires entry, a projection service exposes it, and a custom handler forwards reads to the proxy through @sap/cds's cds.connect.to and bp.run(req.query). Reaching the sandbox needs the API key added as a header on that same credentials block, since the destination service that would carry it is left for a promised part two.DebashishDas, published 2022-03-17
AuthenticationSAP only
Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]The opening of a three-part series on reaching more than one S/4HANA system from one CAP application with the user's identity carried through. This part sets up the business problem; the propagation itself is in the parts that follow.mohit_bansal3, published 2022-11-25
Execute [OAuth2 client credentials] protected REST request with SAP CAP ApplicationExecute [OAuth2 client credentials] protected REST request with SAP CAP ApplicationA recipe, and the author calls it that — package.json, a .cds and a handler — for calling a remote service protected by OAuth2 client credentials from a CAP application. Short, complete, and addressed to CAP developers rather than to BTP administrators.Lachmish, published 2022-04-27
Execute [OAuth2 client credentials] protected REST request with SAP CAP Application
Authentication changed in CAP Java 3.0.1, 2024-07-26. Affects A recipe.
Part 3: Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]Part 3: Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]The final part, and the one with the most CAP in it — the service consuming the propagated destinations, and what the handler sees. Read the three together; the series is one piece.mohit_bansal3, published 2022-11-25
Part 3: Architecting Complex Real Life Business Scenario on SAP BTP with ease [ Targeting Multiple backend S/4HANA Systems utilizing Principal Propagation ]
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects A recipe.
SAP Business Technology Platform: Authorization and Trust Management ServiceSAP Business Technology Platform: Authorization and Trust Management ServiceWalks through how the SAP Authorization and Trust Management service secures a BTP application: scopes, attributes and role templates in the security descriptor, and the OAuth 2.0 resource-owner, client and resource-server roles it builds on. Covers the XSUAA microservice as the OAuth 2.0 authorization server bound to each application through its service broker, the signed JSON Web Token it issues after authentication, and the App Router's place in front of the resource apps as the gateway that starts authentication and checks for cross-site request forgery.SekhuteTK, published 2022-09-09
Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.The long version, from the MTA project outward: what the deployment descriptor has to contain, how the authentication flow actually runs, and then the npm modules doing the work — @sap/xssec and @sap/xsenv named and explained rather than left as dependencies. Old, and the module names have moved on, but the flow it draws has not.balbinosoares, published 2020-03-16
Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.
Authorization has changed twice since this was published, most recently in CAP Java 3.7.1, 2025-01-30. Affects A recipe, Runnable code.
AuthorizationSAP only
An approach to secure multiple integrated SAP CAP java applications with a common XSUAA service instanceAn approach to secure multiple integrated SAP CAP java applications with a common XSUAA service instanceOne XSUAA instance across several CAP Java applications that call each other, rather than one per application. Short, and written from inside SAP Labs as something the author tried — the value is the shape of the arrangement, not a walkthrough.sreanik_dhanyakumar2, published 2022-09-14
How to get authenticated user information with CAP in three different ways – Using the XSUAA APIHow to get authenticated user information with CAP in three different ways – Using the XSUAA APIThe third of three approaches the author sets out, and the one that returns the most: going to the XSUAA API directly rather than reading what CAP already put on the request. Depends on an earlier post for the project setup, so it starts mid-stream on purpose.ale_biagi, published 2022-07-18
Qualtrics integration with domain based authorization in CAP project on HANA cloudQualtrics integration with domain based authorization in CAP project on HANA cloudSurveys pulled from Qualtrics into a CAP application in real time, with the twist in the title: authorisation decided by the user's domain rather than by a role collection. A pattern that comes up whenever the audience is wider than the tenant.former_member69893, published 2022-09-30
Qualtrics integration with domain based authorization in CAP project on HANA cloud
Authorization has changed twice since this was published, most recently in CAP Java 3.7.1, 2025-01-30. Affects Runnable code.
SAP Business Technology Platform: Authorization and Trust Management ServiceSAP Business Technology Platform: Authorization and Trust Management ServiceWalks through how the SAP Authorization and Trust Management service secures a BTP application: scopes, attributes and role templates in the security descriptor, and the OAuth 2.0 resource-owner, client and resource-server roles it builds on. Covers the XSUAA microservice as the OAuth 2.0 authorization server bound to each application through its service broker, the signed JSON Web Token it issues after authentication, and the App Router's place in front of the resource apps as the gateway that starts authentication and checks for cross-site request forgery.SekhuteTK, published 2022-09-09
SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)SAP Job Scheduling Service + Cloud Application Programming Model application (CAP) + SAP Authorization and Trust Management Service (XSUAA)Calling an unsecured endpoint on a schedule is trivial; this is the same thing once the endpoint is protected. The interesting part is the caller — the Job Scheduling Service is not a person, so CAP's pseudo-roles are where the post spends its time, and $XSSERVICENAME has to match the scheduler's own instance name.former_member412792, published 2022-12-12
Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.The long version, from the MTA project outward: what the deployment descriptor has to contain, how the authentication flow actually runs, and then the npm modules doing the work — @sap/xssec and @sap/xsenv named and explained rather than left as dependencies. Old, and the module names have moved on, but the flow it draws has not.balbinosoares, published 2020-03-16
Understanding security approaches in SAP CAP using XSUAA in node.js flavor and MTA.
Authorization has changed twice since this was published, most recently in CAP Java 3.7.1, 2025-01-30. Affects A recipe, Runnable code.
Useful CAP CDS and Fiori Commands to Accelerate Development and DeploymentUseful CAP CDS and Fiori Commands to Accelerate Development and DeploymentA command-by-command walkthrough of @sap/cds-dk's cds add and fiori add generators: cds add xsuaa writes an XSUAA security configuration from the CDS model's authorization annotations, and cds add hana together with cds deploy --to hana switches persistence from the default SQLite database to SAP HANA Cloud. cds add mta and fiori add deploy-config, from @sap/generator-fiori, build the Cloud Foundry deployment descriptor together, adding a destination-service block and an xs-app.json that routes the Fiori app's calls through a named destination.TiaXu, published 2022-10-19
Why developers should care about credential-types for xsuaa?Why developers should care about credential-types for xsuaa?Rotating secrets, argued from a habit rather than a feature: the author names the practice implicit in many beginner tutorials — lifting a secret out of a binding to use it elsewhere — and notes CAP has features that make it unnecessary in development. Then the three credential types side by side, configured on a CAP application's uaa resource in mta.yaml and through a deployment extension.former_member2839, published 2022-07-05
Why developers should care about credential-types for xsuaa?
Authorization has changed twice since this was published, most recently in CAP Java 3.7.1, 2025-01-30. Affects A recipe, Runnable code.
DeploymentCommunity only
Build and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configurationBuild and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configurationGeneration and deployment in one piece, with the managed approuter rather than a standalone one — so the routing is configuration instead of a module, and the post covers what that changes at deploy time.jlong, published 2022-02-10
Build and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configuration
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
CAP on Kyma - Deploy your CAP apps to SAP BTP, Kyma RuntimeCAP on Kyma - Deploy your CAP apps to SAP BTP, Kyma RuntimeThe post that superseded the author's own earlier one, written for cds and cds-dk 6 when Kyma deployment became something the tooling did rather than something you assembled. The current reference of the several Kyma posts here.Uwe_Klinger, published 2022-07-12
CAP on Kyma - Deploy your CAP apps to SAP BTP, Kyma Runtime
Deployment changed in @sap/cds-dk 8.9.0, 2025-03-31. Affects A recipe, Runnable code.
cf-create-app: Create End-to-End apps and deploy to Cloud Foundry in minutescf-create-app: Create End-to-End apps and deploy to Cloud Foundry in minutesA generator from 2020 that goes further than scaffolding — an end-to-end application created and deployed to Cloud Foundry in one run. Predates most of what cds add now does.former_member604013, published 2020-07-29
cf-create-app: Create End-to-End apps and deploy to Cloud Foundry in minutes
Generators has changed twice since this was published, most recently in @sap/cds-dk 10.0.3, 2026-07-02. Affects A recipe, Runnable code.
Deploying a CAP Application to SAP Cloud Platform, Kyma runtime & connecting an iOS appDeploying a CAP Application to SAP Cloud Platform, Kyma runtime & connecting an iOS appKyma when it was new on the platform, taken from a CAP application through deployment to a native iOS client on the other end. Written by someone working the mobile side, so the parts about what a device needs from the service are more careful than usual.KRiedelsheimer, published 2020-12-17
Extend SAP SuccessFactors on SAP BTP with CAP - Deploy to SAP HANA CloudExtend SAP SuccessFactors on SAP BTP with CAP - Deploy to SAP HANA CloudThe deployment instalment of the author's SuccessFactors extension series — the project already exists and the imported service is already modelled, so this is only the move onto HANA Cloud. Depends on the two posts before it and says so.ale_biagi, published 2022-03-29
HTML5.Timeout for CAP destinations in mta.yaml longer than defaultHTML5.Timeout for CAP destinations in mta.yaml longer than defaultA page and a half about one property that has to be raised when a CAP destination is slower than the default allows — and it now opens with its own correction, dated October 2025, that the property is called timeout rather than HTML5.Timeout, credited to a commenter. The correction is why it is worth keeping.NilsJanen, published 2022-11-09
SAP CAP - Optimize your build MTA projects with several ui appsSAP CAP - Optimize your build MTA projects with several ui appsWhat the Business Application Studio wizard writes into mta.yaml stops scaling somewhere past a couple of dozen UI applications, because every one of them gets its own build step. The post is about the build phase specifically, and reads as a report from a project large enough to have hit the wall rather than as a general optimisation.published 2022-04-28
SAP CAP - Optimize your build MTA projects with several ui apps
Deployment changed in @sap/cds-dk 8.9.0, 2025-03-31. Affects A recipe.
The Future of Continuous Delivery for SAP Cloud SDK and SAP Cloud Application Programming ModelThe Future of Continuous Delivery for SAP Cloud SDK and SAP Cloud Application Programming ModelA direction note on the Continuous Delivery Pipeline that Cloud SDK and CAP projects were expected to start from, written by someone on the inside as its future was being decided. Dated 2020, so read it for what was being weighed rather than for what to run — and as one of the few places the reasoning behind a tooling direction was written down at all.published 2020-11-23
MultitenancySAP only
Getting your head into Cloud Application Programming model multitenancyGetting your head into Cloud Application Programming model multitenancyOpens by telling you it is out of date and pointing at the HANA Academy series instead, which is more honest than most posts manage. What survives the staleness is the discussion and context around multitenancy that the title promises — the reasoning, not the commands.andrew_lunde, published 2020-08-20
Getting your head into Cloud Application Programming model multitenancy
Multitenancy has changed twice since this was published, most recently in @sap/cds 7.0.0, 2023-06-22. Affects Runnable code.
Multitenant SaaS applications on SAP BTP using CAP? Tried-and-True!Multitenant SaaS applications on SAP BTP using CAP? Tried-and-True!The opening post of the Cloud Foundry series, and the one that states the shape of the whole thing: a sample built out of a partner co-innovation project with BCG, then delivered in three graded versions — Basic, Advanced, Expert Features — against a fictional partner's requirements. Read it for the motivation and the map; the implementation is in the three that follow.martinfrick, published 2022-10-19
Multitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Advanced VersionMultitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Advanced VersionWhat the basic version leaves out and production needs: central user management, and reaching an on-premise S/4HANA from a subscribed tenant. Framed as a step towards production readiness rather than as production itself, which is the honest reading — the Expert Features post is where the rest of that distance is covered.published 2022-11-21
Multitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Basic VersionMultitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Basic VersionThe version deliberately bounded by what a trial or pay-as-you-go account can hold — the authors point out a PAYG owner can run it for nothing on free-tier services. Scenario first, then the architecture diagram, then a component-by-component walk through what each service in it is for.published 2022-10-24
Multitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Expert FeaturesMultitenant SaaS apps on SAP BTP using CAP? Tried-and-True! – The Expert FeaturesThe last of the four, and the one carrying the features that are optional until they are not. Each is written up as a self-contained tutorial in the sample repository rather than inline, so the post is a guide to which of them applies to your landscape.martinfrick, published 2022-11-29
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbviewTesting your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbviewcds.test covers the service; this covers what is underneath it, where the artifact is an hdbprocedure or an hdbview that CDS never sees. That means a real HDI container, so most of the post is about where to get one and how to give CAP access to it — the tests are the easy part once that is true.Tristan, published 2022-08-30
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbview
Testing has changed 3 times since this was published, most recently in @cap-js/cds-test 1.0.0, 2026-04-23. Affects A recipe, Runnable code.
Editor supportSAP and community
Add useful Extensions to Dev spaces in SAP Business Application StudioAdd useful Extensions to Dev spaces in SAP Business Application StudioStarts from the point capire makes — that CAP is editor-agnostic and BAS is the preconfigured option — and then does the thing that undoes preconfiguration: adds two extensions to a dev space for initialising data in a CAP application, with the uninstall procedure as well as the install. The uninstall half is what makes it worth keeping.showkath_naseem, published 2022-11-13
Developing CAP applications in SAP Business Application StudioDeveloping CAP applications in SAP Business Application StudioThe overview written at the point BAS replaced Web IDE, and it is structured as a comparison — each step of building a CAP application, with the difference from the Web IDE experience called out beside it. Useful now mostly for what it records: which parts of CAP development the editor took over, and when.liat_b, published 2020-07-06
Importing an external data model using CDS Graphical Modeler for Visual Studio CodeImporting an external data model using CDS Graphical Modeler for Visual Studio CodeWalks through the CDS Graphical Modeler for Visual Studio Code: creating a "Customers" entity, importing an external OData model from an edmx file into the CDS model, and drawing a managed association from the new entity to an entity from the imported namespace. The import happens through the modeler's GUI rather than the cds import command, and the imported edmx becomes a CDS file the modeler can open directly.Xiao-fei_Song, published 2022-05-09
Migrating Your CAP Applications from SAP Web IDE to SAP Business Application StudioMigrating Your CAP Applications from SAP Web IDE to SAP Business Application StudioA migration checklist, and a reminder of how much of a CAP project used to be editor-specific: Web IDE configuration files to delete, a build to move to the Cloud MTA Build Tool, a CAP Java version to raise. Historical — Web IDE is gone — but it is the clearest list of what the tooling boundary used to include.liat_b, published 2020-07-09
Migrating Your CAP Applications from SAP Web IDE to SAP Business Application Studio
Editor support changed in @sap/cds-dk 8.8.0, 2025-03-04. Affects A recipe.
Running CAP Node Applications in SAP Business Application StudioRunning CAP Node Applications in SAP Business Application StudioThe Run Configurations tool, which is where binding and mocking live in BAS rather than in a terminal. Three things it does: several named configurations per application in a tree, dependencies bound to real service instances, and OData dependencies mocked. The author notes the configurations are standard launch entries underneath, which is the detail that lets you leave the tool behind if you want to.liat_b, published 2020-10-22
SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1Introduces SAP Cloud Application Programming Model as an open, opinionated framework that shoulders OData plumbing and database-specific code so a domain is modelled once in CDS, then builds a small bookshop project to show it: @sap/cds-dk's cds init scaffolds the project, cds watch serves it locally with live reload against an in-memory SQLite database, and a CatalogService projects a CDS domain model seeded from CSV files. The result is read as an OData service in the browser and exercised further through a Postman collection, with the optional @sap/vscode-cds extension noted for CDS syntax highlighting and completion in VS Code.rasai, published 2020-12-31
GeneratorsSAP and community
cf-create-app: Create End-to-End apps and deploy to Cloud Foundry in minutescf-create-app: Create End-to-End apps and deploy to Cloud Foundry in minutesA generator from 2020 that goes further than scaffolding — an end-to-end application created and deployed to Cloud Foundry in one run. Predates most of what cds add now does.former_member604013, published 2020-07-29
cf-create-app: Create End-to-End apps and deploy to Cloud Foundry in minutes
Generators has changed twice since this was published, most recently in @sap/cds-dk 10.0.3, 2026-07-02. Affects A recipe, Runnable code.
First Java Cap ApplicationFirst Java Cap ApplicationA step-by-step walkthrough of a first CAP Java project: com.sap.cds:cds-services-archetype scaffolds the initial Maven project, and the domain model is then rewritten in the db folder with entities, the cuid and managed aspects, associations, compositions and a CodeList, so a hand-coded event handler serving a single entity gives way to a service that CAP's generic persistence handling serves without custom code. It deploys that model to SQLite for local development — cds deploy --to sqlite, then a Spring profile pointing at the generated database file — and ends by adding an index.cds so the model and service can be published as a reusable npm module.bruce_wang3, published 2020-12-08
SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1Introduces SAP Cloud Application Programming Model as an open, opinionated framework that shoulders OData plumbing and database-specific code so a domain is modelled once in CDS, then builds a small bookshop project to show it: @sap/cds-dk's cds init scaffolds the project, cds watch serves it locally with live reload against an in-memory SQLite database, and a CatalogService projects a CDS domain model seeded from CSV files. The result is read as an OData service in the browser and exercised further through a Postman collection, with the optional @sap/vscode-cds extension noted for CDS syntax highlighting and completion in VS Code.rasai, published 2020-12-31
Useful CAP CDS and Fiori Commands to Accelerate Development and DeploymentUseful CAP CDS and Fiori Commands to Accelerate Development and DeploymentA command-by-command walkthrough of @sap/cds-dk's cds add and fiori add generators: cds add xsuaa writes an XSUAA security configuration from the CDS model's authorization annotations, and cds add hana together with cds deploy --to hana switches persistence from the default SQLite database to SAP HANA Cloud. cds add mta and fiori add deploy-config, from @sap/generator-fiori, build the Cloud Foundry deployment descriptor together, adding a destination-service block and an xs-app.json that routes the Fiori app's calls through a named destination.TiaXu, published 2022-10-19
加速开发和部署的CAP CDS和Fiori一些实用命令加速开发和部署的CAP CDS和Fiori一些实用命令In Chinese. A command reference rather than a walkthrough — cds import, cds compile, cds deploy --to sqlite, cds add hana, cds add xsuaa — grouped by what they are for. The kind of page that is more useful than a tutorial once you already know what you are doing.TiaXu, published 2022-10-21
加速开发和部署的CAP CDS和Fiori一些实用命令
Generators has changed twice since this was published, most recently in @sap/cds-dk 10.0.3, 2026-07-02. Affects A recipe, Runnable code.
Local developmentSAP only
A Fiori Launchpad Sandbox for all your CAP-based projects - OverviewA Fiori Launchpad Sandbox for all your CAP-based projects - OverviewWhere cds-launchpad-plugin came from, told as a learning exercise: the author wanted a real problem to teach himself TypeScript on, and picked the thing he kept redoing in every CAP project — a launchpad to see all the UI applications in one place. The origin post for an entry whose 2023 update is also indexed here.published 2022-03-14
A Fiori Launchpad Sandbox for all your CAP-based projects – Sample project setupA Fiori Launchpad Sandbox for all your CAP-based projects – Sample project setupThe hands-on half published the same day as the overview: the launchpad module wired into the CAP sample repository, step by step from a global cds-dk install. Same-day pairs like this are worth keeping together — the overview argues, this one is the thing you follow.published 2022-03-14
BTP CAP : How to Connect to Remote Services Locally in CAP ApplicationBTP CAP : How to Connect to Remote Services Locally in CAP ApplicationThe same problem four years earlier: a CAP application that consumes a remote service, running locally against the real thing rather than against a mock.showkath_naseem, published 2022-12-12
Develop SAP CAP apps inside a VS Code Docker ContainerDevelop SAP CAP apps inside a VS Code Docker ContainerA VS Code dev container configuration with everything a CAP project needs already in it, published as a repository rather than as instructions. The 2020 half of a pair whose other half, four years later, does the same for Lazyvim — the same author solving the same problem twice as his editor changed.published 2020-02-20
Develop SAP CAP apps inside a VS Code Docker Container
Local development has changed twice since this was published, most recently in @sap/cds-dk 7.9.1, 2024-05-02. Affects Runnable code.
Running CAP Node Applications in SAP Business Application StudioRunning CAP Node Applications in SAP Business Application StudioThe Run Configurations tool, which is where binding and mocking live in BAS rather than in a terminal. Three things it does: several named configurations per application in a tree, dependencies bound to real service instances, and OData dependencies mocked. The author notes the configurations are standard launch entries underneath, which is the detail that lets you leave the tool behind if you want to.liat_b, published 2020-10-22
SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1SAP Cloud Application Programming Model(CAP):概要およびデモ - Part 1Introduces SAP Cloud Application Programming Model as an open, opinionated framework that shoulders OData plumbing and database-specific code so a domain is modelled once in CDS, then builds a small bookshop project to show it: @sap/cds-dk's cds init scaffolds the project, cds watch serves it locally with live reload against an in-memory SQLite database, and a CatalogService projects a CDS domain model seeded from CSV files. The result is read as an OData service in the browser and exercised further through a Postman collection, with the optional @sap/vscode-cds extension noted for CDS syntax highlighting and completion in VS Code.rasai, published 2020-12-31
Use SCP CF Destination service in NodeJs locallyUse SCP CF Destination service in NodeJs locallyReading a destination from a laptop, where the environment variable the destination service normally provides does not exist. A small gap with a real cost, since the alternative is deploying to test every change to a remote call.WouterLemaire, published 2020-05-28
Use SCP CF Destination service in NodeJs locally
Destinations changed in @sap-cloud-sdk/connectivity 4.0.0, 2025-03-04. Affects Runnable code.
加速开发和部署的CAP CDS和Fiori一些实用命令加速开发和部署的CAP CDS和Fiori一些实用命令In Chinese. A command reference rather than a walkthrough — cds import, cds compile, cds deploy --to sqlite, cds add hana, cds add xsuaa — grouped by what they are for. The kind of page that is more useful than a tutorial once you already know what you are doing.TiaXu, published 2022-10-21
加速开发和部署的CAP CDS和Fiori一些实用命令
Generators has changed twice since this was published, most recently in @sap/cds-dk 10.0.3, 2026-07-02. Affects A recipe, Runnable code.
Seed dataCommunity only
Add useful Extensions to Dev spaces in SAP Business Application StudioAdd useful Extensions to Dev spaces in SAP Business Application StudioStarts from the point capire makes — that CAP is editor-agnostic and BAS is the preconfigured option — and then does the thing that undoes preconfiguration: adds two extensions to a dev space for initialising data in a CAP application, with the uninstall procedure as well as the install. The uninstall half is what makes it worth keeping.showkath_naseem, published 2022-11-13
CAP: Consume External Service - Part 1CAP: Consume External Service - Part 1Builds a CAP Node.js service from scratch that consumes the public NorthWind OData V4 service: cds import turns its EDMX metadata into a CSN model under srv/external, and a CatalogService projects Products from it with a custom READ handler that runs the request through cds.connect.to('NorthWind'). Shows the same projection working two ways — against a CSV mocked under srv/external/data with the <service>-<entity>.csv naming the framework expects, then against the real service once credentials.url is added to the CAP configuration and @sap-cloud-sdk/http-client is installed — and defers routing that connection through the Cloud Foundry Destinations service to the next post in the series.published 2020-05-26
TestingSAP and community
CAP: Unit Testing using Mocha and ChaiCAP: Unit Testing using Mocha and ChaiUnit tests added to an existing CAP service rather than written alongside a new one, which is the harder and more common case. Mocha and Chai wired up by hand, from a time before cds.test was the obvious answer.jhodel18, published 2020-05-31
CAP: Unit Testing using Mocha and Chai
Testing has changed 3 times since this was published, most recently in @cap-js/cds-test 1.0.0, 2026-04-23. Affects Runnable code.
Integration Tests in a Cloud Foundry Java App using SAP Cloud Application Programming ModelIntegration Tests in a Cloud Foundry Java App using SAP Cloud Application Programming ModelIntegration rather than unit tests, and from 2020 — the earliest testing entry here, and a reminder of what had to be assembled by hand before the framework had an answer.former_member428487, published 2020-02-23
Integration Tests in a Cloud Foundry Java App using SAP Cloud Application Programming Model
Testing has changed 3 times since this was published, most recently in @cap-js/cds-test 1.0.0, 2026-04-23. Affects Runnable code.
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbviewTesting your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbviewcds.test covers the service; this covers what is underneath it, where the artifact is an hdbprocedure or an hdbview that CDS never sees. That means a real HDI container, so most of the post is about where to get one and how to give CAP access to it — the tests are the easy part once that is true.Tristan, published 2022-08-30
Testing your CAP HANA Artifacts with jest – including multitenancy, hdbprocedure and hdbview
Testing has changed 3 times since this was published, most recently in @cap-js/cds-test 1.0.0, 2026-04-23. Affects A recipe, Runnable code.
TypeScript patternsDoes not apply
Taking CAP to the next level - with TypeScriptTaking CAP to the next level - with TypeScriptThe author's own two packages introduced together, and they are two halves of one idea: cds2types generates TypeScript from the CDS model, cds-routing-handlers arranges the handlers that use them. Published in 2020, years before cds-typer, which makes it the earliest answer in the graph to a question the core answered later.published 2020-05-22
Taking CAP to the next level - with TypeScript
cds-routing-handlers: release and repository quiet for 46 months. Affects Runnable code.
Draft handlingSAP only
Extend SAP SuccessFactors on SAP BTP with CAP - Create the CAP ServiceExtend SAP SuccessFactors on SAP BTP with CAP - Create the CAP ServiceWalks through writing a service definition in SAP Business Application Studio that projects entities from an existing CDS model: one entity gets @odata.draft.enabled because Fiori Elements only shows CRUD actions on a draft-enabled entity, and a read-only projection of an already-imported SuccessFactors OData entity fails with the generic handlers because the call is delegated to the remote service, so a custom handler is needed. Running cds watch then serves the entities, drafts and $metadata at the declared service path.published 2022-03-23
How to ensure that users can efficiently enter data in SAP Fiori elements applicationsHow to ensure that users can efficiently enter data in SAP Fiori elements applicationsGuidance for draft-enabled Fiori Elements applications aimed at the user who spends their day in them: entering data quickly and by keyboard, on a slow network, without the round trips a draft-backed form can otherwise impose. Written from the design side rather than the implementation side, which is the half most CAP writing about drafts leaves out.published 2022-12-05
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client ApplicationsMessaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client ApplicationsGetting a message out of a CAP service and onto a Fiori elements object page in a draft scenario — errors, warnings and information, each of which the UI treats differently. Co-written with one of the people on the OData side, and it spends its length on the message container rather than on the handler that fills it.arley-triana-morin, published 2022-08-11
Messaging System for Transferring Error, Warning, and Information Messages from OData V4 Services to HTTP Client Applications
OData changed in @cap-js-community/odata-v2-adapter 1.10.0, 2023-04-05. Affects A recipe, Runnable code.
UI5ers Buzz #56: New full-stack UI5 sample app featuring CAP + OData V4 + draft modeUI5ers Buzz #56: New full-stack UI5 sample app featuring CAP + OData V4 + draft modeA sample app published as code rather than described — SAPUI5 over a CAP service with OData V4 and draft mode — and the note that it was built on what the team learned from an application written in March 2020 to help the German Foreign Office repatriate citizens. That provenance is unusual and worth keeping.AndreasKunz, published 2020-11-06
Fiori annotationsSAP only
Build and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configurationBuild and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configurationGeneration and deployment in one piece, with the managed approuter rather than a standalone one — so the routing is configuration instead of a module, and the post covers what that changes at deploy time.jlong, published 2022-02-10
Build and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configuration
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
CAP with Fiori Elements: Side Effects, Custom Actions, Dynamic ExpressionsCAP with Fiori Elements: Side Effects, Custom Actions, Dynamic ExpressionsThe first of the author's Fiori elements posts, and the widest: side effects, which are the annotation that tells the UI a field changed something else; custom actions; and dynamic expressions. The three that turn a generated app into a usable one.Ajit_K_Panda, published 2022-12-23
CAP with Fiori Elements: Side Effects, Custom Actions, Dynamic Expressions
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects Runnable code.
Case-insensitive filters in Fiori Elements (List report + CAP)Case-insensitive filters in Fiori Elements (List report + CAP)A blocker rather than a feature: filters on a List Report are case-sensitive, the business wanted them not to be, and the CAP backend is where it gets fixed. Node and Java both.Kishannaicker, published 2022-04-26
Developing a Fiori elements app with CAP and Fiori ToolsDeveloping a Fiori elements app with CAP and Fiori ToolsA learning write-up from someone new to CAP at the time, and long enough to be thorough. Carries its own update pointing at a newer post on deploying a CAP-based Fiori app to a central launchpad without an approuter.MioYasutake, published 2020-09-07
Developing a Fiori elements app with CAP and Fiori Tools
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
Developing Fiori Element Application (List Report and Object Page) consuming the OData service created using SAP Cloud Application Programming modelDeveloping Fiori Element Application (List Report and Object Page) consuming the OData service created using SAP Cloud Application Programming modelOne of the earliest entries here, from mid-2020: the List Report and Object Page pair generated over a CAP OData service, when that combination was still new enough to need explaining.former_member187069, published 2020-06-08
Developing Fiori Element Application (List Report and Object Page) consuming the OData service created using SAP Cloud Application Programming model
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe.
Display of hierarchical data in SAP Fiori elements using SAP Cloud Application Programming ModelDisplay of hierarchical data in SAP Fiori elements using SAP Cloud Application Programming ModelHierarchies before the framework supported them, and the post now opens with its own update saying that Fiori elements V4 and OData V4 support tree views natively and linking the guide. Read the update first; the rest is the record of what people did in the meantime.OliverKlemenz, published 2022-07-01
Display of hierarchical data in SAP Fiori elements using SAP Cloud Application Programming Model
sap:hierarchy. Affects Runnable code.
Extend SAP SuccessFactors on SAP BTP with CAP - Develop the SAP Fiori Elements ApplicationExtend SAP SuccessFactors on SAP BTP with CAP - Develop the SAP Fiori Elements ApplicationThe UI instalment of the SuccessFactors extension series — the imported service is already modelled and this is the application over it. Names the three posts it depends on.ale_biagi, published 2022-03-30
Part 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsPart 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsThe substantial part of a side-by-side extensibility series: CAP Node.js, Cloud SDK and Fiori elements against S/4HANA Cloud. Eighteen thousand characters, and the one to read if you only read one.former_member748, published 2020-12-01
Part 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elements
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
Part 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsPart 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elementsThe second part, continuing the same extension. Opens with a recap of the stack rather than of the steps, which makes it readable on its own.former_member748, published 2020-12-20
Part 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elements
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects A recipe, Runnable code.
Random collection of useful code fragments for CAP Fiori Elements and SAPUI5Random collection of useful code fragments for CAP Fiori Elements and SAPUI5Exactly what it says, and the author gives the reason: none of these were easy to find in the documentation or the samples. A collection of fragments rather than an argument, and the kind of page people bookmark.published 2020-11-18
Random collection of useful code fragments for CAP Fiori Elements and SAPUI5
Fiori annotations changed in @sap/cds-dk 9.6.0, 2025-12-17. Affects Runnable code.
SAP Fiori Element using CAP Model – List Report AppSAP Fiori Element using CAP Model – List Report AppThe build half of the same author's pair: the List Report application over the CAP model introduced in the previous post.jhodel18, published 2020-10-19
SAP Fiori Elements using CAP Model - IntroductionSAP Fiori Elements using CAP Model - IntroductionThe introduction to a demo project, and it says where the project came from — exploring what the then-new Fiori tools could do. Context rather than code; the List Report post is the one that builds.jhodel18, published 2020-09-29
Upload data from excel in CAP (Node.js)Upload data from excel in CAP (Node.js)Mass upload from a spreadsheet, both halves shown: an entity marked @cds.persistence.skip to receive the file, an INSERT built from the parsed rows, and a list report extended with the upload button that starts it.KM11, published 2022-11-21
Upload data from excel in CAP (Node.js)
Database connectors has changed twice since this was published, most recently in @sap/cds 10.1.0, 2026-09-07. Affects Runnable code.
Reference appsCommunity only
UI5ers Buzz #56: New full-stack UI5 sample app featuring CAP + OData V4 + draft modeUI5ers Buzz #56: New full-stack UI5 sample app featuring CAP + OData V4 + draft modeA sample app published as code rather than described — SAPUI5 over a CAP service with OData V4 and draft mode — and the note that it was built on what the team learned from an application written in March 2020 to help the German Foreign Office repatriate citizens. That provenance is unusual and worth keeping.AndreasKunz, published 2020-11-06
Under no capability
Getting started with cds.ql in NodeJS for CAP - 101 on how to query dataGetting started with cds.ql in NodeJS for CAP - 101 on how to query dataWalks through cds.ql, the query API @sap/cds gives a Node.js CAP service's custom handlers, with worked SELECT, UPDATE, DELETE and INSERT examples against a sample schema — filters, AND/OR conditions, column projections, ordering, limiting, grouping and joining two entities through a schema view. An added correction notes that cds.tx(req) is no longer needed to run a query in newer CAP versions, contradicting the post's own original guidance.published 2022-06-21