From 70aaacf0e1531f9509e7207612e482ece0bda457 Mon Sep 17 00:00:00 2001 From: Steffen Waldmann Date: Fri, 28 Aug 2026 11:14:13 +0200 Subject: [PATCH 1/2] Document SAP HANA Cloud serverless database (Beta) Add a Setup & Configuration section covering the hana-serverless kind and cds add hana-serverless, scoped to multitenant apps for now. --- guides/databases/hana.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/guides/databases/hana.md b/guides/databases/hana.md index 4e4d678fb3..685ec35fe8 100644 --- a/guides/databases/hana.md +++ b/guides/databases/hana.md @@ -56,6 +56,42 @@ The datasource for SAP HANA is then auto-configured based on available service b ::: +### SAP HANA Cloud Serverless { #hana-serverless } + +Instead of a dedicated database, you can connect to an [SAP HANA Cloud serverless](https://help.sap.com/docs/hana-cloud) instance. The binding carries only an orchestration gateway URL, and the actual HDI container is resolved on demand through the serverless Tenant API. + +::: warning Multitenant apps only +Serverless support currently targets multitenant apps, where one HDI container is provisioned per tenant on subscription. Single-tenant use is not supported yet. +::: + +Set it up with: + +```sh +cds add hana-serverless +``` + +This does the following: + +- Adds the `@cap-js/hana` dependency and sets `db` to the `hana-serverless` kind under the `[production]` profile in your _package.json_. +- Provisions a `hana-cloud` managed service on the `serverless` plan in _mta.yaml_, configured for `subscription-manager` auto-subscription so a container is provisioned per tenant on subscription. +- Lets the app's `identity` binding consume the database instance, reusing an existing IAS identity when present or adding a machine-to-machine one otherwise, so the runtime obtains a single, correctly-scoped token for the Tenant API. + +The resulting configuration looks like this: + +::: code-group +```jsonc [package.json] +{ + "cds": { + "requires": { + "[production]": { + "db": "hana-serverless" + } + } + } +} +``` +::: + ## Running `cds build` Deployment to SAP HANA is done via the [SAP HANA Deployment Infrastructure (HDI)](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-developer-guide-for-cloud-foundry-multitarget-applications-sap-business-app-studio/sap-hdi-deployer?). Use `cds build` to generate all necessary deployable HDI artifacts. For example, run this in [capire/bookshop](https://github.com/capire/bookshop): From 2d884c058384e75abbe6076d00b0368c76673181 Mon Sep 17 00:00:00 2001 From: Steffen Waldmann Date: Fri, 28 Aug 2026 11:22:30 +0200 Subject: [PATCH 2/2] Fold the hana-serverless setup steps into a details block --- guides/databases/hana.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/databases/hana.md b/guides/databases/hana.md index 685ec35fe8..730db7c5ff 100644 --- a/guides/databases/hana.md +++ b/guides/databases/hana.md @@ -70,12 +70,14 @@ Set it up with: cds add hana-serverless ``` -This does the following: +::: details What `cds add hana-serverless` sets up - Adds the `@cap-js/hana` dependency and sets `db` to the `hana-serverless` kind under the `[production]` profile in your _package.json_. - Provisions a `hana-cloud` managed service on the `serverless` plan in _mta.yaml_, configured for `subscription-manager` auto-subscription so a container is provisioned per tenant on subscription. - Lets the app's `identity` binding consume the database instance, reusing an existing IAS identity when present or adding a machine-to-machine one otherwise, so the runtime obtains a single, correctly-scoped token for the Tenant API. +::: + The resulting configuration looks like this: ::: code-group