P_MltplMatlStk_L3C

DDL: P_MLTPLMATLSTK_L3C Type: view_entity COMPOSITE

P_MltplMatlStk_L3C is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_MltplMatlStk_L2) and exposes 31 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_MltplMatlStk_L2 P_MltplMatlStk_L2 from

Parameters (1)

NameTypeDefault
P_EndDate sydate

Associations (2)

CardinalityTargetAliasCondition
[0..1] R_MaterialStockValueByKeyDate _MaterialStockValueByKeyDate $projection.CostEstimate = _MaterialStockValueByKeyDate.CostEstimate and $projection.CompanyCode = _MaterialStockValueByKeyDate.ValuationArea and $projection.Material = _MaterialStockValueByKeyDate.Product and $projection.MaterialBaseUnit = _MaterialStockValueByKeyDate.BaseUnit and $projection.CostEstimate <> '000000000000'
[0..1] I_CurrentMatlPriceByCostEst _CurrentInvtryPrice $projection.CostEstimate = _CurrentInvtryPrice.CostEstimate and $projection.CompanyCode = _CurrentInvtryPrice.ValuationArea and $projection.Material = _CurrentInvtryPrice.Material and $projection.CostEstimate <> '000000000000'

Annotations (7)

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

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY Material Material Vehicle Model
KEY Plant Plant Valuation Area
KEY StorageLocation StorageLocation StorageLocation
KEY Batch Batch Lot No.
KEY Supplier Supplier Supplier
KEY SDDocument SDDocument SD Document
KEY SDDocumentItem SDDocumentItem
KEY WBSElementInternalID WBSElementInternalID WBS Internal ID
KEY Customer Customer Sold-to Party
KEY ResourceID ResourceID Vehicle ID
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY CostEstimate CostEstimate Cost EstimateNo
ValuationAreaType
ValuationareaisConpanyCodeCompanyCode
MaterialBaseUnit MaterialBaseUnit Valuation Unit
InventoryValuationType InventoryValuationType Valuation Type
Currency Currency Valuation Crcy
VltdUnrestrictedUseStkQty VltdUnrestrictedUseStkQty
QualityInspectionStockQuantity QualityInspectionStockQuantity
ReturnsBlockedStockQuantity ReturnsBlockedStockQuantity
TransferStockStorageLocQty TransferStockStorageLocQty
TransferStockPlantQuantity TransferStockPlantQuantity
StockInTransitQuantity StockInTransitQuantity Stk in Transit
BlockedStockQuantity BlockedStockQuantity
RestrictedStockQuantity RestrictedStockQuantity
TiedEmptiesStockQuantity TiedEmptiesStockQuantity
GoodsReceiptBlockedStockQty GoodsReceiptBlockedStockQty Val. GR Blocked Stck
dec232asInventoryPrice
dec50endasMaterialPriceUnitQty
AmountInCompanyCodeCurrency
InventoryQty

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_MltplMatlStk_L3C.
-- 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.
-- Parameters: P_EndDate : sydate

CREATE VIEW P_MltplMatlStk_L3C AS
SELECT
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  WBSElementInternalID,
  Customer,
  ResourceID,
  InventorySpecialStockType,
  CostEstimate,
  cast('3' as bwkrs_cus) AS ValuationAreaType,
  MaterialBaseUnit,
  InventoryValuationType,
  Currency,
  VltdUnrestrictedUseStkQty,
  QualityInspectionStockQuantity,
  ReturnsBlockedStockQuantity,
  TransferStockStorageLocQty,
  TransferStockPlantQuantity,
  StockInTransitQuantity,
  BlockedStockQuantity,
  RestrictedStockQuantity,
  TiedEmptiesStockQuantity,
  GoodsReceiptBlockedStockQty,
  case when _CurrentInvtryPrice.MaterialPriceUnitQty = 0 then cast(1 as abap.dec( 5, 0 )) when _CurrentInvtryPrice.MaterialPriceUnitQty is null then cast(1 as abap.dec( 5, 0 )) else cast(_CurrentInvtryPrice.MaterialPriceUnitQty as abap.dec( 5, 0 )) end as MaterialPriceUnitQty AS dec50endasMaterialPriceUnitQty,
  cast(_MaterialStockValueByKeyDate( P_EndDate: $parameters.P_EndDate ).AmountInCompanyCodeCurrency as abap.dec(23,2)) AS AmountInCompanyCodeCurrency,
  cast(_MaterialStockValueByKeyDate( P_EndDate: $parameters.P_EndDate ).InventoryQty as abap.dec(16,5)) AS InventoryQty
FROM P_MltplMatlStk_L2
LEFT OUTER JOIN R_MaterialStockValueByKeyDate AS _MaterialStockValueByKeyDate ON CostEstimate = _MaterialStockValueByKeyDate.CostEstimate AND CompanyCode = _MaterialStockValueByKeyDate.ValuationArea AND Material = _MaterialStockValueByKeyDate.Product AND MaterialBaseUnit = _MaterialStockValueByKeyDate.BaseUnit AND CostEstimate <> '000000000000'  -- association [0..1]
LEFT OUTER JOIN I_CurrentMatlPriceByCostEst AS _CurrentInvtryPrice ON CostEstimate = _CurrentInvtryPrice.CostEstimate AND CompanyCode = _CurrentInvtryPrice.ValuationArea AND Material = _CurrentInvtryPrice.Material AND CostEstimate <> '000000000000'  -- association [0..1]
;