OData Annotations

Capture OData-related aspects to expose data gained from a CDS entity in an OData service.

Scope and Definition

@Scope:[#VIEW, #TABLE_FUNCTION]
Annotation OData
 {
   publish : Boolean default true;
 };

Usage

Annotation Meaning
OData.publish

OData.publish is intended for generating an OData service.

Scope: [VIEW, TABLE_FUNCTION]

Evaluation Runtime (Engine): SADL

Values:

Value Description
true

Has to be set to generate an OData service

false

Defines that this CDS entity cannot be exposed for an OData service

Examples

This example demonstrates how you can define the SEPM_I_SalesOrder CDS entity that exposes data to an OData service.

Here, an OData service is generated for the CDS entity. The data is provided from the database table snwd_so.