Mentor SAP

CDS View Service Generator

You can start the service implementation by creating an Entity Type/Entity Set based on the import of a DDIC structure.

 

The service implementation is performed by mapping a CDS view on that DDIC structure.

 

 

OData Services Generated from CDS Views

A service that is generated based on a CDS view only supports read access (READ and QUERY).

 

In addition to the properties, you can also map the associations of a CDS view with the navigation properties of an OData service.

 

 

Data Model Definition — Import from DDIC Structure Used by CDS Views

The data model definition starts by importing a DDIC structure that is defined using a CDS view.

 

 

CDS Views — Finding the Right DDIC Structure

To find the right DDIC structure that can be used for mapping with a CDS view, view the report RUTDDLSSHOW. The report RUTDDLSSHOW allows the developer to search for DDL sources by name and code fragment.

 

 

In the code, you can identify the DDIC structure through which the view is published in the DDIC by searching for the statement: @AbapCatalog.sqlViewName: 'SEPM_IBUPAE

 

If a CDS view contains associations, they are listed in the report along with other DDIC structures.

 

Service Implementation — Mapping Entity Sets to CDS Data Source (1)

Mapping of a CDS data source to a business entity results in the generation of the READ and QUERY method in the DPC class.

 

 

Service Implementation — Mapping Entity Sets to CDS Data Source (2)

In the mapping process, you can use the “Generate Mapping” button to map the business entity elements to the properties of the entity of the OData service. The mapping of the business entity association to the navigation property of an entity type of the OData service is performed using drag and drop in a second step.

 

 

Service Generation — Service Implementation Using Mapping Development Flow