P_TotalGrInvQty
P_TotalGrInvQty is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_PurchasingDocumentItem) and exposes 5 fields with key fields PurchaseOrder, PurchaseOrderItem. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchasingDocumentItem | PurchasingDocumentItem | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | P_GrInvQtyInd | _CalcGRIR | $projection.PurchaseOrder = _CalcGRIR.PurchaseOrder and $projection.PurchaseOrderItem = _CalcGRIR.PurchaseOrderItem |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PGRINVTOTALQTY | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (5)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | I_PurchasingDocumentItem | PurchasingDocument | |
| KEY | PurchaseOrderItem | I_PurchasingDocumentItem | PurchasingDocumentItem | |
| GoodsReceiptQty | ||||
| InvoiceReceiptQuantity | ||||
| PurchaseOrderAmount |
@AbapCatalog.sqlViewName: 'PGRINVTOTALQTY'
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
define view P_TotalGrInvQty
as select from I_PurchasingDocumentItem as PurchasingDocumentItem
association [1..*] to P_GrInvQtyInd as _CalcGRIR on $projection.PurchaseOrder = _CalcGRIR.PurchaseOrder
and $projection.PurchaseOrderItem = _CalcGRIR.PurchaseOrderItem
{
key PurchasingDocumentItem.PurchasingDocument as PurchaseOrder,
key PurchasingDocumentItem.PurchasingDocumentItem as PurchaseOrderItem,
//Total Goods Receipt Quantity
cast(sum(_CalcGRIR.GoodsReceiptQty) as abap.quan(13,3)) as GoodsReceiptQty,
//Total Invo ice Receipt Quantity
cast(sum(_CalcGRIR.InvoiceReceiptQuantity) as abap.quan(13,3)) as InvoiceReceiptQuantity,
cast(sum(_CalcGRIR.PurchaseOrderAmount) as abap.curr(15,3)) as PurchaseOrderAmount
}
where PurchasingDocumentItem.PurchasingDocumentCategory = 'F' or PurchasingDocumentItem.PurchasingDocumentCategory = 'L'
and PurchasingDocumentItem.PurchasingDocumentItemCategory <> '9' //3074796
group by
PurchasingDocumentItem.PurchasingDocument,
PurchasingDocumentItem.PurchasingDocumentItem
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASINGDOCUMENTITEM",
"P_GRINVQTYIND"
],
"ASSOCIATED":
[
"P_GRINVQTYIND"
],
"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