I_MatlSerialNumberInformation

DDL: I_MATLSERIALNUMBERINFORMATION Type: view_entity COMPOSITE Package: ODATA_LO_SN_HISTORY

Serial Number Information

I_MatlSerialNumberInformation is a Composite CDS View that provides data about "Serial Number Information" in SAP S/4HANA. It reads from 1 data source (I_Equipment) and exposes 51 fields with key field Equipment. It has 13 associations to related views. Part of development package ODATA_LO_SN_HISTORY.

Data Sources (1)

SourceAliasJoin Type
I_Equipment I_Equipment from

Associations (13)

CardinalityTargetAliasCondition
[0..1] I_EquipmentStockSegment _StockSegment $projection.Equipment = _StockSegment.Equipment
[1..1] I_MasterWrntyObjectAssgmt _CustomerWarranty $projection.MaintObjectInternalID = _CustomerWarranty.ObjectInternalID and _CustomerWarranty.WarrantyType = '1'
[1..1] I_MasterWrntyObjectAssgmt _SupplierWarranty $projection.MaintObjectInternalID = _SupplierWarranty.ObjectInternalID and _SupplierWarranty.WarrantyType = '2'
[1..1] I_MaterialText _MaterialText $projection.Material = _MaterialText.Material and _MaterialText.Language = $session.system_language
[0..1] I_PlantMaintenancePartner _Partner $projection.MaintObjectInternalID = _Partner.MaintObjectInternalID and _Partner.PartnerFunction = 'AG'
[0..*] C_SerialNumberHistoryPartner _PartnerInfo $projection.MaintObjectInternalID = _PartnerInfo.MaintObjectInternalID
[0..1] P_SrlNmbrHistSalesOrderItemTxt _SalesOrderItemText $projection.Equipment = _SalesOrderItemText.Equipment
[1..1] I_User _User $projection.CreatedByUser = _User.UserID
[1..1] P_SrlNmbrHistMaterialGroup _MaterialGroup $projection.Material = _MaterialGroup.Material
[0..1] I_Supplier _StockOwner $projection.StockOwner = _StockOwner.Supplier
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_StorageLocation _StorageLocation $projection.Plant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation
[0..*] I_SerialNumberHistory _SrlNmbrHistory

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Serial Number Information view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #COMPOSITE view

Fields (51)

