P_MatStkQtyValCur1

DDL: P_MATSTKQTYVALCUR1 Type: view_entity COMPOSITE Package: MM_IM_VDM_STOCK

Current Stock Quantity and Value

P_MatStkQtyValCur1 is a Composite CDS View that provides data about "Current Stock Quantity and Value" in SAP S/4HANA. It reads from 1 data source (P_MatStkQtyValCur2) and exposes 17 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. Part of development package MM_IM_VDM_STOCK.

Data Sources (1)

SourceAliasJoin Type
P_MatStkQtyValCur2 P_MatStkQtyValCur2 from

Annotations (3)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (17)

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 SpecialStockIdfgStockOwner SpecialStockIdfgStockOwner
KEY InventoryStockType InventoryStockType Stock Type
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY MaterialBaseUnit MaterialBaseUnit Valuation Unit
KEY Currency Currency Valuation Crcy
MatlWrhsStkQtyInMatlBaseUnit
StockValueInCCCrcy
system_dateasCurrentDate

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_MatStkQtyValCur1.
-- 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_MatStkQtyValCur1 AS
SELECT
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  WBSElementInternalID,
  Customer,
  SpecialStockIdfgStockOwner,
  InventoryStockType,
  InventorySpecialStockType,
  MaterialBaseUnit,
  Currency,
  cast(sum(MatlWrhsStkQtyInMatlBaseUnit) as nsdm_material_stock_in_buom preserving type ) AS MatlWrhsStkQtyInMatlBaseUnit,
  cast(sum(StockValueInCCCrcy) as nsdm_stock_value_in_cccrcy preserving type ) AS StockValueInCCCrcy
FROM P_MatStkQtyValCur2
;