P_MfgDefectHistory

DDL: P_MFGDEFECTHISTORY SQL: PMFGDEFECTHIST Type: view COMPOSITE

P_MfgDefectHistory is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_NotificationItem) and exposes 27 fields with key fields Notification, NotificationItem.

Data Sources (1)

SourceAliasJoin Type
I_NotificationItem NotificationItem from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMFGDEFECTHIST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY Notification I_NotificationItem Notification Notification
KEY NotificationItem I_NotificationItem NotificationItem Number of days
NotificationFieldLengthValue
DefectCategory I_NotificationItem DefectCategory Violation Category
CreatedByUser I_NotificationItem CreatedByUser User Name
CreationDate I_NotificationItem CreationDate Time Stamp
LastChangedByUser I_NotificationItem LastChangedByUser User Name
LastChangeDate I_NotificationItem LastChangeDate Time Stamp
OrderInternalIDendasOrderInternalID
CreationTime
LastChangeTime
InspectionSubsetInternalID I_NotificationItem InspectionSubsetInternalID Sample Number
EquipmentendasEquipment
IsDeleted
ProducedMaterialendasMaterial
PlantendasPlant
InspectionLotendasInspectionLot
ChangedDateTime I_NotificationItem ChangedDateTime Time Stamp
DefectInternalID I_NotificationItem Notification Notification
NotificationItemText I_NotificationItem NotificationItemText Text
MainWorkCenter I_NotificationItem MainWorkCenter Work Center
MainWorkCenterPlant I_NotificationItem MainWorkCenterPlant Plnt WorkCenter
ProducedSerialNumberendasSerialNumber
InspectionCharacteristic I_NotificationItem InspectionCharacteristic Characteristic
_CreatedByUserContactCard I_NotificationItem _CreatedByUserContactCard
_LastChangedByUserContactCard I_NotificationItem _LastChangedByUserContactCard
_DefectCategory I_NotificationItem _DefectCategory

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 P_MfgDefectHistory.
-- 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: PMFGDEFECTHIST

CREATE VIEW P_MfgDefectHistory AS
SELECT
  NotificationItem.Notification AS Notification,
  NotificationItem.NotificationItem AS NotificationItem,
  length(NotificationItem.Notification) AS NotificationFieldLengthValue,
  NotificationItem.DefectCategory AS DefectCategory,
  NotificationItem.CreatedByUser AS CreatedByUser,
  NotificationItem.CreationDate AS CreationDate,
  NotificationItem.LastChangedByUser AS LastChangedByUser,
  NotificationItem.LastChangeDate AS LastChangeDate,
  case when NotificationItem.ReferencedDefect is not initial then NotificationItemRef.OrderInternalID when NotificationItem.InspectionCharacteristic is not initial then Notification.MfgOrderInternalID else NotificationItem.OrderInternalID end as OrderInternalID AS OrderInternalIDendasOrderInternalID,
  cast( NotificationItem.CreationTime as vdm_qerstezeit preserving type ) AS CreationTime,
  cast( NotificationItem.LastChangeTime as vdm_qaendezeit preserving type ) AS LastChangeTime,
  NotificationItem.InspectionSubsetInternalID AS InspectionSubsetInternalID,
  case when NotificationItem.ReferencedDefect is not initial then NotificationItemRef.Equipment else NotificationItem.Equipment end as Equipment AS EquipmentendasEquipment,
  cast( NotificationItem.IsDeleted as vdm_qdefisdeleted preserving type ) AS IsDeleted,
  case when NotificationItem.ReferencedDefect is not initial then NotificationItemRef.ProducedMaterial when NotificationItem.InspectionCharacteristic is not initial then cast( Notification.Material as vdm_defective_material preserving type ) else NotificationItem.ProducedMaterial end as Material AS ProducedMaterialendasMaterial,
  case when NotificationItem.Plant is initial then Notification.Plant else NotificationItem.Plant end as Plant AS PlantendasPlant,
  case when NotificationItem.ReferencedDefect is not initial then NotificationItemRef.InspectionLot when NotificationItem.InspectionCharacteristic is not initial then Notification.InspectionLot else NotificationItem.InspectionLot end as InspectionLot AS InspectionLotendasInspectionLot,
  NotificationItem.ChangedDateTime AS ChangedDateTime,
  NotificationItem.Notification AS DefectInternalID,
  NotificationItem.NotificationItemText AS NotificationItemText,
  NotificationItem.MainWorkCenter AS MainWorkCenter,
  NotificationItem.MainWorkCenterPlant AS MainWorkCenterPlant,
  case when NotificationItem.ReferencedDefect is not initial then NotificationItemRef.ProducedSerialNumber when NotificationItem.DefectCategory is not initial then NotificationItem.ProducedSerialNumber end as SerialNumber AS ProducedSerialNumberendasSerialNumber,
  NotificationItem.InspectionCharacteristic AS InspectionCharacteristic,
  NotificationItem._CreatedByUserContactCard AS _CreatedByUserContactCard,
  NotificationItem._LastChangedByUserContactCard AS _LastChangedByUserContactCard,
  NotificationItem._DefectCategory AS _DefectCategory
FROM I_NotificationItem AS NotificationItem
;