Show TOC

Inheritance of AnnotationsLocate this document in the navigation structure

Get information about what property to use to prevent elements from being inherited from an underlying CDS view.

By default, all UI annotation elements are inherited from the underlying CDS view. You can explicitely disable this behavior. You can use the following property to prevent a UI annotation element from being inherited:
  • exclude

    The following sample code depicts the CDS view ZP_SalesOrder that inherits elements from the underlying CDS view SEPM_CDS_SALES_ORDER, and uses the UI annotation @UI.identification:

    Sample Code
    ...
    define view ZP_SalesOrder as select from sepm_cds_sales_order as so {
    	@UI.identification: [ { position: 10 } ]
    	key so.sales_order_id as SalesOrder,
    
    	@UI.identification: [ { position: 20 } ]
    	so.customer.company_name as CompanyName,
    ...
    }

    The following sample code depicts the CDS view ZI_SalesOrder that inherits elements from the underlying CDS view ZP_SalesOrder. In this view, the element key SalesOrder is inherited from the underlying CDS view as UI annotation @UI.identification by default. The element so.customer.company_name as CompanyName, however, is not inherited as UI annotation @UI.identification because of the property exclude:

    Sample Code
    ...
    define view ZI_SalesOrder as select from ZP_SalesOrder as so {
    
    key SalesOrder,
    
    @UI.identification: [ { exclude } ]
    so.customer.company_name as CompanyName,
    ...
    }