Visual SAP #0 — PlantUML Setup in VS Code (And How to Actually Speak Diagram Code)

This isn’t Visio. This is code. And if you learn it — you’ll never make static diagrams again.
🛠️ Step 1: Set Up PlantUML in VS Code
Skip the drag-and-drop pain. Here’s the clean dev setup.
✅ You need:
VS Code — Download here
Java (JRE or JDK 8+)
- Install via Adoptium
Graphviz — the layout engine
Windows: Download
macOS:
brew install graphviz
Linux:
sudo apt install graphviz
🔌 In VS Code:
Hit
Ctrl+Shift+X
, searchPlantUML
, install the one by jebbsDone. You can now preview diagrams with
Alt + D
✍️ Step 2: Your First Diagram
Create a file hello.puml
, paste this:
@startuml
title My First SAP Diagram
"Fiori App" --> "Gateway"
"Gateway" --> "Backend"
"Backend" --> "Database"
@enduml
Press Alt + D
. You just built a diagram with code.
💡 Step 3: Learn the Language — PlantUML’s DSL
PlantUML uses a simple domain-specific language (DSL). Think of it like Markdown, but for diagrams.
You don’t drag — you declare what’s in your system, and how it connects.
🔑 Core Syntax Concepts
Concept | Syntax Example | What It Does |
Diagram block | @startuml ... @enduml | Wraps the diagram |
Title | title SAP Flow | Adds a diagram title |
Shapes/Nodes | "A" or component A , class B | Defines objects |
Arrow | A --> B | Draws a line from A to B |
Labeled arrow | A --> B : sends request | Adds a label to the line |
Aliases | "Fiori App" as F | Shortens names |
Notes | note right of A : Some info | Adds explanations |
📦 What You Can Model
Use Case | PlantUML Shape | Example |
User/system interaction | actor , participant | sequence diagrams |
Systems/modules | component , node | component diagrams |
Tables/entities | entity | ER diagrams |
Objects and relationships | class , interface | ABAP OO logic |
Processes and flows | :action; , if/else | activity diagrams |
🧠 Real-World SAP Example (Sequence Diagram)
plantumlCopyEdit@startuml
title Create Delivery — SAP Flow
actor User
participant "Fiori App" as F
participant "Gateway"
participant "Backend"
participant "S/4 BAPI"
User -> F : Submit Outbound Delivery
F -> Gateway : OData Call
Gateway -> Backend : RFC Call
Backend -> "S/4 BAPI" : BAPI_OUTB_DELIVERY_CREATE
"S/4 BAPI" --> Backend : Result
Backend --> Gateway : Response
Gateway --> F : Delivery created
F --> User : Done
@enduml
💥 This is how you document flows like a pro, not with screenshots or arrows in PowerPoint.
🎯 Why Learn the DSL?
Because it gives you superpowers:
Make any diagram in seconds
Store diagrams as text (version-controlled)
Reuse and extend easily
Embed in GitHub, Confluence, Docs
Automate → generate hundreds of diagrams
It’s like knowing SQL vs clicking filters in Excel.
Same data. More control.
🚀 What’s Next?
We go to the heart of SAP logic:
👉 Visual SAP #1 — ER Diagrams That Actually Help You Understand SAP Data
We’ll map MARA
, MAKT
, and MVKE
in PlantUML and show how to think in relations, not rows.
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.