Visual SAP with plantUML #4 Sequence Diagrams

A sequence diagram shows the order of interactions between systems, modules, or users.
You use it to document or design communication flows β especially when it matters who does what and when.
In SAP, that usually means:
IDoc flows
API calls
RFC sequences
Middleware handshakes (PO / CPI / Gateway)
π When to Use Sequence Diagrams
Use Case | Why It Helps |
Explaining integration logic | Makes system communication explicit |
Designing API / IDoc flows | Clarifies sender, receiver, steps |
Documenting middleware behavior | Shows what goes through PO/CPI |
Debugging timing/order issues | Visualize async vs sync |
Functional/technical handoff | Aligns expectations between teams |
π§© Sequence Diagram Notation (PlantUML)
Element | Syntax | Meaning |
Participant | participant "Name" | Actor or system |
Actor | actor "User" | External user (optional) |
Message (β) | A -> B : message | Synchronous call |
Async (β>) | A ->> B : fire-and-forget | Asynchronous call (IDoc, CPI) |
Return (--) | B --> A : response | Response |
Notes | note right of A : comment | Comments |
β Example: Create Delivery via Fiori
plantuml
CopyEdit
@startuml
title Sequence Diagram β Delivery Creation Flow
actor "User"
participant "Fiori App"
participant "SAP Gateway"
participant "Backend (S/4HANA)"
participant "Database"
"User" -> "Fiori App" : Submit Delivery
"Fiori App" -> "SAP Gateway" : OData Request
"SAP Gateway" -> "Backend (S/4HANA)" : Call BAPI
"Backend (S/4HANA)" -> "Database" : Update Tables
"Backend (S/4HANA)" --> "SAP Gateway" : BAPI Response
"SAP Gateway" --> "Fiori App" : Success
"Fiori App" --> "User" : Confirmation
@enduml
This is simple, but powerful.
You can use it to explain almost any SAP process that crosses boundaries.
π Real SAP Use: IDoc Outbound via PO
plantuml
CopyEdit
@startuml
title Sequence Diagram β IDoc via SAP PO
participant "S/4HANA"
participant "SAP PO"
participant "3rd-Party System"
"S/4HANA" ->> "SAP PO" : Send IDoc (ORDERS05)
"SAP PO" ->> "3rd-Party System" : Transformed XML
"3rd-Party System" --> "SAP PO" : 200 OK
"SAP PO" --> "S/4HANA" : Status Update (optional)
@enduml
Use ->>
for asynchronous messages like IDocs or messages to CPI/PO.
βοΈ Rules Recap
Define each participant
Use arrows to show direction
Label messages (what is sent)
Use
>>
for async flows (IDoc, JMS)Keep sequence logical (top-down)
Add only meaningful participants
π§ Pro Tips
β Use real names from your landscape (not just "System A")
β Combine with notes to explain behavior
β Use this in technical specs or when aligning with middleware teams
β It helps when onboarding new devs or partners
β Summary
If you're working on SAP integration, sequence diagrams are essential.
They show who talks to whom, when, and with what. Thatβs all you need.
Use them for:
IDoc and API flows
Middleware handoffs
Process debugging
Technical communication
Next up:
π Visual SAP #5 β Class Diagrams for ABAP: Make Logic Visual and Sharable
We'll map objects, methods, relationships β and show how to visualize your Z-logic before coding.
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.