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.
Advice that a diagram needs an external script or a paid tool. It needs neither, for a class diagram.
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.
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/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.
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.
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.
Community tools extract a model for an external renderer, as SAP2MooseSAP2MooseAn ABAP program that extracts model data from a system as a SOMIX model, for Moose2Model to draw as a dependency diagram.independent, abap does for Moose2Model, or draw it themselves through PlantUML or Graphviz, as ZUML_DIAGRAMZUML_DIAGRAMAn ABAP program that draws a UML class diagram of chosen objects, rendered over the internet through PlantUML and shown inline in CL_GUI_HTML_VIEWER.independent, abap and abapGraphabapgraphAn ABAP library for creating Graphviz graphs, written to give the maintainer's own ABAP debugger object graph extension a more compact layout, with demo code as its documentation.independent, abap do. An Eclipse plugin, abap-search-tools-uiABAP Search and Analysis ToolsAn Eclipse plugin with an object search dialog over repository objects and a view that analyses CDS views top-down and answers where-used questions, fed by its own ADT backend in the system.independent, abap, reads CDS views as a tree of the entities they build on.
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.
Advice that a diagram needs an external script or a paid tool. It needs neither, for a class diagram.
capability:model-visualisation