Quick Views for Smart Link Navigation: Further Configuration Examples

Quick Views for Smart Link Navigation: Further Configuration Examples

You have various options for configuring the quick view. This documentation provides some examples.

Example 1: Quick View in Object Page Table

Note

Not all columns that are supported in a table support the display of a quick view.

For the currency, no referential constraint is defined by the service. This is why you need to make the following entry:

Sample Code
<Association Name="assoc_6D52161C1362D99A31996E5BB23202E8" sap:content-version="1">
    <End Type="STTA_PROD_MAN.STTA_C_MP_ProductSalesDataType" Multiplicity="1" Role="FromRole_assoc_6D52161C1362D99A31996E5BB23202E8"/>
    <End Type="STTA_PROD_MAN.I_CurrencyType" Multiplicity="0..1" Role="ToRole_assoc_6D52161C1362D99A31996E5BB23202E8"/>
    <ReferentialConstraint>
        <Principal Role="FromRole_assoc_6D52161C1362D99A31996E5BB23202E8">
            <PropertyRef Name="Currency"/>
        </Principal>
        <Dependent Role="ToRole_assoc_6D52161C1362D99A31996E5BB23202E8">
            <PropertyRef Name="Currency"/>
        </Dependent>
    </ReferentialConstraint>
</Association>

Quick view facets annotation:

Sample Code
<!-- QuickViewFacets annotation for Currency-->
<Annotations Target="STTA_PROD_MAN.STTA_C_MP_ProductSalesDataType/Currency">
    <Annotation Term="Common.SemanticObject" String="EPMProduct"/>
</Annotations>           
<Annotations Target="STTA_PROD_MAN.I_CurrencyType">           
    <Annotation Term="UI.QuickViewFacets">
        <Collection>
            <Record Type="UI.ReferenceFacet">
                <PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#CurrencyQuickViewPOC_FieldGroup_1" />
            </Record>           
        </Collection>
    </Annotation>
    <Annotation Term="UI.FieldGroup" Qualifier="CurrencyQuickViewPOC_FieldGroup_1">
        <Record>
            <PropertyValue Property="Data">
                <Collection>
                    <Record Type="UI.DataField">
                        <PropertyValue Property="Label" String="Decimals" />
                        <PropertyValue Property="Value" Path="Decimals"/>
                    </Record>
                    <Record Type="UI.DataField">
                        <PropertyValue Property="Label" String="CurrencyISOCode" />

                        <PropertyValue Property="Value" Path="CurrencyISOCode"/>
                    </Record>
                    <Record Type="UI.DataField">
                        <PropertyValue Property="Label" String="AlternativeCurrencyKey" />

                        <PropertyValue Property="Value" Path="AlternativeCurrencyKey"/>
                    </Record>                            
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>   
</Annotations>

SAP Fiori Elements for OData V2

Example

QuickViewFacets annotation for Supplier

Sample Code
<!-- QuickViewFacets annotation for Supplier-->
            <Annotations Target="STTA_PROD_MAN.STTA_C_MP_SupplierType/EmailAddress" xmlns="http://docs.oasis-open.org/odata/ns/edm">
                  <Annotation Term="com.sap.vocabularies.Communication.v1.IsEmailAddress" Bool="true"/>
            </Annotations>      

            <Annotations Target="STTA_PROD_MAN.STTA_C_MP_SupplierType/URL" xmlns="http://docs.oasis-open.org/odata/ns/edm">
                  <Annotation Term="Org.OData.Core.V1.IsUrl" Bool="true"/>
            </Annotations>
            <Annotations Target="STTA_PROD_MAN.STTA_C_MP_SupplierType/PhoneNumber" xmlns="http://docs.oasis-open.org/odata/ns/edm">
                  <Annotation Term="com.sap.vocabularies.Communication.v1.IsPhoneNumber" Bool="true"/>
            </Annotations>
            <Annotations Target="STTA_PROD_MAN.STTA_C_MP_SupplierType">                
                <Annotation Term="UI.QuickViewFacets">
                    <Collection>
                        <Record Type="UI.ReferenceFacet">
                            <PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#SupplierQuickViewPOC_FieldGroup_1" />
                        </Record>
                        <Record Type="UI.ReferenceFacet">
                            <PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#SupplierQuickViewPOC_FieldGroup_2" />
                        </Record>        

                    </Collection>
                </Annotation>
                <Annotation Term="UI.FieldGroup" Qualifier="SupplierQuickViewPOC_FieldGroup_1">
                    <Record>
                        <PropertyValue Property="Label" String="The first field group label" />
                        <PropertyValue Property="Data">
                            <Collection>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="Supplier" />
                                    <PropertyValue Property="Value" Path="Supplier"/>
                                </Record>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="Company Name" />
                                    <PropertyValue Property="Value" Path="CompanyName"/>
                                </Record>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="Email Address" />
                                    <PropertyValue Property="Value" Path="EmailAddress"/>
                                </Record>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="to_Address / FormattedAddress" />
                                    <PropertyValue Property="Value" Path="to_Address/FormattedAddress"/>
                                </Record>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
                <Annotation Term="UI.FieldGroup" Qualifier="SupplierQuickViewPOC_FieldGroup_2">
                    <Record>
                        <PropertyValue Property="Label" String="The second field group label" />
                        <PropertyValue Property="Data">
                            <Collection>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="Phone Number" />
                                    <PropertyValue Property="Value" Path="PhoneNumber"/>
                                </Record>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="URL" />
                                    <PropertyValue Property="Value" Path="URL"/>
                                </Record>
                                <Record Type="UI.DataField">
                                    <PropertyValue Property="Label" String="to_Address / AddressValidityStartDate" />
                                    <PropertyValue Property="Value" Path="to_Address/AddressValidityStartDate"/>
                                </Record>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
            </Annotations>

SAP Fiori Elements for OData V4

Example

Sample Code
<Annotation Term="UI.QuickViewFacets">
   <Collection>
    <Record Type="UI.ReferenceFacet">
      <PropertyValue Property="Label" String="Label FieldGroup 1"/>
      <PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#SoldToQuickView"/>
    </Record>
    <Record Type="UI.ReferenceFacet">
      <PropertyValue Property="Label" String="Label FieldGroup 2"/>
      <PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#QVFacet"/>
    </Record>
   </Collection>
</Annotation>
<Annotation Term="UI.FieldGroup" Qualifier="SoldToQuickView">
   <Record Type="UI.FieldGroupType">
     <PropertyValue Property="Data">
      <Collection>
       <Record Type="UI.DataField">
        <PropertyValue Property="Value" Path="PostalCode"/>
       </Record>
       <Record Type="UI.DataField">
        <PropertyValue Property="Value" Path="CityName"/>
       </Record>
      </Collection>
     </PropertyValue>
   </Record>
</Annotation>
<Annotation Term="UI.FieldGroup" Qualifier="QVFacet">
   <Record Type="UI.FieldGroupType">
     <PropertyValue Property="Data">
      <Collection>
       <Record Type="UI.DataField">
        <PropertyValue Property="Value" Path="Country"/>
       </Record>
      </Collection>
     </PropertyValue>
   </Record>
</Annotation>