I_SerialNumberStockDifference
Serialized Stock Difference
I_SerialNumberStockDifference is a Composite CDS View that provides data about "Serialized Stock Difference" in SAP S/4HANA. It reads from 3 data sources (P_SrlNmbrStockDiffSrlNmbrStock, P_SrlNmbrStockDiffMatlStock, P_SrlNmbrStockDiffMatlStock) and exposes 31 fields with key fields Material, Plant, Batch, StorageLocation, InventoryStockType.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_SrlNmbrStockDiffSrlNmbrStock | _SrlNmbrQuanity | right_outer |
| P_SrlNmbrStockDiffMatlStock | _StockQuantity | from |
| P_SrlNmbrStockDiffMatlStock | _StockQuantity | union |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Serialized Stock Difference | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | P_SrlNmbrStockDiffMatlStock | Material | Vehicle Model |
| KEY | Plant | P_SrlNmbrStockDiffMatlStock | Plant | Valuation Area |
| KEY | Batch | P_SrlNmbrStockDiffMatlStock | Batch | Lot No. |
| KEY | StorageLocation | P_SrlNmbrStockDiffMatlStock | StorageLocation | StorageLocation |
| KEY | InventoryStockType | P_SrlNmbrStockDiffMatlStock | InventoryStockType | Stock Type |
| KEY | InventorySpecialStockType | P_SrlNmbrStockDiffMatlStock | InventorySpecialStockType | Special Stock Type |
| KEY | Supplier | P_SrlNmbrStockDiffMatlStock | Supplier | Supplier |
| KEY | SalesOrder | P_SrlNmbrStockDiffMatlStock | SDDocument | SD Document |
| KEY | SalesOrderItem | P_SrlNmbrStockDiffMatlStock | SDDocumentItem | Sales Order Item |
| KEY | WBSElementInternalID | P_SrlNmbrStockDiffMatlStock | WBSElementInternalID | WBS Internal ID |
| KEY | Customer | P_SrlNmbrStockDiffMatlStock | Customer | Sold-to Party |
| KEY | StockOwner | P_SrlNmbrStockDiffMatlStock | SpecialStockIdfgStockOwner | Owner of stock |
| KEY | CompanyCode | P_SrlNmbrStockDiffMatlStock | CompanyCode | Receiver Company Code |
| MatlWrhsStkQtyInMatlBaseUnit | P_SrlNmbrStockDiffMatlStock | MatlWrhsStkQtyInMatlBaseUnit | Quantity | |
| SerialNumberQuantity | P_SrlNmbrStockDiffSrlNmbrStock | SerialNumberQuantity | ||
| Material | Vehicle Model | |||
| KEY | Plant | P_SrlNmbrStockDiffSrlNmbrStock | Plant | Valuation Area |
| KEY | Batch | P_SrlNmbrStockDiffSrlNmbrStock | Batch | Lot No. |
| KEY | StorageLocation | P_SrlNmbrStockDiffSrlNmbrStock | StorageLocation | StorageLocation |
| KEY | InventoryStockType | P_SrlNmbrStockDiffSrlNmbrStock | InventoryStockType | Stock Type |
| KEY | InventorySpecialStockType | P_SrlNmbrStockDiffSrlNmbrStock | InventorySpecialStockType | Special Stock Type |
| KEY | Supplier | P_SrlNmbrStockDiffSrlNmbrStock | Supplier | Supplier |
| KEY | SalesOrder | P_SrlNmbrStockDiffSrlNmbrStock | SalesOrder | SD Document |
| KEY | SalesOrderItem | P_SrlNmbrStockDiffSrlNmbrStock | SalesOrderItem | Sales Order Item |
| KEY | WBSElementInternalID | P_SrlNmbrStockDiffSrlNmbrStock | WBSElementInternalID | WBS Internal ID |
| KEY | Customer | P_SrlNmbrStockDiffSrlNmbrStock | Customer | Sold-to Party |
| KEY | StockOwner | P_SrlNmbrStockDiffSrlNmbrStock | StockOwner | Owner of stock |
| KEY | CompanyCode | P_SrlNmbrStockDiffSrlNmbrStock | CompanyCode | Receiver Company Code |
| MatlWrhsStkQtyInMatlBaseUnit | P_SrlNmbrStockDiffMatlStock | MatlWrhsStkQtyInMatlBaseUnit | Quantity | |
| SerialNumberQuantity | P_SrlNmbrStockDiffSrlNmbrStock | SerialNumberQuantity | ||
| MaterialBaseUnit | P_SrlNmbrStockDiffSrlNmbrStock | MaterialBaseUnit | Valuation Unit |
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_SerialNumberStockDifference.
-- 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_SerialNumberStockDifference AS
SELECT
_StockQuantity.Material AS Material,
_StockQuantity.Plant AS Plant,
_StockQuantity.Batch AS Batch,
_StockQuantity.StorageLocation AS StorageLocation,
_StockQuantity.InventoryStockType AS InventoryStockType,
_StockQuantity.InventorySpecialStockType AS InventorySpecialStockType,
_StockQuantity.Supplier AS Supplier,
_StockQuantity.SDDocument AS SalesOrder,
_StockQuantity.SDDocumentItem AS SalesOrderItem,
_StockQuantity.WBSElementInternalID AS WBSElementInternalID,
_StockQuantity.Customer AS Customer,
_StockQuantity.SpecialStockIdfgStockOwner AS StockOwner,
_StockQuantity.CompanyCode AS CompanyCode,
_StockQuantity.MatlWrhsStkQtyInMatlBaseUnit AS MatlWrhsStkQtyInMatlBaseUnit,
_SrlNmbrQuanity.SerialNumberQuantity AS SerialNumberQuantity,
_SrlNmbrQuanity.MaterialBaseUnit AS MaterialBaseUnit
FROM P_SrlNmbrStockDiffMatlStock AS _StockQuantity
RIGHT OUTER JOIN P_SrlNmbrStockDiffSrlNmbrStock AS _SrlNmbrQuanity ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): P_SrlNmbrStockDiffMatlStock
;
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