I_INSPECTIONCODE
Inspection Code
I_INSPECTIONCODE is a CDS View in S/4HANA. Inspection Code. It contains 5 fields. 8 CDS views read from this table.
CDS Views using this table (8)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_MaintNotifCodeVH | view_entity | from | CONSUMPTION | Maintenance Notification Code |
| C_MaintWorkRequestDamageCodeVH | view_entity | from | CONSUMPTION | Value help for work request failure mode code |
| C_MalfunctionDetailCodesVH | view | from | CONSUMPTION | Malfunction Detail Codes |
| I_InspectionCodeStdVH | view_entity | from | COMPOSITE | Inspection Code |
| P_WRNTYDEFECTCODES | view_entity | cross | COMPOSITE | Private View for defect codes and code group |
| R_MaintNotifCodingCodeTP | view_entity | from | TRANSACTIONAL | Code for Coding |
| R_MaintNotifObjPrtCodeTP | view_entity | from | TRANSACTIONAL | Code for Object Parts |
| R_MaintNotifOvwDamageCodeTP | view_entity | from | TRANSACTIONAL | Code for Overview of Damage |
Fields (5)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | InspectionCatalog | InspectionCatalog,MaintNotifCodingCatalog,MaintNotifObjPartCatalog,MaintNotifOvwDamageCatalog | 7 |
| KEY | InspectionCode | InspectionCode,MaintNotifCodingCode,MaintNotifObjPartCode,MaintNotifOvwDamageCode | 7 |
| KEY | InspectionCodeGroup | InspectionCodeGroup,MaintNotifCodingCodeGroup,MaintNotifObjPartCodeGroup,MaintNotifOvwDamageCodeGroup | 7 |
| _InspectionCodeGroup | _InspectionCodeGroup | 2 | |
| CodeIsInactive | CodeIsInactive | 3 |
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Inspection Code'
@VDM: {
viewType:#BASIC,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@ObjectModel.supportedCapabilities:
[ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]
@ObjectModel.representativeKey: 'InspectionCode'
@Analytics.technicalName: 'IINSPCODE'
@ObjectModel.usageType: { serviceQuality: #A, sizeCategory: #M, dataClass: #CUSTOMIZING }
@Metadata.ignorePropagatedAnnotations: true
define view entity I_InspectionCode as select from qpcd
association [1..1] to I_Inspectioncatalog as _InspectionCatalog
on $projection.InspectionCatalog = _InspectionCatalog.InspectionCatalog
association [1..1] to I_InspectionCodeGroup as _InspectionCodeGroup
on $projection.InspectionCatalog = _InspectionCodeGroup.InspectionCatalog
and $projection.InspectionCodeGroup = _InspectionCodeGroup.InspectionCodeGroup
association [1..*] to I_InspectionCodeText as _Text
on $projection.InspectionCatalog = _Text.InspectionCatalog
and $projection.InspectionCodeGroup = _Text.InspectionCodeGroup
and $projection.InspectionCode = _Text.InspectionCode
{
@ObjectModel.foreignKey.association: '_InspectionCatalog'
key qpcd.katalogart as InspectionCatalog,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_InspectionCodeGroupStdVH',
element: 'InspectionCodeGroup' },
additionalBinding: [{ localElement: 'InspectionCatalog',
element: 'InspectionCatalog' }]
}]
@ObjectModel.foreignKey.association: '_InspectionCodeGroup'
key codegruppe as InspectionCodeGroup,
// key qpcd.version --> is always 1 so we could leave out
@ObjectModel.text.association: '_Text'
key code as InspectionCode,
// DB field has three values, but field shall be indicator
// @Semantics.booleanIndicator: true // It is boolean, but we cannot tag it, due to static code check
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
_InspectionCatalog,
_InspectionCodeGroup,
_Text
} where qpcd.version = '000001'