P_CHMPMaterialValuation

DDL: P_CHMPMATERIALVALUATION Type: view_entity COMPOSITE Package: ODATA_ML_CHANGEMATERIALPRICES

WBS Valuation

P_CHMPMaterialValuation is a Composite CDS View that provides data about "WBS Valuation" in SAP S/4HANA. It reads from 4 data sources (I_ProdSalesOrderStockValuation, I_ProductProjectStockValuation, I_ProdVltdStockSubcontractor, P_ProductValuationBasic) and exposes 70 fields with key field CostEstimate. It has 3 associations to related views. Part of development package ODATA_ML_CHANGEMATERIALPRICES.

Data Sources (4)

SourceAliasJoin Type
I_ProdSalesOrderStockValuation I_ProdSalesOrderStockValuation union_all
I_ProductProjectStockValuation I_ProductProjectStockValuation union_all
I_ProdVltdStockSubcontractor I_ProdVltdStockSubcontractor union_all
P_ProductValuationBasic P_ProductValuationBasic from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_Purreqvaluationarea _ValuationArea $projection.ValuationArea = _ValuationArea.ValuationArea
[1..1] I_Product _Product $projection.Material = _Product.Product
[1..1] I_Material _Material $projection.Material = _Material.Material

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view
Metadata.ignorePropagatedAnnotations true view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY CostEstimate ProdCostEstNumber ProdCostEst.No.
Material Product Sold
ValuationArea Valuation Area
PriceControl Price Control
PriceUnit Unit of measure
MaterialValuationClass Valuation Class
InventoryValuationCategory ValuationCategory Valuation Cat.
InventoryValuationType ValuationType Valuation Type
WBSElement WBS Internal ID
InventorySpecialStockType Special Stock Type
SDDocument SD Document
SDDocumentItem WBS Element
Supplier Supplier
PriceDeterminationControl PriceDeterminationControl Price Determ.
ValuationTypeOrigin
Currency
BaseUnit _Product BaseUnit Unit of Measure
_Product _Product
Material Product Sold
ValuationArea Valuation Area
PriceControl Price Control
PriceUnit Unit of measure
MaterialValuationClass Valuation Class
InventoryValuationCategory ValuationCategory Valuation Cat.
InventoryValuationType ValuationType Valuation Type
WBSElement WBS Internal ID
InventorySpecialStockType InventorySpecialStockType Special Stock Type
SDDocument SD Document
SDDocumentItem WBS Element
Supplier Supplier Supplier
PriceDeterminationControl PriceDeterminationControl Price Determ.
ValuationTypeOrigin
Currency
BaseUnit _Product BaseUnit Unit of Measure
_Product _Product
Material Product Sold
ValuationArea Valuation Area
PriceControl Price Control
PriceUnit Unit of measure
MaterialValuationClass Valuation Class
InventoryValuationCategory ValuationCategory Valuation Cat.
InventoryValuationType ValuationType Valuation Type
WBSElement WBS Internal ID
InventorySpecialStockType InventorySpecialStockType Special Stock Type
SDDocument SDDocument SD Document
SDDocumentItem SDDocumentItem WBS Element
Supplier Supplier
PriceDeterminationControl PriceDeterminationControl Price Determ.
ValuationTypeOrigin
Currency
BaseUnit _Product BaseUnit Unit of Measure
_Product _Product
Material Product Sold
ValuationArea Valuation Area
PriceControl Price Control
PriceUnit Unit of measure
MaterialValuationClass Valuation Class
InventoryValuationCategory ValuationCategory Valuation Cat.
InventoryValuationType ValuationType Valuation Type
WBSElement WBSElementInternalID WBS Internal ID
InventorySpecialStockType InventorySpecialStockType Special Stock Type
SDDocument SD Document
SDDocumentItem WBS Element
Supplier Supplier
PriceDeterminationControl PriceDeterminationControl Price Determ.
ValuationTypeOrigin
Currency
BaseUnit _Product BaseUnit Unit of Measure
_Product _Product
_Material _Material

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_CHMPMaterialValuation.
-- 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.

CREATE VIEW P_CHMPMaterialValuation AS
SELECT
  ProdCostEstNumber AS CostEstimate,
  cast ( Product as matnr preserving type ) AS Material,
  cast ( ValuationArea as bwkey preserving type ) AS ValuationArea,
  cast( InventoryValuationProcedure as vprsv preserving type ) AS PriceControl,
  cast ( PriceUnitQty as peinh preserving type ) AS PriceUnit,
  cast ( ValuationClass as bklas preserving type ) AS MaterialValuationClass,
  ValuationCategory AS InventoryValuationCategory,
  ValuationType AS InventoryValuationType,
  cast('00000000' as ps_s4_pspnr preserving type ) AS WBSElement,
  cast('' as sobkz) AS InventorySpecialStockType,
  cast('' as vbeln) AS SDDocument,
  cast('000000' as posnr) AS SDDocumentItem,
  cast('' as lifnr) AS Supplier,
  PriceDeterminationControl,
  cast('mbew' as char4) AS ValuationTypeOrigin,
  _ValuationArea._CompanyCode.Currency AS Currency,
  _Product.BaseUnit AS BaseUnit
FROM P_ProductValuationBasic
LEFT OUTER JOIN I_Purreqvaluationarea AS _ValuationArea ON ValuationArea = _ValuationArea.ValuationArea  -- association [1..1]
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product  -- association [1..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [1..1]
-- UNION ALL with additional select branch(es): I_ProdVltdStockSubcontractor, I_ProdSalesOrderStockValuation, I_ProductProjectStockValuation
;