P_PurchasingDocReceivedQty
P_PurchasingDocReceivedQty is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_PurchasingDocumentHistoryBsc) and exposes 4 fields with key fields PurchasingDocument, PurchasingDocumentItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchasingDocumentHistoryBsc | _PurchDocHist | from |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | PurchasingDocument | ||
| KEY | PurchasingDocumentItem | PurchasingDocumentItem | ||
| ReceivedQuantity | ||||
| OrderQuantityUnit | OrderQuantityUnit |
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Calc sum of rcvd qty per pur doc item'
define view entity P_PurchasingDocReceivedQty
as select from I_PurchasingDocumentHistoryBsc as _PurchDocHist
{
key PurchasingDocument,
key PurchasingDocumentItem,
@Semantics.quantity.unitOfMeasure:'OrderQuantityUnit'
sum(Quantity) as ReceivedQuantity,
OrderQuantityUnit
}
where PurchasingHistoryDocumentType = '1' // Select Goods Receipt as Document Type
group by
PurchasingDocument,
PurchasingDocumentItem,
OrderQuantityUnit
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASINGDOCUMENTHISTORYBSC"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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