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:

  1. VS CodeDownload here

  2. Java (JRE or JDK 8+)

  3. Graphviz — the layout engine

    • Windows: Download

    • macOS: brew install graphviz

    • Linux: sudo apt install graphviz

🔌 In VS Code:

  • Hit Ctrl+Shift+X, search PlantUML, install the one by jebbs

  • Done. 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

ConceptSyntax ExampleWhat It Does
Diagram block@startuml ... @endumlWraps the diagram
Titletitle SAP FlowAdds a diagram title
Shapes/Nodes"A" or component A, class BDefines objects
ArrowA --> BDraws a line from A to B
Labeled arrowA --> B : sends requestAdds a label to the line
Aliases"Fiori App" as FShortens names
Notesnote right of A : Some infoAdds explanations

📦 What You Can Model

Use CasePlantUML ShapeExample
User/system interactionactor, participantsequence diagrams
Systems/modulescomponent, nodecomponent diagrams
Tables/entitiesentityER diagrams
Objects and relationshipsclass, interfaceABAP OO logic
Processes and flows:action;, if/elseactivity 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.

0
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.