P_PriceVariance3

DDL: P_PRICEVARIANCE3 SQL: PMMPRICEVAR3 Type: view CONSUMPTION

Price Variance 3

P_PriceVariance3 is a Consumption CDS View that provides data about "Price Variance 3" in SAP S/4HANA. It reads from 3 data sources (P_PriceVariance2, P_PRICEVARIANCECURRCONV, P_SuplrEvalCritrnVarcScore) and exposes 53 fields with key fields PurchaseOrder, PurchaseOrderItem, PurchaseOrderItem. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
P_PriceVariance2 P_PriceVariance2 from
P_PRICEVARIANCECURRCONV P_PRICEVARIANCECURRCONV union_all
P_SuplrEvalCritrnVarcScore Scoring inner

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate budat
P_EndDate budat

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_PurchasingCategoryMatlGroup _PurchasingCategoryMatlGroup PriceVariance.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMMPRICEVAR3 view
EndUserText.label Price Variance 3 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view

Fields (53)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
PurchaseOrderDate PurchaseOrderDate PO Date
PurchasingOrganization PriceVariance PurchasingOrganization Purchasing Organization
Supplier Supplier Supplier
CompanyCode CompanyCode Receiver Company Code
PurchasingGroup PurchasingGroup Purchasing Group
Plant Plant Valuation Area
Material Material Vehicle Model
MaterialGroup MaterialGroup Product Group
PurchasingDocumentCategory PurchasingDocumentCategory Doc. Category
PurchasingCategory PriceVariance PurchasingCategory Purchasing Category
PurgCatName PurgCatName Purchasing Cat. Name
DeliveredQuantity DeliveredQuantity Qty. in OPUn
OrderedQuantity OrderedQuantity Quantity
Currency Currency Valuation Crcy
DisplayCurrency
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
OrderPriceUnit OrderPriceUnit Order Price Un.
PurchaseOrderNetPriceAmount
InvoicePrice Invce Pr. (Ord. UoM)
PriceVarianceAmount Price Variance Amt
NetAmount NetAmount Stated Amount
SupplierEvaluationScore P_SuplrEvalCritrnVarcScore SupplierEvaluationScore Price Variance Score
PurgDocMigrtnIsCmpltdForAnlyts
P_DisplayCurrency
P_StartDate
MaterialGroupkeyPurchaseOrder
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
PurchaseOrderDate PurchaseOrderDate PO Date
PurchasingOrganization PurchasingOrganization Purchasing Organization
Supplier Supplier Supplier
CompanyCode CompanyCode Receiver Company Code
PurchasingGroup PurchasingGroup Purchasing Group
Plant Plant Valuation Area
Material Material Vehicle Model
MaterialGroup MaterialGroup Product Group
PurchasingDocumentCategory PurchasingDocumentCategory Doc. Category
PurchasingCategory Purchasing Category
PurgCatName Purchasing Cat. Name
DeliveredQuantity deliveredquantity Qty. in OPUn
OrderedQuantity OrderedQuantity Quantity
Currency Currency Valuation Crcy
DisplayCurrency
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
OrderPriceUnit OrderPriceUnit Order Price Un.
PurchaseOrderNetPriceAmount PurchaseOrderNetPriceAmount
InvoicePrice InvoiceAmount Invce Pr. (Ord. UoM)
NetAmount NetAmount Stated Amount
PriceVarianceInPct PriceVarianceInPct Price Variance in %
SupplierEvaluationScore PriceVarianceScore Price Variance Score
PurgDocMigrtnIsCmpltdForAnlyts
SuplrEvalRelevantDocCategory SuplrEvalRelevantDocCategory

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_PriceVariance3.
-- 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: PMMPRICEVAR3
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : budat, P_EndDate : budat

CREATE VIEW P_PriceVariance3 AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  PurchaseOrderDate,
  PriceVariance.PurchasingOrganization AS PurchasingOrganization,
  Supplier,
  CompanyCode,
  PurchasingGroup,
  Plant,
  Material,
  MaterialGroup,
  PurchasingDocumentCategory,
  PriceVariance.PurchasingCategory AS PurchasingCategory,
  PurgCatName,
  DeliveredQuantity,
  OrderedQuantity,
  Currency,
  cast ($parameters.P_DisplayCurrency as vdm_v_display_currency) AS DisplayCurrency,
  PurchaseOrderQuantityUnit,
  OrderPriceUnit,
  cast(PurchaseOrderNetPriceAmount as mm_po_net_price_amount ) AS PurchaseOrderNetPriceAmount,
  cast(InvoiceAmountPerUnit as mm_invoice_price_amount ) AS InvoicePrice,
  cast(PriceVarianceAmount as mm_a_price_variance_amount) AS PriceVarianceAmount,
  NetAmount,
  Scoring.SupplierEvaluationScore AS SupplierEvaluationScore,
  cast ('' as migration_completed) AS PurgDocMigrtnIsCmpltdForAnlyts,
  cast ( '1' as mmpur_ana_de_se_doc_config ) as SuplrEvalRelevantDocCategory AS P_DisplayCurrency,
  P_StartDate : $parameters.P_StartDate AS P_StartDate,
  PriceVarianceInPct,
  SuplrEvalRelevantDocCategory
FROM P_PriceVariance2
INNER JOIN P_SuplrEvalCritrnVarcScore AS Scoring ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurchasingCategoryMatlGroup AS _PurchasingCategoryMatlGroup ON PriceVariance.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup  -- association [1..1]
-- UNION ALL with additional select branch(es): P_PRICEVARIANCECURRCONV
;