@AbapCatalog.sqlViewName: 'CINSPSUBSETCHAR'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'Inspection Characteristic for Inspection Points'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType: {
dataClass: #MIXED,
sizeCategory: #L, //expected number of rows < 10.000.000
serviceQuality: #D
}
define view C_InspSubsetChar
as select from I_InspSubsetCharacteristic as _InspSubsetChar
inner join I_InspectionSubset as _InspSubset on _InspSubset.InspectionLot = _InspSubsetChar.InspectionLot
and _InspSubset.InspPlanOperationInternalID = _InspSubsetChar.InspPlanOperationInternalID
and _InspSubset.InspectionSubsetInternalID = _InspSubsetChar.InspectionSubsetInternalID
association [1..*] to C_InspSubsetCharSingleRslt as _InspSubsetCharSingleRslt on $projection.InspectionLot = _InspSubsetCharSingleRslt.InspectionLot
and $projection.InspectionCharacteristic = _InspSubsetCharSingleRslt.InspectionCharacteristic
and $projection.InspPlanOperationInternalID = _InspSubsetCharSingleRslt.InspPlanOperationInternalID
and $projection.InspectionSubsetInternalID = _InspSubsetCharSingleRslt.InspectionSubsetInternalID
{
//--[ GENERATED:012:GlBfhyFV7kY4h7jYW0xcqG
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_InspectionLotStdVH',
element: 'InspectionLot' }
}]
// ]--GENERATED
key _InspSubset.InspectionLot,
//--[ GENERATED:012:GlBfhyFV7kY4h7jYW0xcqG
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_InspectionOperationStdVH',
element: 'InspPlanOperationInternalID' },
additionalBinding: [{ localElement: 'InspectionLot',
element: 'InspectionLot' }]
}]
// ]--GENERATED
key _InspSubset.InspPlanOperationInternalID,
key _InspSubset.InspectionSubsetInternalID,
key _InspSubset.MaterialSample,
key _InspSubsetChar.InspectionCharacteristic,
_InspSubsetChar._InspectionCharacteristic._InspectionOperation.InspectionOperation,
_InspSubsetChar._InspectionCharacteristic.InspectionMethod,
_InspSubsetChar._InspectionCharacteristic._InspectionMethodVersion._InspectionMethodText[1:Language=$session.system_language].InspectionMethodText,
_InspSubsetChar._InspectionCharacteristic._InspSpecImportanceCode.InspSpecImportanceCodeText,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecification,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecificationText,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecificationPlant,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecificationVersion,
_InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative,
_InspSubsetChar._InspectionCharacteristic._InspectionSpecificationUnit._Text[1:Language=$session.system_language].UnitOfMeasureTechnicalName as InspectionSpecificationUnit,
_InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType,
_InspSubsetChar._InspectionCharacteristic.InspSpecUpperLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecHasUpperLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecLowerLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecHasLowerLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecDecimalPlaces,
_InspSubsetChar._InspectionCharacteristic.InspCharacteristicSampleSize, //Inspect value
_InspSubsetChar._InspectionCharacteristic.InspCharacteristicSampleUnit,
_InspSubsetChar._InspectionCharacteristic.InspSpecSampleQuantityFactor, //Sample Quantity Factor
_InspSubsetChar._InspectionCharacteristic.InspSpecIsMeasuredValueRqd,
_InspSubsetChar._InspectionCharacteristic._CharcAttribSelectedCodeSet.SelectedCodeSetText,
_InspSubsetChar._InspectionCharacteristic.InspectionMethodPlant,
_InspSubsetChar._InspectionCharacteristic.InspectionMethodVersion,
_InspSubsetChar._InspSubsetResult.InspectionValuationResult,
_InspSubsetChar._InspSubsetResult.InspResultValidValuesNumber,
_InspSubsetChar._InspSubsetResult.InspRsltNonconformingValsNmbr,
@EndUserText.label: 'Inspected / Nonconforming'
concat (concat (cast (_InspSubsetChar._InspSubsetResult.InspResultValidValuesNumber as abap.char( 20 )),' / '), concat(' ',cast (_InspSubsetChar._InspSubsetResult.InspRsltNonconformingValsNmbr as abap.char( 20 )))) as InspRsltInspNonConformanceCt,
_InspSubsetChar._InspSubsetResult.InspectionResultMeanValue,
_InspSubsetChar._InspSubsetResult._CharcAttributeCode.CharacteristicAttributeCodeTxt,
_InspSubsetChar._InspSubsetResult.CharacteristicAttributeCode,
_InspSubsetChar._InspSubsetResult.InspectionResultHasMeanValue,
_InspSubsetChar._InspSubsetResult.CharacteristicAttributeCodeGrp,
case when _InspSubsetChar._InspSubsetResult.InspectionResultStatus is null
then _InspSubsetChar._InspCharacteristicStatus.InspectionResultStatusText
else _InspSubsetChar._InspSubsetResult._InspectionResultStatus.InspectionResultStatusText
end as InspectionResultStatusText,
//-- fields needed for authority check
@Consumption.hidden: true
_InspSubset._InspectionLot,
@Consumption.hidden: true
_InspSubset._InspectionOperation,
//Associations
_InspSubsetCharSingleRslt
}