P_CustomerAvgQuantity
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)
| Source | Alias | Join Type |
|---|---|---|
| P_CustomerOrder | CustomerOrder | from |
| mara | mara | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | ||
| KEY | Plant | Plant | ||
| KEY | Customer | Customer | ||
| AverageQuantity | ||||
| MaxOrderQuantity | ||||
| BaseUnitOfMeasure | P_CustomerOrder | BaseUnitOfMeasure |
@AbapCatalog.sqlViewName: 'P_CUSTAVGQTY'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #BASIC
@VDM.private: true
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MASTER}
define view P_CustomerAvgQuantity
as select from P_CustomerOrder as CustomerOrder
inner join mara on CustomerOrder.Material = mara.matnr
{
key Material,
key Plant,
key Customer,
avg( OriginalBaseAmount ) as AverageQuantity,
max( OriginalBaseAmount ) as MaxOrderQuantity,
CustomerOrder.BaseUnitOfMeasure
}
group by
Material,
Plant,
Customer,
CustomerOrder.BaseUnitOfMeasure
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA