P_MaterialWarehouseStockCheck4
P_MaterialWarehouseStockCheck4 is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (P_MaterialWarehouseStockCheck2) and exposes 34 fields with key fields StockIdentifyingMaterial, Plant, StockIdfgStorageLocation, StockIdentifyingBatch, SpecialStockIdfgSupplier. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_MaterialWarehouseStockCheck2 | P_MaterialWarehouseStockCheck2 | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | mara | _CWM_MARA | $projection.StockIdentifyingMaterial = _CWM_MARA.matnr |
| [0..1] | tcwqtolgr | _ToleranceGroup | $projection.ToleranceGroup = _ToleranceGroup.cwqtolgr |
| [0..1] | marv | _CWM_MARV | $projection.CompanyCode = _CWM_MARV.bukrs |
| [0..1] | marm | _CWM_UNIT | $projection.StockIdentifyingMaterial = _CWM_UNIT.matnr and $projection.MaterialParallelUnit = _CWM_UNIT.meinh and _CWM_UNIT.ty2tq = 'A' |
| [0..1] | I_InventoryStockTypeT | _InventoryStockTypeT | _InventoryStockTypeT.InventoryStockType = $projection.InventoryStockType and _InventoryStockTypeT.Language = $session.system_language |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMATLWHSESTKCHK4 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view |
Fields (34)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | StockIdentifyingMaterial | StockIdentifyingMaterial | Stock Mat. | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | StockIdfgStorageLocation | StockIdfgStorageLocation | Stor. Location SID | |
| KEY | StockIdentifyingBatch | StockIdentifyingBatch | Batch SID | |
| KEY | SpecialStockIdfgSupplier | SpecialStockIdfgSupplier | Supplier SID | |
| KEY | SpecialStockIdfgSalesOrder | SpecialStockIdfgSalesOrder | Stock Ident Header | |
| KEY | SpecialStockIdfgSalesOrderItem | SpecialStockIdfgSalesOrderItem | Stock Ident Item | |
| KEY | SpecialStockIdfgWBSElement | SpecialStockIdfgWBSElement | WBS Internal ID | |
| KEY | SpecialStockIdfgCustomer | SpecialStockIdfgCustomer | Customer SID | |
| KEY | SpecialStockIdfgStockOwner | SpecialStockIdfgStockOwner | Addl Supplier SID | |
| KEY | InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | |
| KEY | InventoryStockType | InventoryStockType | Stock Type | |
| KEY | MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | |
| KEY | MaterialParallelUnit | MaterialParallelUnit | ||
| MatlStkQtyInBaseUnit | MatlStkQtyInBaseUnit | |||
| MatlStkQtyInParUnit | MatlStkQtyInParUnit | |||
| PUoMNumerator | ||||
| BUoMNumerator | ||||
| Percent | ||||
| _ToleranceGroup | _ToleranceGroup | |||
| LowDevitionErrorThreshold | ||||
| LowThresholdSigned | ||||
| HighDevitionErrorThreshold | ||||
| CostEstimate | CostEstimate | Cost EstimateNo | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| Batch | Batch | Lot No. | ||
| InventoryStockTypeName | _InventoryStockTypeT | InventoryStockTypeName | ||
| LastPostingDate | LastPostingDate | |||
| FiscalYearVariant | FiscalYearVariant | FY Variant | ||
| LastPostingPeriod | LastPostingPeriod | |||
| NumberOfDaysSinceLastMovement | ||||
| TodayDate | TodayDate | |||
| CurrentPostingPeriod | ||||
| PreviousPostingPeriod |
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 P_MaterialWarehouseStockCheck4.
-- 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.
-- SQL view name: PMATLWHSESTKCHK4
CREATE VIEW P_MaterialWarehouseStockCheck4 AS
SELECT
StockIdentifyingMaterial,
Plant,
StockIdfgStorageLocation,
StockIdentifyingBatch,
SpecialStockIdfgSupplier,
SpecialStockIdfgSalesOrder,
SpecialStockIdfgSalesOrderItem,
SpecialStockIdfgWBSElement,
SpecialStockIdfgCustomer,
SpecialStockIdfgStockOwner,
InventorySpecialStockType,
InventoryStockType,
MaterialBaseUnit,
MaterialParallelUnit,
MatlStkQtyInBaseUnit,
MatlStkQtyInParUnit,
cast( _CWM_UNIT.umrez as umrez preserving type ) AS PUoMNumerator,
cast( _CWM_UNIT.umren as umren preserving type ) AS BUoMNumerator,
cast ('%' as /cwm/percent) AS Percent,
cast( $parameters.P_LowDevitionErrorThreshold as /cwm/lowdevitionerrorthld preserving type) AS LowDevitionErrorThreshold,
cast(- $parameters.P_LowDevitionErrorThreshold as /cwm/lowdevitionerrorthld_s preserving type) AS LowThresholdSigned,
cast( $parameters.P_HighDevitionErrorThreshold as /cwm/highdevitionerrorthld preserving type) AS HighDevitionErrorThreshold,
CostEstimate,
CompanyCode,
Batch,
_InventoryStockTypeT.InventoryStockTypeName AS InventoryStockTypeName,
LastPostingDate,
FiscalYearVariant,
LastPostingPeriod,
cast(dats_days_between(LastPostingDate, TodayDate ) as nsdm_numofdaysinceposting preserving type ) AS NumberOfDaysSinceLastMovement,
TodayDate,
cast(concat(_CWM_MARV.lfgja, concat('0',_CWM_MARV.lfmon)) as /cwm/current_period) AS CurrentPostingPeriod,
cast(concat(_CWM_MARV.vmgja, concat('0',_CWM_MARV.vmmon)) as /cwm/previous_period) AS PreviousPostingPeriod
FROM P_MaterialWarehouseStockCheck2
LEFT OUTER JOIN mara AS _CWM_MARA ON StockIdentifyingMaterial = _CWM_MARA.matnr -- association [0..1]
LEFT OUTER JOIN tcwqtolgr AS _ToleranceGroup ON ToleranceGroup = _ToleranceGroup.cwqtolgr -- association [0..1]
LEFT OUTER JOIN marv AS _CWM_MARV ON CompanyCode = _CWM_MARV.bukrs -- association [0..1]
LEFT OUTER JOIN marm AS _CWM_UNIT ON StockIdentifyingMaterial = _CWM_UNIT.matnr AND MaterialParallelUnit = _CWM_UNIT.meinh AND _CWM_UNIT.ty2tq = 'A' -- association [0..1]
LEFT OUTER JOIN I_InventoryStockTypeT AS _InventoryStockTypeT ON _InventoryStockTypeT.InventoryStockType = InventoryStockType AND _InventoryStockTypeT.Language = $session.system_language -- 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