I_DefectUnion

DDL: I_DEFECTUNION SQL: IDEFECTUNI Type: view COMPOSITE

Defects and Quality Notification Items

I_DefectUnion is a Composite CDS View that provides data about "Defects and Quality Notification Items" in SAP S/4HANA. It reads from 4 data sources (I_Defect_TP, I_Defect_TP, I_NotificationItem, I_NotificationItem) and exposes 277 fields with key field DefectInternalID. It has 13 associations to related views.

Data Sources (4)

SourceAliasJoin Type
I_Defect_TP I_Defect_TP from
I_Defect_TP I_Defect_TP union
I_NotificationItem I_NotificationItem union
I_NotificationItem I_NotificationItem union

Associations (13)

CardinalityTargetAliasCondition
[0..1] I_Notification _Notification $projection.Notification = _Notification.Notification
[0..1] I_NotificationType _NotificationType $projection.NotificationType = _NotificationType.NotificationType
[0..1] I_DefectLocationCatalog _DefectLocationCatalog $projection.DefectLocationCatalog = _DefectLocationCatalog.DefectLocationCatalog
[0..1] I_DefectLocationCodeGroup _DefectLocationCodeGroup $projection.DefectLocationCatalog = _DefectLocationCodeGroup.DefectLocationCatalog and $projection.DefectLocationCodeGroup = _DefectLocationCodeGroup.DefectLocationCodeGroup
[0..1] I_DefectLocationCode _DefectLocationCode $projection.DefectLocationCatalog = _DefectLocationCode.DefectLocationCatalog and $projection.DefectLocationCodeGroup = _DefectLocationCode.DefectLocationCodeGroup and $projection.DefectLocationCode = _DefectLocationCode.DefectLocationCode
[0..1] I_DefectCodeGroup _DefectCodeGroup $projection.DefectCodeGroup = _DefectCodeGroup.DefectCodeGroup
[0..1] I_DefectCode _DefectCode $projection.DefectCodeGroup = _DefectCode.DefectCodeGroup and $projection.DefectCode = _DefectCode.DefectCode
[0..1] I_InspectionLot _InspectionLot $projection.inspectionlot = _InspectionLot.InspectionLot
[0..1] I_DefectStatus _DefectStatus $projection.DefectLifecycleStatus = _DefectStatus.DefectLifecycleStatus
[0..1] I_DefectCausedBy _DefectCausedBy $projection.DefectCausedBy = _DefectCausedBy.DefectCausedBy
[0..1] I_EWM_WarehouseNumber_2 _EWM_WarehouseNumber_2 $projection.Warehouse = _EWM_WarehouseNumber_2.EWMWarehouse
[0..1] I_EWM_WarehouseNumber _EWM_WarehouseNumber $projection.Warehouse = _EWM_WarehouseNumber.Warehouse
[0..1] I_UserContactCard _CreatedByUserContactCard $projection.CreatedByUser = _CreatedByUserContactCard.ContactCardID

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IDEFECTUNI view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.representativeKey DefectInternalID view
EndUserText.label Defects and Quality Notification Items view

Fields (277)

