P_StkValueByType2

DDL: P_STKVALUEBYTYPE2 Type: view COMPOSITE

P_StkValueByType2 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_StkValueByType1, P_StkValueByType1) and exposes 23 fields with key fields Material, Plant, StorageLocation, InventoryStockType, InventorySpecialStockType. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
P_StkValueByType1 Main from
P_StkValueByType1 Main union_all

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PSTCKVALTYP2 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY Material P_StkValueByType1 Material Vehicle Model
KEY Plant Plant Valuation Area
KEY StorageLocation StorageLocation StorageLocation
KEY InventoryStockType InventoryStockType Stock Type
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY CostEstimate P_StkValueByType1 CostEstimate Cost EstimateNo
KEY MaterialBaseUnit MaterialBaseUnit Valuation Unit
KEY CompanyCode CompanyCode Receiver Company Code
KEY ValuationAreaType
InventoryPrice CurrentInvtryPrice InventoryPrice Price
MaterialPriceUnitQty CurrentInvtryPrice MaterialPriceUnitQty Price unit
Material Vehicle Model
KEY Plant Plant Valuation Area
KEY StorageLocation StorageLocation StorageLocation
KEY InventoryStockType InventoryStockType Stock Type
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY CostEstimate P_StkValueByType1 CostEstimate Cost EstimateNo
KEY MaterialBaseUnit MaterialBaseUnit Valuation Unit
KEY CompanyCode CompanyCode Receiver Company Code
KEY ValuationAreaType
InventoryPrice CurrentInvtryPrice InventoryPrice Price
MaterialPriceUnitQty CurrentInvtryPrice MaterialPriceUnitQty Price unit
_CompanyCode _CompanyCode

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_StkValueByType2.
-- 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_StkValueByType2 AS
SELECT
  Main.Material AS Material,
  Plant,
  StorageLocation,
  InventoryStockType,
  InventorySpecialStockType,
  Main.CostEstimate AS CostEstimate,
  MaterialBaseUnit,
  CompanyCode,
  cast('1' as bwkrs_cus) AS ValuationAreaType,
  CurrentInvtryPrice.InventoryPrice AS InventoryPrice,
  CurrentInvtryPrice.MaterialPriceUnitQty AS MaterialPriceUnitQty
FROM P_StkValueByType1 AS Main
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
-- UNION ALL with additional select branch(es): P_StkValueByType1
;