Learn what an MTA is, why BTP uses it, and write a minimal mta.yaml that packages a CAP backend and optional Fiori frontend together.
A Multi-Target Application (MTA) is SAP's packaging format for BTP applications. It bundles multiple modules (a CAP backend, a Fiori UI, an AppRouter, service bindings) into a single deployable archive (.mtar file).
Think of it as a Docker Compose file for BTP — one file describes the whole stack.
mta deploy deploys everything in the right order_schema-version: "3.1"
ID: bookshop
version: 1.0.0
description: Bookshop CAP application
modules:
# ── 1. CAP backend ─────────────────────────────────────────
- name: bookshop-srv
type: nodejs
path: gen/srv # built output from cds build
parameters:
buildpack: nodejs_buildpack
memory: 256M
disk-quota: 512M
requires:
- name: bookshop-hana # service binding
- name: bookshop-xsuaa
provides:
- name: srv-api
properties:
srv-url: ${default-url}
# ── 2. HANA Deployer ───────────────────────────────────────
- name: bookshop-db-deployer
type: hdb
path: gen/db
requires:
- name: bookshop-hana
# ── 3. AppRouter ───────────────────────────────────────────
- name: bookshop-app
type: approuter.nodejs
path: app/router
requires:
- name: bookshop-xsuaa
- name: srv-api
group: destinations
properties:
name: srv-api
url: ~{srv-url}
forwardAuthToken: true
resources:
# ── Service instances ──────────────────────────────────────
- name: bookshop-hana
type: org.cloudfoundry.managed-service
parameters:
service: hana
service-plan: hdi-shared
- name: bookshop-xsuaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
| Element | What it does |
|---|---|
modules |
Deployable units (apps, deployers) |
resources |
BTP services to create or bind |
requires |
Declares a dependency on another module or resource |
provides |
Exports a property (like a URL) for other modules to consume |
parameters |
CF/BTP configuration (memory, buildpack, service plan) |
If you just want to deploy the backend without a UI:
_schema-version: "3.1"
ID: my-cap-app
version: 1.0.0
modules:
- name: my-cap-srv
type: nodejs
path: gen/srv
requires:
- name: my-cap-db
- name: my-cap-db-deployer
type: hdb
path: gen/db
requires:
- name: my-cap-db
resources:
- name: my-cap-db
type: org.cloudfoundry.managed-service
parameters:
service: hana
service-plan: hdi-shared
Sign in for progress tracking & Q&A →