Show TOC

Structure and Elements of an Annotation FileLocate this document in the navigation structure


An annotation file is a semantic description of an OData service. It delivers semantic information to properties and entity types delivered by the OData service, which can be used for a generic rendering for a fact sheet. The description is defined by a sequentiality of annotations that are tags following a special syntax. Annotation tags use terms that are defined in vocabularies, either OData core or delivered by SAP.


<Annotation Term="UI.LineItem">

The term UI.LineItem is defined in the vocabulary as <Term Name="LineItem" Type="Collection(UI.DataFieldAbstract)" AppliesTo="EntityType">

An annotation file consists of:

  • A setup area that references the vocabularies, the XML name spaces, and one or several OData services, which provide data to the annotation file.

    A vocabulary is a set of semantic and structuring term definitions. Vocabularies are delivered by SAP.

    <edmx:Reference Uri="/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/components/factsheet/vocabularies/Communication.xml">
    <edmx:Include Namespace="" Alias="vCard"/>
  • An annotation area that provides a semantic description of the OData service referencing the entity types and properties of the corresponding OData service.

    An annotation file always refers one or several targets. Each annotation has a target, which refers an entity type or a property of the OData service used.

    <Annotations Target="EPMModel.Product">  <Annotation Term="UI.HeaderInfo">    <Record>       <PropertyValue Property="TypeName" String="Product" />       <PropertyValue Property="TypeNamePlural" String="Products" />       <PropertyValue Property="TypeImageUrl" String="/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/components/factsheet/vocabularies/Communication.xml" />       <PropertyValue Property="ImageUrl" Path="ImageUrl" />       <PropertyValue Property="Title">         <Record>           <PropertyValue Property="Label" String="Product" />           <PropertyValue Property="Value" Path="Name" />         </Record>       </PropertyValue>       <PropertyValue Property="Description">         <Record>           <PropertyValue Property="Label" String="Description" />           <PropertyValue Property="Value" Path="Description" />         </Record>      </PropertyValue>    </Record>  </Annotation> 

Each annotation refers to a term of a vocabulary. The features of annotations are:

  • Mapping properties of an OData service to the terms of a vocabulary, that is, the entity types and properties of the corresponding OData service are referenced in the properties of annotation terms.

  • Defining semantic terms, such as header, identification, or line item.

  • Defining areas on the UI, such as facets.

    With a facet, you define a structure in your annotation file, where you can refer annotations defined before, such as header, identification, or line item.