P_InvoicePriceVariance
P_InvoicePriceVariance is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_CalendarDate, P_InvoicePriceVariance2, I_PurchasingCategoryMatlGroup) and exposes 38 fields with key fields MaterialDocumentYear, Invoice, MaterialDocumentItem.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | Calendar | left_outer |
| P_InvoicePriceVariance2 | P_InvoicePriceVariance2 | from |
| I_PurchasingCategoryMatlGroup | PurchasingCategoryMatlGroup | left_outer |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_Material | matnr | |
| P_StartDate | vdm_validitystart | |
| P_EndDate | vdm_validityend |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMMINVPRCVARC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (38)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocumentYear | MaterialDocumentYear | Material Document Year | |
| KEY | Invoice | Material Doc. | ||
| KEY | MaterialDocumentItem | MaterialDocumentItem | Material Document Item | |
| InvoiceDate | Posting Date for GR | |||
| CalendarYear | I_CalendarDate | CalendarYear | Year | |
| CalendarMonth | I_CalendarDate | CalendarMonth | Calendar Month | |
| CalendarQuarter | I_CalendarDate | CalendarQuarter | Calendar Quarter | |
| CalendarWeek | I_CalendarDate | CalendarWeek | Calendar Week | |
| YearWeek | I_CalendarDate | YearWeek | Year and Calendar Week | |
| YearMonth | I_CalendarDate | YearMonth | Year Month | |
| YearQuarter | I_CalendarDate | YearQuarter | Year Quarter | |
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| Supplier | Supplier | Supplier | ||
| Material | Material | Vehicle Model | ||
| MaterialGroup | PriceVariance | MaterialGroup | Product Group | |
| PurchasingCategory | ||||
| PurgCatName | ||||
| Plant | Plant | Valuation Area | ||
| DocNumber | DocNumber | Document Number | ||
| Currency | Currency | Valuation Crcy | ||
| DisplayCurrency | DisplayCurrency | Display Currency | ||
| NetPriceAmount | ||||
| InvoiceAmtInDisplayCurrency | ||||
| QtyInPurchaseOrderPriceUnit | ||||
| NetPriceQuantity | NetPriceQuantity | Price Unit | ||
| OrderPriceUnit | OrderPriceUnit | Order Price Un. | ||
| _Material | _Material | |||
| Quantity | Quantity | Value | ||
| _MaterialGroup | PriceVariance | _MaterialGroup | ||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| _Plant | _Plant | |||
| _Supplier | _Supplier | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _CompanyCode | _CompanyCode | |||
| _DocText | _DocText |
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_InvoicePriceVariance.
-- 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: PMMINVPRCVARC
-- Parameters: P_DisplayCurrency : displaycurrency, P_Material : matnr, P_StartDate : vdm_validitystart, P_EndDate : vdm_validityend
CREATE VIEW P_InvoicePriceVariance AS
SELECT
MaterialDocumentYear,
cast( MaterialDocument as fikz_reginv_invoice ) AS Invoice,
MaterialDocumentItem,
cast( PostingDate as invdt ) AS InvoiceDate,
Calendar.CalendarYear AS CalendarYear,
Calendar.CalendarMonth AS CalendarMonth,
Calendar.CalendarQuarter AS CalendarQuarter,
Calendar.CalendarWeek AS CalendarWeek,
Calendar.YearWeek AS YearWeek,
Calendar.YearMonth AS YearMonth,
Calendar.YearQuarter AS YearQuarter,
PurchasingOrganization,
PurchasingGroup,
CompanyCode,
Supplier,
Material,
PriceVariance.MaterialGroup AS MaterialGroup,
PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName AS PurgCatName,
Plant,
DocNumber,
Currency,
DisplayCurrency,
sum (NetPriceAmount) AS NetPriceAmount,
sum(InvoiceAmtInDisplayCurrency) AS InvoiceAmtInDisplayCurrency,
sum(QtyInPurchaseOrderPriceUnit) AS QtyInPurchaseOrderPriceUnit,
NetPriceQuantity,
OrderPriceUnit,
Quantity,
PriceVariance._MaterialGroup AS _MaterialGroup,
PurchaseOrderQuantityUnit
FROM P_InvoicePriceVariance2
LEFT OUTER JOIN I_PurchasingCategoryMatlGroup AS PurchasingCategoryMatlGroup ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CalendarDate AS Calendar ON /* join condition not captured in parsed metadata */
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA