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 CaseWhy It Helps
Explaining integration logicMakes system communication explicit
Designing API / IDoc flowsClarifies sender, receiver, steps
Documenting middleware behaviorShows what goes through PO/CPI
Debugging timing/order issuesVisualize async vs sync
Functional/technical handoffAligns expectations between teams

🧩 Sequence Diagram Notation (PlantUML)

ElementSyntaxMeaning
Participantparticipant "Name"Actor or system
Actoractor "User"External user (optional)
Message (β†’)A -> B : messageSynchronous call
Async (β†’>)A ->> B : fire-and-forgetAsynchronous call (IDoc, CPI)
Return (--)B --> A : responseResponse
Notesnote right of A : commentComments

βœ… 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.

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.