P_MfgOrderDefectAll

DDL: P_MFGORDERDEFECTALL Type: view_entity COMPOSITE

Mfg. Notification and Defect Records

P_MfgOrderDefectAll is a Composite CDS View that provides data about "Mfg. Notification and Defect Records" in SAP S/4HANA. It reads from 5 data sources (I_Notification, I_NotificationItem, I_NotificationItem, I_NotificationItem, I_NotificationItem) and exposes 52 fields with key fields Notification, NotificationItem, NotificationItem, NotificationItem.

Data Sources (5)

SourceAliasJoin Type
I_Notification Notification inner
I_NotificationItem NotificationItem from
I_NotificationItem NotificationItem union_all
I_NotificationItem NotificationItem union_all
I_NotificationItem NotificationItemRef inner

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Mfg. Notification and Defect Records view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY Notification I_NotificationItem Notification
KEY NotificationItem I_NotificationItem NotificationItem
Defect
DefectText
DefectCategory I_NotificationItem DefectCategory
DefectiveQuantity I_NotificationItem DefectiveQuantity
DefectiveQuantityUnit I_NotificationItem DefectiveQuantityUnit
ProductionOrder I_NotificationItem ProductionOrder
ProducedMaterial I_NotificationItem ProducedMaterial
ProducedSerialNumber I_NotificationItem ProducedSerialNumber
Material I_NotificationItem Material
DefectiveSingleUnit I_NotificationItem DefectiveSingleUnit
QualityNotification I_NotificationItem Notification
QualityNotificationItem I_NotificationItem NotificationItem
OrderInternalID I_NotificationItem OrderInternalID
InspPlanOperationInternalID I_NotificationItem InspPlanOperationInternalID
ProductionOrderOperationActy I_NotificationItem ProductionOrderOperationActy
Notification
KEY NotificationItem I_NotificationItem NotificationItem
Defect
DefectText
DefectCategory I_NotificationItem DefectCategory
DefectiveQuantity I_NotificationItem DefectiveQuantity
DefectiveQuantityUnit I_NotificationItem DefectiveQuantityUnit
ProductionOrder I_NotificationItem ProductionOrder
ProducedMaterial I_NotificationItem ProducedMaterial
ProducedSerialNumber I_NotificationItem ProducedSerialNumber
Material I_NotificationItem Material
DefectiveSingleUnit I_NotificationItem DefectiveSingleUnit
QualityNotification I_NotificationItem Notification
QualityNotificationItem I_NotificationItem NotificationItem
OrderInternalID I_NotificationItem OrderInternalID
InspPlanOperationInternalID I_NotificationItem InspPlanOperationInternalID
ProductionOrderOperationActy I_NotificationItem ProductionOrderOperationActy
Notification
KEY NotificationItem I_NotificationItem NotificationItem
Defect
DefectText
DefectCategory I_NotificationItem DefectCategory
DefectiveQuantity I_NotificationItem DefectiveQuantity
DefectiveQuantityUnit I_NotificationItem DefectiveQuantityUnit
ProductionOrder I_Notification ProductionOrder
ProducedMaterial I_Notification Material
ProducedSerialNumber ShopFloorItem SerialNumber
Material I_Notification Material
DefectiveSingleUnit ShopFloorItem SerialNumber
QualityNotification I_NotificationItem Notification
QualityNotificationItem I_NotificationItem NotificationItem
OrderInternalID I_Notification MfgOrderInternalID
InspPlanOperationInternalID I_NotificationItem InspPlanOperationInternalID
ProductionOrderOperationActy I_NotificationItem ProductionOrderOperationActy
ProductionOrderOpActyVers I_NotificationItem ProductionOrderOpActyVers
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Mfg. Notification and Defect Records'
@Metadata.ignorePropagatedAnnotations: true
@VDM.private:true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType:{
  serviceQuality: #C,
  sizeCategory: #L,
  dataClass: #TRANSACTIONAL
}
define view entity P_MfgOrderDefectAll
  as select from           I_NotificationItem as NotificationItem // Defect Entry

    left outer to one join I_NotificationItem as NotificationItemRef on  NotificationItemRef.ReferencedDefect =  NotificationItem.Notification
                                                                     and NotificationItemRef.IsDeleted        <> 'X'
{
  key NotificationItem.Notification,
  key NotificationItem.NotificationItem,
      cast( substring(NotificationItem.Notification,2,11) as qdefectid preserving type ) as Defect,
      cast(NotificationItem.NotificationItemText as vdm_qfetxt preserving type )         as DefectText,
      NotificationItem.DefectCategory,
      @Semantics.quantity.unitOfMeasure: 'DefectiveQuantityUnit'
      NotificationItem.DefectiveQuantity,
      NotificationItem.DefectiveQuantityUnit,
      NotificationItem.ProductionOrder,
      NotificationItem.ProducedMaterial,
      NotificationItem.ProducedSerialNumber,
      NotificationItem.Material,
      NotificationItem.DefectiveSingleUnit,
      NotificationItemRef.Notification                                                   as QualityNotification,
      NotificationItemRef.NotificationItem                                               as QualityNotificationItem,
      NotificationItem.OrderInternalID                                                   as OrderInternalID,
      NotificationItem.InspPlanOperationInternalID                                       as InspPlanOperationInternalID,
      NotificationItem.ProductionOrderOperationActy,
      NotificationItem.ProductionOrderOpActyVers
}
where
      NotificationItem.NotificationItem             is initial
  and NotificationItem.ProductionOrderOperationActy is not initial
  and NotificationItem.ProductionOrderOpActyVers    is not initial


