I_GoodsMovementSubstituteDEX
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
| Category | CDS Views for Stock and Material Documents |
|---|---|
| Data Category | Fact |
| Status | Released |
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 .
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Supply Chain |
| Application Component | MM-IM-VDM-SGM |
| Capabilities | Data Source for Data Extraction |
| Package | Supply Chain for SAP S/4HANA Cloud Private Edition |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | I_MaterialDocumentRecord | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA