Model visualisation

Turning a data or code model into a readable picture of its entities, classes, fields and relationships, so a reader can understand the shape of a domain without opening every source file.

Overview

InCAPassessed

Turning a CDS model, or the classes and tables of ABAP code, into a picture you can read (entities, their elements and the associations between them) so a newcomer can see the shape of a domain without reading every source file.

SAP SHIPS
Node.js →

@sap/cds-dk The command line client and development toolkit for CAP projects, with the commands cds build, cds deploy, cds watch and cds add among them.

Not covered: It stops at one renderer and one shape: a class diagram in Mermaid text. Crow's-foot ER notation, PlantUML output and rendering to an image are not compile targets.

Both are present. How they came to coexist is not established — the community script and the compile target overlap in time, and this atlas has no evidence about which influenced which.

Sourcecds CLI — cds compile --to mermaidchecked
THE COMMUNITY ADDS

InABAPassessed

In ABAP the model is spread across classes, function groups and tables, so a diagram is extracted from the repository: SAP2Moose writes a model file for Moose2Model, and ZUML_DIAGRAM draws class diagrams through PlantUML.

SAP SHIPS

The ABAP Workbench generates UML class diagrams from classes, interfaces, data types and function groups, treating function groups and programs as classes. It starts from a package's context menu in the Object Navigator.

Not covered: At code objects in SAP GUI: database tables are not among what the page says the tool analyses.

SourceSAP Help — Object Navigatorchecked
THE COMMUNITY ADDS

Community tools extract a model for an external renderer, as SAP2Moose does for Moose2Model, or draw it themselves through PlantUML or Graphviz, as ZUML_DIAGRAM and abapGraph do. An Eclipse plugin, abap-search-tools-ui, reads CDS views as a tree of the entities they build on.

Artifacts6

Group by6 of 6 artifacts
ArtifactSignals
Apps2
SAP2MooseAn ABAP program that extracts model data from a system as a SOMIX model, for Moose2Model to draw as a dependency diagram.
Signals
none
ZUML_DIAGRAMABAP program drawing UML class diagrams through PlantUML
Signals
Quiet
CLI tools2
@sap/cds-dkCommand line client and development toolkit for CAP
Signals
none
sap-cds-erdAWK script sketching an ER diagram from .cds files
Signals
Quiet
IDE extensions1
ABAP Search and Analysis ToolsEclipse plugin for ABAP object search and CDS view analysis
Signals
Functional boundary
Packages1
abapgraphABAP library for creating Graphviz graphs
Signals
Quiet

Content1

Group by
Piece, what it offers
Diagrams related to OData entities (CAP & ECC)
SAP Community, Pierre_Godart, Blog

Details

What changed — and what it makes stale1
@sap/cds-dk 8.0.2, CAP

cds compile --to mermaid became a built-in compile target, emitting a Mermaid class diagram from a model. The 8.x line reached npm on 2024-07-12.

Makes stale:

Advice that a diagram needs an external script or a paid tool. It needs neither, for a class diagram.

Sourcecds CLI — cds compile --to mermaidchecked
Coverage
statecore and community, CAP
assessed
state in ABAPcore and community, assessed
relationshipunassessed
also inABAP
Sourcecds CLI — cds compile --to mermaidchecked
For your agent
Ref
capability:model-visualisation
JSON
/capabilities/model-visualisation.json
MCP
Connecting an agent