Skip to Content
0
May 17, 2018 at 04:46 AM

Odata igrores annotations in CDS

197 Views Last edit May 17, 2018 at 07:56 AM 2 rev

hi, experts. I'm new in Odata and have a question about annotations. I wrote a simple CDS with some annotations for fields

@AbapCatalog.sqlViewName:'ZSBS_FLIGHT_SVIW'

@AbapCatalog.compiler.compareFilter:true

@AccessControl.authorizationCheck:#NOT_REQUIRED

@EndUserText.label:'sflight table as view'

@OData.publish:true

defineview ZSBS_SFLIGHT_VIEW

asselectfrom sflight

{

// KEY Fields

key sflight.carrid as AirlineCode,

key sflight.connid as FlightConnectionNumber,

key sflight.fldate as FlightDate,

//Dimensions

@UI.lineItem:[{label:'AircraftTypeImp'}]

sflight.planetype as AircraftType,

sflight.mandt as Client,

sflight.price as Airfare,

//Measure

@DefaultAggregation:#SUM

sflight.paymentsum as TotalBookings

};

Then I activated OData service and checked metadata and didn't discover any properties describing my annotations. For example @UI.lineItem:[{label:'AircraftTypeImp'}]

ODATA metadata

<Propertysap:label="Plane Type" Name="AircraftType" Type="Edm.String" sap:quickinfo="Aircraft Type" sap:display-format="UpperCase" sap:aggregation-role="dimension" MaxLength="10"/> .

May you help me?