CDS_VIEW_ENTITY_WITH_AGGR

DDL: CDS_VIEW_ENTITY_WITH_AGGR Type: view_entity Package: SABP_UNIT_DOUBLE_CDS_DEMO

CDS Entity with aggregations

CDS_VIEW_ENTITY_WITH_AGGR is a CDS View that provides data about "CDS Entity with aggregations" in SAP S/4HANA. It reads from 1 data source (CdsFrwk_Sales_Order_Item) and exposes 6 fields with key field so_guid. It has 1 association to related views. Part of development package SABP_UNIT_DOUBLE_CDS_DEMO.

Data Sources (1)

SourceAliasJoin Type
CdsFrwk_Sales_Order_Item CdsFrwk_Sales_Order_Item from

Associations (1)

CardinalityTargetAliasCondition
[1] CDS_VIEW_ENTITY_SIMPLE _sales_order CdsFrwk_Sales_Order_Item.so_guid = _sales_order.node_key

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY so_guid so_guid Node Key
so_id _sales_order node_key Tree Model: Node Key
tax_rate tax_rate WithholdingRate
product_guid product_guid Product
_sales_order _sales_order
_product _product

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 CDS_VIEW_ENTITY_WITH_AGGR.
-- 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 CDS_VIEW_ENTITY_WITH_AGGR AS
SELECT
  so_guid,
  _sales_order.node_key AS so_id,
  tax_rate,
  product_guid
FROM CdsFrwk_Sales_Order_Item
LEFT OUTER JOIN CDS_VIEW_ENTITY_SIMPLE AS _sales_order ON CdsFrwk_Sales_Order_Item.so_guid = _sales_order.node_key  -- association [1]
;