I_MaterialDocumentRecordXtrct

DDL: I_MATERIALDOCUMENTRECORDXTRCT Type: view_entity BASIC

Stock Change Data for Material Documents

I_MaterialDocumentRecordXtrct is a Basic CDS View that provides data about "Stock Change Data for Material Documents" in SAP S/4HANA. It reads from 1 data source (matdoc_extract) and exposes 14 fields. It has 16 associations to related views.

Data Sources (1)

SourceAliasJoin Type
matdoc_extract matdoc_extract from

Associations (16)

CardinalityTargetAliasCondition
[0..1] I_Product _StockIdentifyingMaterial $projection.StockIdentifyingMaterial = _StockIdentifyingMaterial.Product
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_StorageLocation _StockIdfgStorageLocation $projection.StockIdfgStorageLocation = _StockIdfgStorageLocation.StorageLocation and $projection.Plant = _StockIdfgStorageLocation.Plant
[0..1] I_Supplier _SpecialStockIdfgSupplier $projection.SpecialStockIdfgSupplier = _SpecialStockIdfgSupplier.Supplier
[0..1] I_Customer _SpecialStockIdfgCustomer $projection.SpecialStockIdfgCustomer = _SpecialStockIdfgCustomer.Customer
[0..1] I_Supplier _SpecialStockIdfgStockOwner $projection.SpecialStockIdfgStockOwner = _SpecialStockIdfgStockOwner.Supplier
[0..1] I_InventorySpecialStockType _InventorySpecialStockType $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType
[0..1] I_InventoryStockType _InventoryStockType $projection.InventoryStockType = _InventoryStockType.InventoryStockType
[0..1] I_UnitOfMeasure _MaterialBaseUnit $projection.MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure
[0..1] I_WBSElementByInternalKey _SpecialStockIdfgWBSElement $projection.SpecialStockIdfgWBSElement = _SpecialStockIdfgWBSElement.WBSElementInternalID
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_SalesOrder _SpecialStockIdfgSalesOrder $projection.SpecialStockIdfgSalesOrder = _SpecialStockIdfgSalesOrder.SalesOrder
[0..1] I_SalesOrderItem _SpecialStockIdfgSalesOrderItm $projection.SpecialStockIdfgSalesOrder = _SpecialStockIdfgSalesOrderItm.SalesOrder and $projection.SpecialStockIdfgSalesOrderItem = _SpecialStockIdfgSalesOrderItm.SalesOrderItem
[0..1] I_WBSElementBasicData _SpclStkIdfgWBSElmntBasicData $projection.SpecialStockIdfgWBSElement = _SpclStkIdfgWBSElmntBasicData.WBSElementInternalID
[0..1] I_Currency _Currency $projection.CompanyCodeCurrency = _Currency.Currency
[0..*] I_ResourceBasic _ResourceBasic $projection.ResourceID = _ResourceBasic.ResourceID

Annotations (9)

NameValueLevelField
EndUserText.label Stock Change Data for Material Documents view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.private false view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (14)

KeyFieldSource TableSource FieldDescription
StockIdentifyingMaterial matbf Stock Mat.
Plant werks Receiving Plant
StockIdfgStorageLocation lgort_sid Stor. Location SID
StockIdentifyingBatch charg_sid Batch SID
SpecialStockIdfgSupplier lifnr_sid Supplier SID
SpecialStockIdfgSalesOrder mat_kdauf SD Doc of Inv.
SpecialStockIdfgSalesOrderItem mat_kdpos SD Item of Inv.
SpecialStockIdfgWBSElement WBSElem of Inv.
SpecialStockIdfgCustomer kunnr_sid Customer SID
InventorySpecialStockType Special Stock
InventoryStockType lbbsa_sid Stock Type
SpecialStockIdfgStockOwner Addl Supplier SID
ResourceID resourcename_sid Resource Name
withrecordsoftypeMDOC_CP

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 I_MaterialDocumentRecordXtrct.
-- 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 I_MaterialDocumentRecordXtrct AS
SELECT
  matbf AS StockIdentifyingMaterial,
  werks AS Plant,
  lgort_sid AS StockIdfgStorageLocation,
  charg_sid AS StockIdentifyingBatch,
  lifnr_sid AS SpecialStockIdfgSupplier,
  mat_kdauf AS SpecialStockIdfgSalesOrder,
  mat_kdpos AS SpecialStockIdfgSalesOrderItem,
  cast(mat_pspnr as mmim_mat_pspnr preserving type) AS SpecialStockIdfgWBSElement,
  kunnr_sid AS SpecialStockIdfgCustomer,
  cast(sobkz as nsdm_spcl_stock_type preserving type) AS InventorySpecialStockType,
  lbbsa_sid AS InventoryStockType,
  cast(disub_owner_sid as nsdm_disub_owner_sid preserving type) AS SpecialStockIdfgStockOwner,
  resourcename_sid AS ResourceID
FROM matdoc_extract
LEFT OUTER JOIN I_Product AS _StockIdentifyingMaterial ON StockIdentifyingMaterial = _StockIdentifyingMaterial.Product  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _StockIdfgStorageLocation ON StockIdfgStorageLocation = _StockIdfgStorageLocation.StorageLocation AND Plant = _StockIdfgStorageLocation.Plant  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _SpecialStockIdfgSupplier ON SpecialStockIdfgSupplier = _SpecialStockIdfgSupplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _SpecialStockIdfgCustomer ON SpecialStockIdfgCustomer = _SpecialStockIdfgCustomer.Customer  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _SpecialStockIdfgStockOwner ON SpecialStockIdfgStockOwner = _SpecialStockIdfgStockOwner.Supplier  -- association [0..1]
LEFT OUTER JOIN I_InventorySpecialStockType AS _InventorySpecialStockType ON InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType  -- association [0..1]
LEFT OUTER JOIN I_InventoryStockType AS _InventoryStockType ON InventoryStockType = _InventoryStockType.InventoryStockType  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _MaterialBaseUnit ON MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_WBSElementByInternalKey AS _SpecialStockIdfgWBSElement ON SpecialStockIdfgWBSElement = _SpecialStockIdfgWBSElement.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_SalesOrder AS _SpecialStockIdfgSalesOrder ON SpecialStockIdfgSalesOrder = _SpecialStockIdfgSalesOrder.SalesOrder  -- association [0..1]
LEFT OUTER JOIN I_SalesOrderItem AS _SpecialStockIdfgSalesOrderItm ON SpecialStockIdfgSalesOrder = _SpecialStockIdfgSalesOrderItm.SalesOrder AND SpecialStockIdfgSalesOrderItem = _SpecialStockIdfgSalesOrderItm.SalesOrderItem  -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _SpclStkIdfgWBSElmntBasicData ON SpecialStockIdfgWBSElement = _SpclStkIdfgWBSElmntBasicData.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON CompanyCodeCurrency = _Currency.Currency  -- association [0..1]
LEFT OUTER JOIN I_ResourceBasic AS _ResourceBasic ON ResourceID = _ResourceBasic.ResourceID  -- association [0..*]
;