I_MATERIALSTOCKTIMESERIES

CDS View

Material Stock For Periods

I_MATERIALSTOCKTIMESERIES is a CDS View in S/4HANA. Material Stock For Periods. 5 CDS views read from this table.

CDS Views using this table (5)

ViewTypeJoinVDMDescription
C_MaterialStockTimeSeries view from CONSUMPTION Material stock for periods by type
I_DailyChmlProductStkQty view from COMPOSITE SARA: Daily Chemical Product Quantity
I_DDHistlBufStkTimeSeries view_entity from COMPOSITE Stock for Product
I_MaterialStockNetWeight view from COMPOSITE Netweight of Material on Stock
I_SaraDailyChemicalProductQty view from COMPOSITE SARA: Daily Chemical Product Quantity
@AbapCatalog: {
                 sqlViewName: 'IMATSTOCKTIMESER',
                 compiler.compareFilter: true,
                 preserveKey: true
              }
@AccessControl: {
                  authorizationCheck: #CHECK,
                  personalData.blocking: #NOT_REQUIRED   --there are no BP references in table MATDOC with an EndOfPurpose state
                }
@EndUserText.label: 'Material Stock For Periods'
@ObjectModel: {
                 usageType:{
                              sizeCategory: #XXL,
                              serviceQuality: #D,
                              dataClass:#TRANSACTIONAL
                           },
                 modelingPattern: #ANALYTICAL_CUBE,
                 supportedCapabilities: [#ANALYTICAL_PROVIDER, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE]
              }
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
         viewType: #COMPOSITE,
         lifecycle.contract.type: #PUBLIC_LOCAL_API
      }
@Analytics.dataCategory:#CUBE
@Metadata: {
             ignorePropagatedAnnotations: true,
             allowExtensions: true
           }

/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */

define view I_MaterialStockTimeSeries
  with parameters
    P_StartDate  : vdm_v_start_date,
    P_EndDate    : vdm_v_end_date,
    P_PeriodType : nsdm_period_type
  as select from P_MaterialStockTimeSeries(P_StartDate:  :P_StartDate,
                                           P_EndDate:    :P_EndDate,
                                           P_PeriodType: :P_PeriodType)

  association [1..1] to I_Material                  as _Material                  on  $projection.Material = _Material.Material
  association [1..1] to I_CompanyCode               as _CompanyCode               on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [1..1] to I_Plant                     as _Plant                     on  $projection.Plant = _Plant.Plant
  association [0..1] to I_StorageLocation           as _StorageLocation           on  $projection.Plant           = _StorageLocation.Plant
                                                                                  and $projection.StorageLocation = _StorageLocation.StorageLocation
  association [0..1] to I_Supplier                  as _Supplier                  on  $projection.Supplier = _Supplier.Supplier
  association [0..1] to I_Customer                  as _Customer                  on  $projection.Customer = _Customer.Customer
  association [1..1] to I_InventoryStockType        as _InventoryStockType        on  $projection.InventoryStockType = _InventoryStockType.InventoryStockType
  association [1..1] to I_InventorySpecialStockType as _InventorySpecialStockType on  $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
  association [1..1] to I_UnitOfMeasure             as _UnitOfMeasure             on  $projection.MaterialBaseUnit = _UnitOfMeasure.UnitOfMeasure
  association [0..1] to I_FiscalYearVariant         as _FiscalYearVariant         on  $projection.FiscalYearVariant = _FiscalYearVariant.FiscalYearVariant
  association [0..1] to I_InvtryPrcBasicByKeyDate   as _InvtryPrcByPeriodEndDate  on  $projection.CostEstimate = _InvtryPrcByPeriodEndDate.CostEstimate
  association [0..1] to I_CurrentMatlPriceByCostEst as _CurrentInvtryPrice        on  $projection.CostEstimate = _CurrentInvtryPrice.CostEstimate
{

      // Period

  key PeriodType,
      @Semantics.businessDate.at: true
      @Semantics.businessDate.to: false  -- switch of semantic inherited from one of the lower view in the stack  
  key EndDate,
  key YearPeriod,
      // Stock Identifier

      @ObjectModel.foreignKey.association: '_Material'
  key Material,
      @ObjectModel.foreignKey.association: '_Plant'
  key Plant,
      @ObjectModel.foreignKey.association: '_StorageLocation'
  key StorageLocation,
  key Batch,
      @ObjectModel.foreignKey.association: '_Supplier'
  key Supplier,
  key SDDocument,
  key SDDocumentItem,
  key WBSElementInternalID,
      @ObjectModel.foreignKey.association: '_Customer'
  key Customer,
      @ObjectModel.foreignKey.association: '_InventoryStockType'
  key InventoryStockType,
      @ObjectModel.foreignKey.association: '_InventorySpecialStockType'
  key InventorySpecialStockType,
      // Stock Groups

      @Semantics.fiscal.yearVariant: true
  key FiscalYearVariant,
      // Units

      @Semantics.unitOfMeasure: true
  key MaterialBaseUnit,
      CostEstimate,
      @ObjectModel.foreignKey.association: '_CompanyCode'
      CompanyCode,

      // Quantity

      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      @DefaultAggregation : #SUM
      MatlWrhsStkQtyInMatlBaseUnit,

      // Associations for names and descriptions

      _UnitOfMeasure,
      _Material,
      _CompanyCode,
      _Plant,
      _StorageLocation,
      _Supplier,
      _Customer,
      _InventoryStockType,
      _InventorySpecialStockType,
      _FiscalYearVariant,
      _InvtryPrcByPeriodEndDate,
      _CurrentInvtryPrice
}
where
  PeriodType = :P_PeriodType                                     
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_MATERIALSTOCKTIMESERIES"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENTMATLPRICEBYCOSTEST",
"I_CUSTOMER",
"I_FISCALYEARVARIANT",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_INVENTORYSTOCKTYPE",
"I_INVTRYPRCBASICBYKEYDATE",
"I_MATERIAL",
"I_PLANT",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/