C_MfgOrderDefectRecord

DDL: C_MFGORDERDEFECTRECORD SQL: CMFGORDDEFREC Type: view CONSUMPTION

Consumption view for defect

C_MfgOrderDefectRecord is a Consumption CDS View that provides data about "Consumption view for defect" in SAP S/4HANA. It reads from 1 data source (I_Defect_TP) and exposes 86 fields with key field DefectInternalID. It has 16 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_Defect_TP Defect from

Associations (16)

CardinalityTargetAliasCondition
[0..1] I_NotificationItem _NotificationItem _NotificationItem.ReferencedDefect = Defect.DefectInternalID and _NotificationItem.IsDeleted = ''
[0..1] I_SitnInstceIndicator _Sitn _Sitn.SitnInstceAnchorObjectKey = $projection.Defect and _Sitn.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'
[0..*] I_DefectLongTextTP _DefectLongTextTP $projection.DefectInternalID = _DefectLongTextTP.DefectInternalID
[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 (22)

NameValueLevelField
AbapCatalog.sqlViewName CMFGORDDEFREC view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK 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.compositionRoot true view
ObjectModel.transactionalProcessingDelegated true view
ObjectModel.draftEnabled true view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled EXTERNAL_CALCULATION 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 Consumption view for defect view

Fields (86)

KeyFieldSource TableSource FieldDescription
KEY DefectInternalID I_Defect_TP DefectInternalID Internal Defect ID
SerialNumber _Equip SerialNumber Serial Number
Defect Defect
DefectCategory I_Defect_TP DefectCategory
CreatedByUser I_Defect_TP CreatedByUser User Name
CreationDate I_Defect_TP CreationDate Time Stamp
LastChangedByUser I_Defect_TP LastChangedByUser User Name
LastChangeDate I_Defect_TP LastChangeDate Time Stamp
DefectText DefectText
DefectCodeCatalog I_Defect_TP DefectCodeCatalog
DefectCodeGroup I_Defect_TP DefectCodeGroup Code Group
DefectCode I_Defect_TP DefectCode Damage Code
DefectCodeVersion I_Defect_TP DefectCodeVersion
DefectObjectCodeCatalog DefectObjectCodeCatalog
DefectObjectCodeGroup DefectObjectCodeGroup
DefectObjectCode DefectObjectCode
DefectObjectCodeVersion DefectObjectCodeVersion
DefectCauseCodeCatalog I_Defect_TP DefectCauseCodeCatalog
DefectCauseCodeGroup I_Defect_TP DefectCauseCodeGroup
DefectCauseCode I_Defect_TP DefectCauseCode
DefectCauseCodeVersion I_Defect_TP DefectCauseCodeVersion
DefectiveQuantity I_Defect_TP DefectiveQuantity
DefectiveQuantityUnit I_Defect_TP DefectiveQuantityUnit
DefectIsCreatedAutomatically I_Defect_TP DefectIsCreatedAutomatically
ProductionOrderOperationActy I_Defect_TP ProductionOrderOperationActy
OpActyNtwkElementExternalID _OpActyInstceNtwkElmntBasic OpActyNtwkElementExternalID Op. Activity
OpActyNtwkInstance _OpActyInstceNtwkElmntBasic OpActyNtwkInstance Instance ID
OpActyNtwkElement _OpActyInstceNtwkElmntBasic OpActyNtwkElement Element Number
ManufacturingOrderOperation
MfgOrderOperationText _MfgOrderOperationBasic MfgOrderOperationText
ManufacturingOrder _MfgOrderOperationBasic ManufacturingOrder Order
ManufacturingOrderText
ProductionOrderOpActyVers I_Defect_TP ProductionOrderOpActyVers
Batch I_Defect_TP Batch Lot No.
DefectiveSingleUnit I_Defect_TP DefectiveSingleUnit
ProductionOrder I_Defect_TP ProductionOrder Order
OrderInternalID I_Defect_TP OrderInternalID Plan No.f.Oper.
CreationTime I_Defect_TP CreationTime Time of Change
LastChangeTime I_Defect_TP LastChangeTime Time changed
DefectClass I_Defect_TP DefectClass Defect Class
NumberOfDefects I_Defect_TP NumberOfDefects
InspPlanOperationInternalID I_Defect_TP InspPlanOperationInternalID
InspectionCharacteristic I_Defect_TP InspectionCharacteristic
InspectionSubsetInternalID I_Defect_TP InspectionSubsetInternalID
MaterialSample I_Defect_TP MaterialSample
WorkCenterTypeCode I_Defect_TP WorkCenterTypeCode Object Type
MainWorkCenterInternalID I_Defect_TP MainWorkCenterInternalID Work Center
MainWorkCenterPlant I_Defect_TP MainWorkCenterPlant Plnt WorkCenter
MainWorkCenter I_Defect_TP MainWorkCenter Work Center
Equipment I_Defect_TP Equipment Equipment check
FunctionalLocation I_Defect_TP FunctionalLocation Object ID
IsDeleted I_Defect_TP IsDeleted TRUE
DefectOrigin I_Defect_TP DefectOrigin
Material I_Defect_TP Material Vehicle Model
Plant I_Defect_TP Plant Valuation Area
InspectionLot I_Defect_TP InspectionLot Inspection Lot
CatalogProfile I_Defect_TP CatalogProfile Catalog Profile
ChangedDateTime I_Defect_TP ChangedDateTime Time Stamp
DefectLifecycleStatus I_Defect_TP DefectLifecycleStatus
DefectLifecycleStatusText
ProblemAnalysisStatus I_Defect_TP ProblemAnalysisStatus
QualityIssueReference I_Defect_TP QualityIssueReference Reference Number
MasterLanguage I_Defect_TP MasterLanguage Primary lang.
Notification _NotificationItem Notification Notification
NotificationText
NotificationItem _NotificationItem NotificationItem Notification Item
MfgDefectDecision _DefectDecision MfgDefectDecision Decision
MfgDefectDecisionName
SitnNumberOfInstances _Sitn SitnNumberOfInstances
BOMItemInstanceUUID I_Defect_TP BOMItemInstanceUUID
ProducedMaterial I_Defect_TP ProducedMaterial
ProducedSerialNumber I_Defect_TP ProducedSerialNumber
_DefectLongTextTP _DefectLongTextTP
_DefectStatus _DefectStatus
_DefectCodeText _DefectCodeText
_InspectionLot _InspectionLot
_ShopFloorItem _ShopFloorItem
_InspectionSubset _InspectionSubset
_DefectDecision _DefectDecision
_MfgOrderOperation _MfgOrderOperation
_OperationActivityText _OperationActivityText
_MaterialText _MaterialText
_OpActyInstceOpActyNtwkElmnt _OpActyInstceOpActyNtwkElmnt
_MfgActionReasonCode _MfgActionReasonCode
_ReworkBOOVersionDefectCode _ReworkBOOVersionDefectCode
_NotificationItem _NotificationItem

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_MfgOrderDefectRecord.
-- 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: CMFGORDDEFREC

CREATE VIEW C_MfgOrderDefectRecord AS
SELECT
  Defect.DefectInternalID AS DefectInternalID,
  _Equip.SerialNumber AS SerialNumber,
  Defect,
  Defect.DefectCategory AS DefectCategory,
  Defect.CreatedByUser AS CreatedByUser,
  Defect.CreationDate AS CreationDate,
  Defect.LastChangedByUser AS LastChangedByUser,
  Defect.LastChangeDate AS LastChangeDate,
  DefectText,
  Defect.DefectCodeCatalog AS DefectCodeCatalog,
  Defect.DefectCodeGroup AS DefectCodeGroup,
  Defect.DefectCode AS DefectCode,
  Defect.DefectCodeVersion AS DefectCodeVersion,
  DefectObjectCodeCatalog,
  DefectObjectCodeGroup,
  DefectObjectCode,
  DefectObjectCodeVersion,
  Defect.DefectCauseCodeCatalog AS DefectCauseCodeCatalog,
  Defect.DefectCauseCodeGroup AS DefectCauseCodeGroup,
  Defect.DefectCauseCode AS DefectCauseCode,
  Defect.DefectCauseCodeVersion AS DefectCauseCodeVersion,
  Defect.DefectiveQuantity AS DefectiveQuantity,
  Defect.DefectiveQuantityUnit AS DefectiveQuantityUnit,
  Defect.DefectIsCreatedAutomatically AS DefectIsCreatedAutomatically,
  Defect.ProductionOrderOperationActy AS ProductionOrderOperationActy,
  _OpActyInstceNtwkElmntBasic.OpActyNtwkElementExternalID AS OpActyNtwkElementExternalID,
  _OpActyInstceNtwkElmntBasic.OpActyNtwkInstance AS OpActyNtwkInstance,
  _OpActyInstceNtwkElmntBasic.OpActyNtwkElement AS OpActyNtwkElement,
  cast(_MfgOrderOperationBasic.ManufacturingOrderOperation as manufacturingorderoperation preserving type) AS ManufacturingOrderOperation,
  _MfgOrderOperationBasic.MfgOrderOperationText AS MfgOrderOperationText,
  _MfgOrderOperationBasic.ManufacturingOrder AS ManufacturingOrder,
  _MfgOrderOperationBasic._MfgOrder.ManufacturingOrderText AS ManufacturingOrderText,
  Defect.ProductionOrderOpActyVers AS ProductionOrderOpActyVers,
  Defect.Batch AS Batch,
  Defect.DefectiveSingleUnit AS DefectiveSingleUnit,
  Defect.ProductionOrder AS ProductionOrder,
  Defect.OrderInternalID AS OrderInternalID,
  Defect.CreationTime AS CreationTime,
  Defect.LastChangeTime AS LastChangeTime,
  Defect.DefectClass AS DefectClass,
  Defect.NumberOfDefects AS NumberOfDefects,
  Defect.InspPlanOperationInternalID AS InspPlanOperationInternalID,
  Defect.InspectionCharacteristic AS InspectionCharacteristic,
  Defect.InspectionSubsetInternalID AS InspectionSubsetInternalID,
  Defect.MaterialSample AS MaterialSample,
  Defect.WorkCenterTypeCode AS WorkCenterTypeCode,
  Defect.MainWorkCenterInternalID AS MainWorkCenterInternalID,
  Defect.MainWorkCenterPlant AS MainWorkCenterPlant,
  Defect.MainWorkCenter AS MainWorkCenter,
  Defect.Equipment AS Equipment,
  Defect.FunctionalLocation AS FunctionalLocation,
  Defect.IsDeleted AS IsDeleted,
  Defect.DefectOrigin AS DefectOrigin,
  Defect.Material AS Material,
  Defect.Plant AS Plant,
  Defect.InspectionLot AS InspectionLot,
  Defect.CatalogProfile AS CatalogProfile,
  Defect.ChangedDateTime AS ChangedDateTime,
  Defect.DefectLifecycleStatus AS DefectLifecycleStatus,
  _DefectStatus._DefectStatusText[1: Language=$session.system_language].DefectLifecycleStatusText AS DefectLifecycleStatusText,
  Defect.ProblemAnalysisStatus AS ProblemAnalysisStatus,
  Defect.QualityIssueReference AS QualityIssueReference,
  Defect.MasterLanguage AS MasterLanguage,
  _NotificationItem.Notification AS Notification,
  _NotificationItem._Notification.NotificationText AS NotificationText,
  _NotificationItem.NotificationItem AS NotificationItem,
  _DefectDecision.MfgDefectDecision AS MfgDefectDecision,
  _DefectDecision._DefectDecisionVH._Text[1: Language=$session.system_language].MfgDefectDecisionName AS MfgDefectDecisionName,
  _Sitn.SitnNumberOfInstances AS SitnNumberOfInstances,
  Defect.BOMItemInstanceUUID AS BOMItemInstanceUUID,
  Defect.ProducedMaterial AS ProducedMaterial,
  Defect.ProducedSerialNumber AS ProducedSerialNumber
FROM I_Defect_TP AS Defect
LEFT OUTER JOIN I_NotificationItem AS _NotificationItem ON _NotificationItem.ReferencedDefect = Defect.DefectInternalID AND _NotificationItem.IsDeleted = ''  -- association [0..1]
LEFT OUTER JOIN I_SitnInstceIndicator AS _Sitn ON _Sitn.SitnInstceAnchorObjectKey = Defect AND _Sitn.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_DefectLongTextTP AS _DefectLongTextTP ON DefectInternalID = _DefectLongTextTP.DefectInternalID  -- association [0..*]
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..*]
;