C_MfgOrderDefect
Defect and notification
C_MfgOrderDefect is a Consumption CDS View that provides data about "Defect and notification" in SAP S/4HANA. It reads from 1 data source (I_MfgOrderDefectRecord) and exposes 107 fields with key fields DefectInternalID, NotificationItem. It has 8 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MfgOrderDefectRecord | Defect | from |
Associations (8)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SitnInstceIndicator | _Sitn | _Sitn.SitnInstceAnchorObjectKey = $projection.Defect and _Sitn.SitnDefAnchorObject = 'Defect' |
| [1..1] | I_MfgOrderOperation | _MfgOrderOperation | _MfgOrderOperation.OrderInternalBillOfOperations = $projection.OrderInternalID and _MfgOrderOperation.OrderIntBillOfOperationsItem = $projection.InspPlanOperationInternalID |
| [1..1] | I_MfgOrderOperationBasic | _MfgOrderOperationBasic | _MfgOrderOperationBasic.OrderInternalBillOfOperations = $projection.OrderInternalID and _MfgOrderOperationBasic.OrderIntBillOfOperationsItem = $projection.InspPlanOperationInternalID |
| [1..1] | I_OperationActivityText | _OperationActivityText | $projection.ProductionOrderOperationActy = _OperationActivityText.OperationActivity and $projection.ProductionOrderOpActyVers = _OperationActivityText.OperationActyVersionCounter and _OperationActivityText.Language = $session.system_language |
| [0..*] | C_ReworkBOOVersionDefectCode | _ReworkBOOVersionDefectCode | $projection.DefectCodeGroup = _ReworkBOOVersionDefectCode.DefectCodeGroup and $projection.DefectCode = _ReworkBOOVersionDefectCode.DefectCode and ( --Non-serialized rework routings only if Defect is not bound to a serial number ( ( $projection.SerialNumber = '' or $projection.SerialNumber is null ) and _ReworkBOOVersionDefectCode.OpActyConfIsSFIBased = '' ) or( --Serialized rework routings only if Defect is bound to a serial number $projection.SerialNumber > '' and $projection.SerialNumber is not null and _ReworkBOOVersionDefectCode.OpActyConfIsSFIBased = 'X' ) ) and ( ( --If order is non-flexible, show only non-flexible routings $projection.ProdnProcgIsFlexible = '' and _ReworkBOOVersionDefectCode.ProdnProcgIsFlexible = '' ) or( --If order is flexible, show flexible and non-flexbile routings $projection.ProdnProcgIsFlexible = 'X' ) ) |
| [0..1] | I_MaterialText | _MaterialText | $projection.Material = _MaterialText.Material and _MaterialText.Language = $session.system_language |
| [0..1] | I_MaterialText | _ProductText | $projection.ProducedMaterial = _ProductText.Material and _ProductText.Language = $session.system_language |
| [0..1] | I_MfgExecDocumentNote | _MfgExecDocumentNote | $projection.Notification <> $projection.Notification |
Annotations (20)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CMFGORDDEF | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.representativeKey | DefectInternalID | view | |
| ObjectModel.createEnabled | true | view | |
| ObjectModel.updateEnabled | true | view | |
| ObjectModel.deleteEnabled | true | view | |
| Metadata.allowExtensions | true | view | |
| UI.headerInfo.typeName | Defect | view | |
| UI.headerInfo.typeNamePlural | Defects | view | |
| UI.headerInfo.title.value | Defect | view | |
| UI.headerInfo.title.label | Defect | view | |
| UI.headerInfo.description.value | DefectText | view | |
| EndUserText.label | Defect and notification | view |
Fields (107)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectInternalID | I_MfgOrderDefectRecord | DefectInternalID | Internal Defect ID |
| KEY | NotificationItem | I_MfgOrderDefectRecord | NotificationItem | |
| Notification | I_MfgOrderDefectRecord | Notification | Notification | |
| Defect | I_MfgOrderDefectRecord | Defect | ||
| SerialNumber | ShopFloorItem | SerialNumber | Serial Number | |
| DefectCategory | I_MfgOrderDefectRecord | DefectCategory | ||
| DefectCategoryText | ||||
| NotificationType | I_MfgOrderDefectRecord | NotificationType | Notifictn Type | |
| CreatedByUser | I_MfgOrderDefectRecord | CreatedByUser | User Name | |
| CreationDate | I_MfgOrderDefectRecord | CreationDate | Time Stamp | |
| LastChangedByUser | I_MfgOrderDefectRecord | LastChangedByUser | User Name | |
| LastChangeDate | I_MfgOrderDefectRecord | LastChangeDate | Time Stamp | |
| DefectText | I_MfgOrderDefectRecord | DefectText | ||
| DefectCodeCatalog | I_MfgOrderDefectRecord | DefectCodeCatalog | ||
| DefectCodeGroup | I_MfgOrderDefectRecord | DefectCodeGroup | Code Group | |
| DefectCodeGroupText | ||||
| DefectCode | I_MfgOrderDefectRecord | DefectCode | Damage Code | |
| DefectCodeText | ||||
| DefectiveQuantity | I_MfgOrderDefectRecord | DefectiveQuantity | Defective Quantity | |
| DefectiveQuantityUnit | I_MfgOrderDefectRecord | DefectiveQuantityUnit | ||
| DefectIsCreatedAutomatically | I_MfgOrderDefectRecord | DefectIsCreatedAutomatically | ||
| ProductionOrderOperationActy | I_MfgOrderDefectRecord | ProductionOrderOperationActy | Operation Activity | |
| OpActyNtwkElementExternalID | I_MfgOrderDefectRecord | OpActyNtwkElementExternalID | Op. Activity | |
| OperationActivityName | _OperationActivityText | OperationActivityName | ||
| OpActyNtwkInstance | I_MfgOrderDefectRecord | OpActyNtwkInstance | Instance ID | |
| OpActyNtwkElement | I_MfgOrderDefectRecord | OpActyNtwkElement | Element Number | |
| ManufacturingOrderOperation | ||||
| MfgOrderOperationText | _MfgOrderOperationBasic | MfgOrderOperationText | ||
| ProductionOrderOpActyVers | I_MfgOrderDefectRecord | ProductionOrderOpActyVers | OA Version | |
| ProductionOrder | I_MfgOrderDefectRecord | ProductionOrder | Order | |
| OrderInternalID | I_MfgOrderDefectRecord | OrderInternalID | Plan No.f.Oper. | |
| CreationTime | I_MfgOrderDefectRecord | CreationTime | Time of Change | |
| LastChangeTime | I_MfgOrderDefectRecord | LastChangeTime | Time changed | |
| InspPlanOperationInternalID | I_MfgOrderDefectRecord | InspPlanOperationInternalID | ||
| InspectionCharacteristic | I_MfgOrderDefectRecord | InspectionCharacteristic | ||
| InspectionSubsetInternalID | I_MfgOrderDefectRecord | InspectionSubsetInternalID | ||
| DefectiveSingleUnit | I_MfgOrderDefectRecord | DefectiveSingleUnit | Defective Serial Number | |
| ProducedMaterial | I_MfgOrderDefectRecord | ProducedMaterial | Produced Material | |
| ProducedMaterialName | _ProductText | MaterialName | Material Description | |
| ProducedSerialNumber | I_MfgOrderDefectRecord | ProducedSerialNumber | Produced Serial Number | |
| Batch | I_MfgOrderDefectRecord | Batch | Lot No. | |
| ShopFloorItem | I_MfgOrderDefectRecord | ShopFloorItem | Serial.Mat. ID | |
| OperationActivitySFIGroup | ShopFloorStatus | OperationActivitySFIGroup | ||
| Equipment | I_MfgOrderDefectRecord | Equipment | Equipment check | |
| IsDeleted | I_MfgOrderDefectRecord | IsDeleted | TRUE | |
| Material | I_MfgOrderDefectRecord | Material | Component | |
| MaterialName | _MaterialText | MaterialName | Material Description | |
| Plant | I_MfgOrderDefectRecord | Plant | Valuation Area | |
| InspectionLot | I_MfgOrderDefectRecord | InspectionLot | Inspection Lot | |
| ChangedDateTime | I_MfgOrderDefectRecord | ChangedDateTime | Time Stamp | |
| DefectLifecycleStatus | I_MfgOrderDefectRecord | DefectLifecycleStatus | ||
| NotifProcessingPhase | I_MfgOrderDefectRecord | NotifProcessingPhase | Notif. Phase | |
| DefectLifecycleStatusText | ||||
| NotifProcessingPhaseDesc | ||||
| NotificationText | I_MfgOrderDefectRecord | NotificationText | Notification Text | |
| MfgDefectDecision | I_MfgOrderDefectRecord | MfgDefectDecision | Decision | |
| MfgDefectDecisionName | I_MfgOrderDefectRecord | MfgDefectDecisionName | ||
| SitnNumberOfInstances | _Sitn | SitnNumberOfInstances | ||
| WorkCenterTypeCode | I_MfgOrderDefectRecord | WorkCenterTypeCode | Object Type | |
| MainWorkCenterInternalID | I_MfgOrderDefectRecord | WorkCenterInternalID | Work Center | |
| MainWorkCenter | I_MfgOrderDefectRecord | MainWorkCenter | Work Center | |
| MainWorkCenterPlant | I_MfgOrderDefectRecord | MainWorkCenterPlant | Plnt WorkCenter | |
| BillOfMaterialCategory | I_MfgOrderDefectRecord | BillOfMaterialCategory | BOM category | |
| BillOfMaterialInternalID | I_MfgOrderDefectRecord | BillOfMaterialInternalID | ||
| BillOfMaterialVariant | I_MfgOrderDefectRecord | BillOfMaterialVariant | AlternativeBOM | |
| BillOfMaterialItemNodeNumber | I_MfgOrderDefectRecord | BillOfMaterialItemNodeNumber | Item node | |
| BOMItemInternalChangeCount | I_MfgOrderDefectRecord | BOMItemInternalChangeCount | Counter | |
| InheritedNodeNumberForBOMItem | BillOfMaterialItem | InheritedNodeNumberForBOMItem | Nodes | |
| BillOfMaterialVersion | BillOfMaterialItem | BillOfMaterialVersion | BOM Version | |
| OriglDgtlMockUpCharcsCharUUID | ||||
| BOMItemInstanceUUID | I_MfgOrderDefectRecord | BOMItemInstanceUUID | ||
| ReferenceDesignatorName | ||||
| BatchBySupplier | I_MfgOrderDefectRecord | BatchBySupplier | Supplier Batch | |
| ManufacturerSerialNumber | I_MfgOrderDefectRecord | ManufacturerSerialNumber | Mnf.serial no. | |
| MfgExecutionDocumentNote | _MfgExecDocumentNote | MfgExecutionDocumentNote | ||
| ManufacturingOrder | _MfgOrderOperationBasic | ManufacturingOrder | Order | |
| ManufacturingOrderText | LogisticsOrder | OrderDescription | ||
| ProdnProcgIsFlexible | LogisticsOrder | ProdnProcgIsFlexible | ||
| ManufacturingActionReasonCode | ||||
| ProductionHoldObjectType | ||||
| Reservation | ||||
| ReservationItem | ||||
| RecordType | ||||
| OrderHeaderProductionPlant | ||||
| OpActyAssignmentExists | ||||
| LinkedSAPObjectKey | ||||
| MfgRefStrucItmRefDsgntrName | ||||
| OriglBOMItemInheritedNodeNmbr | ||||
| _Notification | I_MfgOrderDefectRecord | _Notification | ||
| _DefectStatus | I_MfgOrderDefectRecord | _DefectStatus | ||
| _InspectionLot | I_MfgOrderDefectRecord | _InspectionLot | ||
| _CreatedByUserContactCard | I_MfgOrderDefectRecord | _CreatedByUserContactCard | ||
| _DefectCode | I_MfgOrderDefectRecord | _DefectCode | ||
| _DefectCodeCatalog | I_MfgOrderDefectRecord | _DefectCodeCatalog | ||
| _DefectCodeGroup | I_MfgOrderDefectRecord | _DefectCodeGroup | ||
| _ProducedMaterial | I_MfgOrderDefectRecord | _ProducedMaterial | ||
| _LastChangedByUserContactCard | I_MfgOrderDefectRecord | _LastChangedByUserContactCard | ||
| _NotifProcessingPhase | I_MfgOrderDefectRecord | _NotifProcessingPhase | ||
| _DefectCategory | I_MfgOrderDefectRecord | _DefectCategory | ||
| _DefectDecisionVH | I_MfgOrderDefectRecord | _DefectDecisionVH | ||
| _MfgOrder | _MfgOrderOperationBasic | _MfgOrder | ||
| _DefectCodeText | I_MfgOrderDefectRecord | _DefectCodeText | ||
| _MfgOrderOperation | _MfgOrderOperation | |||
| _OperationActivityText | _OperationActivityText | |||
| _MaterialText | _MaterialText | |||
| _ProductText | _ProductText | |||
| _ReworkBOOVersionDefectCode | _ReworkBOOVersionDefectCode |
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 C_MfgOrderDefect.
-- 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: CMFGORDDEF
CREATE VIEW C_MfgOrderDefect AS
SELECT
Defect.DefectInternalID AS DefectInternalID,
Defect.NotificationItem AS NotificationItem,
Defect.Notification AS Notification,
Defect.Defect AS Defect,
ShopFloorItem.SerialNumber AS SerialNumber,
Defect.DefectCategory AS DefectCategory,
Defect._DefectCategory._Text[1: Language=$session.system_language].DefectCategoryText AS DefectCategoryText,
Defect.NotificationType AS NotificationType,
Defect.CreatedByUser AS CreatedByUser,
Defect.CreationDate AS CreationDate,
Defect.LastChangedByUser AS LastChangedByUser,
Defect.LastChangeDate AS LastChangeDate,
Defect.DefectText AS DefectText,
Defect.DefectCodeCatalog AS DefectCodeCatalog,
Defect.DefectCodeGroup AS DefectCodeGroup,
Defect._DefectCodeGroup._Text[1: Language=$session.system_language].InspSpecAddlCodeGroupText AS DefectCodeGroupText,
Defect.DefectCode AS DefectCode,
Defect._DefectCode._Text[1: Language=$session.system_language].InspectionCodeText AS DefectCodeText,
Defect.DefectiveQuantity AS DefectiveQuantity,
Defect.DefectiveQuantityUnit AS DefectiveQuantityUnit,
Defect.DefectIsCreatedAutomatically AS DefectIsCreatedAutomatically,
Defect.ProductionOrderOperationActy AS ProductionOrderOperationActy,
Defect.OpActyNtwkElementExternalID AS OpActyNtwkElementExternalID,
_OperationActivityText.OperationActivityName AS OperationActivityName,
Defect.OpActyNtwkInstance AS OpActyNtwkInstance,
Defect.OpActyNtwkElement AS OpActyNtwkElement,
cast(_MfgOrderOperationBasic.ManufacturingOrderOperation as vdm_vornr preserving type) AS ManufacturingOrderOperation,
_MfgOrderOperationBasic.MfgOrderOperationText AS MfgOrderOperationText,
Defect.ProductionOrderOpActyVers AS ProductionOrderOpActyVers,
Defect.ProductionOrder AS ProductionOrder,
Defect.OrderInternalID AS OrderInternalID,
Defect.CreationTime AS CreationTime,
Defect.LastChangeTime AS LastChangeTime,
Defect.InspPlanOperationInternalID AS InspPlanOperationInternalID,
Defect.InspectionCharacteristic AS InspectionCharacteristic,
Defect.InspectionSubsetInternalID AS InspectionSubsetInternalID,
Defect.DefectiveSingleUnit AS DefectiveSingleUnit,
Defect.ProducedMaterial AS ProducedMaterial,
_ProductText.MaterialName AS ProducedMaterialName,
Defect.ProducedSerialNumber AS ProducedSerialNumber,
Defect.Batch AS Batch,
Defect.ShopFloorItem AS ShopFloorItem,
ShopFloorStatus.OperationActivitySFIGroup AS OperationActivitySFIGroup,
Defect.Equipment AS Equipment,
Defect.IsDeleted AS IsDeleted,
Defect.Material AS Material,
_MaterialText.MaterialName AS MaterialName,
Defect.Plant AS Plant,
Defect.InspectionLot AS InspectionLot,
Defect.ChangedDateTime AS ChangedDateTime,
Defect.DefectLifecycleStatus AS DefectLifecycleStatus,
Defect.NotifProcessingPhase AS NotifProcessingPhase,
Defect._DefectStatus._DefectStatusText[1: Language=$session.system_language].DefectLifecycleStatusText AS DefectLifecycleStatusText,
Defect._NotifProcessingPhase._Text[1: Language=$session.system_language].NotifProcessingPhaseDesc AS NotifProcessingPhaseDesc,
Defect.NotificationText AS NotificationText,
Defect.MfgDefectDecision AS MfgDefectDecision,
Defect.MfgDefectDecisionName AS MfgDefectDecisionName,
_Sitn.SitnNumberOfInstances AS SitnNumberOfInstances,
Defect.WorkCenterTypeCode AS WorkCenterTypeCode,
Defect.WorkCenterInternalID AS MainWorkCenterInternalID,
Defect.MainWorkCenter AS MainWorkCenter,
Defect.MainWorkCenterPlant AS MainWorkCenterPlant,
Defect.BillOfMaterialCategory AS BillOfMaterialCategory,
Defect.BillOfMaterialInternalID AS BillOfMaterialInternalID,
Defect.BillOfMaterialVariant AS BillOfMaterialVariant,
Defect.BillOfMaterialItemNodeNumber AS BillOfMaterialItemNodeNumber,
Defect.BOMItemInternalChangeCount AS BOMItemInternalChangeCount,
BillOfMaterialItem.InheritedNodeNumberForBOMItem AS InheritedNodeNumberForBOMItem,
BillOfMaterialItem.BillOfMaterialVersion AS BillOfMaterialVersion,
cast(DigitalMockUpCharcs.DgtlMockUpCharcsValue as dmu_tmxguid_char32) AS OriglDgtlMockUpCharcsCharUUID,
Defect.BOMItemInstanceUUID AS BOMItemInstanceUUID,
cast('' as vmp_ref_des) AS ReferenceDesignatorName,
Defect.BatchBySupplier AS BatchBySupplier,
Defect.ManufacturerSerialNumber AS ManufacturerSerialNumber,
_MfgExecDocumentNote.MfgExecutionDocumentNote AS MfgExecutionDocumentNote,
_MfgOrderOperationBasic.ManufacturingOrder AS ManufacturingOrder,
LogisticsOrder.OrderDescription AS ManufacturingOrderText,
LogisticsOrder.ProdnProcgIsFlexible AS ProdnProcgIsFlexible,
cast(' ' as qcode preserving type) AS ManufacturingActionReasonCode,
cast('' as mpe_hold_object_type) AS ProductionHoldObjectType,
cast('' as rsnum) AS Reservation,
cast('' as rspos) AS ReservationItem,
cast('' as rsart preserving type) AS RecordType,
cast(' ' as werks_d preserving type) AS OrderHeaderProductionPlant,
cast(' ' as mpe_rtg_assigned_to_oa preserving type) AS OpActyAssignmentExists,
cast('' as objky) AS LinkedSAPObjectKey,
cast('' as mpe_mrs_designator_name) AS MfgRefStrucItmRefDsgntrName,
cast( '' as stvkn ) AS OriglBOMItemInheritedNodeNmbr,
Defect._Notification AS _Notification,
Defect._DefectStatus AS _DefectStatus,
Defect._InspectionLot AS _InspectionLot,
Defect._CreatedByUserContactCard AS _CreatedByUserContactCard,
Defect._DefectCode AS _DefectCode,
Defect._DefectCodeCatalog AS _DefectCodeCatalog,
Defect._DefectCodeGroup AS _DefectCodeGroup,
Defect._ProducedMaterial AS _ProducedMaterial,
Defect._LastChangedByUserContactCard AS _LastChangedByUserContactCard,
Defect._NotifProcessingPhase AS _NotifProcessingPhase,
Defect._DefectCategory AS _DefectCategory,
Defect._DefectDecisionVH AS _DefectDecisionVH,
_MfgOrderOperationBasic._MfgOrder AS _MfgOrder,
Defect._DefectCodeText AS _DefectCodeText
FROM I_MfgOrderDefectRecord AS Defect
LEFT OUTER JOIN I_SitnInstceIndicator AS _Sitn ON _Sitn.SitnInstceAnchorObjectKey = Defect AND _Sitn.SitnDefAnchorObject = 'Defect' -- association [0..1]
LEFT OUTER JOIN I_MfgOrderOperation AS _MfgOrderOperation ON _MfgOrderOperation.OrderInternalBillOfOperations = OrderInternalID AND _MfgOrderOperation.OrderIntBillOfOperationsItem = InspPlanOperationInternalID -- association [1..1]
LEFT OUTER JOIN I_MfgOrderOperationBasic AS _MfgOrderOperationBasic ON _MfgOrderOperationBasic.OrderInternalBillOfOperations = OrderInternalID AND _MfgOrderOperationBasic.OrderIntBillOfOperationsItem = InspPlanOperationInternalID -- association [1..1]
LEFT OUTER JOIN I_OperationActivityText AS _OperationActivityText ON ProductionOrderOperationActy = _OperationActivityText.OperationActivity AND ProductionOrderOpActyVers = _OperationActivityText.OperationActyVersionCounter AND _OperationActivityText.Language = $session.system_language -- association [1..1]
LEFT OUTER JOIN C_ReworkBOOVersionDefectCode AS _ReworkBOOVersionDefectCode ON /* condition not available in parsed metadata */ -- association [0..*]
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON Material = _MaterialText.Material AND _MaterialText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_MaterialText AS _ProductText ON ProducedMaterial = _ProductText.Material AND _ProductText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_MfgExecDocumentNote AS _MfgExecDocumentNote ON /* condition not available in parsed metadata */ -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA