C_DefectMngCharcRslts

DDL: C_DEFECTMNGCHARCRSLTS SQL: CDEFECTCHARCRSLT Type: view CONSUMPTION

Defect: Charcteristics Single Results

C_DefectMngCharcRslts is a Consumption CDS View that provides data about "Defect: Charcteristics Single Results" in SAP S/4HANA. It reads from 2 data sources (I_InspectionResultValue, I_InspSubsetCharacteristic) and exposes 17 fields with key fields InspectionLot, InspPlanOperationInternalID, InspectionCharacteristic, InspectionSubsetInternalID, InspectionOperation.

Data Sources (2)

SourceAliasJoin Type
I_InspectionResultValue _InspectionResultValue left_outer
I_InspSubsetCharacteristic _InspSubsetChar from

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName CDEFECTCHARCRSLT view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
EndUserText.label Defect: Charcteristics Single Results view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY InspectionLot I_InspSubsetCharacteristic InspectionLot
KEY InspPlanOperationInternalID I_InspSubsetCharacteristic InspPlanOperationInternalID
KEY InspectionCharacteristic I_InspSubsetCharacteristic InspectionCharacteristic
KEY InspectionSubsetInternalID I_InspSubsetCharacteristic InspectionSubsetInternalID
KEY InspectionOperation
KEY InspResultValueInternalID I_InspectionResultValue InspResultValueInternalID
InspSpecIsQuantitative
InspSpecRecordingType
InspSpecIsMeasuredValueRqd
InspectionSpecificationUnit
InspSpecDecimalPlaces
InspResultHasMeasuredValue I_InspectionResultValue InspResultHasMeasuredValue
CharacteristicAttributeCodeGrp I_InspectionResultValue CharacteristicAttributeCodeGrp
fltpendasInspectionResultMeasuredValue
clientNULLendasChangedDateTime
_InspectionLot I_InspSubsetCharacteristic _InspectionLot
_InspectionOperation I_InspSubsetCharacteristic _InspectionOperation
@AbapCatalog.sqlViewName: 'CDEFECTCHARCRSLT'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType: {
    dataClass: #MIXED,
    sizeCategory: #XL, //expected number of rows < 10.000.000

    serviceQuality: #C 
}
@EndUserText.label: 'Defect: Charcteristics Single Results'

define view C_DefectMngCharcRslts  as select from  I_InspSubsetCharacteristic as _InspSubsetChar

left outer join I_InspectionResultValue    as _InspectionResultValue on  _InspSubsetChar.InspectionLot               = _InspectionResultValue.InspectionLot
                                                                         and _InspSubsetChar.InspPlanOperationInternalID = _InspectionResultValue.InspPlanOperationInternalID
                                                                         and _InspSubsetChar.InspectionSubsetInternalID  = _InspectionResultValue.InspectionSubsetInternalID
                                                                         and _InspSubsetChar.InspectionCharacteristic    = _InspectionResultValue.InspectionCharacteristic
{
    @DefaultAggregation: #NONE  
  key _InspSubsetChar.InspectionLot,
  key _InspSubsetChar.InspPlanOperationInternalID,
  key _InspSubsetChar.InspectionCharacteristic,
  key _InspSubsetChar.InspectionSubsetInternalID,
  key _InspSubsetChar._InspectionCharacteristic._InspectionOperation.InspectionOperation,
  key _InspectionResultValue.InspResultValueInternalID,
      
      _InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative,
      _InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType,
      _InspSubsetChar._InspectionCharacteristic.InspSpecIsMeasuredValueRqd,
      _InspSubsetChar._InspectionCharacteristic._InspectionSpecificationUnit._Text[1:Language=$session.system_language].UnitOfMeasureTechnicalName                                 as  InspectionSpecificationUnit,
      @UI.hidden: true
      case _InspectionResultValue.InspectionValuationResult
       when 'A' then 3
       when 'R' then 1
       else 0
      end                                                                                                                                          as  UsageDecisionCodeCriticality,


      @UI.dataPoint: {
        title:'Single Results',
        criticality: 'UsageDecisionCodeCriticality'
      }
      @DefaultAggregation: #NONE
      _InspSubsetChar._InspectionCharacteristic.InspSpecDecimalPlaces,
      _InspectionResultValue.InspResultHasMeasuredValue,
      _InspectionResultValue.CharacteristicAttributeCodeGrp,

      case _InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative //Quantitative

      when 'X' then case _InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType
                    when '+' then _InspectionResultValue.InspectionValuationResult //'+' is Single

                    else ''
                    end
      else case _InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType //'+' is Single

           when '+' then _InspectionResultValue.InspectionValuationResult
           else ''
           end
      end                                                                                                                                          as  InspectionValuationResult,

      case _InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative
      when 'X' then case _InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType //Quantitative

                    when '+' then _InspectionResultValue.InspectionResultMeasuredValue //'+' is Single

                    else cast(0 as abap.fltp)
                    end
      else cast(0 as abap.fltp)
      end                                                                                                                                          as  InspectionResultMeasuredValue,

      case _InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative
      when 'X' then '' //Quantitative

      else case _InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType //Qualitive

           when '+' then _InspectionResultValue._CharcAttributeCode.CharacteristicAttributeCode //Single

           else '' //Summary

           end
      end                                                                                                                                          as  CharacteristicAttributeCode,

      case _InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative
      when 'X' then '' //Quantitative

      else case _InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType //Qualitive

           when '+' then _InspectionResultValue._CharcAttributeCode.CharacteristicAttributeCodeTxt //Single

           else '' //Summary

           end
      end                                                                                                                                          as  CharacteristicAttributeCodeTxt,

      //Date & Time fields exposed for micro chart sort order

      case
      when (LastChangeDate is not null and LastChangeDate <> '00000000')
        then dats_tims_to_tstmp(LastChangeDate, ChangedTime, abap_system_timezone( $session.client,'NULL' ),  $session.client, 'NULL')
      else dats_tims_to_tstmp(CreationDate, CreationTime, abap_system_timezone( $session.client,'NULL' ),  $session.client, 'NULL')
      end                                                                                                                                          as  ChangedDateTime,



      //associations for DCL

      @Consumption.hidden: true
      _InspSubsetChar._InspectionLot,
      @Consumption.hidden: true
      _InspSubsetChar._InspectionOperation
   
}