KeyFieldSource TableSource FieldDescription
KEY Equipment Equipment Equipment check
Material Material Vehicle Model
SerialNumber SerialNumber Serial Number
MasterWarranty MasterWarranty Master warranty
MaintObjectInternalID MaintObjectInternalID Object number
HasEquipmentData Equipment data
CreatedByUser CreatedByUser User Name
UserDescription _User UserDescription Full Name
CreationDate CreationDate Time Stamp
ValidityStartDate ValidityStartDate Validity Start Date
ValidityEndDate ValidityEndDate ValidTo
Plant
StorageLocation
Customer
Supplier
SalesOrder
SalesOrderItem
InventorySpecialStockType
WBSElementInternalID
WBSElement
WBSDescription
Batch
InventoryStockType
StockOwner
InventorySpecialStockTypeName
InventoryStockTypeName
MaterialName _MaterialText MaterialName Material Description
TechObjCustomerMasterWarranty
TechObjCustWarrantyStartDate _CustomerWarranty WarrantyStartDate
TechObjCustWarrantyEndDate _CustomerWarranty WarrantyEndDate
TechObjSuplrWarrantyStartDate _SupplierWarranty WarrantyStartDate
TechObjSupplierMasterWarranty
TechObjSuplrWarrantyEndDate _SupplierWarranty WarrantyEndDate
MaintenancePartner
BusinessPartnerName
SalesOrderItemText _SalesOrderItemText SalesOrderItemText
CustomerWarrantyName
SupplierWarrantyName
MaterialGroup _MaterialGroup MaterialGroup Product Group
MaterialGroupName _MaterialGroup MaterialGroupName prod Grp Desc.
CustomerName
SupplierName
StockOwnerName
_SrlNmbrHistory _SrlNmbrHistory
_Material _Material
_CustomerWarranty _CustomerWarranty
_SupplierWarranty _SupplierWarranty
_PartnerInfo _PartnerInfo
_StockOwner _StockOwner
_Plant _Plant
_StorageLocation _StorageLocation

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_MatlSerialNumberInformation.
-- 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_MatlSerialNumberInformation AS
SELECT
  Equipment,
  Material,
  SerialNumber,
  MasterWarranty,
  MaintObjectInternalID,
  cast(HasEquipmentData as abap_boolean preserving type) AS HasEquipmentData,
  CreatedByUser,
  _User.UserDescription AS UserDescription,
  CreationDate,
  ValidityStartDate,
  ValidityEndDate,
  cast(coalesce(_StockSegment.Plant, '') as werks_d preserving type) AS Plant,
  cast(coalesce(_StockSegment.StorageLocation, '') as lgort_d preserving type) AS StorageLocation,
  cast(coalesce(_StockSegment.Customer, '') as b_kunnr preserving type) AS Customer,
  cast(coalesce(_StockSegment.Supplier, '') as b_lifnr preserving type) AS Supplier,
  cast(coalesce(_StockSegment.SalesOrder, '') as kdauf preserving type) AS SalesOrder,
  cast(coalesce(_StockSegment.SalesOrderItem, '') as kdpos) AS SalesOrderItem,
  cast(coalesce(_StockSegment.InventorySpecialStockType, '') as sobkz preserving type) AS InventorySpecialStockType,
  cast(_StockSegment.WBSElementInternalID as nsdm_wbselement_internal_id preserving type) AS WBSElementInternalID,
  cast(coalesce(_StockSegment._WBSElementBasicData.WBSElementExternalID, '') as ps_posid_edit preserving type) AS WBSElement,
  _StockSegment._WBSElementBasicData.WBSDescription AS WBSDescription,
  cast(coalesce(_StockSegment.Batch, '') as b_charge preserving type) AS Batch,
  cast(coalesce(_StockSegment.InventoryStockType, '') as lbbsa preserving type) AS InventoryStockType,
  cast(coalesce(_StockSegment.StockOwner, '') as owner_d preserving type) AS StockOwner,
  _StockSegment._InventorySpecialStockType._Text[1: Language = $session.system_language].InventorySpecialStockTypeName AS InventorySpecialStockTypeName,
  _StockSegment._InventoryStockType._Text[1: Language = $session.system_language].InventoryStockTypeName AS InventoryStockTypeName,
  _MaterialText.MaterialName AS MaterialName,
  cast(coalesce(_CustomerWarranty.MasterWarranty, '') as mganr preserving type) AS TechObjCustomerMasterWarranty,
  _CustomerWarranty.WarrantyStartDate AS TechObjCustWarrantyStartDate,
  _CustomerWarranty.WarrantyEndDate AS TechObjCustWarrantyEndDate,
  _SupplierWarranty.WarrantyStartDate AS TechObjSuplrWarrantyStartDate,
  cast(coalesce(_SupplierWarranty.MasterWarranty, '') as mganr preserving type) AS TechObjSupplierMasterWarranty,
  _SupplierWarranty.WarrantyEndDate AS TechObjSuplrWarrantyEndDate,
  cast(coalesce(ltrim(_Partner.MaintenancePartner, '0'), '') as i_parnr preserving type) AS MaintenancePartner,
  _Partner._Customer.BPCustomerFullName AS BusinessPartnerName,
  _SalesOrderItemText.SalesOrderItemText AS SalesOrderItemText,
  cast(coalesce(_CustomerWarranty._MasterWarranty._MasterWarrantyText[1: Language = $session.system_language].WarrantyName, '') as losn_customerwarrantyname preserving type) AS CustomerWarrantyName,
  cast(coalesce(_SupplierWarranty._MasterWarranty._MasterWarrantyText[1: Language = $session.system_language].WarrantyName, '') as losn_supplierwarrantyname preserving type) AS SupplierWarrantyName,
  _MaterialGroup.MaterialGroup AS MaterialGroup,
  _MaterialGroup.MaterialGroupName AS MaterialGroupName,
  _StockSegment._Customer.BPCustomerFullName AS CustomerName,
  _StockSegment._Supplier.BPSupplierFullName AS SupplierName,
  cast(coalesce(_StockSegment._StockOwner.BPSupplierFullName, '') as losn_stockownerfullname preserving type) AS StockOwnerName
FROM I_Equipment
LEFT OUTER JOIN I_EquipmentStockSegment AS _StockSegment ON Equipment = _StockSegment.Equipment  -- association [0..1]
LEFT OUTER JOIN I_MasterWrntyObjectAssgmt AS _CustomerWarranty ON MaintObjectInternalID = _CustomerWarranty.ObjectInternalID AND _CustomerWarranty.WarrantyType = '1'  -- association [1..1]
LEFT OUTER JOIN I_MasterWrntyObjectAssgmt AS _SupplierWarranty ON MaintObjectInternalID = _SupplierWarranty.ObjectInternalID AND _SupplierWarranty.WarrantyType = '2'  -- association [1..1]
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON Material = _MaterialText.Material AND _MaterialText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_PlantMaintenancePartner AS _Partner ON MaintObjectInternalID = _Partner.MaintObjectInternalID AND _Partner.PartnerFunction = 'AG'  -- association [0..1]
LEFT OUTER JOIN C_SerialNumberHistoryPartner AS _PartnerInfo ON MaintObjectInternalID = _PartnerInfo.MaintObjectInternalID  -- association [0..*]
LEFT OUTER JOIN P_SrlNmbrHistSalesOrderItemTxt AS _SalesOrderItemText ON Equipment = _SalesOrderItemText.Equipment  -- association [0..1]
LEFT OUTER JOIN I_User AS _User ON CreatedByUser = _User.UserID  -- association [1..1]
LEFT OUTER JOIN P_SrlNmbrHistMaterialGroup AS _MaterialGroup ON Material = _MaterialGroup.Material  -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _StockOwner ON StockOwner = _StockOwner.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _StorageLocation ON Plant = _StorageLocation.Plant AND StorageLocation = _StorageLocation.StorageLocation  -- association [0..1]
LEFT OUTER JOIN I_SerialNumberHistory AS _SrlNmbrHistory ON /* condition not available in parsed metadata */  -- association [0..*]
;