Show TOC

Working with the Graphical EditorLocate this document in the navigation structure

In the graphical editor, you can use any of the following options to see the source code of an entity:
  • Double-click the object

  • Use the context menu of the object

Displaying the Graphical Representation of DDL Source Code

The CDS Graphical Editor provides an overview of the various entities and their relationships in graphical format.

Context

This visualization allows you to understand the code implementation much faster as you do not have to read and understand the code itself.

Procedure

  1. Open the context menu on a DDL source.
  2. Choose Start of the navigation path Open With  Next navigation step Graphical Editor End of the navigation path.
    Tip

    Alternatively, you can also open the graphical editor from the DDL source editor context menu of a CDS entity using Start of the navigation path Open With Next navigation step Graphical Editor End of the navigation path.

Results

The CDS Graphical Editor is opened and provides a graphical display of the entity as described in the DDL source editor.

Updating the Graphical Representation of a CDS Entity

You can edit the source code in the text editor.

Context

Changes made in the text editor appear immediately in the graphical editor.

Note

Syntax errors appear as parsing errors in the object where the error occurred.

Syntax Error
Figure 1: Syntax Errors

Procedure

  1. Choose a CDS entity.
  2. In the context menu of the CDS entity, choose Start of the navigation path Open With Next navigation step Graphical Editor End of the navigation path.
  3. In the context menu of the graphical editor, choose Open DDL Source Editor.
  4. Make the required changes to the CDS entity in the source editor.
  5. Choose the graphical editor view to see the changes.

Opening a CDS Entity in the Source-Based Editor

This functionality allows you to open the source code editor of a CDS entity from a graphical editor.

Procedure

  1. Choose a CDS entity.
  2. In the context menu of the CDS entity, choose Start of the navigation path Open With  Next navigation step Graphical Editor End of the navigation path.

    The Graphical Editor is opened.

  3. In the graphical editor, select the relevant entity and choose Open DDL Source Editor from the context menu.
    Opening DDL Source Editor
    Figure 2: Opening DDL Source Editor

Highlighting Used Columns

Context

This feature enables you to view the usage of a user-defined type within the DDL source.

Procedure

  1. Choose a user-defined type.
  2. In the context menu of the user-defined type, choose the option Highlight Used Columns.
    Highlighting Used Columns
    Figure 3: Highlighting Used Columns

Results

The user-defined type appears highlighted.

Navigating Through Data Models

Context

If the data model is so large that not all the objects are visible in the graphical editor at once, you can use the Miniature View to browse the data model.

Procedure

  1. Open a CDS entity in a graphical editor.
  2. Choose the Quick Access field.
    Tip To navigate to Quick Access, you can also press CTRL + 3.
  3. In the Quick Access field, enter Miniature View.
  4. From the Views category, choose Miniature View.
    Miniature View
    Figure 4: Miniature View

Positioning Objects Automatically in the CDS Source Editor

The graphical editor positions the objects in the editor automatically.

Context

You can manually change the position of the objects, but these positions are not persisted. The next time you open the DDL source, the graphical editor lays out the position of the objects automatically.

If you have manually changed the position of the objects, follow the step below to have the objects positioned automatically.

Procedure

In the context menu of the graphical editor, choose Auto Layout.
Auto Layout
Figure 5: Auto Layout

Printing and Exporting Diagrams

Context

You can print or export object diagrams using the graphical editor.

Procedure

  1. To print the graphical representation, select the relevant entity and choose Print from the context menu.

    The Print preview and preferences dialog is opened. Here you select the relevant printer and print settings.

  2. To export the graphical representation as an image file, select the relevant entity and choose Export from the context menu.

    The Export Diagram dialog is opened. Here you can select the relevant area for the graphical representation as well as the target file format and its size to be generated as an image file.