P_SalesOrderByMonthAggregation

DDL: P_SALESORDERBYMONTHAGGREGATION Type: view_entity COMPOSITE

P_SalesOrderByMonthAggregation is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_SalesOrderByMonth) and exposes 9 fields with key fields SalesOrder, YearMonth.

Data Sources (1)

SourceAliasJoin Type
P_SalesOrderByMonth P_SalesOrderByMonth from

Parameters (4)

NameTypeDefault
P_Date sydatum
P_NumberOfMonths num_of_months
P_ExchangeRateType kurst
P_DisplayCurrency vdm_v_display_currency

Annotations (7)

NameValueLevelField
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder SalesOrder SD Document
KEY YearMonth YearMonth Year Month
CalendarMonth CalendarMonth Calendar Month
_CalendarMonth _CalendarMonth
DisplayCurrency DisplayCurrency Display Currency
IncomingSalesOrdersNetAmtInDC
ComprnIncgSlsOrdersNetAmtInDC
NumberOfSalesOrders
ComparisonNumberOfSalesOrders

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 P_SalesOrderByMonthAggregation.
-- 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.
-- Parameters: P_Date : sydatum, P_NumberOfMonths : num_of_months, P_ExchangeRateType : kurst, P_DisplayCurrency : vdm_v_display_currency

CREATE VIEW P_SalesOrderByMonthAggregation AS
SELECT
  SalesOrder,
  YearMonth,
  CalendarMonth,
  DisplayCurrency,
  cast(sum(IncomingSalesOrdersNetAmtInDC) as incg_sls_ords_net_amt_in_dc) AS IncomingSalesOrdersNetAmtInDC,
  cast(sum(ComprnIncgSlsOrdersNetAmtInDC) as comprn_incg_sls_ords_amt_in_dc) AS ComprnIncgSlsOrdersNetAmtInDC,
  cast(sum(NumberOfSalesOrders) as number_of_sales_orders) AS NumberOfSalesOrders,
  cast(sum(ComparisonNumberOfSalesOrders) as comprn_num_of_sls_ords) AS ComparisonNumberOfSalesOrders
FROM P_SalesOrderByMonth
;