I_InspOperMatlSampleAggregate

DDL: I_INSPOPERMATLSAMPLEAGGREGATE SQL: IINSPOPMSMLAGGR Type: view COMPOSITE

Aggregation on insp op mat sample level

I_InspOperMatlSampleAggregate is a Composite CDS View that provides data about "Aggregation on insp op mat sample level" in SAP S/4HANA. It reads from 3 data sources (I_InspectionOperation, I_InspectionSubset, I_InspSubsetCharacteristic) and exposes 4 fields with key fields InspectionLot, InspPlanOperationInternalID, InspectionOperation, MaterialSample.

Data Sources (3)

SourceAliasJoin Type
I_InspectionOperation I_InspectionOperation from
I_InspectionSubset I_InspectionSubset inner
I_InspSubsetCharacteristic I_InspSubsetCharacteristic inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName IINSPOPMSMLAGGR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Aggregation on insp op mat sample level view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY InspectionLot I_InspectionOperation InspectionLot
KEY InspPlanOperationInternalID I_InspectionOperation InspPlanOperationInternalID
KEY InspectionOperation I_InspectionOperation InspectionOperation
KEY MaterialSample I_InspectionSubset MaterialSample
@AbapCatalog.sqlViewName: 'IINSPOPMSMLAGGR'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Aggregation on insp op mat sample level'
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType: { dataClass: #MIXED, sizeCategory: #L, serviceQuality: #D }
define view I_InspOperMatlSampleAggregate
  as select from I_InspectionOperation
    inner join   I_InspectionSubset         on  I_InspectionSubset.InspectionLot               = I_InspectionOperation.InspectionLot
                                            and I_InspectionSubset.InspPlanOperationInternalID = I_InspectionOperation.InspPlanOperationInternalID
    inner join   I_InspSubsetCharacteristic on  I_InspSubsetCharacteristic.InspectionLot               = I_InspectionSubset.InspectionLot
                                            and I_InspSubsetCharacteristic.InspPlanOperationInternalID = I_InspectionSubset.InspPlanOperationInternalID
                                            and I_InspSubsetCharacteristic.InspectionSubsetInternalID  = I_InspectionSubset.InspectionSubsetInternalID
{
  key I_InspectionOperation.InspectionLot,
  key I_InspectionOperation.InspPlanOperationInternalID,
  key I_InspectionOperation.InspectionOperation,
  key I_InspectionSubset.MaterialSample,
      sum(case when I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult is null
                 or I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult = ' ' then 1
          when I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult = '+' then 999999 //to force int4-type

          else 0 end) as InspCharOpenSampleCount,
      sum(case when I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult = 'A' then 1
          when I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult = '+' then 999999 //to force int4-type

          else 0 end) as InspCharcAcceptedSampleCount,
      sum(case when I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult = 'R' then 1
          when I_InspSubsetCharacteristic._InspSubsetResult.InspectionValuationResult = '+' then 999999 //to force int4-type

          else 0 end) as InspCharRejectedSampleCount
}
group by
  I_InspectionOperation.InspectionLot,
  I_InspectionOperation.InspPlanOperationInternalID,
  I_InspectionOperation.InspectionOperation,
  I_InspectionSubset.MaterialSample 
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSPECTIONOPERATION",
"I_INSPECTIONSUBSET",
"I_INSPSUBSETCHARACTERISTIC",
"I_INSPSUBSETRESULT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/