F5_Mmim_Matstockquanvalbydat3

DDL: F5_MMIM_MATSTOCKQUANVALBYDAT3 Type: view_entity

Material Stock Quantity and Value by Key Date

F5_Mmim_Matstockquanvalbydat3 is a CDS View that provides data about "Material Stock Quantity and Value by Key Date" in SAP S/4HANA. It reads from 1 data source (F6_MMIM_MATSTOCKQUANVALBYDAT3) and exposes 47 fields.

Data Sources (1)

SourceAliasJoin Type
F6_MMIM_MATSTOCKQUANVALBYDAT3 F6_MMIM_MATSTOCKQUANVALBYDAT3 from

Parameters (1)

NameTypeDefault
P_EndDate sydate

Annotations (5)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Material Stock Quantity and Value by Key Date view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view

Fields (47)

KeyFieldSource TableSource FieldDescription
Material Material Vehicle Model
Plant Plant Valuation Area
StorageLocation StorageLocation StorageLocation
ResourceId ResourceId Vehicle ID
Batch Batch Lot No.
Supplier Supplier Supplier
SDDocument SDDocument SD Document
SDDocumentItem SDDocumentItem
WBSElementInternalID WBSElementInternalID WBS Internal ID
Customer Customer Sold-to Party
InventoryStockType InventoryStockType Stock Type
InventorySpecialStockType InventorySpecialStockType Special Stock Type
CompanyCode CompanyCode Receiver Company Code
MaterialBaseUnit MaterialBaseUnit Valuation Unit
MatlWrhsStkQtyInMatlBaseUnit MatlWrhsStkQtyInMatlBaseUnit Quantity
ValuationArea ValuationArea Valuation Area
InventoryValuationType InventoryValuationType Valuation Type
CostEstimate CostEstimate Cost EstimateNo
Currency Currency Valuation Crcy
dec213endasCurrentStock Quantity
dec213endasReturnsBlockedStockQuantity Quantity
dec213endasTransferStockStorageLocQty Quantity
dec213endasTransferStockPlantQuantity Quantity
dec213endasStockInTransitQuantity Quantity
dec213endasBlockedStockQuantity Quantity
dec213endasRestrictedStockQuantity Quantity
dec213endasTiedEmptiesStockQuantity Quantity
dec213endasGoodsReceiptBlockedStockQty Quantity
dec232endasCurrentStockValue
dec232endasQualityInspectionStockValue
dec232endasReturnsBlockedStockValue
dec232endasTransferStockStorageLocValue
dec232endasTransferStockPlantValue
dec232endasStockInTransitValue
dec232endasBlockedStockValue
dec232endasRestrictedStockValue
dec232endasTiedEmptiesStockValue
dec232endasGoodsReceiptBlockedStockValue
dec232endasCurrentStockCurVal
dec232endasQualityInspectionStockCurVal
dec232endasReturnsBlockedStockCurVal
dec232endasTransferStockStorageLocCurVal
dec232endasTransferStockPlantCurVal
dec232endasStockInTransitCurVal
dec232endasBlockedStockCurVal
dec232endasRestrictedStockCurVal
dec232endasTiedEmptiesStockCurVal

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 F5_Mmim_Matstockquanvalbydat3.
-- 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 F5_Mmim_Matstockquanvalbydat3 AS
SELECT
  Material,
  Plant,
  StorageLocation,
  ResourceId,
  Batch,
  Supplier,
  SDDocument,
  SDDocumentItem,
  WBSElementInternalID,
  Customer,
  InventoryStockType,
  InventorySpecialStockType,
  CompanyCode,
  MaterialBaseUnit,
  MatlWrhsStkQtyInMatlBaseUnit,
  ValuationArea,
  InventoryValuationType,
  CostEstimate,
  Currency,
  case when InventoryStockType = '01' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as CurrentStock AS dec213endasCurrentStock,
  case when InventoryStockType = '03' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as ReturnsBlockedStockQuantity AS dec213endasReturnsBlockedStockQuantity,
  case when InventoryStockType = '04' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as TransferStockStorageLocQty AS dec213endasTransferStockStorageLocQty,
  case when InventoryStockType = '05' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as TransferStockPlantQuantity AS dec213endasTransferStockPlantQuantity,
  case when InventoryStockType = '06' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as StockInTransitQuantity AS dec213endasStockInTransitQuantity,
  case when InventoryStockType = '07' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as BlockedStockQuantity AS dec213endasBlockedStockQuantity,
  case when InventoryStockType = '08' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as RestrictedStockQuantity AS dec213endasRestrictedStockQuantity,
  case when InventoryStockType = '09' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as TiedEmptiesStockQuantity AS dec213endasTiedEmptiesStockQuantity,
  case when InventoryStockType = '10' then cast( MatlWrhsStkQtyInMatlBaseUnit as abap.dec(21,3) ) else cast( 0 as abap.dec(21,3 ) ) end as GoodsReceiptBlockedStockQty AS dec213endasGoodsReceiptBlockedStockQty,
  case when InventoryStockType = '01' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as CurrentStockValue AS dec232endasCurrentStockValue,
  case when InventoryStockType = '02' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as QualityInspectionStockValue AS dec232endasQualityInspectionStockValue,
  case when InventoryStockType = '03' then cast( 0 as abap.dec(23,2 ) ) else cast( 0 as abap.dec(23,2 ) ) end as ReturnsBlockedStockValue AS dec232endasReturnsBlockedStockValue,
  case when InventoryStockType = '04' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as TransferStockStorageLocValue AS dec232endasTransferStockStorageLocValue,
  case when InventoryStockType = '05' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as TransferStockPlantValue AS dec232endasTransferStockPlantValue,
  case when InventoryStockType = '06' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as StockInTransitValue AS dec232endasStockInTransitValue,
  case when InventoryStockType = '07' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as BlockedStockValue AS dec232endasBlockedStockValue,
  case when InventoryStockType = '08' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as RestrictedStockValue AS dec232endasRestrictedStockValue,
  case when InventoryStockType = '09' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as TiedEmptiesStockValue AS dec232endasTiedEmptiesStockValue,
  case when InventoryStockType = '10' then StockValue else cast( 0 as abap.dec(23,2 ) ) end as GoodsReceiptBlockedStockValue AS dec232endasGoodsReceiptBlockedStockValue,
  case when InventoryStockType = '01' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as CurrentStockCurVal AS dec232endasCurrentStockCurVal,
  case when InventoryStockType = '02' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as QualityInspectionStockCurVal AS dec232endasQualityInspectionStockCurVal,
  case when InventoryStockType = '03' then cast( 0 as abap.dec(23,2 ) ) else cast( 0 as abap.dec(23,2 ) ) end as ReturnsBlockedStockCurVal AS dec232endasReturnsBlockedStockCurVal,
  case when InventoryStockType = '04' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as TransferStockStorageLocCurVal AS dec232endasTransferStockStorageLocCurVal,
  case when InventoryStockType = '05' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as TransferStockPlantCurVal AS dec232endasTransferStockPlantCurVal,
  case when InventoryStockType = '06' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as StockInTransitCurVal AS dec232endasStockInTransitCurVal,
  case when InventoryStockType = '07' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as BlockedStockCurVal AS dec232endasBlockedStockCurVal,
  case when InventoryStockType = '08' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as RestrictedStockCurVal AS dec232endasRestrictedStockCurVal,
  case when InventoryStockType = '09' then StockCurrentValue else cast( 0 as abap.dec(23,2 ) ) end as TiedEmptiesStockCurVal AS dec232endasTiedEmptiesStockCurVal
FROM F6_MMIM_MATSTOCKQUANVALBYDAT3
;