An xml fragment of the annotation local file is as follows:
<Annotations Target="SEPMRA_PROD_MAN.SEPMRA_C_PD_ProductType" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<Annotation Term="Common.SemanticKey">
<Collection>
<PropertyPath>Product</PropertyPath>
</Collection>
</Annotation>
</Annotations>
Below is a line by line explanation.
<Annotations>
Labels are used to contain a set of annotations. Annotations are used to enhance metadata of OData services, they can be used to describe how to display data in Fiori user interface.Target
The attribute specifies the target of this set of annotations. In this case, the target isSEPMRA_PROD_MAN.SEPMRA_C_PD_ProductType
that this is an entity type in the OData service. This means that this set of annotations is used to describe how to handle data of this entity type.xmlns
The attribute defines the XML namespace of this XML document. Here, it is OData's EDM (Entity Data Model) namespace, which indicates that this document follows OData's EDM specification.
Then <Annotation>
the tag:
<Annotation Term="Common.SemanticKey">
...
</Annotation>
<Annotation>
Labels are used to define an annotation. Here,Term
the attribute of this annotation isCommon.SemanticKey
, which indicates that this annotation is used to define the semantic key of the entity type.- A semantic key is a special kind of key that defines the uniqueness of an entity. In the Fiori user interface, semantic keys are used to establish links between related entities and to identify entities in navigation and search.
And finally the <Collection>
and <PropertyPath>
tags:
<Collection>
<PropertyPath>Product</PropertyPath>
</Collection>
<Collection>
Tags are used to define a collection. Here, it includes all properties of the semantic key.<PropertyPath>
Tags are used to define a property path. Here it is,Product
which meansProduct
the attribute is part of the semantic key for that entity type.
In general, the meaning of this XML is: In SEPMRA_PROD_MAN.SEPMRA_C_PD_ProductType
entity types, Product
attributes are defined as part of the semantic key. This means that in the Fiori UI, Product
attributes will be used to establish links between related entities, and to identify entities in navigation and search.