I_DefectCauseCode
Defect Cause Code
I_DefectCauseCode is a Basic CDS View that provides data about "Defect Cause Code" in SAP S/4HANA. It reads from 1 data source (qpcd) and exposes 4 fields with key fields DefectCauseCodeGroup, DefectCauseCode. It has 2 associations to related views. Part of development package VDM_QM_NOTIFICATION.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| qpcd | qpcd | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_DefectCauseCodeGroup | _DefectCauseCodeGroup | $projection.DefectCauseCodeGroup = _DefectCauseCodeGroup.DefectCauseCodeGroup |
| [0..*] | I_DefectCauseCodeText | _Text | $projection.DefectCauseCodeGroup = _Text.DefectCauseCodeGroup and $projection.DefectCauseCode = _Text.DefectCauseCode |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Defect Cause Code | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| ObjectModel.representativeKey | DefectCauseCode | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.usageType.dataClass | #CUSTOMIZING | view | |
| Analytics.technicalName | IDEFCACODE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DefectCauseCodeGroup | |||
| KEY | DefectCauseCode | |||
| _DefectCauseCodeGroup | _DefectCauseCodeGroup | |||
| _Text | _Text |
@EndUserText.label: 'Defect Cause Code'
@AccessControl.authorizationCheck: #CHECK
@VDM: {
viewType:#BASIC,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@ObjectModel: {
representativeKey: 'DefectCauseCode',
usageType: { serviceQuality: #A, sizeCategory: #M, dataClass: #CUSTOMIZING }
}
@Analytics.technicalName: 'IDEFCACODE'
@Metadata.ignorePropagatedAnnotations: true
define view entity I_DefectCauseCode as select from qpcd
association [1..1] to I_DefectCauseCodeGroup as _DefectCauseCodeGroup on $projection.DefectCauseCodeGroup = _DefectCauseCodeGroup.DefectCauseCodeGroup
association [0..*] to I_DefectCauseCodeText as _Text on $projection.DefectCauseCodeGroup = _Text.DefectCauseCodeGroup
and $projection.DefectCauseCode = _Text.DefectCauseCode
{
@ObjectModel.foreignKey.association: '_DefectCauseCodeGroup'
key cast( qpcd.codegruppe as vdm_qfecausegrp preserving type ) as DefectCauseCodeGroup,
@ObjectModel.text.association: '_Text'
key cast( qpcd.code as vdm_qfecausecod preserving type ) as DefectCauseCode,
// key qpcd.version --> is always 1 so we could leave out
// DB field has three values, but field shall be indicator
@Semantics.booleanIndicator: true
case qpcd.inaktiv
when ' ' then cast( ' ' as vdm_qm_codeisinactive preserving type )
else cast( 'X' as vdm_qm_codeisinactive preserving type )
end as CodeIsInactive,
// Associations
_DefectCauseCodeGroup,
_Text
} where qpcd.katalogart = '5' // Causes
and qpcd.version = '000001'
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