I_INSPCHARCREJECTION

CDS View

Rejections for insp. characteristic

I_INSPCHARCREJECTION is a CDS View in S/4HANA. Rejections for insp. characteristic. It contains 2 fields.

Fields (2)

KeyField CDS FieldsUsed in Views
KEY InspectionLot InspectionLot 1
KEY InspPlanOperationInternalID InspPlanOperationInternalID 1
@AbapCatalog.sqlViewName: 'IINSPCHARCREJ'
@ObjectModel.usageType: { serviceQuality: #B, sizeCategory: #M, dataClass: #TRANSACTIONAL }
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Rejections for insp. characteristic'
@VDM.viewType: #COMPOSITE
define view I_InspCharcRejection as select from I_InspectionCharacteristic 

  association [1..1] to I_InspectionLot                as _InspectionLot        
    on $projection.InspectionLot               = _InspectionLot.InspectionLot

  association [0..1] to I_InspectionResult             as _InspectionResult
    on     $projection.InspectionLot               = _InspectionResult.InspectionLot
       and $projection.InspPlanOperationInternalID = _InspectionResult.InspPlanOperationInternalID
       and $projection.InspectionCharacteristic    = _InspectionResult.InspectionCharacteristic

  association [0..1] to P_InspCharcWithRjctdSmpl as _InspCharcWithRjctdSmpl
    on     $projection.InspectionLot               = _InspCharcWithRjctdSmpl.InspectionLot
       and $projection.InspPlanOperationInternalID = _InspCharcWithRjctdSmpl.InspPlanOperationInternalID
       and $projection.InspectionCharacteristic    = _InspCharcWithRjctdSmpl.InspectionCharacteristic
{
  key I_InspectionCharacteristic.InspectionLot,
  key I_InspectionCharacteristic.InspPlanOperationInternalID,
  key I_InspectionCharacteristic.InspectionCharacteristic,

  case 
//     1. Characteristic results which do not have inspection samples

       when     _InspectionLot.InspLotHasSubsets                = ' '
            and I_InspectionCharacteristic.HasInspCharcPrtlSmpl = ' '
            then case 
                      when _InspectionResult.InspectionValuationResult = 'R' 
                      then 'X' 
                      else ' ' 
                 end
//     2. Characteristics with any kind of samples (independent or subsets/ insp. points)

       else 
                 case 
                      when  _InspCharcWithRjctdSmpl.InspectionCharacteristic is not null 
                      then 'X' 
                      else ' ' 
                 end
       end as InspCharcHasRejection,

  _InspectionLot,
  _InspectionResult
  
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSPECTIONCHARACTERISTIC",
"I_INSPECTIONLOT",
"I_INSPECTIONRESULT",
"P_INSPCHARCWITHRJCTDSMPL"
],
"ASSOCIATED":
[
"I_INSPECTIONLOT",
"I_INSPECTIONRESULT",
"P_INSPCHARCWITHRJCTDSMPL"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/