C_Defect

DDL: C_DEFECT SQL: CDEFECT Type: view CONSUMPTION

Defect Consumption View

C_Defect is a Consumption CDS View that provides data about "Defect Consumption View" in SAP S/4HANA. It reads from 1 data source (I_QualityDefectUnion) and exposes 19 fields with key fields DefectInternalID, NotificationItem.

Data Sources (1)

SourceAliasJoin Type
I_QualityDefectUnion I_QualityDefectUnion from

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName CDEFECT view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Defect Consumption View view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #B view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY DefectInternalID I_QualityDefectUnion Notification
KEY NotificationItem I_QualityDefectUnion NotificationItem
Defect
DefectCodeGroup I_QualityDefectUnion DefectCodeGroup
DefectCode I_QualityDefectUnion DefectCode
NumberOfDefects I_QualityDefectUnion NumberOfDefects
InspPlanOperationInternalID I_QualityDefectUnion InspPlanOperationInternalID
InspectionCharacteristic I_QualityDefectUnion InspectionCharacteristic
InspectionLot I_QualityDefectUnion InspectionLot
Plant I_QualityDefectUnion Plant
InspectionLotSum
DefectCategory I_QualityDefectUnion DefectCategory
WorkCenterTypeCode I_QualityDefectUnion WorkCenterTypeCode
MainWorkCenterInternalID I_QualityDefectUnion MainWorkCenterInternalID
MainWorkCenter I_QualityDefectUnion MainWorkCenter
MainWorkCenterPlant I_QualityDefectUnion MainWorkCenterPlant
_InspectionLot I_QualityDefectUnion _InspectionLot
_DefectCode _DefectCode
_DefectCodeGroup _DefectCodeGroup
@AbapCatalog.sqlViewName: 'CDEFECT'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Defect Consumption View'
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType: 
{
        dataClass: #TRANSACTIONAL,
        sizeCategory: #S, 
        serviceQuality: #B }
        
define view C_Defect as select from I_QualityDefectUnion 
{
       @UI.hidden: true
       @ObjectModel.readOnly:true
       key I_QualityDefectUnion.Notification as DefectInternalID,
   
       @ObjectModel.readOnly:true
       key I_QualityDefectUnion.NotificationItem,
       
       @ObjectModel.readOnly: true
        cast( substring(I_QualityDefectUnion.Notification,2,11) as qdefectid preserving type ) as Defect,
       
      //--[ GENERATED:011:GlBfhyFV7jY4gqQmcmHUzm

      @Consumption.valueHelpDefinition: [ 
        { entity:  { name:    'I_DefectCodeGroupStdVH',
                     element: 'DefectCodeGroup' }
        }]
      // ]--GENERATED

       @ObjectModel: { readOnly: true, foreignKey.association: '_DefectCodeGroup' }
       I_QualityDefectUnion.DefectCodeGroup, 
       
      //--[ GENERATED:011:GlBfhyFV7jY4gqQmcmHUzm

      @Consumption.valueHelpDefinition: [ 
        { entity:  { name:    'I_DefectCodeStdVH',
                     element: 'DefectCode' },
          additionalBinding: [{ localElement: 'DefectCodeGroup',
                                element: 'DefectCodeGroup' }]
        }]
      // ]--GENERATED

       @ObjectModel: { readOnly: true, foreignKey.association: '_DefectCode' }
       I_QualityDefectUnion.DefectCode, 
      
       @ObjectModel.readOnly: true 
       I_QualityDefectUnion.NumberOfDefects,
        
       @ObjectModel.readOnly: true 
       I_QualityDefectUnion.InspPlanOperationInternalID, 
        
       @ObjectModel.readOnly: true 
       I_QualityDefectUnion.InspectionCharacteristic, 
       
       @ObjectModel.readOnly: true
       I_QualityDefectUnion.InspectionLot, 
       
       @UI.hidden: true
       @ObjectModel.readOnly: true       
       I_QualityDefectUnion.Plant,
       
       //Getting count for defects

        @UI.hidden: true 
         cast (1 as abap.int8) as  InspectionLotSum,

       // Fields for authorization checks

       @Consumption.hidden: true
       I_QualityDefectUnion.DefectCategory,
       @Consumption.hidden: true
       I_QualityDefectUnion.WorkCenterTypeCode,
       @Consumption.hidden: true
       I_QualityDefectUnion.MainWorkCenterInternalID,
       @Consumption.hidden: true
       I_QualityDefectUnion.MainWorkCenter,
       @Consumption.hidden: true
       I_QualityDefectUnion.MainWorkCenterPlant,
       
       /* Associations */
       I_QualityDefectUnion._InspectionLot,
       _DefectCode,      
       _DefectCodeGroup
      
    
} where IsDeleted <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_QUALITYDEFECTUNION"
],
"ASSOCIATED":
[
"I_DEFECTCODE",
"I_DEFECTCODEGROUP",
"I_INSPECTIONLOT"
],
"BASE":
[
"I_QUALITYDEFECTUNION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/