A_MatlStkInAcctMod

DDL: A_MATLSTKINACCTMOD Type: view COMPOSITE

Material Stock

A_MatlStkInAcctMod is a Composite CDS View that provides data about "Material Stock" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 15 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaterialStock_2 I_MaterialStock_2 from

Associations (2)

CardinalityTargetAliasCondition
[1..1] A_MaterialStock _MaterialStock $projection.Material = _MaterialStock.Material
[1..*] A_MaterialSerialNumber _MaterialSerialNumber $projection.Material = _MaterialSerialNumber.Material and $projection.Plant = _MaterialSerialNumber.Plant and $projection.StorageLocation = _MaterialSerialNumber.StorageLocation and $projection.InventorySpecialStockType = _MaterialSerialNumber.InventorySpecialStockType and $projection.Batch = _MaterialSerialNumber.Batch and $projection.InventoryStockType = _MaterialSerialNumber.InventoryStockType and $projection.Customer = _MaterialSerialNumber.Customer and $projection.Supplier = _MaterialSerialNumber.Supplier and $projection.SDDocument = _MaterialSerialNumber.SDDocument and $projection.SDDocumentItem = _MaterialSerialNumber.SDDocumentItem and $projection.WBSElementInternalID = _MaterialSerialNumber.WBSElementInternalID

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName AMATLSTKINACCMOD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
EndUserText.label Material Stock view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (15)

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 Customer Customer Sold-to Party
KEY WBSElementInternalID WBSElementInternalID WBS Internal ID
KEY SDDocumentItem SDDocumentItem
KEY InventorySpecialStockType InventorySpecialStockType Special Stock Type
KEY InventoryStockType InventoryStockType Stock Type
WBSElementExternalID _SpclStkIdfgWBSElmntBasicData WBSElementExternalID WBS Element External ID
3434541MaterialBaseUnit
MatlWrhsStkQtyInMatlBaseUnit
_MaterialStock _MaterialStock
_MaterialSerialNumber _MaterialSerialNumber

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 A_MatlStkInAcctMod.
-- 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 A_MatlStkInAcctMod AS
SELECT
  Material,
  Plant,
  StorageLocation,
  Batch,
  Supplier,
  Customer,
  WBSElementInternalID,
  SDDocumentItem,
  InventorySpecialStockType,
  InventoryStockType,
  _SpclStkIdfgWBSElmntBasicData.WBSElementExternalID AS WBSElementExternalID,
  sum(MatlWrhsStkQtyInMatlBaseUnit) AS MatlWrhsStkQtyInMatlBaseUnit
FROM I_MaterialStock_2
LEFT OUTER JOIN A_MaterialStock AS _MaterialStock ON Material = _MaterialStock.Material  -- association [1..1]
LEFT OUTER JOIN A_MaterialSerialNumber AS _MaterialSerialNumber ON Material = _MaterialSerialNumber.Material AND Plant = _MaterialSerialNumber.Plant AND StorageLocation = _MaterialSerialNumber.StorageLocation AND InventorySpecialStockType = _MaterialSerialNumber.InventorySpecialStockType AND Batch = _MaterialSerialNumber.Batch AND InventoryStockType = _MaterialSerialNumber.InventoryStockType AND Customer = _MaterialSerialNumber.Customer AND Supplier = _MaterialSerialNumber.Supplier AND SDDocument = _MaterialSerialNumber.SDDocument AND SDDocumentItem = _MaterialSerialNumber.SDDocumentItem AND WBSElementInternalID = _MaterialSerialNumber.WBSElementInternalID  -- association [1..*]
;