P_InfoRecordPriceVariance

DDL: P_INFORECORDPRICEVARIANCE SQL: PMMIRPRCVAR Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Info Record Price Variance

P_InfoRecordPriceVariance is a Consumption CDS View that provides data about "Info Record Price Variance" in SAP S/4HANA. It reads from 1 data source (P_InfoRecordPriceVariance3) and exposes 22 fields with key fields PurchasingInfoRecord, PurchasingInfoRecordCategory, PurchasingOrganization, Plant, ChangeDocument. Part of development package ODATA_MM_ANALYTICS.

Data Sources (1)

SourceAliasJoin Type
P_InfoRecordPriceVariance3 P_InfoRecordPriceVariance3 from

Parameters (3)

NameTypeDefault
P_Material matnr
P_StartDate vdm_validitystart
P_EndDate vdm_validityend

Annotations (6)

NameValueLevelField
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 (22)

KeyFieldSource TableSource FieldDescription
KEY PurchasingInfoRecord IR PurchasingInfoRecord Info Record
KEY PurchasingInfoRecordCategory IR PurchasingInfoRecordCategory Infotype
KEY PurchasingOrganization IR PurchasingOrganization Purchasing Organization
KEY Plant IR Plant Valuation Area
KEY ChangeDocument IR ChangeDocument Document Number
PurchasingGroup IR PurchasingGroup Purchasing Group
Supplier IR Supplier Supplier
IRNetPriceAmount IR NetPriceAmount Net Price
CreationDate IR CreationDate Time Stamp
Material IR Material Vehicle Model
MaterialGroup IR MaterialGroup Product Group
BOMHasHeaderInfoRecord IR BOMHasHeaderInfoRecord
Currency IR Currency Valuation Crcy
DocumentCurrency DocumentCurrency Document Currency
DocumentChangeDate DocumentChangeDate
curr212asNetPriceAmount
QuantityInBaseUnit QuantityInBaseUnit Quantity
MaterialPriceUnitQty MaterialPriceUnitQty Price unit
PurchaseOrderPriceUnit PurchaseOrderPriceUnit Order Price Un.
IsDocumentChanged IsDocumentChanged
NumberOfChanges NumberOfChanges
NumberOfPriceChanges NumberOfPriceChanges

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
  IR.PurchasingInfoRecord AS PurchasingInfoRecord,
  IR.PurchasingInfoRecordCategory AS PurchasingInfoRecordCategory,
  IR.PurchasingOrganization AS PurchasingOrganization,
  IR.Plant AS Plant,
  IR.ChangeDocument AS ChangeDocument,
  IR.PurchasingGroup AS PurchasingGroup,
  IR.Supplier AS Supplier,
  IR.NetPriceAmount AS IRNetPriceAmount,
  IR.CreationDate AS CreationDate,
  IR.Material AS Material,
  IR.MaterialGroup AS MaterialGroup,
  IR.BOMHasHeaderInfoRecord AS BOMHasHeaderInfoRecord,
  IR.Currency AS Currency,
  DocumentCurrency,
  DocumentChangeDate,
  cast( case when IR.IsDocumentChanged = 'X' then IR.ChangeDocNewFieldValue + division(IR.NewFieldValAfterDecimal,100,2) else IR.NetPriceAmount end as abap.curr( 21, 2 ) ) as NetPriceAmount AS curr212asNetPriceAmount,
  QuantityInBaseUnit,
  MaterialPriceUnitQty,
  PurchaseOrderPriceUnit,
  IsDocumentChanged,
  NumberOfChanges,
  NumberOfPriceChanges
FROM P_InfoRecordPriceVariance3
;