Open-source SAP CDS modeling tool for VS Code supporting hybrid, textual- and graphical editing!
Main features:
- 📝 Textual Language for the specification of ER2CDS models in the textual editor. Assistive validation and rich-text editing support, enabled with the Language Server Protocol, allows to quickly get familiar with the available language constructs.
- 📊 Diagram View that is fully synchronized with the textual model and automatically updates on changes. Also offers an interactive toolbar with graphical editing actions, layout mechanisms, and multi-notation support
- 🖨️ Code Generation to generate CDS view entities out of the specified ER2CDS models and integrate with existing databases.
- 📥 Import of existing CDS view entities from a connected SAP S/4HANA system.
📖 Table of Contents
ER2CDS aims to provide an open-source and modern solution for a model-driven development process of CDS by making use of the Language Server Protocol (LSP). The protocol is used for communicating textual language features to the VS Code client and is further extended to also support graphical editing. Additionally, a webservice deployed directly on a SAP S/4HANA system allows to integrate the system's datamodel into ER2CDS.
Research The tool is based on extensive research. The evaluation results can be found in Evaluation.
Built With
The language server is realized with Langium, while the diagramming capabilities are based on Sprotty. Sprotty enhances the server with graphical language features (using sprotty-server
) and integrates with VS Code through Sprotty VS Code Extensions.
Download and install the extension from the VS Code Marketplace, see the Installation page in the Wiki for instructions.
New ER2CDS Model
After installation, ER2CDS models can be created in .er2cds
files. Use the example below to get started with a basic model.
er2cds ZER2CDS_MANAGER
entity Employee {
key PERNR : NUMC
FNAME : CHAR as FirstName
LNAME : CHAR as LastName
DEPARTMENT_ID : NUMC
}
entity Department {
no-out DEPARTMENT_ID : NUMC
NAME : CHAR as DepartmentName
LOC : CHAR as Location
}
relationship manages {
Employee[1] -> Department[1]
join order 1
DEPARTMENT_ID = DEPARTMENT_ID
}
Open the Diagram The corresponding ER2CDS Diagram can be opened by using the button in the editor toolbar, the context menu when right-clicking the file, or by pressing Ctrl/⌘ + O.
(Optional) Connect SAP S/4HANA
- Create the CDS view entities
- Create the Service Definition
- Create a Service Binding (ZER2CDS) for the Service Definition
- Publish the service under
/sap/opu/odata/sap/ZER2CDS
Learn More For more information on how to use the tool, see the ER2CDS Wiki.
Prerequisites
Download or clone the repository and in the root folder of the project execute the following commands:
npm run build --prefix ./extension
npm run build --prefix ./language-server
npm run build --prefix ./webview
The project can be run in development mode in VS Code by pressing F5 or selecting Run ➜ Start Debugging
from the menu.
Project issues are managed on GitHub, see Open Issues for the currently tracked issues. Do not hesitate to report a bug or request a feature through the offered Issue Templates. For questions, simply use a blank issue.
Contributions to the project are always welcome!
Contributors:
- Gallus Huber (main developer)
- Dominik Bork
See All Contributors.
If you like our work, please feel free to buy us a coffee ☕️
The project is distributed under the MIT License. See License for more details.
Check out our other modeling tools!