KeyFieldSource TableSource FieldDescription
KEY DefectInternalID DefectInternalID Internal Defect ID
Notification Notification
NotificationItem Number of days
NotificationItemExternalID WBS Element
Defect Defect
DefectCategory DefectCategory Violation Category
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
CreationTime CreationTime Time of Change
LastChangedByUser LastChangedByUser User Name
LastChangeDate LastChangeDate Time Stamp
LastChangeTime LastChangeTime Time changed
DefectText DefectText Text
DefectCodeCatalog DefectCodeCatalog Defect types
DefectCodeGroup DefectCodeGroup Code Group
DefectCode DefectCode Damage Code
DefectCodeVersion DefectCodeVersion Version
DefectLocationCatalog DefectObjectCodeCatalog Object Parts
DefectLocationCodeGroup DefectObjectCodeGroup Field Is No Longer Used
DefectLocationCode DefectObjectCode ObjectPartCode
DefectClass DefectClass Defect Class
NumberOfDefects NumberOfDefects
DefectLifecycleStatus DefectLifecycleStatus Task Status
ReferencedDefect Defect Key
Plant Plant Valuation Area
Material Material Vehicle Model
Batch Batch Lot No.
InspectionLot InspectionLot Inspection Lot
InspPlanOperationInternalID InspPlanOperationInternalID Node Number
InspectionCharacteristic InspectionCharacteristic Characteristic
InspectionSubsetInternalID InspectionSubsetInternalID Sample Number
MaterialSample MaterialSample Sample
Supplier Supplier
Customer Sold-to Party
NotificationType Notifictn Type
ProductionOrder ProductionOrder Order
ProductionOrderOperation ProductionOrderOperation Transaction
ProductionOrderSequence ProductionOrderSequence Visit Sequence
WorkCenterTypeCode WorkCenterTypeCode Object Type
MainWorkCenterInternalID MainWorkCenterInternalID Work Center
MainWorkCenterPlant MainWorkCenterPlant Plnt WorkCenter
MainWorkCenter MainWorkCenter Work Center
StorageLocation StorageLocation StorageLocation
ProductionSupplyArea ProductionSupplyArea Supply Area
Warehouse Warehouse Warehouse No.
StorageType StorageType Srce Stor. Type
SourceStorageBin SourceStorageBin Source Stor.Bin
WarehouseLogicalSystem WarehouseLogicalSystem Logical System of Warehouse
IsDeleted IsDeleted TRUE
DefectOrigin DefectOrigin Oritin of item
DefectCausedBy DefectCausedBy Defect Caused By
DefectUUID DefectUUID Defect UUID
_Notification _Notification
_NotificationType _NotificationType
_DefectCategory _DefectCategory
_DefectCodeGroup _DefectCodeGroup
_DefectCode _DefectCode
_DefectLocationCatalog _DefectLocationCatalog
_DefectLocationCodeGroup _DefectLocationCodeGroup
_DefectLocationCode _DefectLocationCode
_DefectClass _DefectClass
_DefectStatus _DefectStatus
_DefectCausedBy _DefectCausedBy
_Plant _Plant
_Product _Product
_InspectionLot _InspectionLot
_EWM_WarehouseNumber_2 _EWM_WarehouseNumber_2
_EWM_WarehouseNumber _EWM_WarehouseNumber
_CreatedByUserContactCard _CreatedByUserContactCard
DefectLocationCodekeyDefectInternalID
Notification Notification
NotificationItem Number of days
NotificationItemExternalID WBS Element
Defect Defect
DefectCategory DefectCategory Violation Category
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
CreationTime CreationTime Time of Change
LastChangedByUser LastChangedByUser User Name
LastChangeDate LastChangeDate Time Stamp
LastChangeTime LastChangeTime Time changed
DefectText DefectText Text
DefectCodeCatalog DefectCodeCatalog Defect types
DefectCodeGroup DefectCodeGroup Code Group
DefectCode DefectCode Damage Code
DefectCodeVersion DefectCodeVersion Version
DefectLocationCatalog DefectObjectCodeCatalog Object Parts
DefectLocationCodeGroup DefectObjectCodeGroup Field Is No Longer Used
DefectLocationCode DefectObjectCode ObjectPartCode
DefectClass DefectClass Defect Class
NumberOfDefects NumberOfDefects
DefectLifecycleStatus DefectLifecycleStatus Task Status
ReferencedDefect Defect Key
Plant Plant Valuation Area
Material Material Vehicle Model
Batch _InspectionLot Batch Lot No.
InspectionLot InspectionLot Inspection Lot
InspPlanOperationInternalID InspPlanOperationInternalID Node Number
InspectionCharacteristic InspectionCharacteristic Characteristic
InspectionSubsetInternalID InspectionSubsetInternalID Sample Number
MaterialSample MaterialSample Sample
Supplier Supplier
Customer Sold-to Party
NotificationType Notifictn Type
ProductionOrder ProductionOrder Order
ProductionOrderOperation ProductionOrderOperation Transaction
ProductionOrderSequence ProductionOrderSequence Visit Sequence
WorkCenterTypeCode WorkCenterTypeCode Object Type
MainWorkCenterInternalID MainWorkCenterInternalID Work Center
MainWorkCenterPlant MainWorkCenterPlant Plnt WorkCenter
MainWorkCenter MainWorkCenter Work Center
StorageLocation StorageLocation StorageLocation
ProductionSupplyArea ProductionSupplyArea Supply Area
Warehouse Warehouse Warehouse No.
StorageType StorageType Srce Stor. Type
SourceStorageBin SourceStorageBin Source Stor.Bin
WarehouseLogicalSystem WarehouseLogicalSystem Logical System of Warehouse
IsDeleted IsDeleted TRUE
DefectOrigin DefectOrigin Oritin of item
DefectCausedBy DefectCausedBy Defect Caused By
DefectUUID DefectUUID Defect UUID
_Notification _Notification
_NotificationType _NotificationType
_DefectCategory _DefectCategory
_DefectCodeGroup _DefectCodeGroup
_DefectCode _DefectCode
_DefectLocationCatalog _DefectLocationCatalog
_DefectLocationCodeGroup _DefectLocationCodeGroup
_DefectLocationCode _DefectLocationCode
_DefectClass _DefectClass
_DefectStatus _DefectStatus
_DefectCausedBy _DefectCausedBy
_Plant _Plant
_Product _Product
_InspectionLot _InspectionLot
_EWM_WarehouseNumber_2 _EWM_WarehouseNumber_2
_EWM_WarehouseNumber _EWM_WarehouseNumber
_CreatedByUserContactCard _CreatedByUserContactCard
DefectLocationCodekeyDefectInternalID
Notification I_NotificationItem Notification Notification
NotificationItem I_NotificationItem NotificationItem Number of days
NotificationItemExternalID WBS Element
Defect
DefectCategory DefectCategory Violation Category
CreatedByUser User Name
CreationDate Time Stamp
CreationTime Time of Change
LastChangedByUser I_NotificationItem LastChangedByUser User Name
LastChangeDate I_NotificationItem LastChangeDate Time Stamp
LastChangeTime Time changed
DefectText NotificationItemText Text
DefectCodeCatalog DefectCodeCatalog Defect types
DefectCodeGroup DefectCodeGroup Code Group
DefectCode DefectCode Damage Code
DefectCodeVersion DefectCodeVersion Version
DefectLocationCatalog Object Parts
DefectLocationCodeGroup Field Is No Longer Used
DefectLocationCode ObjectPartCode
DefectClass DefectClass Defect Class
NumberOfDefects NumberOfDefects
DefectLifecycleStatus Task Status
ReferencedDefect ReferencedDefect Defect Key
Plant Plant Valuation Area
Material Assembly Vehicle Model
Batch Batch Lot No.
InspectionLot _Notification InspectionLot Inspection Lot
InspPlanOperationInternalID InspPlanOperationInternalID Node Number
InspectionCharacteristic InspectionCharacteristic Characteristic
InspectionSubsetInternalID InspectionSubsetInternalID Sample Number
MaterialSample MaterialSample Sample
Supplier _Notification Supplier Supplier
Customer _Notification Customer Sold-to Party
NotificationType _Notification NotificationType Notifictn Type
ProductionOrder Order
ProductionOrderOperation Transaction
ProductionOrderSequence Visit Sequence
WorkCenterTypeCode _Notification WorkCenterTypeCode Object Type
MainWorkCenterInternalID _Notification MainWorkCenterInternalID Work Center
MainWorkCenterPlant _Notification MainWorkCenterPlant Plnt WorkCenter
MainWorkCenter MainWorkCenter Work Center
StorageLocation I_NotificationItem StorageLocation StorageLocation
ProductionSupplyArea I_NotificationItem ProductionSupplyArea Supply Area
Warehouse I_NotificationItem EWMWarehouse Warehouse No.
StorageType I_NotificationItem SourceStorageType Srce Stor. Type
SourceStorageBin I_NotificationItem SourceStorageBin Source Stor.Bin
WarehouseLogicalSystem I_NotificationItem WarehouseLogicalSystem Logical System of Warehouse
IsDeleted I_NotificationItem IsDeleted TRUE
DefectOrigin I_NotificationItem DefectOrigin Oritin of item
DefectCausedBy DefectCausedBy Defect Caused By
DefectUUID DefectUUID Defect UUID
_Notification _Notification
_NotificationType _NotificationType
_DefectCategory _DefectCategory
_DefectCodeGroup _DefectCodeGroup
_DefectCode _DefectCode
_DefectLocationCatalog _DefectLocationCatalog
_DefectLocationCodeGroup _DefectLocationCodeGroup
_DefectLocationCode _DefectLocationCode
_DefectClass _DefectClass
_DefectStatus _DefectStatus
_DefectCausedBy _DefectCausedBy
_Plant _Plant
_Product _Assembly
_InspectionLot _InspectionLot
_EWM_WarehouseNumber_2 _EWM_WarehouseNumber_2
_EWM_WarehouseNumber _EWM_WarehouseNumber
_CreatedByUserContactCard _CreatedByUserContactCard
DefectLocationCodekeyDefectInternalID
Notification I_NotificationItem Notification Notification
NotificationItem NotificationItem Number of days
NotificationItemExternalID WBS Element
Defect
DefectCategory DefectCategory Violation Category
CreatedByUser I_NotificationItem CreatedByUser User Name
CreationDate I_NotificationItem CreationDate Time Stamp
CreationTime Time of Change
LastChangedByUser I_NotificationItem LastChangedByUser User Name
LastChangeDate I_NotificationItem LastChangeDate Time Stamp
LastChangeTime Time changed
DefectText NotificationItemText Text
DefectCodeCatalog DefectCodeCatalog Defect types
DefectCodeGroup DefectCodeGroup Code Group
DefectCode DefectCode Damage Code
DefectCodeVersion DefectCodeVersion Version
DefectLocationCatalog Object Parts
DefectLocationCodeGroup Field Is No Longer Used
DefectLocationCode ObjectPartCode
DefectClass DefectClass Defect Class
NumberOfDefects NumberOfDefects
DefectLifecycleStatus Task Status
ReferencedDefect ReferencedDefect Defect Key
Plant _Notification Plant Valuation Area
Material _Notification Material Vehicle Model
Batch _Notification Batch Lot No.
InspectionLot _Notification InspectionLot Inspection Lot
InspPlanOperationInternalID InspPlanOperationInternalID Node Number
InspectionCharacteristic InspectionCharacteristic Characteristic
InspectionSubsetInternalID InspectionSubsetInternalID Sample Number
MaterialSample MaterialSample Sample
Supplier _Notification Supplier Supplier
Customer _Notification Customer Sold-to Party
NotificationType _Notification NotificationType Notifictn Type
ProductionOrder Order
ProductionOrderOperation Transaction
ProductionOrderSequence Visit Sequence
WorkCenterTypeCode _Notification WorkCenterTypeCode Object Type
MainWorkCenterInternalID _Notification MainWorkCenterInternalID Work Center
MainWorkCenterPlant _Notification MainWorkCenterPlant Plnt WorkCenter
MainWorkCenter MainWorkCenter Work Center
StorageLocation StorageLocation
ProductionSupplyArea Supply Area
Warehouse Warehouse No.
StorageType Srce Stor. Type
SourceStorageBin Source Stor.Bin
WarehouseLogicalSystem Logical System of Warehouse
IsDeleted I_NotificationItem IsDeleted TRUE
DefectOrigin I_NotificationItem DefectOrigin Oritin of item
DefectCausedBy Defect Caused By
DefectUUID DefectUUID Defect UUID
_Notification _Notification
_NotificationType _NotificationType
_DefectCategory _DefectCategory
_DefectCodeGroup _DefectCodeGroup
_DefectCode _DefectCode
_DefectLocationCatalog _DefectLocationCatalog
_DefectLocationCodeGroup _DefectLocationCodeGroup
_DefectLocationCode _DefectLocationCode
_DefectClass _DefectClass
_DefectStatus _DefectStatus
_DefectCausedBy _DefectCausedBy
_Plant _Notification _Plant
_Product _Notification _Product
_InspectionLot _InspectionLot
_EWM_WarehouseNumber_2 _EWM_WarehouseNumber_2
_EWM_WarehouseNumber _EWM_WarehouseNumber
_CreatedByUserContactCard _CreatedByUserContactCard
_LastChangedByUserContactCard _LastChangedByUserContactCard

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_DefectUnion.
-- 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.
-- SQL view name: IDEFECTUNI

