Visual SAP with plantUML #7 C4 Model

C4 stands for:
Context – Where the system sits in the bigger world
Container – What it consists of (apps, DBs, APIs)
Component – What’s inside each container
(Code — optional)
It’s not UML, but a practical way to show how a system works — at different levels of zoom.
📌 Why Use C4 in SAP Projects?
Situation | Why C4 Helps |
Explaining system architecture | Layers clarify backend, UI, interfaces |
Designing cloud/on-prem landscapes | Shows what's where and how they connect |
Documenting SAP integrations | SAP ↔ non-SAP made visible |
Aligning with dev & infra teams | Shared visual language |
Rollout or onboarding | Helps others understand architecture |
🧠 Levels You Actually Need
In most SAP projects, you’ll mostly use:
Level 1 — Context (systems + people)
Level 2 — Container (apps, APIs, DBs)
That’s enough for 90% of real-world needs.
✍️ Notation in PlantUML (C4 Library)
You need to import the C4 library:
plantuml
CopyEdit
!includeurl <https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml>
Use:
Person()
System()
System_Ext()
Container()
✅ C4 Level 1 — Context Diagram (SAP Integration)
pl
CopyEdit
@startuml
!includeurl <https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml>
Person(user, "Sales Rep")
System(s4hana, "SAP S/4HANA")
System_Ext(crm, "External CRM")
System_Ext(po, "SAP Process Orchestration")
user --> s4hana : uses Fiori apps
s4hana --> po : sends IDocs
po --> crm : sends formatted data
@enduml
This answers:
"Where is SAP in the bigger system landscape?"
✅ C4 Level 2 — Container Diagram (S/4HANA View)
plantuml
CopyEdit
@startuml
!includeurl <https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml>
System_Boundary(s4, "SAP S/4HANA") {
Container(fiori, "Fiori Launchpad", "UI5", "User interface for business processes")
Container(gateway, "SAP Gateway", "OData/RFC", "Exposes backend logic")
Container(appcore, "Application Layer", "ABAP", "Implements core logic")
Container(db, "HANA DB", "HANA", "Stores transactional data")
}
Person(user, "Internal User")
user --> fiori
fiori --> gateway
gateway --> appcore
appcore --> db
@enduml
This answers:
"What’s inside SAP, and how do the parts work together?"
✅ When to Use C4 in SAP
C4 Level | Use For |
Context | Architecture reviews, integration maps |
Container | System breakdown, deployment documentation |
Component | Rare — internal custom modules or apps |
Code | Optional — ABAP class maps (better as class diagram) |
🧠 Pro Tips
✅ Use System_Ext
for non-SAP systems
✅ Add short descriptions for clarity
✅ Use it in workshops, proposals, architecture decks
✅ Keep C4 Level 1 + 2 separate — different audiences
✅ Summary
C4 helps you think in layers:
“What’s outside?” → “What’s inside?” → “How does it run?”
It’s the fastest way to communicate SAP architecture without confusion.
Use it to:
Show integrations
Document system structure
Align across tech & business
Subscribe to my newsletter
Read articles from Dzmitryi Kharlanau directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Dzmitryi Kharlanau
Dzmitryi Kharlanau
SAP Logistics Consultant with 10+ years of experience in SAP SD, SAP MM, SAP LE, and SAP IS-Automotive. Skilled in SAP system support, integration, and process improvements. Achievements ✔️ Delivered custom logistics solutions, overseeing the entire process from concept to go-live. ✔️ Achieved SLA compliance in JIT environments, managing tasks from requirements to release independently. ✔️ Resolved complex issues swiftly, minimizing downtime and optimizing efficiency. Interests: Motivated to work with 🔧 S/4HANA SD, MM, BTP, and ABAP, taking responsibility for end-to-end solutions.