C_SerialNumberStockDifference

DDL: C_SERIALNUMBERSTOCKDIFFERENCE Type: view_entity CONSUMPTION

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)

SourceAliasJoin Type
I_SerialNumberStockDifference I_SerialNumberStockDifference from

Associations (7)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;