Ansicht
Dokumentation

ABENCDS_DATA_SOURCE_V1 - CDS DATA SOURCE V1

ABENCDS_DATA_SOURCE_V1 - CDS DATA SOURCE V1

ABAP Short Reference   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

- DDIC-Based View, SELECT, data_source

... entity$[ parameters$]$| path_expr $[$[AS$] alias$] $[join$] ...

Effect

Defines a data source of a . A data source can be a DDIC database table defined in ABAP Dictionary, a DDIC database view, an DDIC external view, a CDS view entity, a CDS table function, a CDS hierarchy, or a .

  • The data source is specified either directly using its name entity or using a path expression path_expr in which CDS associations are evaluated. Non-SQL CDS entities are not possible as association target of the path expression.
  • An alternative name alias for a directly specified data source can be defined after AS. It is also possible to define an alias name without the keyword AS (see example below). If a path expression is used, an alternative name must be defined. The name must comply with the naming rules for names.
  • The syntax JOIN can be used to combine multiple data sources as joins.

Example

Defines the CDS view business_partner for the DDIC database table snwd_bpa, for which an alternative name partner is specified. This name is used in the SELECT list.

@AbapCatalog.sqlViewName: 'BPA_VW'
define view business_partner as
  select from snwd_bpa as partner
         { key partner.bp_id,
           partner.company_name,
           partner.bp_role }

as can also be omitted in front of the alternative name partner. The following example demonstrates another valid spelling that is potentially confusing:

@AbapCatalog.sqlViewName: 'BPA_VW'
define view business_partner as
  select from snwd_bpa
           partner{ key partner.bp_id,
                    partner.company_name,
                    partner.bp_role }






PERFORM Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 5293 Date: 20240426 Time: 101030     sap01-206 ( 56 ms )