P_InfoRecordPriceVariance
P_InfoRecordPriceVariance is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_PurchasingInfoRecord, I_PurgInfoRecdOrgPlantData, P_ChangeDocumentItem2) and exposes 26 fields with key fields PurchasingInfoRecord, PurchasingInfoRecordCategory, PurchasingOrganization, Plant, ChangeDocument.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchasingInfoRecord | InfoRecord | from |
| I_PurgInfoRecdOrgPlantData | InfoRecord1 | inner |
| P_ChangeDocumentItem2 | P_ChangeDocumentItem2 | left_outer |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_Material | matnr | |
| P_StartDate | vdm_validitystart | |
| P_EndDate | vdm_validityend |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMMIRPRCVAR | 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 (26)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingInfoRecord | I_PurchasingInfoRecord | PurchasingInfoRecord | Info Record |
| KEY | PurchasingInfoRecordCategory | I_PurgInfoRecdOrgPlantData | PurchasingInfoRecordCategory | Infotype |
| KEY | PurchasingOrganization | I_PurgInfoRecdOrgPlantData | PurchasingOrganization | Purchasing Organization |
| KEY | Plant | I_PurgInfoRecdOrgPlantData | Plant | Valuation Area |
| KEY | ChangeDocument | ChangeDocument | Document Number | |
| PurchasingGroup | I_PurgInfoRecdOrgPlantData | PurchasingGroup | Purchasing Group | |
| Supplier | I_PurchasingInfoRecord | Supplier | Supplier | |
| IRNetPriceAmount | I_PurgInfoRecdOrgPlantData | NetPriceAmount | Net Price | |
| CreationDate | I_PurchasingInfoRecord | CreationDate | Time Stamp | |
| Material | I_PurchasingInfoRecord | Material | Vehicle Model | |
| MaterialGroup | I_PurchasingInfoRecord | MaterialGroup | Product Group | |
| Currency | ChangeItem | Currency | Valuation Crcy | |
| CurrencyendasDocumentCurrency | ||||
| CreationDateendasDocumentChangeDate | ||||
| NetPriceAmountendasNetPriceAmount | ||||
| MaterialPriceUnitQty | MaterialPriceUnitQty | Price unit | ||
| PurchaseOrderPriceUnit | PurchaseOrderPriceUnit | Order Price Un. | ||
| IsDocumentChanged | IsDocumentChanged | |||
| NumberOfChanges | NumberOfChanges | |||
| NumberOfPriceChanges | NumberOfPriceChanges | |||
| _Material | I_PurchasingInfoRecord | _Material | ||
| _MaterialGroup | I_PurchasingInfoRecord | _MaterialGroup | ||
| _Plant | I_PurgInfoRecdOrgPlantData | _Plant | ||
| _Supplier | I_PurchasingInfoRecord | _Supplier | ||
| _PurchasingOrganization | I_PurgInfoRecdOrgPlantData | _PurchasingOrganization | ||
| _PurchasingGroup | I_PurgInfoRecdOrgPlantData | _PurchasingGroup |
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_InfoRecordPriceVariance.
-- 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: PMMIRPRCVAR
-- Parameters: P_Material : matnr, P_StartDate : vdm_validitystart, P_EndDate : vdm_validityend
CREATE VIEW P_InfoRecordPriceVariance AS
SELECT
InfoRecord.PurchasingInfoRecord AS PurchasingInfoRecord,
InfoRecord1.PurchasingInfoRecordCategory AS PurchasingInfoRecordCategory,
InfoRecord1.PurchasingOrganization AS PurchasingOrganization,
InfoRecord1.Plant AS Plant,
ChangeDocument,
InfoRecord1.PurchasingGroup AS PurchasingGroup,
InfoRecord.Supplier AS Supplier,
InfoRecord1.NetPriceAmount AS IRNetPriceAmount,
InfoRecord.CreationDate AS CreationDate,
InfoRecord.Material AS Material,
InfoRecord.MaterialGroup AS MaterialGroup,
ChangeItem.Currency AS Currency,
case when ChangeDocument is not null and ChangeItem.Currency is not null then ChangeItem.Currency else InfoRecord1.Currency end as DocumentCurrency AS CurrencyendasDocumentCurrency,
case when ChangeDocument = '' or ChangeDocument is null then InfoRecord.CreationDate else ChangeItem.CreationDate end as DocumentChangeDate AS CreationDateendasDocumentChangeDate,
case when ChangeDocument is not null then cast(ChangeItem.NetPriceAmount + division(cast(ValueAfterDecimal as abap.dec( 21, 2 )), 100,2) as abap.curr( 21, 2 )) else InfoRecord1.NetPriceAmount end as NetPriceAmount AS NetPriceAmountendasNetPriceAmount,
MaterialPriceUnitQty,
PurchaseOrderPriceUnit,
IsDocumentChanged,
NumberOfChanges,
NumberOfPriceChanges,
InfoRecord._Material AS _Material,
InfoRecord._MaterialGroup AS _MaterialGroup,
InfoRecord1._Plant AS _Plant,
InfoRecord._Supplier AS _Supplier,
InfoRecord1._PurchasingOrganization AS _PurchasingOrganization,
InfoRecord1._PurchasingGroup AS _PurchasingGroup
FROM I_PurchasingInfoRecord AS InfoRecord
INNER JOIN I_PurgInfoRecdOrgPlantData AS InfoRecord1 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_ChangeDocumentItem2 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