I_DefectCategory
Defect Category
I_DefectCategory is a Basic CDS View (Dimension) that provides data about "Defect Category" in SAP S/4HANA. It reads from 4 data sources (tqdefcat, tqdefccat, tqdefccatsttgs, tqdefccatsttgs) and exposes 6 fields with key field DefectCategory. It has 1 association to related views.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| tqdefcat | tqdefcat | from |
| tqdefccat | tqdefccat | union |
| tqdefccatsttgs | tqdefccatsttgs | left_outer |
| tqdefccatsttgs | tqdefccatsttgs | inner |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_DefectCategoryText | _Text | $projection.DefectCategory = _Text.DefectCategory |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IDEFECTCATEGORY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.preserveKey | true | 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 (6)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectCategory | tqdefcat | category | |
| categoryasDefectCategory | ||||
| DefectCategoryDefaultTaskType | tqdefccatsttgs | default_tasktype | ||
| DefectHasAffectedObjects | tqdefccatsttgs | has_affected_objects | ||
| DefectCategoryContext | tqdefccatsttgs | categorycontext | ||
| _Text | _Text |
@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":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA