Let us assume you have already created a DDL source as a development object and implemented it as simple data model for EPM sales order items - as shown in the listing below.
@AbapCatalog.sqlViewName: 'ZDEMO_SOI_ADV' @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: 'Advanced List Reporting for Sales Order Item' @OData.publish: true define view ZDEMO_CDS_SalesOrderItem_A as select from SEPM_I_SalesOrderItem_E as Item { key Item.SalesOrder as SalesOrderID, key Item.SalesOrderItem as ItemPosition, Item._SalesOrder._Customer.CompanyName as CompanyName, Item.Product as Product, Item.TransactionCurrency as CurrencyCode, Item.GrossAmountInTransacCurrency as GrossAmount, Item.NetAmountInTransactionCurrency as NetAmount, Item.TaxAmountInTransactionCurrency as TaxAmount, Item.ProductAvailabilityStatus as ProductAvailabilityStatus }
The source code above defines quite a simple CDS view called ZDEMO_CDS_SalesOrderItem_A. This view is implemented by means of a query for performing a SELECT statement, where the predefined CDS view SEPM_I_SalesOrderItem_E (that originates from the EPM demo application) is used as the data source. The select list includes a set of fields that are relevant for the new sales order item consumption view. The KEY elements in the selection list are used to define the key field semantic of the CDS view.
When the DDL source is activated, the following objects are created in ABAP Dictionary: