P_CustomerAvgQuantity

DDL: P_CUSTOMERAVGQUANTITY SQL: P_CUSTAVGQTY Type: view BASIC Package: ODATA_PP_SC

Average Quantity for Customer

P_CustomerAvgQuantity is a Basic CDS View that provides data about "Average Quantity for Customer" in SAP S/4HANA. It reads from 2 data sources (P_CustomerOrder, mara) and exposes 6 fields with key fields Material, Plant, Customer. Part of development package ODATA_PP_SC.

Data Sources (2)

SourceAliasJoin Type
P_CustomerOrder CustomerOrder from
mara mara inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName P_CUSTAVGQTY view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.private true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MASTER view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
KEY Customer Customer Sold-to Party
AverageQuantity
MaxOrderQuantity
BaseUnitOfMeasure P_CustomerOrder BaseUnitOfMeasure Base Unit

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_CustomerAvgQuantity.
-- 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.
-- SQL view name: P_CUSTAVGQTY

CREATE VIEW P_CustomerAvgQuantity AS
SELECT
  Material,
  Plant,
  Customer,
  avg( OriginalBaseAmount ) AS AverageQuantity,
  max( OriginalBaseAmount ) AS MaxOrderQuantity,
  CustomerOrder.BaseUnitOfMeasure AS BaseUnitOfMeasure
FROM P_CustomerOrder AS CustomerOrder
INNER JOIN mara ON /* join condition not captured in parsed metadata */
;