@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Master Inspection Characteristics'
@ObjectModel.usageType: {
dataClass: #MIXED,
sizeCategory: #L,
serviceQuality: #D
}
@VDM.viewType: #CONSUMPTION
@VDM.usage.type:[#TRANSACTIONAL_PROCESSING_SERVICE]
@UI.headerInfo: {
title: {type: #STANDARD, value: 'Title'}
}
@UI.selectionVariant: [
{
id:'VAR3',
qualifier: 'MasterCharacteristic',
text: 'Master Inspection Characteristics',
filter: ''
}
]
@UI.presentationVariant: [{ requestAtLeast: ['InspCharOpenCount', 'InspCharAcceptedCount', 'InspCharRejectedCount', 'InspCharacteristicCount',
'InspectionSpecificationPlant', 'InspectionSpecification', 'InspectionSpecificationVersion','InspectionMethod', 'InspectionMethodVersion',
'InspectionMethodPlant', 'ProductionResourceTool','NumberOfSkipInspCharcs'] }]
define root view entity C_InspectionSpecRsltRecg
as select from I_InspectionCharacteristic as _InspectionCharacteristic
inner join I_InspectionLot as _InspectionLot on _InspectionCharacteristic.InspectionLot = _InspectionLot.InspectionLot
association [1..1] to I_InspSpecificationVersionText as _Text on _Text.InspectionSpecificationPlant = _InspectionCharacteristic.InspectionSpecificationPlant
and _Text.InspectionSpecification = _InspectionCharacteristic.InspectionSpecification
and _Text.InspectionSpecificationVersion = _InspectionCharacteristic.InspectionSpecificationVersion
and _Text.Language = $session.system_language
association [1..1] to I_OrderProdnResourceTool as _OrderProdnResourceTool on _OrderProdnResourceTool.OrderInternalBillOfOperations = _InspectionLot.OrderInternalBillOfOperations
and _OrderProdnResourceTool.OrderProdnRsceToolInternalID = _InspectionCharacteristic.InspLotTestEquipInternalID
association [1..1] to I_InspectionMethodVersionText as _InspectionMethodText on _InspectionCharacteristic.InspectionMethodPlant = _InspectionMethodText.InspectionMethodPlant
and _InspectionCharacteristic.InspectionMethod = _InspectionMethodText.InspectionMethod
and _InspectionCharacteristic.InspectionMethodVersion = _InspectionMethodText.InspectionMethodVersion
and _InspectionMethodText.Language = $session.system_language
association [1..1] to I_InspectionLotCancelledStatus as _InspectionLotWithStatus on _InspectionLot.InspectionLot = _InspectionLotWithStatus.InspectionLot
association [1..1] to I_InspSubsetCharacteristic as _InspSubsetCharacteristic on _InspectionCharacteristic.InspectionLot = _InspSubsetCharacteristic.InspectionLot
and _InspectionCharacteristic.InspPlanOperationInternalID = _InspSubsetCharacteristic.InspPlanOperationInternalID
and _InspectionCharacteristic.InspectionCharacteristic = _InspSubsetCharacteristic.InspectionCharacteristic
association [1..1] to C_InspSpecAggregate as _InspSpecAggregate on _InspectionCharacteristic.InspectionSpecificationPlant = _InspSpecAggregate.InspectionSpecificationPlant
and _InspectionCharacteristic.InspectionSpecification = _InspSpecAggregate.InspectionSpecification
and _InspectionCharacteristic.InspectionSpecificationVersion = _InspSpecAggregate.InspectionSpecificationVersion
association [0..*] to C_InspLotOpCharcRsltRecg as _InspChar on $projection.InspectionSpecification = _InspChar.InspectionSpecification
and $projection.InspectionSpecificationPlant = _InspChar.InspectionSpecificationPlant
and $projection.InspectionSpecificationVersion = _InspChar.InspectionSpecificationVersion
{
@UI.facet: [
{
id : 'InspCharacteristics',
purpose: #STANDARD,
type: #LINEITEM_REFERENCE,
label: 'Inspection Characteristics',
targetElement: '_InspChar',
position: 10
}
]
key _InspectionCharacteristic.InspectionSpecificationPlant,
key _InspectionCharacteristic.InspectionSpecification,
key _InspectionCharacteristic.InspectionSpecificationVersion,
max(_InspectionLot.Plant) as Plant,
@EndUserText.label: 'Inspection Lot Type'
max(_InspectionLot.InspectionLotType) as InspectionLotType,
@EndUserText.label: 'Material Authorization Group in QM'
max(_InspectionLot.MatlQualityAuthorizationGroup) as MatlQualityAuthorizationGroup,
@EndUserText.label: 'Is Business Purpose Completed'
max(_InspectionLot.IsBusinessPurposeCompleted) as IsBusinessPurposeCompleted,
@UI.fieldGroup: [{ label: 'Inspection Specification', position: 20, qualifier: 'MasterChar' }]
@EndUserText.label: 'Inspection Concatenated Key'
concat_with_space('(', concat_with_space(_InspectionCharacteristic.InspectionSpecification,
concat_with_space('/',concat_with_space(_InspectionCharacteristic.InspectionSpecificationPlant,
concat_with_space('/',concat_with_space(_InspectionCharacteristic.InspectionSpecificationVersion,')',1),1),1),1),1), 1) as InspSpecConcatenatedKey,
@UI.lineItem: [{ label: 'Master Inspection Characteristic', type: #AS_FIELDGROUP, valueQualifier: 'MasterChar', position: 10 }]
@EndUserText.label: 'Master Characteristic'
@EndUserText.quickInfo: 'Master Characteristic'
@UI.fieldGroup: [{ label: 'Inspection Specification Text', position: 10, qualifier: 'MasterChar' }]
max(_Text.InspectionSpecificationText) as InspectionSpecificationText,
@UI.lineItem: [{ position: 40 }]
@EndUserText.label: 'Number of Characteristics'
@EndUserText.quickInfo: 'Number of Characteristics'
max(_InspSpecAggregate.InspCharCount) as InspCharacteristicCount,
@EndUserText.label: 'Information Field 1'
max(_InspectionCharacteristic.InspSpecInformationField1) as InspSpecInformationField1,
@EndUserText.label: 'Information Field 2'
max(_InspectionCharacteristic.InspSpecInformationField2) as InspSpecInformationField2,
@EndUserText.label: 'Information Field 3'
max(_InspectionCharacteristic.InspSpecInformationField3) as InspSpecInformationField3,
@UI.fieldGroup: [{position: 20, qualifier: 'InspectionMethod' }]
@UI.lineItem: [{ label: 'Inspection Method', type: #AS_FIELDGROUP, valueQualifier: 'InspectionMethod', position: 20 }]
@EndUserText.label: 'Inspection Method'
max(_InspectionCharacteristic.InspectionMethod) as InspectionMethod,
@UI.fieldGroup: [{position: 30, qualifier: 'InspectionMethod' }]
@EndUserText.label: 'Inspection Method Plant'
max(_InspectionCharacteristic.InspectionMethodPlant) as InspectionMethodPlant,
@EndUserText.label: 'Inspection Method Text'
@UI.fieldGroup: [{position: 10, qualifier: 'InspectionMethod' }]
COALESCE(cast(max(_InspectionMethodText.InspectionMethodText) as qkurztext), '') as InspectionMethodText,
@EndUserText.label: 'Inspection Method Version'
@UI.fieldGroup: [{position: 40, qualifier: 'InspectionMethod' }]
max(_InspectionCharacteristic.InspectionMethodVersion) as InspectionMethodVersion,
@EndUserText.label: 'Inspector Qualification'
max(_InspectionCharacteristic.InspectorQualification) as InspectorQualification,
@UI.lineItem: [{ position: 30 }]
@EndUserText.label: 'Test Equipment'
@EndUserText.quickInfo: 'Test Equipment'
COALESCE(cast(max(_OrderProdnResourceTool._ProdnRsceToolByInternalKey.ProductionResourceTool) as pph_fhmnr), '') as ProductionResourceTool,
max(_InspSpecAggregate.InspCharOpenCount) as InspCharOpenCount,
@EndUserText.label: 'Number of Accepted Characteristics'
max(_InspSpecAggregate.InspCharAcceptedCount) as InspCharAcceptedCount,
@EndUserText.label: 'Number of Rejected Characteristics'
max(_InspSpecAggregate.InspCharRejectedCount) as InspCharRejectedCount,
@EndUserText.label: 'Number of Skipped Characteristics'
max(_InspSpecAggregate.NumberOfSkipInspCharcs) as NumberOfSkipInspCharcs,
@UI.hidden: true
@EndUserText.label: 'Number of Accepted Characteristics'
0 as InspOpNmbrOfAccepted,
//association
_InspChar
}
where
_InspectionCharacteristic.InspectionSpecification <> ''
and
_InspectionLotWithStatus.InspLotStatusCanceled is null
and(
(
_InspectionLot.InspLotHasSubsets = 'X'
and _InspSubsetCharacteristic.InspectionSubsetInternalID <> '000000'
and _InspectionLot.InspectionSubsetType = '3' // Here we support only case of Physical Samples
)
or(
_InspectionLot.InspLotHasSubsets <> 'X'
and _InspSubsetCharacteristic.InspectionSubsetInternalID = '000000'
)
)
group by
_InspectionCharacteristic.InspectionSpecificationPlant,
_InspectionCharacteristic.InspectionSpecification,
_InspectionCharacteristic.InspectionSpecificationVersion
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_INSPSPECAGGREGATE",
"I_INSPECTIONCHARACTERISTIC",
"I_INSPECTIONLOT",
"I_INSPECTIONLOTCANCELLEDSTATUS",
"I_INSPECTIONMETHODVERSIONTEXT",
"I_INSPSPECIFICATIONVERSIONTEXT",
"I_INSPSUBSETCHARACTERISTIC",
"I_ORDERPRODNRESOURCETOOL",
"I_PRODNRSCETOOLBYINTERNALKEY"
],
"ASSOCIATED":
[
"C_INSPLOTOPCHARCRSLTRECG"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/