C_SerialNumberStockDifference
Projection on Serialized Stock Diff
C_SerialNumberStockDifference is a Consumption CDS View that provides data about "Projection on Serialized Stock Diff" in SAP S/4HANA. It reads from 1 data source (I_SerialNumberStockDifference) and exposes 23 fields with key fields Material, Plant, Batch, StorageLocation, InventoryStockType. It has 7 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_SerialNumberStockDifference | I_SerialNumberStockDifference | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [1..1] | I_StorageLocation | _StorageLocation | $projection.Plant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation |
| [1..1] | I_ProductText | _MaterialText | $projection.Material = _MaterialText.Product and _MaterialText.Language = $session.system_language |
| [1..1] | I_InventoryStockTypeT | _StockTypeT | $projection.InventoryStockType = _StockTypeT.InventoryStockType and _StockTypeT.Language = $session.system_language |
| [1..1] | I_InventorySpecialStockTypeT | _SpecialStockTypeT | $projection.InventorySpecialStockType = _SpecialStockTypeT.InventorySpecialStockType and _SpecialStockTypeT.Language = $session.system_language |
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [1..1] | I_SrlNmbrStockDiffQtyComprnTxt | _Text | $projection.SrlzdStockQuantityComparison = _Text.SrlzdStockQuantityComparison and _Text.Language = $session.system_language |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Projection on Serialized Stock Diff | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.allowExtensions | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Search.searchable | true | view | |
| UI.headerInfo.typeName | Serialized Stock Quantity | view | |
| UI.headerInfo.typeNamePlural | Serialized Stock Quantities | view |
Fields (23)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | Vehicle Model | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | Batch | Batch | Lot No. | |
| KEY | StorageLocation | StorageLocation | StorageLocation | |
| KEY | InventoryStockType | InventoryStockType | Stock Type | |
| KEY | InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | |
| KEY | Supplier | Supplier | Supplier | |
| KEY | SalesOrder | SalesOrder | Sales Order | |
| KEY | SalesOrderItem | SalesOrderItem | Sales Order Item | |
| KEY | WBSElementInternalID | WBSElementInternalID | WBS Internal ID | |
| KEY | Customer | Customer | Sold-to Party | |
| KEY | StockOwner | StockOwner | Owner of stock | |
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| MatlWrhsStkQtyInMatlBaseUnit | MatlWrhsStkQtyInMatlBaseUnit | Quantity | ||
| SerialNumberQuantity | SerialNumberQuantity | |||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| ProductName | _MaterialText | ProductName | Description | |
| PlantName | _Plant | PlantName | Plant Name | |
| StorageLocationName | _StorageLocation | StorageLocationName | Storage Loc. Name | |
| InventoryStockTypeName | _StockTypeT | InventoryStockTypeName | ||
| InventorySpecialStockTypeName | _SpecialStockTypeT | InventorySpecialStockTypeName | ||
| CompanyCodeName | _CompanyCode | CompanyCodeName | Company Name | |
| _Text | _Text |
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 C_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 C_SerialNumberStockDifference AS
SELECT
Material,
Plant,
Batch,
StorageLocation,
InventoryStockType,
InventorySpecialStockType,
Supplier,
SalesOrder,
SalesOrderItem,
WBSElementInternalID,
Customer,
StockOwner,
CompanyCode,
MatlWrhsStkQtyInMatlBaseUnit,
SerialNumberQuantity,
MaterialBaseUnit,
_MaterialText.ProductName AS ProductName,
_Plant.PlantName AS PlantName,
_StorageLocation.StorageLocationName AS StorageLocationName,
_StockTypeT.InventoryStockTypeName AS InventoryStockTypeName,
_SpecialStockTypeT.InventorySpecialStockTypeName AS InventorySpecialStockTypeName,
_CompanyCode.CompanyCodeName AS CompanyCodeName
FROM I_SerialNumberStockDifference
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [1..1]
LEFT OUTER JOIN I_StorageLocation AS _StorageLocation ON Plant = _StorageLocation.Plant AND StorageLocation = _StorageLocation.StorageLocation -- association [1..1]
LEFT OUTER JOIN I_ProductText AS _MaterialText ON Material = _MaterialText.Product AND _MaterialText.Language = $session.system_language -- association [1..1]
LEFT OUTER JOIN I_InventoryStockTypeT AS _StockTypeT ON InventoryStockType = _StockTypeT.InventoryStockType AND _StockTypeT.Language = $session.system_language -- association [1..1]
LEFT OUTER JOIN I_InventorySpecialStockTypeT AS _SpecialStockTypeT ON InventorySpecialStockType = _SpecialStockTypeT.InventorySpecialStockType AND _SpecialStockTypeT.Language = $session.system_language -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN I_SrlNmbrStockDiffQtyComprnTxt AS _Text ON SrlzdStockQuantityComparison = _Text.SrlzdStockQuantityComparison AND _Text.Language = $session.system_language -- association [1..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