@AbapCatalog.sqlViewName: 'IPPBOOOPCHARCCS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #CHECK
@Analytics.dataCategory: #DIMENSION
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions:true
@ObjectModel.representativeKey: 'BOOCharacteristicVersion'
@ObjectModel.usageType: { serviceQuality: #C, sizeCategory: #M, dataClass: #MASTER }
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Bill of Operations Operation Characteristic Change State'
define view I_BOOOpCharacteristicChgSt
as select from I_BOOCharcInspSpecUnion as _BOOCharcUnion
inner join I_BOOSqncOperationAssgmtChgSt as plas on plas.BillOfOperationsType = _BOOCharcUnion.BillOfOperationsType
and plas.BillOfOperationsGroup = _BOOCharcUnion.BillOfOperationsGroup
and plas.BOOOperationInternalID = _BOOCharcUnion.BOOOperationInternalID
and plas.ValidityStartDate <= _BOOCharcUnion.ValidityEndDate
and plas.ValidityEndDate >= _BOOCharcUnion.ValidityStartDate
-- to parent
association [1..1] to I_BOOOperationCharacteristic as _BOOOperationCharacteristic on $projection.BillOfOperationsType = _BOOOperationCharacteristic.BillOfOperationsType
and $projection.BillOfOperationsGroup = _BOOOperationCharacteristic.BillOfOperationsGroup
and $projection.BillOfOperationsVariant = _BOOOperationCharacteristic.BillOfOperationsVariant
and $projection.BillOfOperationsSequence = _BOOOperationCharacteristic.BillOfOperationsSequence
and $projection.BOOOperationInternalID = _BOOOperationCharacteristic.BOOOperationInternalID
and $projection.BOOCharacteristic = _BOOOperationCharacteristic.BOOCharacteristic
association [1..1] to I_BOOSqncOperationAssgmtChgSt as _BOOSqncOperationAssgmtChgSt on $projection.BillOfOperationsType = _BOOSqncOperationAssgmtChgSt.BillOfOperationsType
and $projection.BillOfOperationsGroup = _BOOSqncOperationAssgmtChgSt.BillOfOperationsGroup
and $projection.BillOfOperationsVariant = _BOOSqncOperationAssgmtChgSt.BillOfOperationsVariant
and $projection.BillOfOperationsSequence = _BOOSqncOperationAssgmtChgSt.BillOfOperationsSequence
and $projection.BOOOperationInternalID = _BOOSqncOperationAssgmtChgSt.BOOOperationInternalID
and $projection.BOOSqncOpAssgmtIntVersionCntr = _BOOSqncOperationAssgmtChgSt.BOOSqncOpAssgmtIntVersionCntr
association [1..1] to I_BOOCharacteristic as _BOOCharacteristic on $projection.BillOfOperationsType = _BOOCharacteristic.BillOfOperationsType
and $projection.BillOfOperationsGroup = _BOOCharacteristic.BillOfOperationsGroup
and $projection.BOOOperationInternalID = _BOOCharacteristic.BOOOperationInternalID
and $projection.BOOCharacteristic = _BOOCharacteristic.BOOCharacteristic
{
// --------------------------------------------------------------------------------------------------------
// Key
// --------------------------------------------------------------------------------------------------------
@ObjectModel.foreignKey.association: '_BillOfOperationsType'
key plas.BillOfOperationsType,
@ObjectModel.foreignKey.association: '_BillOfOperationsGroup'
key plas.BillOfOperationsGroup,
@ObjectModel.foreignKey.association: '_BillOfOperations'
key plas.BillOfOperationsVariant as BillOfOperationsVariant,
@ObjectModel.foreignKey.association: '_BillOfOperationsSequence'
key plas.BillOfOperationsSequence as BillOfOperationsSequence,
@ObjectModel.foreignKey.association: '_BOOOperationInternalID'
key plas.BOOOperationInternalID,
@ObjectModel.foreignKey.association: '_BOOSqncOperationAssgmtChgSt'
key plas.BOOSqncOpAssgmtIntVersionCntr as BOOSqncOpAssgmtIntVersionCntr,
@ObjectModel.foreignKey.association: '_BOOCharacteristic'
key _BOOCharcUnion.BOOCharacteristic,
key _BOOCharcUnion.BOOCharacteristicVersion,
// --------------------------------------------------------------------------------------------------------
// Validity
// --------------------------------------------------------------------------------------------------------
@Semantics.businessDate.from: true
cast(case when _BOOCharcUnion.ValidityStartDate > plas.ValidityStartDate then _BOOCharcUnion.ValidityStartDate
else plas.ValidityStartDate
end as vdm_v_validity_start_date preserving type) as ValidityStartDate,
@Semantics.businessDate.to: true
cast(case when _BOOCharcUnion.ValidityEndDate < plas.ValidityEndDate then _BOOCharcUnion.ValidityEndDate
else plas.ValidityEndDate
end as vdm_v_validity_end_date preserving type) as ValidityEndDate,
// --------------------------------------------------------------------------------------------------------
// General Data
// --------------------------------------------------------------------------------------------------------
_BOOCharcUnion.ChangeNumber,
case when _BOOCharcUnion.IsDeleted <> ' ' then _BOOCharcUnion.IsDeleted
when plas.IsDeleted <> ' ' then plas.IsDeleted
else plas.IsImplicitlyDeleted end as IsDeleted,
// Reference to inspection method (table QMTB)
@ObjectModel.foreignKey.association: '_InspectionMethodPlant'
InspectionMethodPlant,
@ObjectModel.foreignKey.association: '_InspectionMethod'
InspectionMethod,
@ObjectModel.foreignKey.association: '_InspectionMethodVersion'
InspectionMethodVersion,
@ObjectModel.foreignKey.association: '_InspSpecImportanceCode'
InspSpecImportanceCode,
@ObjectModel.foreignKey.association: '_InspectorQualification'
InspectorQualification,
// --------------------------------------------------------------------------------------------------------
// Reference to Inspection Specification Version (Inspection Characteristic Master, table QPMK)
// --------------------------------------------------------------------------------------------------------
@ObjectModel.foreignKey.association: '_InspectionSpecificationPlant'
InspectionSpecificationPlant,
@ObjectModel.foreignKey.association: '_InspectionSpecification'
InspectionSpecification,
@ObjectModel.foreignKey.association: '_InspSpecificationVersion'
InspectionSpecificationVersion,
BOOCharcHasInspSpecReference,
QltyMstrDataAuthorizationGroup,
// --------------------------------------------------------------------------------------------------------
// Control indicators
// --------------------------------------------------------------------------------------------------------
@ObjectModel.readOnly: true
InspSpecControlIndicators, // Publish structure as a whole
InspSpecIsQuantitative, // Quantitative-Qualitative
@ObjectModel.foreignKey.association: '_InspSpecCharcType'
InspSpecCharacteristicType,
InspSpecIsMeasuredValueRqd, // Measured Value Must Be Recorded
InspSpecIsSelectedSetRequired, // Selected set is required
InspSpecIsUpperLimitRequired, // Upper Specification Limit Required
InspSpecIsLowerLimitRequired, // Lower Specification Limit Required
InspSpecIsTargetValueInLimit, // Check if target value is between lower and upper limit
@ObjectModel.foreignKey.association: '_InspectionScope'
InspectionScope, // Inspection Scope
InspSpecIsLongTermInspection, // Long-Term Inspection
@ObjectModel.foreignKey.association: '_InspSpecRecordingType'
InspSpecRecordingType, // RecordingType: Values from domain QESTKUZ
@ObjectModel.foreignKey.association: '_InspResultDocnRequired'
InspResultIsDocumentationRqd, // Documentation Required for Inspection Result: Values from domain QDOKUKZ
@ObjectModel.foreignKey.association: '_InspSpecCharcCategory'
InspSpecCharcCategory, // Characteristic Category
InspSpecIsSampleQtyAdditive, // Sample Quantity Is Additive
InspSpecIsDestructive, // Destructive Inspection
@ObjectModel.foreignKey.association: '_InspSpecRsltCalculation'
InspSpecResultCalculation, // Result Calculation for Characteristics
InspSpecIsSamplingProcedRqd, // Sampling Procedure Is Required
InspSpecIsScrapRelevant, // Characteristic Relevant for Quality Score and Scrap Share
InspSpecHasFixedCtrlIndicators,
InspSpecIsTestEquipmentRqd, // Assignment of Test Equipment Required
InspSpecIsDefectsRecgAutomatic, // Defects Recording Automatically Called Up
InspSpecIsChgDocRequired, // Create Change Documents During Results Recording
InspSpecIsControlChartUsed, // SPC Characteristic; Control Chart is Used
@ObjectModel.foreignKey.association: '_InspSpecPrintControl'
InspSpecPrintControl, // Print Control
// --------------------------------------------------------------------------------------------------------
// Quantitative Data/ Tolerances
// --------------------------------------------------------------------------------------------------------
@ObjectModel.foreignKey.association: '_InspToleranceSpecification'
InspToleranceSpecification,
InspSpecDecimalPlaces,
@ObjectModel.foreignKey.association: '_InspSpecUnitOfMeasure'
@Semantics.unitOfMeasure: true
InspectionSpecificationUnit,
-- @Semantics.quantity.unitOfMeasure: 'InspectionSpecificationUnit'
-- @DefaultAggregation:#NONE
InspSpecTargetValue,
@ObjectModel.readOnly: true
InspSpecHasTargetValue,
// Tolerance
-- @Semantics.quantity.unitOfMeasure: 'InspectionSpecificationUnit'
-- @DefaultAggregation:#NONE
InspSpecUpperLimit,
-- @Semantics.quantity.unitOfMeasure: 'InspectionSpecificationUnit'
-- @DefaultAggregation:#NONE
InspSpecLowerLimit,
@ObjectModel.readOnly: true
InspSpecHasUpperLimit,
@ObjectModel.readOnly: true
InspSpecHasLowerLimit,
// --------------------------------------------------------------------------------------------------------
// Cataloges
// --------------------------------------------------------------------------------------------------------
// Defect codes for rejection
@ObjectModel.foreignKey.association: '_InspDefectCodeGrpRejection'
InspSpecDefectCodeGrpRejection,
@ObjectModel.foreignKey.association: '_InspDefectCodeRejection'
InspSpecDefectCodeRejection,
@ObjectModel.foreignKey.association: '_InspDefectCodeGrpRjcnUpper'
InspSpecDefectCodeGrpRjcnUpper,
@ObjectModel.foreignKey.association: '_InspDefectCodeRjcnUpper'
InspSpecDefectCodeRjcnUpper,
@ObjectModel.foreignKey.association: '_InspDefectCodeGrpRjcnLower'
InspSpecDefectCodeGrpRjcnLower,
@ObjectModel.foreignKey.association: '_InspDefectCodeRjcnLower'
InspSpecDefectCodeRjcnLower,
@ObjectModel.foreignKey.association: '_CharcAttribSelectedCodeSet'
SelectedCodeSet,
SelectedCodeSetPlant,
InspSpecAdditionalCatalog2,
InspSpecAdditionalSelectedSet2,
InspSpecAdditionalCodeGroup2,
InspSpecAddlSeldCodeSetPlant2,
InspSpecAdditionalCatalog3,
InspSpecAdditionalSelectedSet3,
InspSpecAdditionalCodeGroup3,
InspSpecAddlSeldCodeSetPlant3,
InspSpecAdditionalCatalog4,
InspSpecAdditionalSelectedSet4,
InspSpecAdditionalCodeGroup4,
InspSpecAddlSeldCodeSetPlant4,
InspSpecAdditionalCatalog5,
InspSpecAdditionalSelectedSet5,
InspSpecAdditionalCodeGroup5,
InspSpecAddlSeldCodeSetPlant5,
// --------------------------------------------------------------------------------------------------------
// Sample Data
// --------------------------------------------------------------------------------------------------------
@ObjectModel.foreignKey.association: '_SamplingProcedure'
SamplingProcedure,
@ObjectModel.foreignKey.association: '_SampleUnitOfMeasure'
@Semantics.unitOfMeasure: true
InspCharacteristicSampleUnit,
@Semantics.quantity.unitOfMeasure: 'InspCharacteristicSampleUnit'
@DefaultAggregation:#NONE
BOOCharcSampleQuantity,
// --------------------------------------------------------------------------------------------------------
// Additional Data
// --------------------------------------------------------------------------------------------------------
InspSpecInformationField1,
InspSpecInformationField2,
InspSpecInformationField3,
// --------------------------------------------------------------------------------------------------------
// Texts
// --------------------------------------------------------------------------------------------------------
InspectionSpecificationText,
// --------------------------------------------------------------------------------------------------------
// Administrative Data
// --------------------------------------------------------------------------------------------------------
@ObjectModel.readOnly: true
@Semantics.user.createdBy: true
_BOOCharcUnion.CreatedByUser,
@ObjectModel.readOnly: true
@Semantics.systemDate.createdAt: true
_BOOCharcUnion.CreationDate,
@ObjectModel.readOnly: true
@Semantics.user.lastChangedBy: true
_BOOCharcUnion.LastChangedByUser,
@ObjectModel.readOnly: true
@Semantics.systemDate.lastChangedAt: true
_BOOCharcUnion.LastChangeDate,
// --------------------------------------------------------------------------------------------------------
// Routing Version
// --------------------------------------------------------------------------------------------------------
_BOOCharcUnion.BillOfOperationsVersion,
// --------------------------------------------------------------------------------------------------------
// Associations
// --------------------------------------------------------------------------------------------------------
plas._BillOfOperationsType,
plas._BillOfOperationsGroup,
plas._BillOfOperations,
plas._BillOfOperationsSequence,
plas._BOOOperationInternalID,
_BOOSqncOperationAssgmtChgSt,
_BOOCharacteristic,
_BOOOperationCharacteristic, // Parent
_CharcAttribSelectedCodeSet,
_InspSpecCharcType,
_InspectionScope,
_InspSpecRecordingType,
_InspResultDocnRequired,
_InspSpecImportanceCode,
_InspSpecCharcCategory,
_InspSpecRsltCalculation,
_InspSpecPrintControl,
_InspectorQualification,
_InspectionMethodPlant,
_InspectionMethod,
_InspectionMethodVersion,
_InspectionSpecificationPlant,
_InspectionSpecification,
_InspSpecificationVersion,
_SamplingProcedure,
_SampleUnitOfMeasure,
_InspToleranceSpecification,
_InspSpecUnitOfMeasure,
_InspDefectCodeGrpRejection,
_InspDefectCodeRejection,
_InspDefectCodeGrpRjcnUpper,
_InspDefectCodeRjcnUpper,
_InspDefectCodeGrpRjcnLower,
_InspDefectCodeRjcnLower
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BOOCHARCINSPSPECUNION",
"I_BOOSQNCOPERATIONASSGMTCHGST"
],
"ASSOCIATED":
[
"I_BILLOFOPERATIONS",
"I_BILLOFOPERATIONSGROUP",
"I_BILLOFOPERATIONSSEQUENCE",
"I_BILLOFOPERATIONSTYPE",
"I_BOOCHARACTERISTIC",
"I_BOOOPERATIONCHARACTERISTIC",
"I_BOOOPERATIONINTERNALID",
"I_BOOSQNCOPERATIONASSGMTCHGST",
"I_CHARCATTRIBSELECTEDCODESET",
"I_DEFECTCODE",
"I_DEFECTCODEGROUP",
"I_INSPECTIONMETHOD",
"I_INSPECTIONMETHODVERSION",
"I_INSPECTIONSCOPE",
"I_INSPECTIONSPECIFICATION",
"I_INSPECTORQUALIFICATION",
"I_INSPRESULTDOCUREQUIRED",
"I_INSPSPECCHARCCATEGORY",
"I_INSPSPECCHARCTYPE",
"I_INSPSPECIFICATIONVERSION",
"I_INSPSPECIMPORTANCECODE",
"I_INSPSPECPRINTCONTROL",
"I_INSPSPECRECORDINGTYPE",
"I_INSPSPECRSLTCALCULATION",
"I_INSPTOLERANCESPECIFICATION",
"I_PLANT",
"I_SAMPLINGPROCEDURE",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_BOOCHARCINSPSPECUNION",
"I_BOOSQNCOPERATIONASSGMTCHGST"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/