CREATE VIEW I_DefectUnion AS
SELECT
  DefectInternalID,
  cast( ' ' as qmnum preserving type ) AS Notification,
  cast( '0000' as felfd preserving type ) AS NotificationItem,
  cast( '0000' as qnotifitemexternal preserving type ) AS NotificationItemExternalID,
  Defect,
  DefectCategory,
  CreatedByUser,
  CreationDate,
  CreationTime,
  LastChangedByUser,
  LastChangeDate,
  LastChangeTime,
  DefectText,
  DefectCodeCatalog,
  DefectCodeGroup,
  DefectCode,
  DefectCodeVersion,
  DefectObjectCodeCatalog AS DefectLocationCatalog,
  DefectObjectCodeGroup AS DefectLocationCodeGroup,
  DefectObjectCode AS DefectLocationCode,
  DefectClass,
  NumberOfDefects,
  DefectLifecycleStatus,
  cast( ' ' as qdefrefnum preserving type ) AS ReferencedDefect,
  Plant,
  Material,
  Batch,
  InspectionLot,
  InspPlanOperationInternalID,
  InspectionCharacteristic,
  InspectionSubsetInternalID,
  MaterialSample,
  cast( ' ' as elifn preserving type ) AS Supplier,
  cast( ' ' as qkunwe preserving type ) AS Customer,
  cast( ' ' as qmart preserving type ) AS NotificationType,
  ProductionOrder,
  ProductionOrderOperation,
  ProductionOrderSequence,
  WorkCenterTypeCode,
  MainWorkCenterInternalID,
  MainWorkCenterPlant,
  MainWorkCenter,
  StorageLocation,
  ProductionSupplyArea,
  Warehouse,
  StorageType,
  SourceStorageBin,
  WarehouseLogicalSystem,
  IsDeleted,
  DefectOrigin,
  DefectCausedBy,
  DefectUUID,
  _Notification._Plant AS _Plant,
  _Notification._Product AS _Product
