I_DEFECT_TP

CDS View

Defect

I_DEFECT_TP is a CDS View in S/4HANA. Defect. It contains 67 fields. 10 CDS views read from this table.

CDS Views using this table (10)

ViewTypeJoinVDMDescription
A_Defect view_entity from CONSUMPTION Defects
C_DefectMngDefectsForTransfer view from CONSUMPTION Defects for Transfer
C_DefectRecord view from CONSUMPTION Record Defect
C_MfgExecDefectRecord view from CONSUMPTION View with UI attributes for defect
C_MfgOrderDefectRecord view from CONSUMPTION Consumption view for defect
C_QltyTaskProcessDefectInfo view from CONSUMPTION Defect Information for Quality Task
C_QltyTskDefectMng view inner CONSUMPTION Quality Task Defect Fields View
C_SFIMfgDefectDcsnScrap view inner CONSUMPTION View for SFI with decision Scrap
I_DefectUnion view from COMPOSITE Defects and Quality Notification Items
I_DefectUnion view union COMPOSITE Defects and Quality Notification Items

Fields (67)

KeyField CDS FieldsUsed in Views
KEY DefectInternalID DefectInternalID 4
_Plant _Plant 1
Batch Batch 3
BOMItemInstanceUUID BOMItemInstanceUUID 2
CatalogProfile CatalogProfile 1
ChangedDateTime ChangedDateTime 1
CostCenter CostCenter 1
CreatedByUser CreatedByUser 2
CreationDate CreationDate 2
CreationTime CreationTime 2
Defect Defect 1
DefectCategory DefectCategory 3
DefectCauseCode DefectCauseCode 1
DefectCauseCodeCatalog DefectCauseCodeCatalog 1
DefectCauseCodeGroup DefectCauseCodeGroup 1
DefectCauseCodeVersion DefectCauseCodeVersion 1
DefectCausedBy DefectCausedBy 1
DefectClass DefectClass 2
DefectCode DefectCode 2
DefectCodeCatalog DefectCodeCatalog 2
DefectCodeGroup DefectCodeGroup 2
DefectCodeVersion DefectCodeVersion 1
DefectConfigurationValue DefectConfigurationValue 1
DefectIsCreatedAutomatically DefectIsCreatedAutomatically 1
DefectiveQuantity DefectiveQuantity 2
DefectiveQuantityUnit DefectiveQuantityUnit 2
DefectiveSingleUnit DefectiveSingleUnit,SerialNumber 2
DefectLifecycleStatus DefectLifecycleStatus 2
DefectObjectCode DefectLocationCode 1
DefectObjectCodeCatalog DefectLocationCatalog 1
DefectObjectCodeGroup DefectLocationCodeGroup 1
DefectOrigin DefectOrigin 1
DefectText DefectText 1
Equipment Equipment 1
FunctionalLocation FunctionalLocation 1
InspectionCharacteristic InspectionCharacteristic 2
InspectionLot InspectionLot 2
InspectionSubsetInternalID InspectionSubsetInternalID 2
InspPlanOperationInternalID InspPlanOperationInternalID 2
IsDeleted IsDeleted 2
LastChangeDate LastChangeDate 2
LastChangedByUser LastChangedByUser 2
LastChangeTime LastChangeTime 2
MainWorkCenter MainWorkCenter 3
MainWorkCenterInternalID MainWorkCenterInternalID 3
MainWorkCenterPlant MainWorkCenterPlant 3
MasterLanguage MasterLanguage 2
Material Material 3
MaterialSample MaterialSample 2
NumberOfDefects NumberOfDefects 2
OrderInternalID OrderInternalID 1
Plant Plant 4
ProblemAnalysisStatus ProblemAnalysisStatus 2
ProducedMaterial ProducedMaterial 2
ProducedSerialNumber ProducedSerialNumber 2
ProductionOrder ProductionOrder 1
ProductionOrderOpActyVers ProductionOrderOpActyVers 1
ProductionOrderOperation ProductionOrderOperation 1
ProductionOrderOperationActy ProductionOrderOperationActy 1
ProductionSupplyArea ProductionSupplyArea 1
QualityIssueReference QualityIssueReference 2
SourceStorageBin SourceStorageBin 1
StorageLocation StorageLocation 1
StorageType StorageType 1
Warehouse Warehouse 1
WarehouseLogicalSystem WarehouseLogicalSystem 1
WorkCenterTypeCode WorkCenterTypeCode 3
@AbapCatalog.sqlViewName: 'IDEFECTTP'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter:true 
@EndUserText.label: 'Defect'
@VDM: {
    viewType: #TRANSACTIONAL,
    lifecycle.contract.type: #SAP_INTERNAL_API
}
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.privilegedAssociations:  [ '_CreatedByUserContactCard', '_LastChangedByUserContactCard' ] 
@ObjectModel: {
    usageType: {
        dataClass: #TRANSACTIONAL,
        sizeCategory: #L, 
        serviceQuality: #B },
    representativeKey: 'DefectInternalID',
    semanticKey:  [ 'Defect' ],
    sapObjectNodeType.name: 'Defect',
// Begin Draft 2.0

    compositionRoot: true,
    createEnabled: 'EXTERNAL_CALCULATION',
    updateEnabled: 'EXTERNAL_CALCULATION',
    deleteEnabled: true,
    transactionalProcessingEnabled: true,
    draftEnabled: true,
    writeDraftPersistence: 'QDEFECT_D',
    writeActivePersistence: 'V_DEF_BO2ACT',
    entityChangeStateId: 'ChangedDateTime',
    lifecycle.enqueue: {
        expiryBehavior: #RELATIVE_TO_LAST_CHANGE,  // Default #RELATIVE_TO_LAST_CHANGE

        expiryInterval: 'PT15M'                    // Default 'PT15M'

    },
    lifecycle.processing: {
        expiryBehavior: #RELATIVE_TO_LAST_CHANGE,  // Default #RELATIVE_TO_LAST_CHANGE

        expiryInterval: 'PT30M'                    // Default 'PT30M'

    }
// End Draft 2.0 

}

define view I_Defect_TP as select from I_Defect as _Defect
    association [0..1] to tqdefectconfig as _DefectConfiguration on _Defect.DefectInternalID = _DefectConfiguration.defectinternalid
    
    association [0..1] to I_DefectCodeGroup     as _DefectCodeGroup             on  $projection.DefectCodeGroup   = _DefectCodeGroup.DefectCodeGroup
    association [0..1] to I_DefectCode          as _DefectCode                  on  $projection.DefectCodeGroup   = _DefectCode.DefectCodeGroup
                                                                               and $projection.DefectCode        = _DefectCode.DefectCode  

    association [0..1] to I_Inspectioncatalog    as _DefectCauseCodeCatalog    on $projection.DefectCauseCodeCatalog  = _DefectCauseCodeCatalog.InspectionCatalog
    association [0..1] to I_DefectCauseCodeGroup as _DefectCauseCodeGroup      on $projection.DefectCauseCodeGroup    = _DefectCauseCodeGroup.DefectCauseCodeGroup
    association [0..1] to I_DefectCauseCode      as _DefectCauseCode           on $projection.DefectCauseCodeGroup    = _DefectCauseCode.DefectCauseCodeGroup
                                                                              and $projection.DefectCauseCode         = _DefectCauseCode.DefectCauseCode
                                                                               
    association [0..1] to I_Inspectioncatalog   as _DefectObjectCodeCatalog     on  $projection.DefectObjectCodeCatalog      = _DefectObjectCodeCatalog.InspectionCatalog
    association [0..1] to I_InspectionCodeGroup as _DefectObjectPartCodeGroup   on  $projection.DefectObjectCodeCatalog      = _DefectObjectPartCodeGroup.InspectionCatalog
                                                                               and $projection.DefectObjectCodeGroup    = _DefectObjectPartCodeGroup.InspectionCodeGroup
    association [0..1] to I_InspectionCode      as _DefectObjectCode            on  $projection.DefectObjectCodeCatalog      = _DefectObjectCode.InspectionCatalog
                                                                               and $projection.DefectObjectCodeGroup    = _DefectObjectCode.InspectionCodeGroup
                                                                               and $projection.DefectObjectCode             = _DefectObjectCode.InspectionCode                                                                               
   
    association [0..1] to I_DefectStatus            as _DefectStatus           on $projection.DefectLifecycleStatus = _DefectStatus.DefectLifecycleStatus
    association [0..1] to I_ProblemAnalysisStatus   as _ProblemAnalysisStatus  on $projection.ProblemAnalysisStatus = _ProblemAnalysisStatus.ProblemAnalysisStatus
                
    // Deprecated:

    association [0..1] to I_EWM_WarehouseNumber     as _EWM_WarehouseNumber    on $projection.Warehouse = _EWM_WarehouseNumber.Warehouse
       
    association [0..1] to I_EWM_StorageType         as _EWM_StorageType        on $projection.Warehouse = _EWM_StorageType.Warehouse 
                                                                               and $projection.StorageType = _EWM_StorageType.StorageType
    association [0..1] to I_EWM_StorageBin          as _EWM_StorageBin         on $projection.Warehouse = _EWM_StorageBin.Warehouse 
                                                                               and $projection.SourceStorageBin = _EWM_StorageBin.StorageBin
                              
    // Copied from I_NotificationItem; should no longer be used 

    association [0..1] to I_UnitOfMeasure           as _DefectiveQtyUnitOfMeasure    on  $projection.DefectiveQuantityUnit = _DefectiveQtyUnitOfMeasure.UnitOfMeasure
                                                                                                                                        
    // Production Order and Order Operation ("Production" means all data record with 'ManufacturingOrderCategory' = '10' from this data source)

    association [0..1] to I_OrderOperationBasic     as _ProductionOrderOperation on  $projection.OrderInternalID = _ProductionOrderOperation.OrderInternalID
                                                                                 and $projection.InspPlanOperationInternalID = _ProductionOrderOperation.OrderOperationInternalID 
        
    //Association to child nodes (composition)

    association [0..*] to I_DefectLongTextTP        as _DefectLongTextTP       on $projection.DefectInternalID  = _DefectLongTextTP.DefectInternalID                                                                        
    association [0..*] to I_DefectAffectedObjectTP  as _DefectAffectedObjectTP on $projection.DefectInternalID  = _DefectAffectedObjectTP.DefectInternalID
    
    //Association to child nodes (specialization)

    association [0..*] to I_DefectLongTextTP        as _DefectDetailedDescription on  $projection.DefectInternalID  = _DefectDetailedDescription.DefectInternalID
                                                                                  and _DefectDetailedDescription.LongTextID = 'LTXT'
                                                                                  
    //Extension

    association [1..1] to E_NotificationItem        as _Extension              on  $projection.DefectInternalID = _Extension.Notification and
                                                                                   _Extension.NotificationItem = '0000'

{
       @UI.hidden: true
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
      key _Defect.DefectInternalID,
      //  key  _Defect.NotificationItem,  // Not necessary !? --> No

   
       @ObjectModel.readOnly: true
       _Defect.Defect,

       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectCategory, 
       @ObjectModel.readOnly: true 
       _Defect.CreatedByUser, 
       @ObjectModel.readOnly: true 
       _Defect.CreationDate,
       @ObjectModel.readOnly: true 
       _Defect.LastChangedByUser,
       @ObjectModel.readOnly: true 
       _Defect.LastChangeDate,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       @EndUserText: { label: 'Defect Description', quickInfo: 'Defect Description' }
       _Defect.DefectText,  
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectCodeCatalog, 
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectCodeGroup' }
       _Defect.DefectCodeGroup, 
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectCode' }
       _Defect.DefectCode, 
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectCodeVersion,
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectObjectCodeCatalog'}
       _Defect.DefectObjectCodeCatalog,
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectObjectPartCodeGroup'}
       _Defect.DefectObjectCodeGroup,
       @ObjectModel: {readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectObjectCode'}
       _Defect.DefectObjectCode,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectObjectCodeVersion,       
       
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectCauseCodeCatalog' }
       _Defect.DefectCauseCodeCatalog,
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectCauseCodeGroup' }
       _Defect.DefectCauseCodeGroup,
       @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' , foreignKey.association: '_DefectCauseCode' }
       _Defect.DefectCauseCode,    
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectCauseCodeVersion,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.DefectiveQuantity,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectiveQuantityUnit,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.DefectIsCreatedAutomatically,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.ProductionOrderOperationActy,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.ProductionOrderOpActyVers,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.Batch,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectiveSingleUnit,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.ProductionOrder,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.OrderInternalID,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       @EndUserText: { label: 'Production Order Operation', quickInfo: 'Number of Production Order Operation' }
       _ProductionOrderOperation.Operation as ProductionOrderOperation, // External operation number

       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _ProductionOrderOperation.Sequence as ProductionOrderSequence, // Sequence of operation

       
       @ObjectModel.readOnly: true 
       @Semantics.time: true
       _Defect.CreationTime,
       @ObjectModel.readOnly: true 
       @Semantics.time: true
       _Defect.LastChangeTime,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.DefectClass,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.NumberOfDefects,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.InspPlanOperationInternalID,  
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.InspectionCharacteristic, 
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.InspectionSubsetInternalID, 
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.MaterialSample, 

//     Work center data

       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.WorkCenterTypeCode, 
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.MainWorkCenterInternalID, 
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.MainWorkCenterPlant,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.MainWorkCenter,           //External id, required for auth. check



       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.Equipment,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.FunctionalLocation,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.IsDeleted,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.DefectOrigin,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'        
       _Defect.Material,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'        
       _Defect.Plant,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'        
       _Defect.StorageLocation,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.InspectionLot, 
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION' 
       _Defect.CatalogProfile, 
       @ObjectModel.readOnly: true 
       _Defect.ChangedDateTime,
       
       @ObjectModel:    {   foreignKey.association: '_DefectStatus',
                            readOnly: 'EXTERNAL_CALCULATION'
       }
       DefectLifecycleStatus,
       @ObjectModel:    {   foreignKey.association: '_DefectArchivingStatus',
                            readOnly: true 
       }
       DefectArchivingStatus,
       @ObjectModel:    {   foreignKey.association: '_ProblemAnalysisStatus',
                            readOnly: 'EXTERNAL_CALCULATION'
       }
       ProblemAnalysisStatus,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       QualityIssueReference,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       MasterLanguage,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       DefectUUID,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.ProductionSupplyArea,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       @ObjectModel.foreignKey.association: '_EWM_WarehouseNumber_2'
       _Defect.EWMWarehouse as Warehouse,
       @ObjectModel.readOnly: true
       @ObjectModel.foreignKey.association: '_EWM_SourceStorageType'
       _Defect.SourceStorageType as StorageType,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       @ObjectModel.foreignKey.association: '_EWM_SourceStorageBin'
       _Defect.SourceStorageBin,
       @ObjectModel.readOnly: true
       _Defect.WarehouseLogicalSystem,
    
       @ObjectModel.readOnly: true
        _DefectConfiguration.defectconfigurationvalue as DefectConfigurationValue,
       
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.DefectCausedBy,
       
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.CostCenter,
       
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.BOMItemInstanceUUID,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.ProducedMaterial,
       @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
       _Defect.ProducedSerialNumber,    
      
       /* Associations */
       _Defect._CatalogProfile, 
       _Defect._DefectCategory, 
       _DefectCode, 
       _Defect._DefectCodeCatalog, 
       _DefectCodeGroup, 
       _Defect._InspectionLot,
       @VDM.lifecycle: { status: #DEPRECATED, successor: '_DefectiveQuantityUnit' }
       _DefectiveQtyUnitOfMeasure,
       _Defect._DefectiveQuantityUnit,
//       _Defect._Notification,  // Do not use, because Defect has no foreignKey relation to I_Notification! 

       _DefectObjectCodeCatalog, 
       _DefectObjectPartCodeGroup, 
       _DefectObjectCode,
       _DefectStatus,
       _Defect._DefectArchivingStatus,
       _ProblemAnalysisStatus,
       _Product,
       _ProducedMaterial,
       _Plant,
       _StorageLocation,
       _DefectClass, 
       _CreatedByUserContactCard,
       _LastChangedByUserContactCard, 
       _DefectCauseCodeCatalog,
       _DefectCauseCodeGroup,
       _DefectCauseCode,
       _ProductionSupplyArea,
       _EWM_WarehouseNumber_2,
       @VDM.lifecycle: { status: #DEPRECATED, successor: '_EWM_WarehouseNumber_2' }
       _EWM_WarehouseNumber,
       _EWM_SourceStorageType,
       @VDM.lifecycle: { status: #DEPRECATED, successor: '_EWM_SourceStorageType' }
       _EWM_StorageType,
       _EWM_SourceStorageBin,
       @VDM.lifecycle: { status: #DEPRECATED, successor: '_EWM_SourceStorageBin' }
       _EWM_StorageBin,
       _DefectCausedBy,
       
       @ObjectModel.association.type:  [ #TO_COMPOSITION_CHILD  ] 
       _DefectLongTextTP,
       @ObjectModel.association.type:  [ #TO_COMPOSITION_CHILD  ]
       _DefectAffectedObjectTP,
       
       // Specialization for 'Detailed Description'

       _DefectDetailedDescription
          
}