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
Plant werks
StockIdfgStorageLocation lgort_sid
StockIdentifyingBatch charg_sid
SpecialStockIdfgSupplier lifnr_sid
SpecialStockIdfgSalesOrder mat_kdauf
SpecialStockIdfgSalesOrderItem mat_kdpos
SpecialStockIdfgWBSElement
SpecialStockIdfgCustomer kunnr_sid
InventorySpecialStockType
InventoryStockType lbbsa_sid
SpecialStockIdfgStockOwner
ResourceID resourcename_sid
withrecordsoftypeMDOC_CP
@EndUserText.label: 'Stock Change Data for Material Documents'
@AccessControl: {
                  authorizationCheck: #MANDATORY,
                  personalData.blocking: #BLOCKED_DATA_EXCLUDED
                }
@ObjectModel: {
                usageType: {
                             sizeCategory: #XXL,
                             serviceQuality: #A,
                             dataClass:#TRANSACTIONAL
                           }
              }
@VDM: {
        private: false,
        viewType: #BASIC,
        lifecycle.contract.type: #SAP_INTERNAL_API           
        }

/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ]  } */
define view entity I_MaterialDocumentRecordXtrct
  as select from matdoc_extract

  association [0..1] to I_Product                  as _StockIdentifyingMaterial      on  $projection.StockIdentifyingMaterial = _StockIdentifyingMaterial.Product

  association [0..1] to I_Plant                     as _Plant                         on  $projection.Plant = _Plant.Plant
  association [0..1] to I_StorageLocation           as _StockIdfgStorageLocation      on  $projection.StockIdfgStorageLocation = _StockIdfgStorageLocation.StorageLocation
                                                                                      and $projection.Plant                    = _StockIdfgStorageLocation.Plant

  association [0..1] to I_Supplier                  as _SpecialStockIdfgSupplier      on  $projection.SpecialStockIdfgSupplier = _SpecialStockIdfgSupplier.Supplier

  association [0..1] to I_Customer                  as _SpecialStockIdfgCustomer      on  $projection.SpecialStockIdfgCustomer = _SpecialStockIdfgCustomer.Customer

  association [0..1] to I_Supplier                  as _SpecialStockIdfgStockOwner    on  $projection.SpecialStockIdfgStockOwner = _SpecialStockIdfgStockOwner.Supplier

  association [0..1] to I_InventorySpecialStockType as _InventorySpecialStockType     on  $projection.InventorySpecialStockType = _InventorySpecialStockType.InventorySpecialStockType

  association [0..1] to I_InventoryStockType        as _InventoryStockType            on  $projection.InventoryStockType = _InventoryStockType.InventoryStockType

  association [0..1] to I_UnitOfMeasure             as _MaterialBaseUnit              on  $projection.MaterialBaseUnit = _MaterialBaseUnit.UnitOfMeasure

  association [0..1] to I_WBSElementByInternalKey   as _SpecialStockIdfgWBSElement    on  $projection.SpecialStockIdfgWBSElement = _SpecialStockIdfgWBSElement.WBSElementInternalID
  
  association [0..1] to I_CompanyCode               as _CompanyCode                   on  $projection.CompanyCode = _CompanyCode.CompanyCode

  association [0..1] to I_SalesOrder                as _SpecialStockIdfgSalesOrder    on  $projection.SpecialStockIdfgSalesOrder = _SpecialStockIdfgSalesOrder.SalesOrder

  association [0..1] to I_SalesOrderItem            as _SpecialStockIdfgSalesOrderItm on  $projection.SpecialStockIdfgSalesOrder     = _SpecialStockIdfgSalesOrderItm.SalesOrder
                                                                                      and $projection.SpecialStockIdfgSalesOrderItem = _SpecialStockIdfgSalesOrderItm.SalesOrderItem
  association [0..1] to I_WBSElementBasicData       as _SpclStkIdfgWBSElmntBasicData  on  $projection.SpecialStockIdfgWBSElement = _SpclStkIdfgWBSElmntBasicData.WBSElementInternalID
 
  association [0..1] to I_Currency                  as _Currency                      on  $projection.CompanyCodeCurrency = _Currency.Currency
 
  association [0..*] to I_ResourceBasic             as _ResourceBasic                 on  $projection.ResourceID                = _ResourceBasic.ResourceID

{


  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,

  
  -- with records of type MDOC_CP, AG_MDOC_CF etc there is no unique key except the technical GUID key, so we don't use any key fields at all

  @Semantics.fiscal.yearVariant: true
  periv             as FiscalYearVariant,
 
  @Semantics.fiscal.yearPeriod: true
  cast(gjper as nsdm_jahrper preserving type) as FiscalYearPeriod,
 
  meins             as MaterialBaseUnit,

  @Aggregation.default: #NONE
  @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
  consumption_qty   as MatlCnsmpnQtyInMatlBaseUnit,
  

  cast ( kzbws as nsdm_separate_valn_type preserving type ) as InventorySpecialStockValnType,
  xobew             as IsSupplierStockValuation,


  bukrs             as CompanyCode,


  cast(waers as nsdm_comp_code_currency preserving type)  as CompanyCodeCurrency,


  @Consumption.hidden: true
  record_type       as MaterialDocumentRecordType,


  _StockIdentifyingMaterial,

  _Plant,
  _StockIdfgStorageLocation,

  _SpecialStockIdfgSupplier,

  _SpecialStockIdfgCustomer,

  _SpecialStockIdfgStockOwner,

  _InventorySpecialStockType,
  _InventoryStockType,
  _MaterialBaseUnit,
  _CompanyCode,
  _SpecialStockIdfgSalesOrder,

  _SpecialStockIdfgSalesOrderItm,

  @VDM.lifecycle.status: #DEPRECATED
  @VDM.lifecycle.successor: '_SpclStkIdfgWBSElmntBasicData'
  _SpecialStockIdfgWBSElement,
  _SpclStkIdfgWBSElmntBasicData,

  _Currency,
  
  _ResourceBasic
  
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"MATDOC_EXTRACT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_CUSTOMER",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_INVENTORYSTOCKTYPE",
"I_PLANT",
"I_PRODUCT",
"I_RESOURCEBASIC",
"I_SALESORDER",
"I_SALESORDERITEM",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_UNITOFMEASURE",
"I_WBSELEMENTBASICDATA",
"I_WBSELEMENTBYINTERNALKEY"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/