Analytics Legends logoAI & Analytics Legends Sign inSign up
Academy module

SAP Cloud Application Programming Model (CAP): CDS Models, Services and SAP HANA Cloud Persistence

SAP Cloud Application Programming Model (CAP): CDS Models, Services and SAP HANA Cloud Persistence — Analytics Legends section illustration for the SAP Analytics knowledge base (concepts, studies, Academy)

As of 2026-10-30

CAP is SAP's framework for side-by-side services on SAP BTP: you model entities and services in CDS, and the runtime serves OData V4 with SQLite locally and SAP HANA Cloud (HDI containers) in production. This module takes you from cds init to a working cost-centre budget service with sample CSV data, reproducible $count and $filter results, a declarative authorization layer with @restrict, and the build chain mbt build and cf deploy. It also shows where CAP fits next to clean core, how it consumes S/4HANA APIs through cds import, and how analytics and AI services sit on top of it.

What you will learn

  • Create a CAP project with cds init and model entities with cuid and managed aspects in db/schema.cds
  • Expose projections as an OData V4 service and query it with $count and $filter
  • Write a Node.js handler with before and on hooks and an unbound function
  • Protect a service with @restrict and test it with mocked users
  • Add SAP HANA Cloud support with cds add hana and explain the HDI deployment
  • Import an EDMX from api.sap.com with cds import and expose a projection on it

CAP in 2026: what it is and where it sits

The SAP Cloud Application Programming Model (CAP) is SAP's framework for building side-by-side services on SAP BTP. You describe a domain model and services in CDS (Core Data Services for CAP, files with the extension .cds), and CAP's runtime serves them as OData V4 without handwritten controllers. It runs on Node.js and on Java (cds add nodejs, cds add java), and its default production database is SAP HANA Cloud while SQLite is the development database (CAP Getting Started, CAP databases guide).

For an analytics consultant the position matters. CAP is where a client builds what must stay out of S/4HANA under the clean-core rule (see M417 and concept C198, side-by-side extensions): a budget-approval service, a mapping table, a thin API over a data product. It is not an ABAP CDS replacement. ABAP CDS views (concept C032) live in the ABAP stack and feed Embedded Analytics; CAP CDS lives in a BTP application and persists to SAP HANA Cloud (concept C319, see M422).

Prerequisites

  • Basic JavaScript or TypeScript and REST/OData knowledge
  • Node.js (even-numbered LTS) and @sap/cds-dk installed
  • For the optional deployment: an SAP BTP trial or free-tier subaccount with Cloud Foundry and a HANA Cloud instance

Outcomes

  • Reproduce the lab results: $count 8 on BudgetLines, 3 overspent 2026 lines, totalPlanned 2026 = 170000
  • Explain what cuid and managed add to an entity and which database columns result
  • Distinguish SQLite development from HANA Cloud and HDI production persistence
  • Describe the build chain cds add, mbt build, cf deploy and name the XSUAA artefacts it creates
  • Decide when CAP, released S/4HANA APIs or an ABAP Cloud extension is the right tool
  • State what is and is not verified about CAP analytics annotations and the CAP LLM plugin

Full module with the Consultant plan — €19.90/month. The full module adds: the decision framework · the end-to-end scenario walkthrough · the KPI scorecard · the anti-patterns · the code blocks · the knowledge check · the diagrams.

Open in the app →

Open missions

SAP analytics jobs and contracts · freelance SAP contracts.