Mapping Diagram
1 · What it does
The Mapping Diagram draws the data model of a mapping file from the SAP Mapping Studio. It shows which SAP tables the mapping reads, via which fields the tables are linked with each other, and which fields of the e-invoice according to EN 16931 each table supplies.
There are two views. The compact view shows, for each table, the fields of the standard ( BT ) that it supplies. The field view shows, for each table, the key and data fields with their target, similar to an ER diagram. Both views can be saved as SVG, as PNG and as Mermaid source text.
The tool works according to these principles:
- It is a single HTML file. You open it in the browser; there is no installation.
- It only reads. The mapping file is drawn and not changed.
- Your data stays in the browser. The tool reads the mapping file from your own computer and sends no content to a server.
Note: The user interface is in German. This manual quotes the labels as they appear on screen and gives their meaning in English in brackets.
2 · Requirements
| What | Requirement |
|---|---|
| Browser | A current browser. |
| Mapping file | A JSON file created with the SAP Mapping Studio. The tool rejects other JSON files. |
3 · Opening a mapping file
If the tool cannot use the file, a message appears at the bottom:
| Message | Meaning |
|---|---|
| „Die Datei ist kein gültiges JSON.“ ( not valid JSON ) | The file cannot be read. |
| „Das ist eine Tabellendefinition, keine Mapping-Datei.“ ( a table definition, not a mapping file ) | The file describes SAP tables for the Mapping Studio and contains no mapping. |
| „Unbekanntes Format – erwartet wird eine Mapping-Datei.“ ( unknown format ) | The file is JSON, but not a mapping file. |
A newly opened file replaces the previous one. The tool does not remember any file; after reloading the page you open the file again.
4 · What the diagram shows
Each box is a table as the mapping reads it. If the mapping reads the same table along two different routes, it appears twice. Each line is a step from one table to the next.
| Display | Meaning |
|---|---|
| box with a thick border | The header source, from which everything is read. |
| box with a thin border | A table that is read via an access path. |
| purple box | A repetition, for example the line items. Below the table name is the name of the group. The tooltip names its number, with the addition „je Zeile“ ( per row ) for a group that can occur several times. |
| grey line | A link between two tables. |
| purple line | The route to a repetition. |
The left column shows the same legend. Under „Inhalt“ ( content ) are the numbers of tables, links, repetitions, access paths and supplied BT fields.
Depending on the settings, a box contains:
- at the top the role in the form «BG-… name». It names the group of the standard into which most fields of this table flow. A repetition has no role here.
- the table name,
- below it the names of the access paths or repetitions that end at this table, at most three; for the header source it says „Kopfquelle“ ( header source ),
- in the compact view the numbers of the supplied fields, for example
BT-1, - in the field view the individual fields ( chapter 5 ).
The lines carry the link conditions, for example VBELN = BKPF-AWKEY. A line shows at most three conditions; it summarises further ones as „… +“ with their number. When the mouse pointer is over a box or a line, a tooltip gives all details in full.
5 · View and layout
The left column controls what the diagram shows. The diagram is redrawn immediately after every change.
| Setting | Effect |
|---|---|
| „Kompakt — Tabellen und BT-Felder“ ( compact, tables and BT fields ) | For each table, the numbers of the fields of the standard that it supplies. |
| „Felder — Schlüssel, Datenfelder und Ziel“ ( fields, keys, data fields and target ) | For each table, first the join fields with ⚿, then, after a line, the data fields, each with the field of the standard into which it flows. A field that determines a document variable shows {{name}} as its target. |
| „BT-Felder anzeigen“ ( show BT fields ) | Shows or hides the numbers of the fields in the compact view. This switch does not exist in the field view. |
| „Verknüpfungsfelder“ ( join fields ) | Shows or hides the conditions on the lines. |
| „Rolle (BG-Gruppe)“ ( role, BG group ) | Shows or hides the role at the top of the box. |
| „Tabellenbezeichnung“ ( table label ) | Shows or hides the names of the access paths and repetitions below the table name. |
| „unbenutzte Pfade zeigen“ ( show unused paths ) | Also shows tables that supply no field of the standard and lead to no such table. Without this switch the diagram hides them. |
| „links nach rechts“ ( left to right ) or „oben nach unten“ ( top to bottom ) | The direction in which the diagram grows from the header source. |
| „eng packen“ ( pack tightly ) | Reduces the gaps between the boxes. |
In the field view, the legend is extended by ⚿ for a join field and by „BT-x“ for the field of the standard for which a data field is used.
6 · Moving, zooming and highlighting
| Operation | Effect |
|---|---|
| Dragging on the drawing area | Moves the diagram. |
| Mouse wheel | Zooms at the position of the mouse pointer, from 8 % to 400 %. |
| „−“ and „+“ at the bottom right | Zooms out or in. Between them is the current size in percent. |
| „⤢“, „Einpassen“ ( fit ) or double-click | Fits the whole diagram into the drawing area. |
| Click on a table | Highlights the table, its lines and its direct neighbours and dims everything else. |
| Second click on the same table, click on the empty area, or Esc | Removes the highlighting again. |
A short version of the operation is also given in the left column under „Bedienung“ ( operation ).
The switch ◑ in the header switches between the light and the dark display. The browser remembers the choice, and it also applies to the Mapping-Liste and the SAP Mapping Studio. Saved SVG and PNG files always stay light.
7 · Saving
The buttons „SVG“, „PNG“ and „Mermaid“ in the header bar are active as soon as a file is loaded. They save the diagram as it is currently set, that is with the same view, the same switches and the same direction. Moving and zooming have no effect on the files; they always contain the whole diagram.
| Button | Result |
|---|---|
| „SVG“ | An SVG graphic in light colours on a white background. |
| „PNG“ | An image in light colours on a white background, at double size. |
| „Mermaid“ | A window „Mermaid-Quelltext“ ( Mermaid source text ) with the diagram as text. „In die Zwischenablage“ ( to the clipboard ) copies it, „Herunterladen“ ( download ) saves it as a file with the extension .mmd, „Schließen“ ( close ) or Esc close the window. |
The Mermaid source text depends on the view:
| View | Kind of Mermaid diagram |
|---|---|
| Compact | classDiagram with one class per table, the role, the BT numbers and the link conditions on the arrows, depending on the switches. The direction corresponds to the layout. |
| Fields | erDiagram with one entity per table and its fields. Join fields carry PK, and the target follows in quotation marks. A repetition is entered as a "one to many" relationship, every other link as "one to at most one". |
The file name is derived from the name of the mapping. If the name contains an abbreviation in brackets, that abbreviation is used. „FI-Beleg (MRRL) → EN 16931 · automatische WE-Abrechnung“, for example, becomes mrrl-diagramm.svg, mrrl-diagramm.png or mrrl-diagramm.mmd.
Note: If the PNG cannot be created in the browser, the tool reports „PNG konnte nicht erzeugt werden – SVG-Export verwenden.“ ( PNG could not be created; use the SVG export ). Save the SVG graphic instead.
8 · The demo version
A demo version of the Mapping Diagram is available for trying out on einvoice4s.de. It differs from the full version in the following points:
| Point | Demo version |
|---|---|
| Samples | The selection „Beispiel laden …“ ( load sample ) in the header bar loads one of two built-in mappings: „SD-Faktura (VF01)“ or „FI-Ausgangsrechnung (FB70)“. At start-up the first one is loaded. |
Everything else works as in the full version: you can open your own mapping files, change the view and save the diagram as SVG, PNG and Mermaid.
Tip: If you append ?beispiel=fi-fb70 to the address of the demo version, it starts directly with the sample „FI-Ausgangsrechnung (FB70)“.