I_MfgOrderDefectForSituations
Defect list to trigger situation
I_MfgOrderDefectForSituations is a Composite CDS View that provides data about "Defect list to trigger situation" in SAP S/4HANA. It reads from 1 data source (I_Defect) and exposes 72 fields with key field DefectInternalID. It has 14 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_Defect | Defect | from |
Associations (14)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SitnInstceIndicator | _SitnInstceIndicator | _SitnInstceIndicator.SitnInstceAnchorObjectKey = $projection.Defect and _SitnInstceIndicator.SitnDefAnchorObject = 'Defect' |
| [0..1] | I_Equipment | _Equip | Defect.Equipment = _Equip.Equipment |
| [0..1] | I_InspectionSubset | _InspectionSubset | _InspectionSubset.InspectionLot = $projection.InspectionLot and _InspectionSubset.InspPlanOperationInternalID = $projection.InspPlanOperationInternalID and _InspectionSubset.InspectionSubsetInternalID = $projection.InspectionSubsetInternalID |
| [0..1] | I_ShopFloorItem | _ShopFloorItem | Defect.Material = _ShopFloorItem.Material and $projection.serialnumber = _ShopFloorItem.SerialNumber |
| [0..1] | I_MfgOrdDefectDecision | _DefectDecision | _DefectDecision.Notification = $projection.DefectInternalID and _DefectDecision.NotificationItem = '0000' |
| [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 |
| [1..1] | I_OpActyInstceOpActyNtwkElmnt | _OpActyInstceOpActyNtwkElmnt | _OpActyInstceOpActyNtwkElmnt.ManufacturingOrder = $projection.ProductionOrder and _OpActyInstceOpActyNtwkElmnt.OrderOperationInternalID = $projection.InspPlanOperationInternalID and _OpActyInstceOpActyNtwkElmnt.OperationActivity = $projection.ProductionOrderOperationActy and _OpActyInstceOpActyNtwkElmnt.OperationActyVersionCounter = $projection.ProductionOrderOpActyVers |
| [1..1] | I_OpActyInstceNtwkElmntBasic | _OpActyInstceNtwkElmntBasic | _OpActyInstceNtwkElmntBasic.ManufacturingOrder = $projection.ProductionOrder and _OpActyInstceNtwkElmntBasic.OrderOperationInternalID = $projection.InspPlanOperationInternalID and _OpActyInstceNtwkElmntBasic.OperationActivity = $projection.ProductionOrderOperationActy and _OpActyInstceNtwkElmntBasic.OperationActyVersionCounter = $projection.ProductionOrderOpActyVers |
| [0..1] | I_MfgActionReasonCode | _MfgActionReasonCode | _MfgActionReasonCode.MfgActionReasonCodeGroupCtlg = $projection.DefectCodeCatalog and _MfgActionReasonCode.MfgActionReasonCodeGroup = $projection.DefectCodeGroup and _MfgActionReasonCode.ManufacturingActionReasonCode = $projection.DefectCode and _MfgActionReasonCode.Version = $projection.DefectCodeVersion |
| [0..1] | I_DefectCodeText | _DefectCodeText | $projection.DefectCodeGroup = _DefectCodeText.DefectCodeGroup and $projection.DefectCode = _DefectCodeText.DefectCode and _DefectCodeText.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' ) ) |
| [0..*] | I_MaterialText | _MaterialText | $projection.Material = _MaterialText.MaterialName |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IMFGDEFECTSIT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Defect list to trigger situation | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (72)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectInternalID | DefectInternalID | Internal Defect ID | |
| SerialNumber | _Equip | SerialNumber | Serial Number | |
| Defect | I_Defect | Defect | ||
| DefectCategory | DefectCategory | |||
| CreatedByUser | CreatedByUser | User Name | ||
| CreationDate | CreationDate | Time Stamp | ||
| LastChangedByUser | LastChangedByUser | User Name | ||
| LastChangeDate | LastChangeDate | Time Stamp | ||
| DefectText | DefectText | |||
| DefectCodeCatalog | DefectCodeCatalog | |||
| DefectCodeGroup | DefectCodeGroup | Code Group | ||
| DefectCode | DefectCode | Damage Code | ||
| DefectCodeVersion | DefectCodeVersion | |||
| DefectObjectCodeCatalog | DefectObjectCodeCatalog | |||
| DefectObjectCodeGroup | DefectObjectCodeGroup | |||
| DefectObjectCode | DefectObjectCode | |||
| DefectObjectCodeVersion | DefectObjectCodeVersion | |||
| DefectCauseCodeCatalog | DefectCauseCodeCatalog | |||
| DefectCauseCodeGroup | DefectCauseCodeGroup | |||
| DefectCauseCode | DefectCauseCode | |||
| DefectCauseCodeVersion | DefectCauseCodeVersion | |||
| DefectiveQuantityUnit | DefectiveQuantityUnit | |||
| ProductionOrderOperationActy | ProductionOrderOperationActy | |||
| OpActyNtwkElementExternalID | _OpActyInstceNtwkElmntBasic | OpActyNtwkElementExternalID | Op. Activity | |
| OpActyNtwkInstance | _OpActyInstceNtwkElmntBasic | OpActyNtwkInstance | Instance ID | |
| OpActyNtwkElement | _OpActyInstceNtwkElmntBasic | OpActyNtwkElement | Element Number | |
| ManufacturingOrderOperation | _MfgOrderOperationBasic | ManufacturingOrderOperation | Activity | |
| MfgOrderOperationText | _MfgOrderOperationBasic | MfgOrderOperationText | ||
| ManufacturingOrder | _MfgOrderOperationBasic | ManufacturingOrder | Order | |
| ManufacturingOrderText | ||||
| ProductionOrderOpActyVers | ProductionOrderOpActyVers | |||
| Batch | Batch | Lot No. | ||
| DefectiveSingleUnit | DefectiveSingleUnit | |||
| ProductionOrder | ProductionOrder | Order | ||
| OrderInternalID | OrderInternalID | Plan No.f.Oper. | ||
| CreationTime | CreationTime | Time of Change | ||
| LastChangeTime | LastChangeTime | Time changed | ||
| DefectClass | DefectClass | Defect Class | ||
| NumberOfDefects | NumberOfDefects | |||
| InspPlanOperationInternalID | InspPlanOperationInternalID | |||
| InspectionCharacteristic | InspectionCharacteristic | |||
| InspectionSubsetInternalID | InspectionSubsetInternalID | |||
| MaterialSample | MaterialSample | |||
| WorkCenterTypeCode | WorkCenterTypeCode | Object Type | ||
| MainWorkCenterInternalID | MainWorkCenterInternalID | Work Center | ||
| MainWorkCenterPlant | MainWorkCenterPlant | Plnt WorkCenter | ||
| MainWorkCenter | MainWorkCenter | Work Center | ||
| Equipment | Equipment | Equipment check | ||
| FunctionalLocation | FunctionalLocation | Object ID | ||
| DefectOrigin | DefectOrigin | |||
| Material | Material | Vehicle Model | ||
| Plant | Plant | Valuation Area | ||
| InspectionLot | InspectionLot | Inspection Lot | ||
| CatalogProfile | CatalogProfile | Catalog Profile | ||
| ChangedDateTime | ChangedDateTime | Time Stamp | ||
| DefectLifecycleStatus | DefectLifecycleStatus | |||
| DefectLifecycleStatusText | ||||
| ProblemAnalysisStatus | ProblemAnalysisStatus | |||
| QualityIssueReference | QualityIssueReference | Reference Number | ||
| MasterLanguage | MasterLanguage | Primary lang. | ||
| _DefectCodeText | _DefectCodeText | |||
| _DefectDecision | _DefectDecision | |||
| _DefectStatus | _DefectStatus | |||
| _InspectionLot | _InspectionLot | |||
| _InspectionSubset | _InspectionSubset | |||
| _MaterialText | _MaterialText | |||
| _MfgActionReasonCode | _MfgActionReasonCode | |||
| _MfgOrderOperation | _MfgOrderOperation | |||
| _OpActyInstceOpActyNtwkElmnt | _OpActyInstceOpActyNtwkElmnt | |||
| _OperationActivityText | _OperationActivityText | |||
| _ReworkBOOVersionDefectCode | _ReworkBOOVersionDefectCode | |||
| _ShopFloorItem | _ShopFloorItem |
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_MfgOrderDefectForSituations.
-- 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: IMFGDEFECTSIT
CREATE VIEW I_MfgOrderDefectForSituations AS
SELECT
DefectInternalID,
_Equip.SerialNumber AS SerialNumber,
Defect.Defect AS Defect,
DefectCategory,
CreatedByUser,
CreationDate,
LastChangedByUser,
LastChangeDate,
DefectText,
DefectCodeCatalog,
DefectCodeGroup,
DefectCode,
DefectCodeVersion,
DefectObjectCodeCatalog,
DefectObjectCodeGroup,
DefectObjectCode,
DefectObjectCodeVersion,
DefectCauseCodeCatalog,
DefectCauseCodeGroup,
DefectCauseCode,
DefectCauseCodeVersion,
DefectiveQuantityUnit,
ProductionOrderOperationActy,
_OpActyInstceNtwkElmntBasic.OpActyNtwkElementExternalID AS OpActyNtwkElementExternalID,
_OpActyInstceNtwkElmntBasic.OpActyNtwkInstance AS OpActyNtwkInstance,
_OpActyInstceNtwkElmntBasic.OpActyNtwkElement AS OpActyNtwkElement,
_MfgOrderOperationBasic.ManufacturingOrderOperation AS ManufacturingOrderOperation,
_MfgOrderOperationBasic.MfgOrderOperationText AS MfgOrderOperationText,
_MfgOrderOperationBasic.ManufacturingOrder AS ManufacturingOrder,
_MfgOrderOperationBasic._MfgOrder.ManufacturingOrderText AS ManufacturingOrderText,
ProductionOrderOpActyVers,
Batch,
DefectiveSingleUnit,
ProductionOrder,
OrderInternalID,
CreationTime,
LastChangeTime,
DefectClass,
NumberOfDefects,
InspPlanOperationInternalID,
InspectionCharacteristic,
InspectionSubsetInternalID,
MaterialSample,
WorkCenterTypeCode,
MainWorkCenterInternalID,
MainWorkCenterPlant,
MainWorkCenter,
Equipment,
FunctionalLocation,
DefectOrigin,
Material,
Plant,
InspectionLot,
CatalogProfile,
ChangedDateTime,
DefectLifecycleStatus,
cast(LOWER(_DefectStatus._DefectStatusText[1:Language = $session.system_language].DefectLifecycleStatusText) as char40) AS DefectLifecycleStatusText,
ProblemAnalysisStatus,
QualityIssueReference,
MasterLanguage
FROM I_Defect AS Defect
LEFT OUTER JOIN I_SitnInstceIndicator AS _SitnInstceIndicator ON _SitnInstceIndicator.SitnInstceAnchorObjectKey = Defect AND _SitnInstceIndicator.SitnDefAnchorObject = 'Defect' -- association [0..1]
LEFT OUTER JOIN I_Equipment AS _Equip ON Defect.Equipment = _Equip.Equipment -- association [0..1]
LEFT OUTER JOIN I_InspectionSubset AS _InspectionSubset ON _InspectionSubset.InspectionLot = InspectionLot AND _InspectionSubset.InspPlanOperationInternalID = InspPlanOperationInternalID AND _InspectionSubset.InspectionSubsetInternalID = InspectionSubsetInternalID -- association [0..1]
LEFT OUTER JOIN I_ShopFloorItem AS _ShopFloorItem ON Defect.Material = _ShopFloorItem.Material AND serialnumber = _ShopFloorItem.SerialNumber -- association [0..1]
LEFT OUTER JOIN I_MfgOrdDefectDecision AS _DefectDecision ON _DefectDecision.Notification = DefectInternalID AND _DefectDecision.NotificationItem = '0000' -- 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 I_OpActyInstceOpActyNtwkElmnt AS _OpActyInstceOpActyNtwkElmnt ON _OpActyInstceOpActyNtwkElmnt.ManufacturingOrder = ProductionOrder AND _OpActyInstceOpActyNtwkElmnt.OrderOperationInternalID = InspPlanOperationInternalID AND _OpActyInstceOpActyNtwkElmnt.OperationActivity = ProductionOrderOperationActy AND _OpActyInstceOpActyNtwkElmnt.OperationActyVersionCounter = ProductionOrderOpActyVers -- association [1..1]
LEFT OUTER JOIN I_OpActyInstceNtwkElmntBasic AS _OpActyInstceNtwkElmntBasic ON _OpActyInstceNtwkElmntBasic.ManufacturingOrder = ProductionOrder AND _OpActyInstceNtwkElmntBasic.OrderOperationInternalID = InspPlanOperationInternalID AND _OpActyInstceNtwkElmntBasic.OperationActivity = ProductionOrderOperationActy AND _OpActyInstceNtwkElmntBasic.OperationActyVersionCounter = ProductionOrderOpActyVers -- association [1..1]
LEFT OUTER JOIN I_MfgActionReasonCode AS _MfgActionReasonCode ON _MfgActionReasonCode.MfgActionReasonCodeGroupCtlg = DefectCodeCatalog AND _MfgActionReasonCode.MfgActionReasonCodeGroup = DefectCodeGroup AND _MfgActionReasonCode.ManufacturingActionReasonCode = DefectCode AND _MfgActionReasonCode.Version = DefectCodeVersion -- association [0..1]
LEFT OUTER JOIN I_DefectCodeText AS _DefectCodeText ON DefectCodeGroup = _DefectCodeText.DefectCodeGroup AND DefectCode = _DefectCodeText.DefectCode AND _DefectCodeText.Language = $session.system_language -- association [0..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.MaterialName -- association [0..*]
;
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