Show TOC

Navigation Properties in the Annotation DocumentLocate this document in the navigation structure

You can present information from a different entity using a navigation property.

For example, you could present information about a business partner on a card that displays sales orders. You can do this by adding a navigation property in your annotation document. In the following example, the CustomerEmail field displays the business partner's e-mail address using the navigation property "ToBusinessPartner/EmailAddress".

Sample Code
<Annotation Term="com.sap.vocabularies.UI.v1.LineItem">
    <Collection>
        <Record Type="com.sap.vocabularies.UI.v1.DataField">
            <PropertyValue Property="Label" String="CustomerEmail"/>
            <PropertyValue Property="Value" Path="ToBusinessPartner/EmailAddress"/>
        </Record>
        <Record Type="com.sap.vocabularies.UI.v1.DataField">
            <PropertyValue Property="Label" String="Order ID"/>
            <PropertyValue Property="Value" Path="SalesOrderID"/>
        </Record>
        <Record Type="com.sap.vocabularies.UI.v1.DataField">
            <PropertyValue Property="Label" String="Customer"/>
            <PropertyValue Property="Value" Path="CustomerName"/>
        </Record>
    </Collection>
</Annotation>

In list and table cards, no additional information is needed. However, for quick view cards you would need to provide information to the stack card about the specific fields collection that contains the navigation properties. This is because the stack card does not have any knowledge about the annotation terms used in the quick view cards.

You can configure this in the application manifest file by setting the annotationPath property in the stack card. In the following example the quick view card displays information from two field groups containing navigation properties, both of which are set in the annotationPath property.

Sample Code
"sap.ovp": {
    ...
    "cards": {
        "card00": {
            "model": "ZCD204_EPM_DEMO_SRV",
            "template": "sap.ovp.cards.stack",
            "settings": {
                "category": "{{card01_category}}",
                "entitySet": "BusinessPartners",
                "annotationPath": "com.sap.vocabularies.UI.v1.FieldGroup#Qualifier1/Data,com.sap.vocabularies.UI.v1.FieldGroup#Qualifier2/Data"
            }
        },
        ...
    }
}