P_CHMPMaterialValuation
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)
| Source | Alias | Join 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)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
;
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