@AbapCatalog.sqlViewName: 'IINSPPLV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Version of Inspection Plan'
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: { serviceQuality: #B, sizeCategory: #M, dataClass: #MASTER }
@ObjectModel.representativeKey: 'InspectionPlanInternalVersion'
@Metadata.ignorePropagatedAnnotations: true
//@Analytics.dataCategory:#DIMENSION
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities:
[ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET,#ANALYTICAL_DIMENSION ]
define view I_InspectionPlanVersion
as select from I_BillOfOperationsChangeState
association [1..1] to I_InspectionPlan as _InspectionPlan on $projection.InspectionPlanGroup = _InspectionPlan.InspectionPlanGroup
and $projection.InspectionPlan = _InspectionPlan.InspectionPlan
association [1..1] to I_BillOfOperationsGroup as _BillOfOperationsGroup on $projection.InspectionPlanGroup = _BillOfOperationsGroup.BillOfOperationsGroup
and $projection.BillOfOperationsType = _BillOfOperationsGroup.BillOfOperationsType
//associations added for C1 release purpose
association [1..1] to I_BillOfOperationsType as _BillOfOperationsType on $projection.BillOfOperationsType = _BillOfOperationsType.BillOfOperationsType
{
@ObjectModel.foreignKey.association: '_BillOfOperationsGroup'
key BillOfOperationsGroup as InspectionPlanGroup,
@ObjectModel.foreignKey.association: '_InspectionPlan'
key BillOfOperationsVariant as InspectionPlan,
// adding below annotation due to ignored underlying annotations
@ObjectModel.text.element: 'BillOfOperationsDesc'
key BOOInternalVersionCounter as InspectionPlanInternalVersion,
@ObjectModel.foreignKey.association: '_BillOfOperationsType'
BillOfOperationsType,
IsDeleted,
IsImplicitlyDeleted,
// *************************** Header general ****************************
-- General data
// adding below annotation due to ignored underlying annotations
@Semantics.text: true
BillOfOperationsDesc,
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_Plant'
Plant,
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_BillOfOperationsUsage'
BillOfOperationsUsage,
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_BillOfOperationsStatus'
BillOfOperationsStatus,
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_ResponsiblePlannerGroup'
ResponsiblePlannerGroup,
// adding below annotation due to ignored underlying annotations
@Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
@DefaultAggregation: #MIN
MinimumLotSizeQuantity,
// adding below annotation due to ignored underlying annotations
@Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
@DefaultAggregation: #MAX
MaximumLotSizeQuantity,
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_BillOfOperationsUnit'
@Semantics.unitOfMeasure: true
BillOfOperationsUnit,
ReplacedBillOfOperations,
IsMarkedForDeletion,
-- Parameter for dynamic modification/inspection points
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_InspSubsetFieldCombination'
InspSubsetFieldCombination,
InspectionPartialLot as InspectionPartialLotAssignment,
SmplDrawingProcedure,
SmplDrawingProcedureVersion,
InspectionLotDynamicLevel,
InspLotDynamicRule,
InspExternalNumberingOfValues,
InspLotDynamicCriteria,
@Semantics.booleanIndicator: true
InspPlanHasMultipleSpec,
@Semantics.booleanIndicator: true
cast( substring(InspLotDynamicCriteria,1,1) as qmatkz preserving type ) as MatlIsConsideredForDynModif,
@Semantics.booleanIndicator: true
cast( substring(InspLotDynamicCriteria,2,1) as qlifkz preserving type ) as SuplrIsConsideredForDynModif,
@Semantics.booleanIndicator: true
cast( substring(InspLotDynamicCriteria,3,1) as qherstkz preserving type ) as MfrIsConsideredForDynModif,
@Semantics.booleanIndicator: true
cast( substring(InspLotDynamicCriteria,4,1) as qkundkz preserving type ) as CustIsConsideredForDynModif,
// *************************** Administration ****************************
-- Administrative Data
// adding below annotation due to ignored underlying annotations
@Semantics.systemDate.createdAt: true
CreationDate,
// adding below annotation due to ignored underlying annotations
@Semantics.user.createdBy: true
CreatedByUser,
// adding below annotation due to ignored underlying annotations
@Semantics.systemDate.lastChangedAt: true
LastChangeDate,
// adding below annotation due to ignored underlying annotations
@Semantics.user.lastChangedBy: true
LastChangedByUser,
// adding below annotation due to ignored underlying annotations
@ObjectModel.foreignKey.association: '_ChangeMaster'
ChangeNumber,
// adding below annotation due to ignored underlying annotations
@Semantics.businessDate.from: true
ValidityStartDate,
// adding below annotation due to ignored underlying annotations
@Semantics.businessDate.to: true
ValidityEndDate,
// adding below annotation due to ignored underlying annotations
ChangedDateTime,
//Associations
_InspectionPlan,
_Plant,
_BillOfOperationsUsage,
_BillOfOperationsStatus,
_ResponsiblePlannerGroup,
_BillOfOperationsUnit,
_InspSubsetFieldCombination,
_SampleDrawingProcedure,
_SmplDrwgProcedureVersion,
_InspectionLotDynamicLevel,
_InspLotDynamicRule,
_InspExtNumbering,
_ChangeMaster,
// association added for C1 release purpose
_BillOfOperationsType,
_BillOfOperationsGroup,
_InspPartialLotAssignment
}
where
BillOfOperationsType = 'Q'
or BillOfOperationsType = 'S'