C_SerialNumberStockDifference

DDL: C_SERIALNUMBERSTOCKDIFFERENCE Type: view_entity CONSUMPTION Package: ODATA_LO_SN_STOCK_QUANTITIES

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 30 fields with key fields Material, Plant, Batch, StorageLocation, InventoryStockType. It has 14 associations to related views. It is exposed through 2 OData services (ASQL_F7551, UI_SRLNUMBERSTOCKDIFFERENCE_V2). Part of development package ODATA_LO_SN_STOCK_QUANTITIES.

Data Sources (1)

SourceAliasJoin Type
I_SerialNumberStockDifference I_SerialNumberStockDifference from

Associations (14)

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
[0..1] I_SalesDocumentItem _SalesOrderItem $projection.SalesOrder = _SalesOrderItem.SalesDocument and $projection.SalesOrderItem = _SalesOrderItem.SalesDocumentItem
[0..1] I_DeliveryDocumentItem _DeliveryDocumentItem $projection.SalesOrder = _DeliveryDocumentItem.DeliveryDocument and $projection.SalesOrderItem = _DeliveryDocumentItem.DeliveryDocumentItem
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Supplier _StockOwner $projection.StockOwner = _StockOwner.Supplier
[0..1] I_SerialNumberProfileText _SerialProfileText $projection.SerialNumberProfile = _SerialProfileText.SerialNumberProfile and _SerialProfileText.Language = $session.system_language
[0..1] I_WBSElementBasicData _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID

Annotations (12)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Projection on Serialized Stock Diff view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL 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

OData Services (2)

ServiceBindingVersionContractRelease
ASQL_F7551 ASQL_F7551 C2 NOT_RELEASED
UI_SRLNUMBERSTOCKDIFFERENCE_V2 UI_SRLNMBRSTOCKDIFF_V2 V2 C1 NOT_TO_BE_RELEASED_STABLE

Fields (30)

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 MaterialBaseUnit MaterialBaseUnit Valuation Unit
CompanyCode CompanyCode Receiver Company Code
MatlWrhsStkQtyInMatlBaseUnit MatlWrhsStkQtyInMatlBaseUnit Quantity
SerialNumberQuantity SerialNumberQuantity
SerialNumberProfile SerialNumberProfile SerialNoProfile
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
CustomerName _Customer BPCustomerFullName
SupplierName _Supplier BPSupplierFullName
StockOwnerName
SerialNumberProfileDescription _SerialProfileText SerialNumberProfileDescription
WBSElement _WBSElement WBSElementExternalID WBS Element External ID
WBSDescription _WBSElement WBSDescription WBS Element 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,
  MaterialBaseUnit,
  CompanyCode,
  MatlWrhsStkQtyInMatlBaseUnit,
  SerialNumberQuantity,
  SerialNumberProfile,
  _MaterialText.ProductName AS ProductName,
  _Plant.PlantName AS PlantName,
  _StorageLocation.StorageLocationName AS StorageLocationName,
  _StockTypeT.InventoryStockTypeName AS InventoryStockTypeName,
  _SpecialStockTypeT.InventorySpecialStockTypeName AS InventorySpecialStockTypeName,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  _Customer.BPCustomerFullName AS CustomerName,
  _Supplier.BPSupplierFullName AS SupplierName,
  cast( _StockOwner.BPSupplierFullName as losn_stockownerfullname preserving type ) AS StockOwnerName,
  _SerialProfileText.SerialNumberProfileDescription AS SerialNumberProfileDescription,
  _WBSElement.WBSElementExternalID AS WBSElement,
  _WBSElement.WBSDescription AS WBSDescription
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]
LEFT OUTER JOIN I_SalesDocumentItem AS _SalesOrderItem ON SalesOrder = _SalesOrderItem.SalesDocument AND SalesOrderItem = _SalesOrderItem.SalesDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_DeliveryDocumentItem AS _DeliveryDocumentItem ON SalesOrder = _DeliveryDocumentItem.DeliveryDocument AND SalesOrderItem = _DeliveryDocumentItem.DeliveryDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _StockOwner ON StockOwner = _StockOwner.Supplier  -- association [0..1]
LEFT OUTER JOIN I_SerialNumberProfileText AS _SerialProfileText ON SerialNumberProfile = _SerialProfileText.SerialNumberProfile AND _SerialProfileText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID  -- association [0..1]
;