Ansicht
Dokumentation

ABENCDS_ELEMENT_LIST_INTERFACE - CDS ELEMENT LIST INTERFACE

ABENCDS_ELEMENT_LIST_INTERFACE - CDS ELEMENT LIST INTERFACE

General Data in Customer Master   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

- projection_list, Transactional Interface

... $[@element_annot1$]
    $[@element_annot2$]
    ...
      $[KEY$]   ${proj_element        $[AS alias$]$}
            $| ${proj_assoc          $[AS alias$]$}
            $| ${cast_expr            AS alias$}


Additions

1. ... KEY

2. ... AS alias

Effect

Defines the elements of a CDS transactional interface. The elements are specified in a comma-separated list in curly brackets { }.

The feature set of a transactional interface is restricted to projecting elements from the underlying projected entity. No new associations, virtual elements, or fields can be defined.

The following elements are supported in the projection list of a transactional interface:

  • proj_element exposes an element from the projected entity. AS can be used to define an alternative element name alias.
In transactional interfaces, an element from the projected entity can be exposed multiple times with different alias names.
Adding additional filter conditions to exposed associations is not supported in CDS transactional interfaces.
All elements included in the ON clause of an exposed CDS association must also be included in the projection list of the CDS projection view.
  • A cast_expr can be used to assign a new data element to a field, for example to get additional semantic information. The addition PRESERVING TYPE is mandatory and must be used. For a cast expression, an alias name must be specified with the keyword AS.
In transactional interfaces, only a limited form of cast expressions is available. Cast expressions can only be used to assign a data element to a field, but not for type conversion.

In a transactional interface, the following elements are not supported in the projection list: expressions, virtual elements, localized text elements, parameters.

Example

The following CDS transactional interface is based on the CDS view entity DEMO_CDS_PURCH_DOC_M. The composition is redirected to the CDS transactional interface of the child entity.

Both parent and child entity should be released for system-internal use under the C1 contract.

The following CDS transactional interface represents the child entity:

Addition 1

... KEY

Effect

The keyword KEY is used to define the current element as a key element of the transactional interface. A transactional interface must define exactly the same key elements in the same order as key elements as the underlying projected entity.

Addition 2

... AS alias

Effect

Defines an alternative element name for the projected element. The alternative element name replaces the actual name of the element from the projected entity. The view field is created under the alternative element name in the CDS transactional interface. Accordingly, the alternative element name must comply with the general syntax rules for names.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 7048 Date: 20240512 Time: 093534     sap01-206 ( 78 ms )