Show TOC

Views (CDS)Locate this document in the navigation structure

A view is a virtual table based on the dynamic results returned in response to an SQL statement.

Procedure

  1. Select the CDS View tool in the toolbox and click in the diagram.

    You can create views at the model root, under a HANA package, or under a context.

  2. In the selection dialog, select one or more tables and views to use as sources for the view and click OK.
    Note For views with multiple sources, only joins of type Union are supported.
  3. Double-click the view symbol to open its property sheet. To edit the underlying query, select the Query tab and click the Properties tool.
    • Columns tab - lists the columns in the SELECT clause. You can add or delete columns in the list, specify aliases for them, and reorder the list using the arrows at the bottom of the tab.
    • Where tab - lists the expressions in the WHERE clause. You can add or delete expressions in the list, and reorder the list using the arrows at the bottom of the tab. For each line, select a column in each of the two Expression columns (or click the ellipsis button to specify a more complex expression), and select the appropriate operator between them. You can optionally enter a prefix and suffix.
    • Group By tab - lists the columns in the GROUP BY clause. You can add or delete columns in the list, and reorder the list using the arrows at the bottom of the tab.
    • Having tab - lists the expressions in the HAVING clause. You can add or delete expressions in the list, and reorder the list using the arrows at the bottom of the tab. For each line, select a column in each of the two Expression columns (or click the ellipsis button to specify a more complex expression), and select the appropriate operator between them. You can optionally enter a prefix and suffix.
    • Order By tab - lists the columns in the ORDER BY clause. You can add or delete columns in the list, and reorder the list using the arrows at the bottom of the tab. For each line, select a column (or click the ellipsis button to specify a more complex expression), and select ASC or DESC for the sort direction.
  4. Click OK to complete the creation of the view.