SAP CDS SELECT LIST ENTRY V1 Get Example source ABAP code based on a different SAP table
SAP Help
• KEY ABAP_CDS_SELECT_ELEMV1
• AS ABAP_CDS_SELECT_ELEMV1
• $EXTENSION.* ABAP_CDS_SELECT_ELEMV1
ABAP_CDS_DDL - DDIC-Based View, SELECT>, element> ABAP_SYNTAX ... ${ $[@element_annot1>$] $[@element_annot2>$] ... $[KEY$] ${ expose_assoc> $[AS alias$] $} $| ${ element $[AS alias$] $} $| ${ path_expr>.element $[AS alias$] $} $| ${ literal> AS alias $} $| ${ parameter> AS alias $} $| ${ session_variable> AS alias $} $| ${ aggr_expr> AS alias $} $| ${ arith_expr> AS alias $} $| ${ builtin_func> AS alias $} $| ${ case_expr> AS alias $} $| ${ cast_expr> AS alias $} $[@ < element_annot1>$] $[@ < element_annot2>$] ... $} $| ${ $EXTENSION.* $} ...> What does it do? Defines an element of a SELECT> list > of a ABAP_CDS_V1_VIEW >. The names of the elements in a SELECT> list must be unique and they are in the same namespace as the parameters> of the view. ABAP Alternative 1 ... expose_assoc$| element$|path_expr$|literal$|parameter$|...> ABAP Addition 1 ... @element_annot ... @ < element_annot> 2 ... KEY> 3 ... AS alias> What does it do? Specifies individual elements in the SELECT> list> of a ABAP_CDS_V1_VIEW >. expose_assoc>> exposes a CDS association >, a CDS composition>, or a CDS to-parent association> using a path expression>. If a CDS association with a filter condition> cds_cond> is exposed, an alternative element name alias > with AS> must be defined. Otherwise, an alternative element name can be defined. When the name element> is specified directly, an element of a data source data_source>> of the current CDS view is defined as an element. The field name can be prefixed with the name of the data source or its alternative name. The prefix is separated using a period (.>). AS> can be used to define an alternative element name alias>. path_expr>.element> specifies an element element> of the association target> of the last CDS association of the path expression path_expr>>. The element defined in this way is part of the result set of the CDS view, a field of the ABAP_CDS_MNG_VIEW >, and a component of a type defined in ABAP with respect to the CDS view. If no alternative element name alias> is defined, and there is no name list>, the element name is defined by the name of the element named by the path expression. literal>> can be used to declare a literal. AS> must be used to define an alternative element name alias>. The literal can be prefixed with the name of a domain. parameter>> can be used to specify a parameter from the parameter list parameter_list>>. If AS> is used, an alternative element name alias> must be defined, which cannot be the name pname> of the parameter. session_variable>> can be used to specify a session variable. AS> must be used to define an alternative element name alias>. aggr_expr>>, arith_expr>>, builtin_func>>, and case_exp>> can be used to specify aggregate expressions, arithmetic expressions, calls of built-in functions, and case distinctions. The expressions and functions are evaluated by the database system when the CDS view is accessed. An alternative element name alias> must be defined with the keyword AS>, unless there is a name list >. Elements with the type CHAR> can have a maximum of 1333 characters. Elements with the type LRAW> or LCHR> must be at the end of the view. Only one such element is allowed per view. Furthermore, a field of type INT2> or INT4> must stand directly in front of such an element, representing the maximum length of the element. ABAP_EXAMPLE_VX5 SELECT> list with all possible elements. DDLS DEMO_CDS_SELECT_LIST_V1 ABAP_EXAMPLE_END ABAP Addition What does it do? Specifies annotations for the element. The annotations can be specified before the element using @element_annot>> or after the element using @ < element_annot>>. Latest notes: An annotation can be used to assign further technical and semantic properties to an element for evaluation by the ABAP runtime framework. Framework-specific annotations> can be used to give the element specific semantic properties that are evaluated by other SAP frameworks. NON_V5_HINTS With respect to the element annotations, publications of a CDS association association> > are handled like any regular element. When a CDS association defined in a different CDS view is exposed, the annotations of prec eding publications are inherited when annotations are evaluated> using the class CL_DD_DDL_ANNOTATION_SERVICE>>. ABAP_HINT_END ABAP Addition What does it do? KEY> is used to define the current element as a key element of the current CDS entity>. Those elements of a SELECT> list> can be defined as key elements that are placed without gaps at the start of the list.