I_DEFECTCATEGORY

CDS View

Defect Category

I_DEFECTCATEGORY is a CDS View in S/4HANA. Defect Category. It contains 2 fields. 5 CDS views read from this table.

CDS Views using this table (5)

ViewTypeJoinVDMDescription
A_DefectCategory view from COMPOSITE Defect Categories
C_DefectCatVH view from CONSUMPTION Defect Category Value Help
C_MfgExecDefectRecord view inner CONSUMPTION View with UI attributes for defect
I_DefectCategoryStdVH view from COMPOSITE Defect Category
SHSM_IDEFCAT view from Defect Category

Fields (2)

KeyField CDS FieldsUsed in Views
DefectCategory DefectCategory 2
DefectCategoryContext DefectCategoryContext 1
@AbapCatalog.sqlViewName: 'IDEFECTCATEGORY'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey : true
@EndUserText.label: 'Defect Category'
@Analytics.dataCategory: #DIMENSION
@VDM: {
    viewType: #BASIC,
    lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel: {
    usageType: {
        dataClass: #ORGANIZATIONAL,
        sizeCategory: #S,
        serviceQuality: #B
    },
    representativeKey: 'DefectCategory',
    resultSet.sizeCategory: #XS
}

define view I_DefectCategory as select from tqdefcat
  left outer join tqdefccatsttgs
     on tqdefccatsttgs.category = tqdefcat.category 
   
   association [0..*] to I_DefectCategoryText as _Text on $projection.DefectCategory = _Text.DefectCategory
   
{
   @ObjectModel.text.association: '_Text'
   key tqdefcat.category       as DefectCategory,

   // For setings merge defaults from system table with values from customizing/settings table tqdefccatsttgs

   case tqdefccatsttgs.origin
     when '1' then tqdefccatsttgs.default_tasktype
     else tqdefcat.default_tasktype
   end                                                                        as DefectCategoryDefaultTaskType,
   
   case tqdefccatsttgs.origin
     when '1' then tqdefccatsttgs.has_affected_objects
     else tqdefcat.has_affected_objects
   end                                                                        as DefectHasAffectedObjects,

   case tqdefccatsttgs.origin
     when '1' then tqdefccatsttgs.categorycontext
     else tqdefcat.categorycontext
   end                                                                        as DefectCategoryContext,   
   
   // Associations

   _Text
}

union select from tqdefccat
  inner join tqdefccatsttgs
     on tqdefccatsttgs.category = tqdefccat.category 
// hint: due to the inner join no settings for system category (origin = 1) shall be read from tqdefccatsttgs; this cas is handled above


  association [0..*] to I_DefectCategoryText as _Text on $projection.DefectCategory = _Text.DefectCategory
  
{
   @ObjectModel.text.association: '_Text'
   key tqdefccat.category       as DefectCategory,

   tqdefccatsttgs.default_tasktype                                            as DefectCategoryDefaultTaskType,
   tqdefccatsttgs.has_affected_objects                                        as DefectHasAffectedObjects,
   tqdefccatsttgs.categorycontext                                             as DefectCategoryContext,
   
   // Associations

   _Text
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"TQDEFCAT",
"TQDEFCCAT",
"TQDEFCCATSTTGS"
],
"ASSOCIATED":
[
"I_DEFECTCATEGORYTEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/