I_DefectLocationCode

DDL: I_DEFECTLOCATIONCODE SQL: IDEFLOCCD Type: view BASIC

Defect Location Code

I_DefectLocationCode is a Basic CDS View that provides data about "Defect Location Code" in SAP S/4HANA. It reads from 1 data source (qpcd) and exposes 6 fields with key fields DefectLocationCatalog, DefectLocationCodeGroup, DefectLocationCode.

Data Sources (1)

SourceAliasJoin Type
qpcd qpcd from

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName IDEFLOCCD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.representativeKey DefectLocationCode view
EndUserText.label Defect Location Code view
Metadata.ignorePropagatedAnnotations true view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY DefectLocationCatalog
KEY DefectLocationCodeGroup
KEY DefectLocationCode
_DefectLocationCatalog _DefectLocationCatalog
_DefectLocationCodeGroup _DefectLocationCodeGroup
_DefectLocationCodeText _DefectLocationCodeText
@AbapCatalog.sqlViewName: 'IDEFLOCCD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE 
@VDM: {
    viewType:#BASIC,
    lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@ObjectModel:{
    usageType:{
        dataClass: #CUSTOMIZING,
        serviceQuality: #A,
        sizeCategory: #S
    },
    representativeKey: 'DefectLocationCode'
}
@EndUserText.label: 'Defect Location Code'
@Metadata.ignorePropagatedAnnotations: true
define view I_DefectLocationCode as select from qpcd 
    
    association[1..1] to I_DefectLocationCatalog as _DefectLocationCatalog on $projection.DefectLocationCatalog = _DefectLocationCatalog.DefectLocationCatalog
    association[1..1] to I_DefectLocationCodeGroup as _DefectLocationCodeGroup on   $projection.DefectLocationCatalog =  _DefectLocationCodeGroup.DefectLocationCatalog and
                                                                                    $projection.DefectLocationCodeGroup = _DefectLocationCodeGroup.DefectLocationCodeGroup
    association[1..*] to I_DefectLocationCodeText as _DefectLocationCodeText on $projection.DefectLocationCatalog = _DefectLocationCodeText.DefectLocationCatalog and
                                                                                $projection.DefectLocationCodeGroup = _DefectLocationCodeText.DefectLocationCodeGroup and
                                                                                $projection.DefectLocationCode = _DefectLocationCodeText.DefectLocationCode
{
    @ObjectModel.foreignKey.association: '_DefectLocationCatalog'
    key cast( katalogart as vdm_qfeocat preserving type ) as DefectLocationCatalog,
    @ObjectModel.foreignKey.association: '_DefectLocationCodeGroup'
    key cast( codegruppe as vdm_qfeogrp preserving type ) as DefectLocationCodeGroup,
    @ObjectModel.text.association: '_DefectLocationCodeText'
    key cast( code as vdm_qfeocod preserving type )       as DefectLocationCode,
    
    // 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,
    
    _DefectLocationCatalog,
    _DefectLocationCodeGroup,
    _DefectLocationCodeText
} where 
    ( 
//      katalogart = 'B' or //Object Parts

      katalogart = 'E'    //Defect Locations

    ) 
    and qpcd.version    = '000001' 
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"QPCD"
],
"ASSOCIATED":
[
"I_DEFECTLOCATIONCATALOG",
"I_DEFECTLOCATIONCODEGROUP",
"I_DEFECTLOCATIONCODETEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/