I_MaintNotifCauseCode

DDL: I_MAINTNOTIFCAUSECODE SQL: IPMCAUSECODE Type: view BASIC

Inspection Code

I_MaintNotifCauseCode is a Basic CDS View that provides data about "Inspection Code" in SAP S/4HANA. It reads from 1 data source (qpcd) and exposes 9 fields with key fields InspectionCatalog, InspectionCodeGroup, InspectionCode. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
qpcd qpcd from

Associations (4)

CardinalityTargetAliasCondition
[1..1] I_Inspectioncatalog _InspectionCatalog $projection.InspectionCatalog = _InspectionCatalog.InspectionCatalog
[1..1] I_MaintNotifCauseCodeGroup _InspectionCodeGroup $projection.InspectionCatalog = _InspectionCodeGroup.InspectionCatalog and $projection.InspectionCodeGroup = _InspectionCodeGroup.InspectionCodeGroup
[1..*] I_MaintNotifCodeGrpStsTxt _StatusDesc $projection.MaintNotifCauseGrpStatus = _StatusDesc.MaintNotifCodeGrpStatus
[1..*] I_InspectionCodeText _Text $projection.InspectionCatalog = _Text.InspectionCatalog and $projection.InspectionCodeGroup = _Text.InspectionCodeGroup and $projection.InspectionCode = _Text.InspectionCode

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IPMCAUSECODE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Inspection Code view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #CUSTOMIZING view
Metadata.ignorePropagatedAnnotations true view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY InspectionCatalog qpcd katalogart
KEY InspectionCodeGroup codegruppe
KEY InspectionCode code
MaintNotifCauseGrpStatus _InspectionCodeGroup CodeGroupStatus
CodeGroupStatus _InspectionCodeGroup CodeGroupStatus
_InspectionCatalog _InspectionCatalog
_InspectionCodeGroup _InspectionCodeGroup
_StatusDesc _StatusDesc
_Text _Text
@AbapCatalog.sqlViewName: 'IPMCAUSECODE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Inspection Code'
@VDM: {
    viewType:#BASIC
}
@ObjectModel.supportedCapabilities: 
    [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]
@ObjectModel.usageType: { serviceQuality: #A, sizeCategory: #M, dataClass: #CUSTOMIZING }
@Metadata.ignorePropagatedAnnotations: true

define view I_MaintNotifCauseCode as select from qpcd 
  association [1..1] to I_Inspectioncatalog as _InspectionCatalog
    on $projection.InspectionCatalog = _InspectionCatalog.InspectionCatalog

  association [1..1] to I_MaintNotifCauseCodeGroup  as _InspectionCodeGroup
    on $projection.InspectionCatalog = _InspectionCodeGroup.InspectionCatalog
   and $projection.InspectionCodeGroup = _InspectionCodeGroup.InspectionCodeGroup

  association [1..*] to I_MaintNotifCodeGrpStsTxt as _StatusDesc
     on $projection.MaintNotifCauseGrpStatus = _StatusDesc.MaintNotifCodeGrpStatus
     
   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,
    
     _InspectionCodeGroup.CodeGroupStatus as MaintNotifCauseGrpStatus ,
    
    // 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,  
     
//     qpcd.gueltigab as MaintCatalogValidFromDate,

//     qpcd.ersteller  as MaintCatalogCodeCreatedBy,

//     qpcd.e_datum as MaintCatalogCodeCreatedOn,

//     qpcd.aenderer as MaintCatalogCodeChangedBy,

//     qpcd.a_datum as MaintCatalogCodeChangedOn,

//     qpcd.inaktiv as MaintCatalogCodeStatus,

//     @Semantics.booleanIndicator: true

//     qpcd.verwendung as MaintCatalogCodeIsUsed,

     
     _InspectionCodeGroup.CodeGroupStatus,
    
    //Associations

    _InspectionCatalog,
    _InspectionCodeGroup,
    _StatusDesc,
    _Text
    
} 
where katalogart = '5'