Ansicht
Dokumentation

ABENCDS_ELEMENT_ANNOTATIONS_V1 - CDS ELEMENT ANNOTATIONS V1

ABENCDS_ELEMENT_ANNOTATIONS_V1 - CDS ELEMENT ANNOTATIONS V1

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

- DDIC-Based View, SELECT, element_annot

... @annotation ...
... @annotation ...

Effect

Specifies an annotation annotation in the definition of an element of a SELECT list in a as element annotation. Element annotations can be specified before and after the element.

  • In front of the element, the character @ must be placed before the name annotation of the annotation.
  • Following the element, the characters @ must be placed before the name annotation of the annotation.

The elements of CDS entities can be annotated with the element annotations listed in topic element_annot.

Example

In the CDS view corporation_sales_order, a short text and a tooltip are assigned to the element role. The element currency_code is flagged as a currency key and is assigned as a currency key to the element gross_amount.

@AbapCatalog.sqlViewName: 'CORP_SO_VW'
define view corporation_sales_order as
  select from snwd_bpa as business_partner
           inner join snwd_so as sales_order
             on business_partner.node_key = sales_order.buyer_guid
         { key sales_order.so_id as sales_order_id,
               business_partner.bp_id as corporation_id,
               business_partner.company_name,
              @EndUserText.label: 'Corporation Role'
              @EndUserText.quickInfo: 'Customer or supplier'
                 business_partner.bp_role as role,
              @Semantics.currencyCode
                 sales_order.currency_code,
              @Semantics.amount.currencyCode: 'currency_code'
                 sales_order.gross_amount }
         where business_partner.legal_form = 'Inc.'; //Corporations only

Example

This example demonstrates inheritance of the element annotations in publications of CDS associations. The following CDS view defines and exposes a CDS association _some_assoc:

A further CDS view accesses the view and also exposes the CDS association. Here, the annotation @SomeAnno is inherited.

The following CDS view entity defines and exposes its own CDS association _some_assoc. In this case, the CDS annotation @SomeAnno is not inherited.

If the CDS association _some_assoc were exposed from Demo_Cds_Assoc_Anno2 instead of or in addition to _some_assoc by specifying the name Demo_Cds_Assoc_Anno2._some_assoc explicitly, the annotation would be inherited again. The program DEMO_CDS_ASSOC_ANNO evaluates the annotations of both views. No local element annotations are defined for the locally defined association _some_assoc of the view Demo_Cds_Assoc_Anno1_Loc, which means that the result for this CDS association is empty.






Vendor Master (General Section)   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 6550 Date: 20240328 Time: 201408     sap01-206 ( 69 ms )