C_Defect

DDL: C_DEFECT SQL: CDEFECT Type: view CONSUMPTION Package: ODATA_QM_INSPLOT

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_DefectUnion) and exposes 20 fields with key fields DefectInternalID, NotificationItem. Part of development package ODATA_QM_INSPLOT.

Data Sources (1)

SourceAliasJoin Type
I_DefectUnion I_DefectUnion 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 #L view
ObjectModel.usageType.serviceQuality #C view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY DefectInternalID I_DefectUnion DefectInternalID
KEY NotificationItem I_DefectUnion NotificationItem
Defect I_DefectUnion Defect
DefectCodeGroup I_DefectUnion DefectCodeGroup
DefectCode I_DefectUnion DefectCode
NumberOfDefects I_DefectUnion NumberOfDefects
InspPlanOperationInternalID I_Defect InspPlanOperationInternalID
InspectionCharacteristic I_Defect InspectionCharacteristic
InspectionLot I_Defect InspectionLot
Plant I_DefectUnion Plant
InspectionLotSum
DefectCategory I_Defect DefectCategory
WorkCenterTypeCode I_Defect WorkCenterTypeCode
MainWorkCenterInternalID I_Defect MainWorkCenterInternalID
MainWorkCenter I_Defect MainWorkCenter
MainWorkCenterPlant I_Defect MainWorkCenterPlant
DefectCodeCatalog I_DefectUnion DefectCodeCatalog
_InspectionLot I_Defect _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: #L,
        serviceQuality: #C }

define view C_Defect
  as select from I_DefectUnion
  association [1..1] to I_Defect on  $projection.DefectInternalID = I_Defect.DefectInternalID
                                 and $projection.Defect           = I_Defect.Defect
{
      @UI.hidden: true
      @ObjectModel.readOnly:true
  key I_DefectUnion.DefectInternalID,

      @ObjectModel.readOnly:true
  key I_DefectUnion.NotificationItem,

      @ObjectModel.readOnly: true
      I_DefectUnion.Defect,

      //--[ GENERATED:011:GlBfhyFV7jY4gqQmcmHUzm

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

      @ObjectModel: { readOnly: true, foreignKey.association: '_DefectCodeGroup' }
      I_DefectUnion.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_DefectUnion.DefectCode,

      @ObjectModel.readOnly: true
      I_DefectUnion.NumberOfDefects,

      @ObjectModel.readOnly: true
      I_Defect.InspPlanOperationInternalID,

      @ObjectModel.readOnly: true
      I_Defect.InspectionCharacteristic,

      @ObjectModel.readOnly: true
      I_Defect.InspectionLot,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      I_DefectUnion.Plant,

      //Getting count for defects

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

      // Fields for authorization checks

      @Consumption.hidden: true
      I_Defect.DefectCategory,
      @Consumption.hidden: true
      I_Defect.WorkCenterTypeCode,
      @Consumption.hidden: true
      I_Defect.MainWorkCenterInternalID,
      @Consumption.hidden: true
      I_Defect.MainWorkCenter,
      @Consumption.hidden: true
      I_Defect.MainWorkCenterPlant,

      @Consumption.hidden: true
      I_DefectUnion.DefectCodeCatalog,

      /* Associations */
      I_Defect._InspectionLot,
      _DefectCode,
      _DefectCodeGroup


}
where
  IsDeleted <> 'X'