P_MatStkQtyValCur1_2

DDL: P_MATSTKQTYVALCUR1_2 Type: view COMPOSITE

P_MatStkQtyValCur1_2 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_MatStkQtyValCur2_2) and exposes 18 fields with key fields Material, Plant, StorageLocation, Batch, Supplier.

Data Sources (1)

SourceAliasJoin Type
P_MatStkQtyValCur2_2 P_MatStkQtyValCur2_2 from

Annotations (7)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PMATSTKQTYVAL1_2 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (18)

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 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
ValuationAreaType ValuationAreaType Valuation area
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_2.
-- 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_2 AS
SELECT
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  cast(WBSElementInternalID as nsdm_wbselement_internal_id preserving type) AS WBSElementInternalID,
  Customer,
  SpecialStockIdfgStockOwner,
  InventoryStockType,
  InventorySpecialStockType,
  MaterialBaseUnit,
  Currency,
  ValuationAreaType,
  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_2
;