C_Inspoperation_Object is a Consumption CDS View that provides data about "Inspection Lot Operations" in SAP S/4HANA. It reads from 1 data source (I_InspectionOperation) and exposes 20 fields with key fields InspectionOperation, InspectionLot.
@AbapCatalog.sqlViewName: 'CINSPOPERAOBJECT'
@ClientHandling.algorithm: #SESSION_VARIABLE@AbapCatalog.compiler.compareFilter: true@VDM.viewType: #CONSUMPTION@EndUserText.label: 'Inspection Lot Operations'
@AccessControl.authorizationCheck: #CHECK@ObjectModel.usageType: {
dataClass: #MIXED,
sizeCategory: #L, //expected number of rows < 10.000.000
serviceQuality: #D
}defineview C_Inspoperation_Object
asselectfrom I_InspectionOperation as _Operation
leftouter to one join I_InspOperationAggregate as _InspOperationAggregate
on _Operation.InspPlanOperationInternalID = _InspOperationAggregate.InspPlanOperationInternalID
and _Operation.InspectionLot = _InspOperationAggregate.InspectionLot
leftouter to one join I_InspOperationUsageDecision as _InspOperationUsageDecision
on _Operation.InspectionLot = _InspOperationUsageDecision.InspectionLot
and _Operation.InspPlanOperationInternalID = _InspOperationUsageDecision.InspPlanOperationInternalID
{
key _Operation.InspectionOperation,
key _Operation.InspectionLot,
_Operation.OrderInternalBillOfOperations,
_Operation.InspPlanOperationInternalID,
_Operation._WorkCenter.WorkCenter,
_Operation.OperationText,
_Operation._WorkCenter._Text[1:Language=$session.system_language].WorkCenterText,
_InspOperationAggregate.InspCharOpenCount,
_InspOperationAggregate.InspCharAcceptedCount,
_InspOperationAggregate.InspCharRejectedCount,
_InspOperationAggregate.InspCharcAcceptedSampleCount,
_InspOperationAggregate.InspCharOpenSampleCount,
_InspOperationAggregate.InspCharRejectedSampleCount,
_InspOperationAggregate.MaterialSampleCount,
_InspOperationAggregate.InspSubsetCharcAcceptedCount,
_InspOperationAggregate.InspSubsetCharcRejectedCount,
_InspOperationAggregate.InspSubsetCharcOpenCount,
@Consumption.hidden: true//for DCL only
_Operation.InspectionOperationPlant,
@Consumption.hidden: true//for DCL only
_Operation._InspectionLot.InspectionLotType,
@Consumption.hidden: true//for DCL only
_Operation._InspectionLot.MatlQualityAuthorizationGroup,
//Check whether this operation has characteristics: when 0 no characteristic
case _Operation._InspectionLot.InspectionSubsetType
when '3' thencase(_InspOperationAggregate.InspCharcAcceptedSampleCount+
_InspOperationAggregate.InspCharOpenSampleCount+
_InspOperationAggregate.InspCharRejectedSampleCount)
when 0 then 0 else 1 endelsecase(_InspOperationAggregate.InspCharOpenCount+
_InspOperationAggregate.InspCharAcceptedCount+
_InspOperationAggregate.InspCharRejectedCount)
when 0 then 0 else 1 endendas InspOpHasCharc,
//Visible controler of sample bar: when 2 ,material sample exist
case _Operation._InspectionLot._InspSubsetFieldCombination.SamplingProcedureInspSubset
when '2' then 1
else 0 endas InspLotHasSubsets,
//Logic of valuation display
case _Operation._InspectionOperationStatus.InspectionOpIsCompletionNeeded
when 'X' then _InspOperationUsageDecision.InspOpUsageDecisionValuation
elsecase _Operation._InspectionLot.InspectionSubsetType
when '3' thencase _InspOperationAggregate.InspCharRejectedSampleCount //Operation has samples
when 0 thencase _InspOperationAggregate.InspCharcAcceptedSampleCount
when 0 then ''
elsecase (_InspOperationAggregate.InspCharOpenSampleCount+
_InspOperationAggregate.InspCharRejectedSampleCount)
when 0 then 'A' else '' endendelse 'R'
endelsecase _InspOperationAggregate.InspCharRejectedCount //Operation has no sample
when 0 thencase _InspOperationAggregate.InspCharAcceptedCount
when 0 then ''
elsecase (_InspOperationAggregate.InspCharOpenCount+
_InspOperationAggregate.InspCharRejectedCount)
when 0 then 'A' else '' endendelse 'R'
endendendas InspOpUsageDecisionValuation
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_INSPECTIONLOT",
"I_INSPECTIONOPERATION",
"I_INSPECTIONOPERATIONSTATUS",
"I_INSPOPERATIONAGGREGATE",
"I_INSPOPERATIONUSAGEDECISION",
"I_INSPSUBSETFIELDCOMBINATION",
"I_WORKCENTER",
"I_WORKCENTERTEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/