I_GoodsMovementSubstituteDEX

DDL: I_GOODSMOVEMENTSUBSTITUTEDEX Type: view_entity COMPOSITE

Material document substitute extraction

I_GoodsMovementSubstituteDEX (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Material Stock · Supply Chain

I_GoodsMovementSubstituteDEX is a Composite CDS View (Fact) that provides data about "Material document substitute extraction" in SAP S/4HANA. It reads from 1 data source (I_MaterialDocumentRecord) and exposes 47 fields with key fields MaterialDocumentKey1, MaterialDocumentKey2, MaterialDocumentKey3, MaterialDocumentKey4, MaterialDocumentKey5. It has 2 associations to related views.

SAP Help Documentation

CategoryCDS Views for Stock and Material Documents
Data CategoryFact
StatusReleased
Purpose
The system contains actual material document data and substitute data for material documents that have been archived. Both are necessary to calculate current stocks. This CDS view is used for data extraction of the substitute material document data and should be used in combination with the CDS view I_GoodsMovementDocumentDEX , for actual material document data, so that stocks can be calculated. Note This extractor is not delta-enabled and should be executed prior to the CDS view I_GoodsMovementDocumentDEX . You may build your own BW content based on the data provided by this view. This CDS view provides the data to answer the following business questions: Which material has been posted to which stock type? Which material has been posted to which special stock type and to which reference object? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization objects assigned: M_MSEG_BMB F_LFA1_BEK F_KNA1_BED

Structure
Parameters The parameters of the CDS view are as follows: Material Plant StorageLocation InventoryStockType Further important fields Important fields in this view include the following: Field Name Description StockIdentifyingMaterial Plant StockIdfgStorageLocation StockIdentifyingBatch SpecialStockIdfgSupplier SpecialStockIdfgSalesOrder SpecialStockIdfgSalesOrderItem SpecialStockIdfgWBSElement SpecialStockIdfgCustomer SpecialStockIdfgStockOwner InventorySpecialStockType InventoryStockType Periods & Times DocumentDate PostingDate FiscalYearVariant FiscalYear FiscalYearPeriod YearDay YearWeek YearMonth YearQuarter CalendarQuarter CalendarMonth CalendarWeek CalendarDay WeekDay Other InventoryValuationType Amounts GoodsMovementStkAmtInCCCrcy GoodsMvtCnsmpnAmtInCCCrcy Quantities MatlStkChangeQtyInBaseUnit MatlCnsmpnQtyInMatlBaseUnit

SAP Business Warehouse (SAP BW) Extraction
Corresponding DataSource (Extractor) Note The corresponding DataSource (Extractor) and this CDS view may have different functionalities. For details about the DataSource, see the related documentation on the SAP Help Portal at https://help.sap.com/viewer/p/BI_CONTENT_757 under Use SAP Library BI Content . For more information about data extraction, see Extracting Data Through CDS Views to SAP BW/4HANA .

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessSupply Chain
Application ComponentMM-IM-VDM-SGM
CapabilitiesData Source for Data Extraction
PackageSupply Chain for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
I_MaterialDocumentRecord I_MaterialDocumentRecord from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_SupplierCompanyByPlant _SpecStkIdfgSupplierByPlant $projection.SpecialStockIdfgSupplier = _SpecStkIdfgSupplierByPlant.Supplier and $projection.Plant = _SpecStkIdfgSupplierByPlant.Plant
[0..1] I_CustomerCompanyByPlant _SpecStockIdfgCustByPlant $projection.SpecialStockIdfgCustomer = _SpecStockIdfgCustByPlant.Customer and $projection.Plant = _SpecStockIdfgCustByPlant.Plant

Annotations (13)

NameValueLevelField
EndUserText.label Material document substitute extraction view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.sapObjectNodeType.name MaterialStock view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
Analytics.dataCategory #FACT view
Analytics.internalName #LOCAL view
Analytics.dataExtraction.enabled true view
Metadata.ignorePropagatedAnnotations true view

Fields (47)

KeyFieldSource TableSource FieldDescription
KEY MaterialDocumentKey1 MaterialDocumentKey1 Key field 1
KEY MaterialDocumentKey2 MaterialDocumentKey2 Key field 2
KEY MaterialDocumentKey3 MaterialDocumentKey3 Key field 3
KEY MaterialDocumentKey4 MaterialDocumentKey4 Key field 4
KEY MaterialDocumentKey5 MaterialDocumentKey5 Key field 5
KEY MaterialDocumentKey6 MaterialDocumentKey6 Key field 6
StockIdentifyingMaterial StockIdentifyingMaterial Material for Stock Mamangement
Plant Plant Valuation Area
StockIdfgStorageLocation StockIdfgStorageLocation Storage Location (Stock Identifier)
StockIdentifyingBatch StockIdentifyingBatch Batch Number (Stock Identifier)
SpecialStockIdfgSupplier SpecialStockIdfgSupplier Supplier for Special Stock
SpecialStockIdfgSalesOrder SpecialStockIdfgSalesOrder Sales Order Number of Valuated Sales Order Stock
SpecialStockIdfgSalesOrderItem SpecialStockIdfgSalesOrderItem Sales Order Item of Valuated Sales Order Stock
SpecialStockIdfgCustomer SpecialStockIdfgCustomer Customer for Special Stock
InventorySpecialStockType InventorySpecialStockType Special Stock Type
InventoryStockType InventoryStockType Stock Type of Goods Movement (Stock Identifier)
SpecialStockIdfgStockOwner SpecialStockIdfgStockOwner Add. Supplier for Special Stock
ResourceID Vehicle ID
CostEstimate CostEstimate Cost Estimate Number - Product Costing
CompanyCode CompanyCode Receiver Company Code
InventorySpecialStockValnType InventorySpecialStockValnType Separate Valuation Type
MatlStkChangeQtyInBaseUnit MatlStkChangeQtyInBaseUnit Stock Quantity
MatlCnsmpnQtyInMatlBaseUnit MatlCnsmpnQtyInMatlBaseUnit Consumption Quantity
MaterialBaseUnit MaterialBaseUnit Base Unit of Measure
GoodsMovementStkAmtInCCCrcy GoodsMovementStkAmtInCCCrcy Amount in Local Currency with Sign of Stock Quantity
GoodsMvtCnsmpnAmtInCCCrcy GoodsMvtCnsmpnAmtInCCCrcy Amount in Local Currency with Sign of Consumption Quantity
CompanyCodeCurrency CompanyCodeCurrency Company Code Currency
InventoryValuationType InventoryValuationType Valuation Type
DocumentDate DocumentDate Document Date in Document
PostingDate PostingDate Posting Date in the Document
FiscalYearVariant FiscalYearVariant Fiscal Year Variant
FiscalYear FiscalYear G/L Fiscal Year
FiscalYearPeriod FiscalYearPeriod Period/Year
YearDay YearDay Year-Day-Combination
YearWeek YearWeek Year and Calendar Week
YearMonth YearMonth Year-Month-Combination
YearQuarter YearQuarter Year-Quarter-Combination
CalendarQuarter CalendarQuarter Calendar Quarter
CalendarMonth CalendarMonth Calendar Month
CalendarWeek CalendarWeek Calendar Week (1 - 53)
CalendarDayOfYear Day of Year (1 - 366)
WeekDay WeekDay Day of Week
_SpecialStockIdfgSupplier _SpecialStockIdfgSupplier
_SpecialStockIdfgStockOwner _SpecialStockIdfgStockOwner
_SpecialStockIdfgCustomer _SpecialStockIdfgCustomer
_SpecStkIdfgSupplierByPlant _SpecStkIdfgSupplierByPlant
_SpecStockIdfgCustByPlant _SpecStockIdfgCustByPlant

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_GoodsMovementSubstituteDEX.
-- 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_GoodsMovementSubstituteDEX AS
SELECT
  MaterialDocumentKey1,
  MaterialDocumentKey2,
  MaterialDocumentKey3,
  MaterialDocumentKey4,
  MaterialDocumentKey5,
  MaterialDocumentKey6,
  StockIdentifyingMaterial,
  Plant,
  StockIdfgStorageLocation,
  StockIdentifyingBatch,
  SpecialStockIdfgSupplier,
  SpecialStockIdfgSalesOrder,
  SpecialStockIdfgSalesOrderItem,
  SpecialStockIdfgCustomer,
  InventorySpecialStockType,
  InventoryStockType,
  SpecialStockIdfgStockOwner,
  cast(ResourceID as nsdm_resourcename preserving type ) AS ResourceID,
  CostEstimate,
  CompanyCode,
  InventorySpecialStockValnType,
  MatlStkChangeQtyInBaseUnit,
  MatlCnsmpnQtyInMatlBaseUnit,
  MaterialBaseUnit,
  GoodsMovementStkAmtInCCCrcy,
  GoodsMvtCnsmpnAmtInCCCrcy,
  CompanyCodeCurrency,
  InventoryValuationType,
  DocumentDate,
  PostingDate,
  FiscalYearVariant,
  FiscalYear,
  FiscalYearPeriod,
  YearDay,
  YearWeek,
  YearMonth,
  YearQuarter,
  CalendarQuarter,
  CalendarMonth,
  CalendarWeek,
  cast(CalendarDay as nsdm_day_of_year preserving type) AS CalendarDayOfYear,
  WeekDay
FROM I_MaterialDocumentRecord
LEFT OUTER JOIN I_SupplierCompanyByPlant AS _SpecStkIdfgSupplierByPlant ON SpecialStockIdfgSupplier = _SpecStkIdfgSupplierByPlant.Supplier AND Plant = _SpecStkIdfgSupplierByPlant.Plant  -- association [0..1]
LEFT OUTER JOIN I_CustomerCompanyByPlant AS _SpecStockIdfgCustByPlant ON SpecialStockIdfgCustomer = _SpecStockIdfgCustByPlant.Customer AND Plant = _SpecStockIdfgCustByPlant.Plant  -- association [0..1]
;