P_MaterialStockTimeSeries

DDL: P_MATERIALSTOCKTIMESERIES SQL: PMATSTOCKTIMESER Type: view COMPOSITE

P_MaterialStockTimeSeries is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_MaterialStockTimeSeries1) and exposes 23 fields with key fields PeriodType, StartDate, EndDate, YearPeriod, Material.

Data Sources (1)

SourceAliasJoin Type
P_MaterialStockTimeSeries1 P_MaterialStockTimeSeries1 from

Parameters (3)

NameTypeDefault
P_StartDate vdm_v_start_date
P_EndDate vdm_v_end_date
P_PeriodType nsdm_period_type

Annotations (10)

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

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY PeriodType PeriodType PeriodIndicator
KEY StartDate StartDate Valid From
KEY EndDate EndDate Term to
KEY YearPeriod YearPeriod Fiscal Year Period
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 InventoryStockType InventoryStockType Stock Type
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY MaterialBaseUnit MaterialBaseUnit Valuation Unit
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYearVariant FiscalYearVariant FY Variant
KEY Currency Currency Valuation Crcy
KEY CostEstimate CostEstimate Cost EstimateNo
MatlWrhsStkQtyInMatlBaseUnit
MatlCnsmpnQtyInMatlBaseUnit
MatlStkQtySumInPeriod

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_MaterialStockTimeSeries.
-- 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.
-- SQL view name: PMATSTOCKTIMESER
-- Parameters: P_StartDate : vdm_v_start_date, P_EndDate : vdm_v_end_date, P_PeriodType : nsdm_period_type

CREATE VIEW P_MaterialStockTimeSeries AS
SELECT
  PeriodType,
  StartDate,
  EndDate,
  YearPeriod,
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  WBSElementInternalID,
  Customer,
  InventoryStockType,
  InventorySpecialStockType,
  MaterialBaseUnit,
  CompanyCode,
  FiscalYearVariant,
  Currency,
  CostEstimate,
  cast(sum(MatlWrhsStkQtyInMatlBaseUnit) as nsdm_stock_qty preserving type) AS MatlWrhsStkQtyInMatlBaseUnit,
  cast(sum(MatlCnsmpnQtyInMatlBaseUnit) as nsdm_stock_qty preserving type) AS MatlCnsmpnQtyInMatlBaseUnit,
  sum( MatlStkQtySumInPeriod) AS MatlStkQtySumInPeriod
FROM P_MaterialStockTimeSeries1
;