FROM I_Defect_TP
LEFT OUTER JOIN I_Notification AS _Notification ON Notification = _Notification.Notification  -- association [0..1]
LEFT OUTER JOIN I_NotificationType AS _NotificationType ON NotificationType = _NotificationType.NotificationType  -- association [0..1]
LEFT OUTER JOIN I_DefectLocationCatalog AS _DefectLocationCatalog ON DefectLocationCatalog = _DefectLocationCatalog.DefectLocationCatalog  -- association [0..1]
LEFT OUTER JOIN I_DefectLocationCodeGroup AS _DefectLocationCodeGroup ON DefectLocationCatalog = _DefectLocationCodeGroup.DefectLocationCatalog AND DefectLocationCodeGroup = _DefectLocationCodeGroup.DefectLocationCodeGroup  -- association [0..1]
LEFT OUTER JOIN I_DefectLocationCode AS _DefectLocationCode ON DefectLocationCatalog = _DefectLocationCode.DefectLocationCatalog AND DefectLocationCodeGroup = _DefectLocationCode.DefectLocationCodeGroup AND DefectLocationCode = _DefectLocationCode.DefectLocationCode  -- association [0..1]
LEFT OUTER JOIN I_DefectCodeGroup AS _DefectCodeGroup ON DefectCodeGroup = _DefectCodeGroup.DefectCodeGroup  -- association [0..1]
LEFT OUTER JOIN I_DefectCode AS _DefectCode ON DefectCodeGroup = _DefectCode.DefectCodeGroup AND DefectCode = _DefectCode.DefectCode  -- association [0..1]
LEFT OUTER JOIN I_InspectionLot AS _InspectionLot ON inspectionlot = _InspectionLot.InspectionLot  -- association [0..1]
LEFT OUTER JOIN I_DefectStatus AS _DefectStatus ON DefectLifecycleStatus = _DefectStatus.DefectLifecycleStatus  -- association [0..1]
LEFT OUTER JOIN I_DefectCausedBy AS _DefectCausedBy ON DefectCausedBy = _DefectCausedBy.DefectCausedBy  -- association [0..1]
LEFT OUTER JOIN I_EWM_WarehouseNumber_2 AS _EWM_WarehouseNumber_2 ON Warehouse = _EWM_WarehouseNumber_2.EWMWarehouse  -- association [0..1]
LEFT OUTER JOIN I_EWM_WarehouseNumber AS _EWM_WarehouseNumber ON Warehouse = _EWM_WarehouseNumber.Warehouse  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _CreatedByUserContactCard ON CreatedByUser = _CreatedByUserContactCard.ContactCardID  -- association [0..1]
-- UNION with additional select branch(es): I_Defect_TP, I_NotificationItem
;