Skip to content

Latest commit

 

History

History
70 lines (59 loc) · 3.93 KB

15_CDS_View_Entities.md

File metadata and controls

70 lines (59 loc) · 3.93 KB

CDS View Entities

Core data services (CDS) are an infrastructure for defining and consuming semantically rich data models on the standard database of an AS ABAP.

💡 Note

  • For cheat sheet content on CDS entities, refer to this blog.
  • The executable example focuses on CDS view entities and covers a selection of features.
  • The sample CDS view entities are designed to demonstrate a selection of features with a limited number of artifacts. They are not intended to be role models for proper CDS view design. They focus on syntax options only. They are not intended to solve concrete programming tasks. You should always work out your own solution for each individual case.

A Glimpse on the CDS Syntax

The following links take you to the source code of the cheat sheet artifacts to get a glimpse on the syntax used. To explore the syntax in action, import the ABAP cheat sheet repository into your system.

  • zdemo_abap_cds_ve_sel
    • Input parameters
    • Specifying fields of the data source
    • Typed and untyped literals
    • Session variables
    • Multiple expressions:
      • Cast expressions
      • Reuse expressions
      • Arithmetic expressions
      • Case expressions
      • Logical expressions
    • Built-in functions
      • Numeric functions
      • String functions
      • Coalesce function
      • Date and time functions
  • zdemo_abap_cds_ve_agg_exp
    • Aggregate expressions
  • zdemo_abap_cds_ve_joins
    • Inner joins
    • Left outer joins
    • Right outer joins
    • Cross joins
  • zdemo_abap_cds_ve_assoc
    • Associations

More Information

Executable Example

zcl_demo_abap_cds_ve

💡 Note

  • The executable example covers the following topics:
    • Operands, expressions, built-in functions, and input parameters in CDS view entities
    • Selecting data from CDS view entities using ABAP SQL SELECT statements
    • Joins
      • Note: A sample CDS view entity contains multiple joins. You can comment in/out code sections to see the effect. See the notes in the view.
      • Excursion: Joins in ABAP SQL
    • Associations
      • Defining views with associations
      • Exposing associations
      • Using exposed associations in ABAP statements
  • The example CDS view entities (zdemo_abap_cds_ve...) and the class contains comments in the code for more information.
  • The steps to import and run the code are outlined here.
  • Disclaimer