P_PriceAndQuantityVariance1
Price And Quantity Variance 1
P_PriceAndQuantityVariance1 is a Consumption CDS View that provides data about "Price And Quantity Variance 1" in SAP S/4HANA. It reads from 2 data sources (P_PriceAndQuantityVariance4, I_PurchasingCategoryMatlGroup) and exposes 16 fields with key fields PurchaseOrder, PurchaseOrderItem. Part of development package ODATA_MM_ANALYTICS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_PriceAndQuantityVariance4 | P_PriceAndQuantityVariance4 | from |
| I_PurchasingCategoryMatlGroup | PurchasingCategoryMatlGroup | left_outer |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_StartDate | bedat | |
| P_EndDate | bedat |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMMPRCQNTYVAR1 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| EndUserText.label | Price And Quantity Variance 1 | view |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | ||
| KEY | PurchaseOrderItem | PurchaseOrderItem | ||
| PurchasingDocumentCategory | PurchasingDocumentCategory | |||
| PurchasingOrganization | PurchasingOrganization | |||
| Supplier | Supplier | |||
| CompanyCode | CompanyCode | |||
| PurchasingGroup | PurchasingGroup | |||
| Plant | Plant | |||
| Material | Material | |||
| MaterialGroup | Items | MaterialGroup | ||
| PurchaseOrderDate | PurchaseOrderDate | |||
| NetAmount | NetAmount | |||
| Currency | Currency | |||
| PurchasingCategory | ||||
| PurgCatName | ||||
| dec173endasAbsolutePriceVariance |
@AbapCatalog.sqlViewName: 'PMMPRCQNTYVAR1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@EndUserText.label: 'Price And Quantity Variance 1'
define view P_PriceAndQuantityVariance1
with parameters
P_StartDate : bedat,
P_EndDate : bedat
as select from P_PriceAndQuantityVariance4 ( P_StartDate : $parameters.P_StartDate,
P_EndDate : $parameters.P_EndDate ) as Items
left outer join I_PurchasingCategoryMatlGroup as PurchasingCategoryMatlGroup on Items.MaterialGroup = PurchasingCategoryMatlGroup.MaterialGroup
{
key PurchaseOrder,
key PurchaseOrderItem,
PurchasingDocumentCategory,
PurchasingOrganization,
Supplier,
CompanyCode,
PurchasingGroup,
Plant,
Material,
Items.MaterialGroup,
PurchaseOrderDate,
NetAmount,
Currency ,
@ObjectModel.text.element: ['PurgCatName']
@Consumption.labelElement: 'PurgCatName'
PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory as PurchasingCategory,
@Semantics.text: true
PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName,
case when NetPriceAmount = 0
then 0
else cast(division( division( InvoiceAmountInDocCurrency , DeliveredQuantity, 3 ),
NetPriceAmount,
3
) as abap.dec(17,3)
) * cast( 100 as abap.dec(17,3))
end as AbsolutePriceVariance
}where DeliveredQuantity > 0
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