//Notification created from defect

union all

select from  I_NotificationItem as NotificationItem
  inner join I_NotificationItem as NotificationItemRef on NotificationItemRef.Notification = NotificationItem.ReferencedDefect

{
  key NotificationItem.Notification,
  key NotificationItem.NotificationItem,
      cast( substring(NotificationItemRef.Notification,2,11) as qdefectid preserving type ) as Defect,
      cast(NotificationItemRef.NotificationItemText as vdm_qfetxt preserving type )         as DefectText,
      NotificationItemRef.DefectCategory,
      NotificationItemRef.DefectiveQuantity,
      NotificationItemRef.DefectiveQuantityUnit,
      NotificationItemRef.ProductionOrder,
      NotificationItemRef.ProducedMaterial,
      NotificationItemRef.ProducedSerialNumber,
      NotificationItemRef.Material,
      NotificationItemRef.DefectiveSingleUnit,
      NotificationItem.Notification                                                         as QualityNotification,
      NotificationItem.NotificationItem                                                     as QualityNotificationItem,
      NotificationItemRef.OrderInternalID                                                   as OrderInternalID,
      NotificationItemRef.InspPlanOperationInternalID                                       as InspPlanOperationInternalID,
      NotificationItemRef.ProductionOrderOperationActy,
      NotificationItemRef.ProductionOrderOpActyVers
}
where
      NotificationItem.ReferencedDefect                is not initial
  and NotificationItemRef.ProductionOrderOperationActy is not initial
  and NotificationItemRef.ProductionOrderOpActyVers    is not initial

//Notification created from IC

union all

select from              I_NotificationItem as NotificationItem
  inner join             I_Notification     as Notification     on Notification.Notification = NotificationItem.Notification
  left outer to one join I_InspectionSubset as InspectionSubset on  InspectionSubset.InspectionLot               = Notification.InspectionLot
                                                                and InspectionSubset.InspPlanOperationInternalID = NotificationItem.InspPlanOperationInternalID
                                                                and InspectionSubset.InspectionSubsetInternalID  = NotificationItem.InspectionSubsetInternalID
  left outer to one join I_ShopFloorItem    as ShopFloorItem    on ShopFloorItem.ShopFloorItem = InspectionSubset.ShopFloorItem
{
  key NotificationItem.Notification,
  key NotificationItem.NotificationItem,
      ''                                           as Defect,
      ''                                           as DefectText,
      NotificationItem.DefectCategory,
      NotificationItem.DefectiveQuantity,
      NotificationItem.DefectiveQuantityUnit,
      Notification.ProductionOrder,
      Notification.Material                        as ProducedMaterial,
      ShopFloorItem.SerialNumber                   as ProducedSerialNumber,
      Notification.Material,
      ShopFloorItem.SerialNumber                   as DefectiveSingleUnit,
      NotificationItem.Notification                as QualityNotification,
      NotificationItem.NotificationItem            as QualityNotificationItem,
      Notification.MfgOrderInternalID              as OrderInternalID,
      NotificationItem.InspPlanOperationInternalID as InspPlanOperationInternalID,
      NotificationItem.ProductionOrderOperationActy,
      NotificationItem.ProductionOrderOpActyVers
}
where
      NotificationItem.InspectionCharacteristic     is not initial
  and NotificationItem.ProductionOrderOperationActy is not initial
  and NotificationItem.ProductionOrderOpActyVers    is not initial