ERPClimb logoERPClimb
CAP
BTP & Integrationadvanced 4 min read

BTP CAP Part 4: Multitenancy, Extensibility and Production Deployment

Preview · a free account unlocks the full lesson

Key takeaway

Build SaaS with CAP: multitenancy with the MTX services (@sap/cds-mtxs), tenant subscription via SaaS registry, tenant-specific HDI containers, tenant-aware caching, extensibility for customers, and production deployment practices (MTA, profiles, CI/CD).

In this lessonShow sections

Visual overview

SAAS WITH CAPTenant onboarding in a multitenant CAP appFrom subscription to isolated data1Customer subscribesFrom their subaccountSaaS registry2Subscription callbackMTX services handle onboardingcds-mtxs3Tenant HDI containerSchema deployed for the tenantHDI4Tenant-scoped requestscds.context.tenant everywhereIsolationUpgrades for all tenantsSchema kept in syncUpgradeTip: put the tenant ID in every cache key and log line.

Explanation

Part 3 secured CAP services; this part covers making a CAP app multitenant and getting it ready for production. Running cds add multitenancy adds the MTX services that handle tenant subscription, schema upgrade, and per-tenant database containers.

Each subscribing tenant gets its own HDI container, and every request runs in that tenant's own context rather than sharing data with any other tenant. The SaaS provisioning service, also called the SaaS registry, is what triggers the subscribe and unsubscribe callbacks when a tenant signs up or leaves.

Where it's enabled, extensibility lets individual customers add their own fields or entities on top of the shared app, per tenant.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.