I_DefectCategory

DDL: I_DEFECTCATEGORY SQL: IDEFECTCATEGORY Type: view BASIC Package: VDM_QM_NOTIFICATION

Defect Category

I_DefectCategory is a Basic CDS View (Dimension) that provides data about "Defect Category" in SAP S/4HANA. It reads from 2 data sources (tqdefcat, tqdefccatsttgs) and exposes 2 fields with key field DefectCategory. It has 1 association to related views. Part of development package VDM_QM_NOTIFICATION.

Data Sources (2)

SourceAliasJoin Type
tqdefcat tqdefcat from
tqdefccatsttgs tqdefccatsttgs left_outer

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_DefectCategoryText _Text $projection.DefectCategory = _Text.DefectCategory

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IDEFECTCATEGORY view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Defect Category view
Analytics.dataCategory #DIMENSION view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.dataClass #ORGANIZATIONAL view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.representativeKey DefectCategory view
ObjectModel.resultSet.sizeCategory #XS view

Fields (2)

KeyFieldSource TableSource FieldDescription
KEY DefectCategory tqdefcat category
_Text _Text
@AbapCatalog.sqlViewName: 'IDEFECTCATEGORY'
@ClientHandling.algorithm: #SESSION_VARIABLE
@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
}

///////

// Skip the below union branch, as the feature is not used in PuC (and was never)

//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

//}