DEMO_CDS_SIMPLE_CASE_1

DDL: DEMO_CDS_SIMPLE_CASE_1 Type: view_entity

DEMO_CDS_SIMPLE_CASE_1 is a CDS View in SAP S/4HANA. It reads from 1 data source (DEMO_CDS_CALC_QUANTITY_BASE) and exposes 4 fields with key field Id.

Data Sources (1)

SourceAliasJoin Type
DEMO_CDS_CALC_QUANTITY_BASE DEMO_CDS_CALC_QUANTITY_BASE from

Annotations (1)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY Id Id WorklistID
charBthen100Dec10else0endascalcQuan
Cuky Cuky
calcUnit

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view DEMO_CDS_SIMPLE_CASE_1.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW DEMO_CDS_SIMPLE_CASE_1 AS
SELECT
  Id,
  case when Char1 = abap.char'A' then Dec10 when Char1 = abap.char'B' then 100 / Dec10 else 0 end as calcQuan AS charBthen100Dec10else0endascalcQuan,
  Cuky,
  concat( concat( Cuky , '/' ), Unit2 ) AS calcUnit
FROM DEMO_CDS_CALC_QUANTITY_BASE
;