P_MfgOrderDefectAll
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)
| Source | Alias | Join 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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSPECTIONSUBSET",
"I_NOTIFICATION",
"I_NOTIFICATIONITEM",
"I_SHOPFLOORITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA