SAP Business Technology Platform (BTP) gives you three places to run your own code. Each suits a different kind of team and workload:
Cloud Foundry is the simplest. Developers hand over their code, and the platform runs it. You pay for the memory your apps reserve.
Kyma is a managed Kubernetes cluster. It gives more control over networking and containers. You pay for the cluster's machines, so there is a minimum size even when nothing runs.
The ABAP environment is an ABAP system in the cloud. ABAP teams build with the same model they use inside S/4HANA. You pay for ABAP and database capacity.
Two more options sit beside these. Some ABAP logic belongs inside S/4HANA itself, not on BTP. And SAP's own SaaS services on BTP, such as Integration Suite, need no runtime from you at all.
SAP's own comparison guide says the choice between Cloud Foundry and Kyma doesn't have to be made once for everything. You can use both, workload by workload. This topic gives a rule for each workload and checks one partner's proposal against it.
The runtime decides three things a leader cares about.
Who you need. Cloud Foundry needs developers. Kyma also needs people who can run Kubernetes workloads. The ABAP environment needs ABAP developers who know ABAP Cloud.
What it costs when idle. Cloud Foundry bills memory, so a small app costs little. A Kyma cluster has a floor: SAP's sizing table names three nodes as the minimum. An ABAP system has a minimum size too, though non-production systems can be hibernated.
What you run yourself. SAP runs all three platforms, but not your apps. In Kyma your team also keeps container images and cluster modules up to date.
Example: Calder Pumpworks, the course's fictional pump maker, has seven workloads heading for BTP: two AI agents, an AI gateway, a distributor portal, a shop-floor listener, a pricing job and a certificate archive. A partner proposed one Kyma cluster for the non-ABAP ones and the ABAP environment for the pricing job. The deep layer shows that six of the seven placements change when you apply a rule per workload. One cluster is still needed, for the shop-floor listener, because Cloud Foundry on BTP can't accept plain TCP traffic.
The comparison guide says Cloud Foundry and Kyma have the same service level agreement and both run across availability zones. So the decision rests on architecture and skills, not on reliability.
Names are shifting. SAP's documentation, updated in November 2026, calls the third option SAP Business AI Platform, ABAP environment, while the comparison guide and many SAP pages still say SAP BTP ABAP environment. The older Neo environment is for existing customers only, and SAP documents how to migrate away from it.
Ask these questions in order for each workload. Stop at the first "yes".
Question
If yes
Why
Is it ABAP logic that changes data inside one S/4HANA system?
Build it in S/4HANA with ABAP Cloud, not on BTP
It runs in the same system and transaction as the data it changes
Is it ABAP code or ABAP skills serving several systems, or kept apart from S/4HANA?
ABAP environment
Same development model as S/4HANA, on its own system
Does it need something Cloud Foundry on BTP doesn't offer? Plain TCP, container-to-container networking, a service mesh, video streaming, more than 16 GB per instance
Kyma
These are documented limits of Cloud Foundry on BTP
Anything else
Cloud Foundry
It bills only the memory reserved and has the least to run
Then ask one more question. If a Kyma cluster exists anyway, should other container workloads share it? That is a cost and skills decision to record, not a rule.
Pick one answer for each question. The explanation appears after you choose.
1According to SAP's comparison guide, what should drive the choice between Cloud Foundry and Kyma?
Answer: C. SAP says both have the same service level agreement, both are long-term, and both support CAP. What differs is the control over infrastructure an architecture needs, and the skills to use it.
2A partner proposes one Kyma cluster for all of Calder's small apps. What is the main cost question to raise?
Answer: B. A Kyma cluster starts at three nodes, billed as capacity units each hour. Cloud Foundry bills the memory apps reserve, which is small for small apps.
3Calder needs a job that sets a monthly price inside its S/4HANA system. Where does it usually belong?
Answer: A. Logic that changes data inside one S/4HANA system runs best in that system. The ABAP environment suits ABAP that serves several systems or stays apart from S/4HANA.
4Calder's shop-floor system can only push messages over plain TCP. What follows for the runtime?
Answer: C. SAP lists TCP routing among the Cloud Foundry features not supported on BTP. Kyma can accept that traffic, so this one workload sends Calder to Kyma.
5Which statement about operating effort is right?
Answer: B. SAP's operating model puts images and module configuration on the customer in Kyma. For buildpack apps SAP patches the stack, and in both runtimes the customer owns its apps' scaling and monitoring.
6What should a leader know about hibernating ABAP environment systems?
Answer: A. SAP says stopped systems use no ABAP Compute Units and minimal database units, so costs can fall below 5%. It suits development and test systems that sit idle.
Each runtime hands you a different unit of responsibility, and bills you for that unit:
Cloud Foundry hands you an app instance. You give code and a memory size. The platform builds, places, restarts and routes it. You pay per GB of memory reserved.
Kyma hands you a cluster. You get Kubernetes nodes and decide what runs on them: deployments, services, modules, sidecars. You pay for the nodes, whether full or empty.
The ABAP environment hands you an ABAP system. You get application servers and a database, with ABAP Cloud's rules and released APIs. You pay for runtime and database capacity.
The smaller the unit, the less you run and the lower the floor. The larger the unit, the more you control and the more you operate. Choosing a runtime means choosing the smallest unit that still meets the workload's hard needs.
flowchart TB
subgraph SA[One BTP subaccount]
subgraph CFO[Cloud Foundry org]
SP[space: apps and service instances]
ABAPI[ABAP environment instance<br/>created in a space]
end
subgraph K[Kyma cluster]
NS[namespaces: pods, modules]
end
end
ABAPI --> AS[ABAP system<br/>application servers + HANA Cloud]
SP --> SVC[BTP services<br/>XSUAA, destination, HANA Cloud]
NS --> SVC
SAP's environments page says environments are anchored at subaccount level, and one subaccount can hold several. Users, authorizations and entitlements are then managed once for all of them. An ABAP system is created as a service instance in a Cloud Foundry space, so a subaccount with the ABAP environment has a Cloud Foundry org too.
You push code or an image, and Cloud Foundry stages it with a buildpack (or takes the image as is), then runs instances. SAP's BTP-specific configuration page sets the limits an architect designs against:
Limit
Value on SAP BTP
Memory per app instance
16 GB, with a guaranteed quarter CPU core per GB (so up to 4 cores)
Disk per instance
Up to 10 GB
Application package
1.5 GB
First health check
60 seconds by default, raisable to 10 minutes
Concurrent HTTP connections
3,000 per container
Log rate
4,000 lines per second per instance by default
Audit events
Kept 14 days
SSH into apps
Off by default
SAP's supported features page adds what isn't there on BTP: container-to-container networking, isolation segments, TCP routing and CredHub credential delivery. Docker images, tasks, WebSockets and HTTP/2 are supported.
Billing. SAP's Cloud Foundry metering page says creating an org is free; runtime memory is billable. The monthly figure is the hourly memory reserved across all spaces of the global account, divided by 730 and rounded up to a full GB. Memory counts while it is reserved, so an idle instance costs the same as a busy one. A task that runs 20 minutes a night reserves memory only for those minutes.
Kyma provisions a Kubernetes cluster through the open-source project Gardener on AWS, Google Cloud, Azure or Alibaba Cloud, in the region you choose. You add modules: Istio, API Gateway and the SAP BTP Operator by default, and optional ones such as Eventing, Serverless, Telemetry, Keda and the Connectivity Proxy, listed on SAP's Kyma modules page. Access uses Kubernetes role-based access control and namespaces.
What Kyma has that Cloud Foundry on BTP lacks, per SAP's comparison guide: a service mesh, internal networking between workloads, streaming endpoints (RTMP, RTSP, WebRTC), and the full Kubernetes API for operators, custom resources and Helm charts. What it lacks: multitarget application (MTA) deployment and SAP Cloud Transport Management, for which SAP points Kyma users to Helm charts and a CI/CD pipeline.
Sizing and billing. SAP's comparison guide gives the minimum as three nodes of 2 CPU and 8 GB, with roughly 40% reserved to run the infrastructure. The provisioning parameters show three as the default and minimum Auto Scaler Min on the standard plans, and a default machine type of 2 vCPU and 8 GB. Billing is in capacity units per hour: SAP's Kyma metering page gives 0.24 × 1.5 units per hour for a 2 vCPU node and 0.24 × 4 for an 8 vCPU node. 32 GB of storage is included; more is billed in 32 GB blocks. Kyma has no subscription-based commercial model.
A workload too big for the default nodes goes on an additional worker node pool with larger machines. SAP recommends high availability for such pools in production. Without it, the pool sits in one zone.
Each system has a dedicated SAP HANA Cloud database, linked 1:1, according to SAP's ABAP environment page. Development follows ABAP Cloud: the RESTful application programming model, CDS and released APIs only, the same model used for extensions inside S/4HANA.
Sizing and billing. SAP's ABAP metering page says a standard system needs at least 2 HANA Compute Units and 1 ABAP Compute Unit, metered hourly in 16 GB blocks. SAP's ABAP Compute Units page defines one ACU as 16 GB of memory and about four vCPUs. The resilience page explains the multi-availability-zone option: ACUs stay the same, HCUs double because a second database instance runs in another zone.
Hibernation. SAP's hibernation page says stopped systems use no ACUs and only minimal HCUs; costs can drop below 5% on consumption-based contracts. SAP starts stopped systems for upgrades and hotfix imports. The developer's guide says customers can nominate non-production systems for a pre-upgrade up to four weeks before the quarterly release upgrade.
SAP's operating model splits the work for Cloud Foundry and Kyma:
Task
Cloud Foundry
Kyma
Patch the operating system under your app
SAP, for buildpack apps; you restage
You, in your container images
Keep platform add-ons current
SAP provides new system buildpacks
You keep custom module configuration correct
Scale, monitor, report health
You
You, and you may need to configure platform resources
Back up data you deploy yourself
Not applicable
You, for storage you run in the cluster
Penetration or performance tests
Tell SAP first and ask for approval
Not listed as a Kyma task
SAP's comparison guide also lists the release rhythm: bi-weekly Cloud Foundry updates and continuous delivery for Kyma modules. Both have a quarterly major upgrade window as the only contractually planned downtime.
You will write Calder's workload list, place each workload on a runtime with a script that encodes the rules above, compare the result with a partner's proposal, and turn it into a decision document. Everything runs on your computer with no account. One optional step checks a real trial subaccount.
flowchart LR
I[--init] --> J[calder_workloads.json]
J --> R[runtime_fit.py<br/>rules from SAP's limits]
R --> T[placement and<br/>partner comparison]
R --> U[--units<br/>billing units]
R --> W[--write]
W --> M[calder_runtime_decisions.md]
In VS Code, create a new file unit21/runtime_fit.py.
Paste this code and save. It uses only Python's built-in modules, so requirements.txt gets no new lines.
"""Place each of Calder's BTP workloads on a runtime: Cloud Foundry, Kyma, the ABAP environment,
or no BTP runtime at all (ABAP Cloud inside S/4HANA).
Usage (run from the course folder):
python unit21/runtime_fit.py --init write the workload list to unit21/calder_workloads.json
python unit21/runtime_fit.py place every workload and compare with the partner's proposal
python unit21/runtime_fit.py --units also show the monthly billing units per runtime
python unit21/runtime_fit.py --available FILE
check the placements against `btp --format json list
accounts/available-environment` output saved in FILE
python unit21/runtime_fit.py --write write unit21/calder_runtime_decisions.md (the deliverable)
Built-in modules only. No account, no network, no randomness. Calder Pumpworks is fictional;
workloads, sizes and the partner's proposal are course values. The rules restate limits from SAP's
documentation as read on 2026-11-26; billing units follow SAP's metering pages, and the Kyma
node count is a course approximation, not SAP's sizing method.
"""
import argparse
import json
import math
import sys
from pathlib import Path
WORKLOADS = Path("unit21/calder_workloads.json")
REPORT = Path("unit21/calder_runtime_decisions.md")
CF, KYMA, ABAP, ONSTACK = "Cloud Foundry", "Kyma", "ABAP environment", "ABAP Cloud in S/4HANA"
SKILL = {CF: "cf", KYMA: "kubernetes", ABAP: "abap", ONSTACK: "abap"}
# Limits from SAP's documentation (read 2026-11-26)
CF_MAX_INSTANCE_GB = 16 # SAP BTP-specific configurations: max instance memory per app
CF_MAX_PACKAGE_GB = 1.5 # maximum application package size
CF_MAX_START_MIN = 10 # health check timeout can be raised to 10 minutes
KYMA_ONLY = { # needs the Cloud Foundry environment on BTP doesn't meet
"tcp-inbound": "TCP routing isn't supported in the Cloud Foundry environment on SAP BTP",
"internal-network": "container-to-container networking isn't supported in Cloud Foundry on SAP BTP",
"service-mesh": "SAP's comparison lists service mesh support for Kyma only",
"streaming": "SAP's comparison lists streaming endpoints (RTMP, RTSP, WebRTC) for Kyma only",
"k8s-operator": "Kubernetes operators and custom resources need a Kubernetes cluster",
"helm": "Helm charts deploy to Kubernetes",
}
CF_STRENGTHS = {
"mta": "multitarget applications (MTA) are supported in Cloud Foundry, not in Kyma",
"transport-cts": "SAP Cloud Transport Management is listed for Cloud Foundry; Kyma uses Helm and a pipeline",
}
# Metering (read 2026-11-26)
HOURS = 730 # SAP divides Cloud Foundry GB-hours by 730 per month
KYMA_CU_PER_HOUR = {2: 0.24 * 1.5, 4: 0.24 * 2, 8: 0.24 * 4, 16: 0.24 * 8, 32: 0.24 * 16}
KYMA_NODE_CU_PER_HOUR = KYMA_CU_PER_HOUR[2] # default 2 vCPU node; SAP's capacity unit table
POOL_SIZES = [(2, 8), (4, 16), (8, 32), (16, 64), (32, 128)] # general-purpose vCPU, GB
KYMA_MIN_NODES = 3 # default and minimum Auto Scaler Min for the standard plans
KYMA_NODE_GB = 8 # default machine type: 2 vCPU, 8 GB
KYMA_RESERVED = 0.40 # "roughly 40% reserved" on the minimum cluster (SAP comparison)
ABAP_MIN_ACU, ABAP_MIN_HCU = 1, 2
HIBERNATED_SHARE = 0.05 # SAP: hibernated systems can drop to less than 5% of total cost
def sample():
def w(id_, name, team, language, packaging, mem, inst, hours, skills, proposed, **kw):
d = {"id": id_, "name": name, "owner_team": team, "language": language,
"packaging": packaging, "memory_gb_per_instance": mem, "instances": inst,
"hours_per_month": hours, "team_skills": skills, "needs": [],
"reuses_abap": False, "extends": "none", "writes_in_s4_transaction": False,
"multi_az": False, "nonprod_hibernated_hours": 0, "proposed": proposed}
d.update(kw)
return d
return {
"company": "Calder Pumpworks (fictional)",
"as_of": "2026-11-26",
"note": "Production stage only. Dev and test add their own units. Course values.",
"workloads": [
w("W01", "Order-exceptions agent API (AGT_ORDER_EXC)", "AI platform", "python",
"buildpack", 0.5, 2, 730, ["cf"], KYMA,
purpose="Reads blocked sales orders in CP10 and drafts next steps"),
w("W02", "Distributor order-status app (R03)", "Apps team", "node", "buildpack",
1, 2, 730, ["cf"], KYMA, needs=["mta", "transport-cts"],
purpose="CAP service and Fiori UI that Hallam and other distributors sign in to"),
w("W03", "AI gateway calder-ai-gw (LiteLLM)", "AI platform", "container", "image",
2, 2, 730, ["cf"], KYMA,
purpose="Proxy in front of the generative AI hub for both agents, moving off its own hosts"),
w("W04", "MES event listener (I02 successor)", "Integration", "java", "buildpack",
1, 2, 730, ["cf"], KYMA, needs=["tcp-inbound"],
purpose="Receives order confirmations that the Rockford MES pushes over plain TCP"),
w("W05", "Intercompany price job (R08)", "SAP development", "abap", "abap",
0, 0, 0, ["abap"], ABAP, extends="s4-cp10", writes_in_s4_transaction=True,
purpose="Sets CP-IMP200's monthly price at cost plus 8% in CP10"),
w("W06", "Test certificate archive", "SAP development", "abap", "abap",
0, 0, 730, ["abap"], CF, reuses_abap=True, extends="cp10-and-cp20",
nonprod_hibernated_hours=510,
purpose="Reuses CP20's ECC certificate logic and serves CP10 and CP20 until the 2027 rollout"),
w("W07", "Nightly notification coding batch", "AI platform", "python", "buildpack",
1, 1, 20, ["cf"], KYMA,
purpose="Codes closed maintenance notifications once a night as a task"),
],
}
def place(wl):
"""Return (runtime, reasons, warnings) for one workload."""
reasons, warnings = [], []
if wl["language"] == "abap" or wl.get("reuses_abap"):
if wl.get("extends") == "s4-cp10" and wl.get("writes_in_s4_transaction"):
reasons.append("ABAP logic that changes data inside one S/4HANA system: build it "
"there with ABAP Cloud (developer extensibility), not on BTP")
rt = ONSTACK
else:
reasons.append("ABAP code or skills that serve more than one system or stay apart "
"from S/4HANA: the ABAP environment runs ABAP Cloud on BTP")
rt = ABAP
else:
kyma_needs = [n for n in wl.get("needs", []) if n in KYMA_ONLY]
big = wl.get("memory_gb_per_instance", 0) > CF_MAX_INSTANCE_GB
large_pkg = wl.get("package_gb", 0) > CF_MAX_PACKAGE_GB and wl["packaging"] != "image"
slow = wl.get("start_minutes", 0) > CF_MAX_START_MIN
if kyma_needs or big or large_pkg or slow:
rt = KYMA
reasons += [KYMA_ONLY[n] for n in kyma_needs]
if big:
reasons.append(f"{wl['memory_gb_per_instance']} GB per instance is above Cloud "
f"Foundry's {CF_MAX_INSTANCE_GB} GB limit")
if large_pkg:
reasons.append(f"package above Cloud Foundry's {CF_MAX_PACKAGE_GB} GB limit")
if slow:
reasons.append(f"start-up above Cloud Foundry's {CF_MAX_START_MIN}-minute health check limit")
lost = [n for n in wl.get("needs", []) if n in CF_STRENGTHS]
warnings += [f"loses: {CF_STRENGTHS[n]}" for n in lost]
else:
rt = CF
reasons.append("no need Cloud Foundry can't meet; it bills from the memory the "
"app reserves, with no cluster to run")
reasons += [CF_STRENGTHS[n] for n in wl.get("needs", []) if n in CF_STRENGTHS]
if wl["packaging"] == "image":
warnings.append("container image on Cloud Foundry: your team builds and patches "
"the image; only buildpack apps get the stack SAP patches")
if wl.get("hours_per_month", HOURS) < 100:
reasons.append("runs a few hours a month: as a Cloud Foundry task it reserves memory only while it runs")
if SKILL[rt] not in wl.get("team_skills", []):
warnings.append(f"skills gap: {wl['owner_team']} lists no '{SKILL[rt]}' skill")
return rt, reasons, warnings
def units(wls, placed):
"""Monthly billing units per runtime, production stage only."""
cf_gb_hours = sum(w["memory_gb_per_instance"] * w["instances"] * w["hours_per_month"]
for w in wls if placed[w["id"]][0] == CF)
cf = math.ceil(cf_gb_hours / HOURS) if cf_gb_hours else 0
kyma_ws = [w for w in wls if placed[w["id"]][0] == KYMA]
kyma = None
if kyma_ws:
usable = KYMA_NODE_GB * (1 - KYMA_RESERVED)
small = [w for w in kyma_ws if w["memory_gb_per_instance"] <= usable]
mem = sum(w["memory_gb_per_instance"] * w["instances"] for w in small)
nodes = max(KYMA_MIN_NODES, math.ceil(mem / usable))
cu = nodes * KYMA_NODE_CU_PER_HOUR * HOURS
pools = []
for w in kyma_ws:
if w in small:
continue
# an additional worker node pool: the smallest general-purpose size whose 90%
# holds one instance, one instance per node (course simplification)
vcpu, gb = next(((v, g) for v, g in POOL_SIZES if 0.9 * g >= w["memory_gb_per_instance"]),
POOL_SIZES[-1])
pool_cu = w["instances"] * KYMA_CU_PER_HOUR[vcpu] * HOURS
pools.append({"id": w["id"], "nodes": w["instances"], "vcpu": vcpu, "gb": gb,
"cu": round(pool_cu, 1)})
cu += pool_cu
kyma = {"memory_gb": mem, "nodes": nodes, "pools": pools, "cu": round(cu, 1)}
abap = []
for w in wls:
if placed[w["id"]][0] != ABAP:
continue
hcu = ABAP_MIN_HCU * (2 if w.get("multi_az") else 1)
prod_acu_h = ABAP_MIN_ACU * w["hours_per_month"]
prod_hcu_h = hcu * w["hours_per_month"]
run = HOURS - w.get("nonprod_hibernated_hours", 0)
dev = {"acu_h": ABAP_MIN_ACU * run, "hcu_h": ABAP_MIN_HCU * run,
"hibernated_h": w.get("nonprod_hibernated_hours", 0)}
abap.append({"id": w["id"], "acu_h": prod_acu_h, "hcu_h": prod_hcu_h, "dev": dev})
return {"cf_gb_months": cf, "kyma": kyma, "abap": abap}
def load(path):
try:
return json.loads(Path(path).read_text(encoding="utf-8"))
except FileNotFoundError:
sys.exit(f"{path} not found. Run: python unit21/runtime_fit.py --init")
except json.JSONDecodeError as e:
sys.exit(f"{path} is not valid JSON: {e}")
def report(data, show_units, available):
wls = data["workloads"]
placed = {w["id"]: place(w) for w in wls}
print(f"{data['company']}: runtime placement as of {data['as_of']}\n")
print(f"{'ID':4} {'Workload':45} {'Placed on':22} Partner")
disagree = 0
for w in wls:
rt = placed[w["id"]][0]
mark = "" if w.get("proposed") == rt else " <- differs"
disagree += bool(mark)
print(f"{w['id']:4} {w['name'][:45]:45} {rt:22} {w.get('proposed', '-')}{mark}")
print()
for w in wls:
rt, reasons, warnings = placed[w["id"]]
print(f"{w['id']} {rt}")
for r in reasons:
print(f" because {r}")
for x in warnings:
print(f" WARNING {x}")
if any(p[0] == KYMA for p in placed.values()):
img = [w["id"] for w in wls if placed[w["id"]][0] == CF and w["packaging"] == "image"]
if img:
print(f"\nNOTE A Kyma cluster is needed anyway; {', '.join(img)} could share it "
f"instead of running its image on Cloud Foundry. Decide it in the record.")
print(f"\n{disagree} of {len(wls)} placements differ from the partner's proposal.")
if show_units:
u = units(wls, placed)
print("\nMonthly billing units, production stage (not money: apply your own rate card)")
print(f" Cloud Foundry {u['cf_gb_months']} GB of runtime memory (GB-hours / 730, rounded up)")
if u["kyma"]:
k = u["kyma"]
print(f" Kyma {k['nodes']} nodes of 2 vCPU / 8 GB for {k['memory_gb']} GB of "
f"workloads (floor: 3 nodes, even when idle)")
for pl in k["pools"]:
print(f" + {pl['id']}: extra pool of {pl['nodes']} node(s) of "
f"{pl['vcpu']} vCPU / {pl['gb']} GB = {pl['cu']} capacity units "
f"(one zone only; SAP recommends high availability pools in production)")
print(f" = {k['cu']} capacity units")
for a in u["abap"]:
print(f" ABAP env {a['id']} prod {a['acu_h']} ACU-hours + {a['hcu_h']} HCU-hours; "
f"dev system {a['dev']['acu_h']} ACU-h + {a['dev']['hcu_h']} HCU-h running, "
f"{a['dev']['hibernated_h']} h hibernated (under 5% of cost)")
if not u["abap"]:
print(" ABAP none")
if available:
text = Path(available).read_text(encoding="utf-8").lower()
need = {CF: "cloudfoundry", KYMA: "kyma", ABAP: "cloudfoundry"}
print(f"\nAvailable environments in {available}:")
for rt, key in need.items():
if any(p[0] == rt for p in placed.values()):
ok = key in text
why = " (an ABAP system is created in a Cloud Foundry space)" if rt == ABAP else ""
print(f" {'OK ' if ok else 'MISSING'} {rt}: '{key}'{why}")
return placed
def write(data, placed):
wls = data["workloads"]
u = units(wls, placed)
rows = "\n".join(f"| {w['id']} | {w['name']} | {placed[w['id']][0]} | {w.get('proposed', '-')} | "
f"{'; '.join(placed[w['id']][1])} |" for w in wls)
warn = "\n".join(f"- {w['id']}: {x}" for w in wls for x in placed[w["id"]][2]) or "- none"
k = u["kyma"]
kyma_line = (f"{k['nodes']} nodes, {k['cu']} capacity units a month" if k else "no cluster")
REPORT.write_text(f"""# Calder Pumpworks: runtime decisions on SAP BTP
As of {data['as_of']}. Calder Pumpworks is fictional; workloads and sizes are course values.
Limits restate SAP's documentation as read on 2026-11-26.
## Placement
| ID | Workload | Runtime | Partner proposed | Why |
| --- | --- | --- | --- | --- |
{rows}
## Warnings to resolve
{warn}
## Monthly billing units (production stage)
- Cloud Foundry: {u['cf_gb_months']} GB of runtime memory
- Kyma: {kyma_line}
- ABAP environment: {', '.join(f"{a['id']} {a['acu_h']} ACU-h + {a['hcu_h']} HCU-h" for a in u['abap']) or 'none'}
Units, not money. Price them with the rate card from your contract or SAP Discovery Center.
## Decision record: default runtime for Calder's BTP workloads
- **Context:** (why Calder needs a default now; what the partner proposed)
- **Options:** (1) Kyma for everything, (2) Cloud Foundry by default with Kyma and ABAP by exception, (3) ...
- **Decision:** (which option, and the rule that sends a workload to the exception)
- **Consequences:** (skills, the Kyma floor, patching images, transports, what you review each year)
""", encoding="utf-8")
print(f"Wrote {REPORT}. Fill in the decision record before the design review.")
def main():
p = argparse.ArgumentParser(description="Place Calder's workloads on BTP runtimes")
p.add_argument("--init", action="store_true", help="write the sample workload list")
p.add_argument("--file", default=str(WORKLOADS), help="workload list to read")
p.add_argument("--units", action="store_true", help="show monthly billing units")
p.add_argument("--available", help="btp JSON of available environments for a subaccount")
p.add_argument("--write", action="store_true", help="write the decision document")
a = p.parse_args()
if a.init:
WORKLOADS.parent.mkdir(exist_ok=True)
if WORKLOADS.exists():
sys.exit(f"{WORKLOADS} already exists; delete it first to start again.")
WORKLOADS.write_text(json.dumps(sample(), indent=2) + "\n", encoding="utf-8")
print(f"Wrote {WORKLOADS}: {len(sample()['workloads'])} workloads with the partner's proposal.")
return
data = load(a.file)
placed = report(data, a.units or a.write, a.available)
if a.write:
print()
write(data, placed)
if __name__ == "__main__":
main()
Wrote unit21/calder_workloads.json: 7 workloads with the partner's proposal.
Open unit21/calder_workloads.json. Each workload has a language, how it is packaged (buildpack, image or abap), memory per instance, instance count, hours a month, the team's skills, special needs, and the runtime the partner proposed. All values are course values for the fictional Calder.
The seven workloads:
ID
Workload
What is special
W01
Order-exceptions agent API (AGT_ORDER_EXC)
Python, 2 × 0.5 GB, always on
W02
Distributor order-status app (R03 in the fit-to-standard topic)
CAP and Fiori, deployed as an MTA through transports
W03
AI gateway calder-ai-gw (LiteLLM)
A container image; it moves off its own hosts
W04
MES event listener
The Rockford MES pushes over plain TCP (a course assumption)
W05
Intercompany price job (R08)
ABAP that changes prices inside CP10
W06
Test certificate archive
Reuses CP20's ECC ABAP logic and serves both company codes
Calder Pumpworks (fictional): runtime placement as of 2026-11-26
ID Workload Placed on Partner
W01 Order-exceptions agent API (AGT_ORDER_EXC) Cloud Foundry Kyma <- differs
W02 Distributor order-status app (R03) Cloud Foundry Kyma <- differs
W03 AI gateway calder-ai-gw (LiteLLM) Cloud Foundry Kyma <- differs
W04 MES event listener (I02 successor) Kyma Kyma
W05 Intercompany price job (R08) ABAP Cloud in S/4HANA ABAP environment <- differs
W06 Test certificate archive ABAP environment Cloud Foundry <- differs
W07 Nightly notification coding batch Cloud Foundry Kyma <- differs
W01 Cloud Foundry
because no need Cloud Foundry can't meet; it bills from the memory the app reserves, with no cluster to run
W02 Cloud Foundry
because no need Cloud Foundry can't meet; it bills from the memory the app reserves, with no cluster to run
because multitarget applications (MTA) are supported in Cloud Foundry, not in Kyma
because SAP Cloud Transport Management is listed for Cloud Foundry; Kyma uses Helm and a pipeline
W03 Cloud Foundry
because no need Cloud Foundry can't meet; it bills from the memory the app reserves, with no cluster to run
WARNING container image on Cloud Foundry: your team builds and patches the image; only buildpack apps get the stack SAP patches
W04 Kyma
because TCP routing isn't supported in the Cloud Foundry environment on SAP BTP
WARNING skills gap: Integration lists no 'kubernetes' skill
W05 ABAP Cloud in S/4HANA
because ABAP logic that changes data inside one S/4HANA system: build it there with ABAP Cloud (developer extensibility), not on BTP
W06 ABAP environment
because ABAP code or skills that serve more than one system or stay apart from S/4HANA: the ABAP environment runs ABAP Cloud on BTP
W07 Cloud Foundry
because no need Cloud Foundry can't meet; it bills from the memory the app reserves, with no cluster to run
because runs a few hours a month: as a Cloud Foundry task it reserves memory only while it runs
NOTE A Kyma cluster is needed anyway; W03 could share it instead of running its image on Cloud Foundry. Decide it in the record.
6 of 7 placements differ from the partner's proposal.
Read it from the bottom. Six of seven placements differ from the partner's proposal. Only W04 needs Kyma, because of the TCP traffic. W05 leaves BTP altogether. W06 goes the other way: the partner put it on Cloud Foundry, but it is ABAP code that serves two systems.
Read the two warnings. W03's image needs someone to patch it, and W04's team has no Kubernetes skills. Neither changes the placement; both go into the decision record.
Read the NOTE. Once Calder runs a Kyma cluster for W04, W03's image could share it. The script doesn't decide this, because it trades a patching and skills question against cost. You decide it in Step 6.
Monthly billing units, production stage (not money: apply your own rate card)
Cloud Foundry 8 GB of runtime memory (GB-hours / 730, rounded up)
Kyma 3 nodes of 2 vCPU / 8 GB for 2 GB of workloads (floor: 3 nodes, even when idle)
= 788.4 capacity units
ABAP env W06 prod 730 ACU-hours + 1460 HCU-hours; dev system 220 ACU-h + 440 HCU-h running, 510 h hibernated (under 5% of cost)
Read the Kyma line. W04 needs 2 GB, but the cluster floor is three nodes: 3 × 0.36 capacity units an hour × 730 hours. That floor is why "Kyma for everything small" is rarely cheapest, and why sharing an existing cluster is a real option.
The Kyma node count is a course approximation (memory divided by the 60% of each default node left after the reserve). SAP's own Kyma price calculator is the tool for a real estimate.
The end of the output lists each runtime Calder needs as OK or MISSING. The script only searches the file for the words cloudfoundry and kyma, so it doesn't depend on SAP's exact field names. A MISSING Kyma line on a trial is normal: SAP offers the Kyma trial only on request.
Wrote unit21/calder_runtime_decisions.md. Fill in the decision record before the design review.
Open unit21/calder_runtime_decisions.md. It holds the placement table, the warnings and the units. At the end is an empty decision record. Fill in the four lines, for example:
Context: seven workloads; a partner proposed Kyma for all non-ABAP ones.
Options: (1) Kyma for everything, (2) Cloud Foundry by default with Kyma and ABAP by exception, (3) option 2 with W03 moved onto the Kyma cluster.
Decision: your choice, with the rule that sends a workload to an exception.
Consequences: who learns Kubernetes for W04, who patches W03's image, the cluster floor in the budget, which apps use Cloud Transport Management.
What SAP offers for each runtime, as of 26 November 2026:
Cloud Foundry. Consumption-based: the standard environment plan plus the MEMORY plan of the Cloud Foundry Runtime service, with a default quota of 200 GB per subaccount. Subscription-based: memory is paid in advance. A free plan gives a limited memory quota, and build-runtime and build-code plans exist only for SAP Build. SAP's comparison guide lists the Application Autoscaler service for scaling and MTA plus SAP Cloud Transport Management for delivery.
Kyma. Standard plans aws, gcp, azure and alicloud with three availability zones, build runtime plans for SAP Build, a free plan (one node on AWS, once per global account, up to 30 days, no upgrade to paid), and a trial on request for 30 days. Joule in Kyma dashboard helps with cluster troubleshooting, but SAP's Joule in Kyma dashboard page says it isn't available in EU restricted access regions or with a custom OIDC client.
ABAP environment. Plans free (stopped each night), standard (minimum 1 ACU and 2 HCU, mandatory combination with the abap_compute_unit and hana_compute_unit plans) and saas_oem for multitenant SaaS; a deprecated fixed 16 GB plan. The Landscape Portal handles hibernation, pre-upgrade nomination and add-on lifecycle. Elastic scaling of application servers between 1 ACU and a configured maximum is described in SAP's developer's guide.
Regions differ by runtime. Each has its own region page on help.sap.com (Cloud Foundry, Kyma, ABAP), and the lists aren't identical. Check the region of each subaccount against the page for the runtime it will hold.
Where it sits. Calder's placement after the rules, with Calder's own systems on the left:
flowchart LR
S4[S/4HANA CP10<br/>W05 price job inside]
ECC[ECC CP20]
MES[Rockford MES]
subgraph BTP[BTP subaccounts]
CF[Cloud Foundry<br/>W01 W02 W03 W07]
KY[Kyma<br/>W04]
AB[ABAP environment<br/>W06]
end
CF -->|released APIs via destinations| S4
AB -->|released APIs| S4
AB -->|RFC via Cloud Connector| ECC
MES -->|plain TCP| KY
KY --> S4
Non-functional requirements that decide the runtime:
Requirement
Typical target
What breaks if it's missed
Idle cost
Under the budget line set per workload
A three-node cluster carries one small service
Inbound protocol
HTTP for most; TCP for the MES
The listener can't be reached on Cloud Foundry
Memory per instance
16 GB or less on Cloud Foundry
Deployment refused; needs Kyma and a larger pool
Availability
Two or more instances across zones
One instance or a single-zone pool stops in a zone outage
Patch window
Image updates within your vulnerability policy
Unpatched images in production
Release path
One transport route per app
Changes reach production untested
Integration and identity. Each runtime reaches S/4HANA through released APIs and the destination service, and on-premise systems such as ECC CP20 through the Cloud Connector (Connectivity: Cloud Connector, destinations and private links covers both). Users sign in through the subaccount's identity provider in all three. The runtime changes where tokens live: service bindings in Cloud Foundry, Kubernetes Secrets created by the SAP BTP Operator in Kyma, and communication arrangements in the ABAP environment.
Context: seven workloads; a partner proposed one Kyma cluster for the non-ABAP workloads.
Options: Kyma for all; Cloud Foundry by default with exceptions; the default plus shared use of the cluster W04 needs anyway.
Decision: Cloud Foundry by default. Kyma only for documented needs (W04). ABAP inside S/4HANA when it changes CP10's data (W05), the ABAP environment when ABAP serves several systems (W06). W03 stays on Cloud Foundry until the platform team has Kubernetes skills, then moves to the cluster.
Consequences: one Kubernetes skill to build for W04; an image patch owner for W03; a cluster floor in the budget from day one; W06's development system hibernated outside working hours.
What a design review will ask:
Which documented limit sends each Kyma workload to Kyma?
Who patches each container image, and how fast after a vulnerability notice?
What is the idle cost per runtime, and who owns it?
For each ABAP workload, why inside S/4HANA or why outside?
Do the subaccount regions offer the runtimes placed in them?
Security and authorizations. In Cloud Foundry, space roles decide who can push; SSH stays off unless you need it. In Kyma, Kubernetes role-based access per namespace and SAP's Pod security recommendations apply. In the ABAP environment, business roles and communication arrangements control access, as in S/4HANA. Map each to Calder's roles before go-live.
Evaluation. Test each workload where it will run. Health check timeouts, memory limits and log rates differ between runtimes.
Cost. Set memory in every Cloud Foundry manifest. Size Kyma's Auto Scaler Max deliberately; SAP notes that cluster autoscaling isn't covered by the service level agreement. Hibernate non-production ABAP systems on a schedule.
Operations. Restage buildpack apps when SAP ships new buildpacks. Track Kyma module updates, which reach the regular channel about two weeks after the fast channel. Nominate an ABAP test system for the pre-upgrade.
Clean core. All three runtimes keep custom code out of S/4HANA's core. Logic built inside S/4HANA with ABAP Cloud also counts as clean core, as long as it uses released APIs; see the integration platform and clean core topic.
Agents are workloads, so the rules above apply to them unchanged. As of 26 October 2026, SAP's AI golden path for GenAI applications calls its CAP-based reference architecture runtime-agnostic across Cloud Foundry and Kyma, and the golden path for agents lists pro-code agents as running on Cloud Foundry or Kyma. That matches Calder's W01 and W07 on Cloud Foundry. Model calls go to SAP AI Core, which runs outside your runtime, so the runtime doesn't need GPUs for that.
Two things to watch. SAP's AI-native north star architecture (dated 23 October 2026) describes a managed agent runtime with sandboxing, memory and evaluations. It is a target architecture, not a product with a release status, so don't plan around it yet. And low-code agents built in Joule Studio need no runtime from you; where should an agent live compares that choice with your own code on BTP.
Expected: W08 is placed on Kyma because 24 GB is above Cloud Foundry's 16 GB limit, with a skills-gap warning for Quality. The Kyma lines show an extra pool:
Kyma 3 nodes of 2 vCPU / 8 GB for 2 GB of workloads (floor: 3 nodes, even when idle)
+ W08: extra pool of 1 node(s) of 8 vCPU / 32 GB = 700.8 capacity units (one zone only; SAP recommends high availability pools in production)
= 1489.2 capacity units
Decide whether the pool needs high availability, which means more nodes across zones. Change instances to match your decision and run again.
Done whencalder_runtime_decisions.md lists W08 on Kyma with its reason, the units show the extra pool, and the decision record says whether W08's pool runs in one zone or three, and why.
Pick one answer for each question. The explanation appears after you choose.
1What does each runtime hand you, and bill you for?
Answer: C. Cloud Foundry meters reserved memory, Kyma meters capacity units for nodes and storage, and the ABAP environment meters ABAP and HANA Compute Units in 16 GB blocks. The unit you are handed is the unit you pay for.
2Calder's MES listener must accept plain TCP connections. Why does the script place it on Kyma?
Answer: C. SAP's supported features page lists TCP routing among the features not supported on BTP. The connection limit is real but doesn't block TCP; the service level agreement is the same for both runtimes.
3How does Cloud Foundry turn memory into a monthly billing figure?
Answer: A. SAP's metering page defines the GB Memory metric that way, based on the memory reserved per instance. So idle instances cost the same as busy ones, and a nightly task costs only its hours.
4Why does the script print a Kyma floor of 788.4 capacity units for a 2 GB workload?
Answer: D. SAP's minimum is three nodes of 2 vCPU and 8 GB, and its table gives 0.24 × 1.5 capacity units per hour for such a node. Three nodes for 730 hours make 788.4, regardless of how little runs on them.
5The partner wants W03's LiteLLM image on Kyma "because it is a container". What is the better argument?
Answer: C. Cloud Foundry on BTP supports Docker images, and SAP's operating model leaves image patching to the customer; only buildpack apps get the stack SAP patches. Moving W03 onto the cluster W04 already needs is a cost and skills trade-off.
6When does ABAP logic belong inside S/4HANA rather than in the ABAP environment?
Answer: D. Logic that changes one system's data runs in the same system and transaction as that data, with ABAP Cloud. The ABAP environment fits ABAP that serves several systems, like Calder's certificate archive for CP10 and CP20.
7What does the ABAP environment's multi-availability-zone option do to billing?
Answer: A. SAP's resilience page says a second database instance runs in another zone, so HCUs increase by factor 2, while the application servers are only distributed, not added.
8Your W08 image check needs 24 GB and runs on a one-node extra pool. A review asks about availability. What is the right answer?
Answer: D. SAP says an additional pool with high availability disabled is deployed in one zone and lacks zone-level failure tolerance, and recommends enabling it in production. Autoscaling isn't covered by the service level agreement either.
9Which statement about SAP's runtime comparison guide is right?
Answer: B. The guide sends ABAP to the ABAP environment and compares only the two non-ABAP runtimes. It says the decision needn't be made up front or be binary, and it is marked as last updated in July 2025.
Comparison: SAP BTP, Kyma Runtime and SAP BTP, Cloud Foundry Runtime (SAP-docs on GitHub, page marked last updated July 2025, read 2026-11-26)— ABAP goes to the ABAP environment, so the guide compares only Cloud Foundry and Kyma; same SLA levels and multi-AZ support; the decision need not be up front or binary; subpages on sizing (Kyma minimum 3 nodes of 2 CPU and 8 GB with roughly 40% reserved, Cloud Foundry from 1 GB with a quarter core, 16 GB per instance), skills, technical details (MTA and Cloud Transport Management for Cloud Foundry only, service mesh and internal network for Kyma only), protocols (streaming endpoints Kyma only) and release frequency
Service Plans and Metering for Cloud Foundry Runtime (SAP BTP documentation)— creating an org is free, runtime memory is billable; consumption-based default quota of 200 GB per subaccount; GB Memory metric is the month's hourly usage across all spaces divided by 730, rounded up; consumption means memory reserved per instance
Service Plans and Metering for Kyma Runtime (SAP BTP documentation)— no subscription-based model for Kyma; capacity units per hour for nodes (2 vCPU = 0.24 x 1.5, 4 vCPU = 0.24 x 2, 8 vCPU = 0.24 x 4) and storage (32 GB included, then 32 GB blocks at 0.02); free plan once per global account for up to 30 days
Available Plans in the Kyma Environment (SAP BTP documentation)— trial only on request; free plan one node, AWS only, once per global account, no upgrade to paid; standard plans aws, gcp, azure, alicloud with high availability; build runtime plans for SAP Build; provisioning parameters show Auto Scaler Min default 3 and default machine type 2 vCPU, 8 GB
Operating Model (Cloud Foundry and Kyma runtimes, SAP BTP documentation)— SAP patches the stack for buildpack apps, customers restage; customers build and patch images in Kyma and keep module configuration current; customers own app scaling, health reporting, monitoring and custom domains; Kyma customers back up storage they deploy
Use System Hibernation (SAP BTP Developer's Guide)— stopped ABAP systems consume no ACUs and minimal HCUs; costs can drop below 5% on consumption-based contracts; SAP starts stopped systems for upgrades; free tier systems stop each night