@AbapCatalog: {
compiler.compareFilter: true,
sqlViewName: 'CMPEOACOMP'
}
@AccessControl: {
authorizationCheck: #MANDATORY,
privilegedAssociations: ['_OpActyBOOOpBOMIndivItmAssgmt'],
personalData.blocking: #BLOCKED_DATA_EXCLUDED
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Operation Activity Component'
@Metadata.allowExtensions: true
@ObjectModel.usageType: {
serviceQuality: #D,
sizeCategory: #XL,
dataClass: #MIXED
}
@UI: {
presentationVariant: {
requestAtLeast: ['MaterialComponentIsMissing', 'ReservationIsFinallyIssued'],
sortOrder: {
by: 'Material',
direction: #ASC
}
},
selectionVariant: [
{
qualifier: 'ALL',
text: 'All Components'
},
{
qualifier: 'MISSING',
text: 'Missing Components',
filter: 'MaterialComponentIsMissing EQ "X" AND ReservationIsFinallyIssued EQ ""'
}
]
}
@VDM.viewType: #CONSUMPTION
define view C_OperationActivityComponent
as select from P_OperationActivityComponent as OperationActivityComponent
inner join I_OpActyInstceNtwkElmntBasic as OpActyInstceNtwkElmntBasic on OperationActivityComponent.OpActyNtwkInstance = OpActyInstceNtwkElmntBasic.OpActyNtwkInstance
and OperationActivityComponent.OpActyNtwkElement = OpActyInstceNtwkElmntBasic.OpActyNtwkElement
association [1..1] to I_OpActyNtwkInstance as _OpActyNtwkInstance on $projection.OpActyNtwkInstance = _OpActyNtwkInstance.OpActyNtwkInstance
association [1..1] to I_OperationActivityInstance as _OperationActivityInstance on $projection.OpActyNtwkInstance = _OperationActivityInstance.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _OperationActivityInstance.OpActyNtwkElement
association [1..1] to I_Material as _Material on $projection.Material = _Material.Material
association [0..1] to I_ProductPlant as _ProductPlant on $projection.Material = _ProductPlant.Product
and $projection.ProductionPlant = _ProductPlant.Plant
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to I_Plant as _ProductionPlant on $projection.ProductionPlant = _ProductionPlant.Plant
association [0..1] to I_BillOfMaterialItemBasic as _BillOfMaterialItem on $projection.BillOfMaterialCategory = _BillOfMaterialItem.BillOfMaterialCategory
and $projection.BillOfMaterial = _BillOfMaterialItem.BillOfMaterial
and $projection.BOMItem = _BillOfMaterialItem.BillOfMaterialItemNodeNumber
and $projection.BOMItemInternalChangeCount = _BillOfMaterialItem.BOMItemInternalChangeCount
association [0..1] to I_ReservationDocumentHeader as _Reservation on $projection.Reservation = _Reservation.Reservation
association [0..*] to C_MfgOrderCompAssemblyAggrgn as _MfgOrderCompAssemblyAggrgn on $projection.Reservation = _MfgOrderCompAssemblyAggrgn.Reservation
and $projection.ReservationItem = _MfgOrderCompAssemblyAggrgn.ReservationItem
and $projection.RecordType = _MfgOrderCompAssemblyAggrgn.RecordType
and $projection.OpActyNtwkInstance = _MfgOrderCompAssemblyAggrgn.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _MfgOrderCompAssemblyAggrgn.OpActyNtwkElement
and $projection.Material = _MfgOrderCompAssemblyAggrgn.Material
and _MfgOrderCompAssemblyAggrgn.AssemblyShopFloorItem = 0
association [0..*] to I_OpActyCompInstceAssignment as _OpActyCompInstceAssignment on $projection.Reservation = _OpActyCompInstceAssignment.Reservation
and $projection.ReservationItem = _OpActyCompInstceAssignment.ReservationItem
and $projection.RecordType = _OpActyCompInstceAssignment.RecordType
and $projection.OpActyNtwkInstance = _OpActyCompInstceAssignment.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _OpActyCompInstceAssignment.OpActyNtwkElement
association [0..*] to I_OpActyBOOOpBOMIndivItmAssgmt as _OpActyBOOOpBOMIndivItmAssgmt on $projection.OperationActivity = _OpActyBOOOpBOMIndivItmAssgmt.OperationActivity
and $projection.OperationActyVersionCounter = _OpActyBOOOpBOMIndivItmAssgmt.OperationActyVersionCounter
and $projection.BillOfOperationsType = _OpActyBOOOpBOMIndivItmAssgmt.BillOfOperationsType
and $projection.BillOfOperationsGroup = _OpActyBOOOpBOMIndivItmAssgmt.BillOfOperationsGroup
and $projection.BOOOpBOMItemInternalID = _OpActyBOOOpBOMIndivItmAssgmt.BOOOpBOMItemInternalID
association [0..1] to I_MfgBOMItemWithPhantomHier as _MfgBOMItemWithPhantomHier on $projection.BillOfMaterialCategory = _MfgBOMItemWithPhantomHier.MfgBillOfMaterialCategory
and $projection.BillOfMaterialInternalID = _MfgBOMItemWithPhantomHier.MfgBillOfMaterial
and $projection.BillOfMaterialVariant = _MfgBOMItemWithPhantomHier.MfgBillOfMaterialVariant
and $projection.BillOfMaterialVersion = _MfgBOMItemWithPhantomHier.MfgBillOfMaterialVersion
and $projection.InheritedBOMItemNode = _MfgBOMItemWithPhantomHier.MfgBOMItmInhtdNodeNmbr
----Extension Association
association [0..1] to E_BillOfMaterialItemTP as _BillOfMaterialItemExtension on $projection.BillOfMaterialCategory = _BillOfMaterialItemExtension.BillOfMaterialCategory
and $projection.BillOfMaterialInternalID = _BillOfMaterialItemExtension.BillOfMaterial
and $projection.BOMItem = _BillOfMaterialItemExtension.BillOfMaterialItemNodeNumber
and $projection.BOMItemInternalChangeCount = _BillOfMaterialItemExtension.BOMItemInternalChangeCount
{
@ObjectModel.foreignKey.association: '_OpActyNtwkInstance'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_OpActyNtwkInstanceStdVH', element: 'OpActyNtwkInstance' } } ]
@UI.hidden: true
key OperationActivityComponent.OpActyNtwkInstance, --OANInstanceID
@ObjectModel.foreignKey.association: '_OperationActivityInstance'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_OpActyInstceStdVH', element: 'OpActyNtwkElement' } } ]
@UI.hidden: true
key OperationActivityComponent.OpActyNtwkElement, --OperationActivityElementNumber
@ObjectModel.foreignKey.association: '_Reservation'
@UI.hidden: true
key OperationActivityComponent.Reservation, --ReservationNumber
@UI.hidden: true
key OperationActivityComponent.ReservationItem, --ReservationItemNumber
@UI.hidden: true
key OperationActivityComponent.RecordType, --ReservationRecordType
@UI.identification.position: 10
@UI.statusInfo.position: 10
@UI.lineItem.position: 10
@UI.selectionField.position: 10
@UI.fieldGroup.position: 10
@ObjectModel.foreignKey.association: '_Material'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
@ObjectModel.text.element: 'MaterialName'
@UI.dataPoint:{ title: 'Material'}
key OperationActivityComponent.Material, --Material
@ObjectModel.foreignKey.association: '_Plant'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_PlantStdVH', element: 'Plant' } } ]
key OperationActivityComponent.Plant,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.ManufacturingOrder,
@ObjectModel.foreignKey.association: '_ProductionPlant'
OperationActivityComponent.ProductionPlant,
@UI.hidden: true
@ObjectModel.foreignKey.association: '_StorageLocation'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_StorageLocation', element: 'StorageLocation' }, additionalBinding: [{localElement: 'Plant', element: 'Plant', usage: #FILTER }] } ]
OperationActivityComponent.StorageLocation,
@UI.hidden: true
_Material._Text[1: Language=$session.system_language].MaterialName,
@UI.hidden: true
cast('2' as mpe_oan_segment_type preserving type) as OpActyNtwkSegmentType, --Components are always assigned to the produce segment, needed for DCL
@UI.hidden: true
OperationActivityComponent.AssemblySequenceNumber,
@UI.hidden: true
@Semantics.unitOfMeasure: true
OperationActivityComponent.BaseUnit, --UnitOfMeasure
@UI.hidden: true
@Semantics.unitOfMeasure: true
cast(case OperationActivityComponent.MaterialCompIsVariableSized
-- Variable-size item: Assembly typically has to be done in PC, but base unit e.g. is square meter
when 'X' then OperationActivityComponent.VariableSizeItemUnit
else OperationActivityComponent.BaseUnit
end as erfme preserving type) as EntryUnit,
@UI.identification.position: 20
@UI.statusInfo.position: 20
@UI.lineItem.position: 20
@UI.selectionField.position: 20
@UI.fieldGroup.position: 20
@Semantics.quantity.unitOfMeasure: 'EntryUnit'
@EndUserText: {
label: 'Total Quantity',
quickInfo: 'Total Quantity'
}
OperationActivityComponent.MfgOrderComponentUsageQuantity,
@Semantics.quantity.unitOfMeasure: 'EntryUnit'
OperationActivityComponent.RequiredQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
cast(case OperationActivityComponent.MaterialCompIsVariableSized
when 'X' then OperationActivityComponent.RequiredQuantity * OperationActivityComponent.VariableSizeComponentQuantity
else OperationActivityComponent.RequiredQuantity
end as mpe_planned_qty_in_base_unit) as RequiredQuantityInBaseUnit,
@UI.identification.position: 30
@UI.statusInfo.position: 30
@UI.selectionField.position: 30
@UI.fieldGroup.position: 30
@Semantics.quantity.unitOfMeasure: 'EntryUnit'
@UI.lineItem: {position: 30, criticality: 'ComponentAssemblyCriticality'}
OperationActivityComponent.MaterialComponentQuantity, --ConsumedQuantity
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
OperationActivityComponent.ResvnItmWithdrawnQtyInBaseUnit,
@UI.hidden: true
case when OperationActivityComponent.MaterialComponentQuantity = 0 or OperationActivityComponent.MaterialComponentQuantity is null then 0 --gray
when OperationActivityComponent.MaterialComponentQuantity > OperationActivityComponent.RequiredQuantity then 1 --red, because overfilled
when OperationActivityComponent.MaterialComponentQuantity = OperationActivityComponent.RequiredQuantity then 3 --green
else 2 --yellow, not filled completely
end as ComponentAssemblyCriticality,
@UI.hidden: true
OperationActivityComponent.SerialNumberProfile, --MARC-SERNP
@UI.hidden: true
OperationActivityComponent.SerialNumberIsRqdForAssembly,
@UI.hidden: true
OperationActivityComponent.StockCheckMessageType,
@UI.hidden: true
OperationActivityComponent.IsBatchManagementRequired, --MARC-XCHPF
@UI.hidden: true
cast( OperationActivityComponent.MatlCompIsMarkedForBackflush as boolean preserving type ) as MatlCompIsMarkedForBackflush,
@UI.hidden: true
OperationActivityComponent.IsBulkMaterialComponent,
@UI.hidden: true
OperationActivityComponent.MatlCompDiscontinuationType,
-- Variable-Size Item Fields
@UI.hidden: true
OperationActivityComponent.MaterialCompIsVariableSized,
@UI.hidden: true
OperationActivityComponent.FormulaKey,
@UI.hidden: true
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
OperationActivityComponent.VariableSizeDimension1,
@UI.hidden: true
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
OperationActivityComponent.VariableSizeDimension2,
@UI.hidden: true
@Semantics.quantity.unitOfMeasure: 'VariableSizeDimensionUnit'
OperationActivityComponent.VariableSizeDimension3,
@UI.hidden: true
@Semantics.unitOfMeasure: true
OperationActivityComponent.VariableSizeDimensionUnit,
@ObjectModel: {
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_MPE_VSI_FRMTD_FORMULA_VE'
}
cast('' as mpe_vsi_formatted_formula) as VarblSizeCompFrmtdFormulaVal,
@Semantics.quantity.unitOfMeasure: 'VariableSizeComponentUnit'
OperationActivityComponent.VariableSizeComponentQuantity,
@UI.hidden: true
@Semantics.unitOfMeasure: true
OperationActivityComponent.VariableSizeComponentUnit,
@UI.hidden: true
OperationActivityComponent.MatlCompAssembleControl,
OperationActivityComponent._MatlCompAssembleControl._Text[1: Language=$session.system_language].MatlCompAssembleControlName,
@UI.hidden: true
OperationActivityComponent.GoodsMovementIsAllowed,
@UI.hidden: true
OperationActivityComponent.MaterialComponentIsMissing,
@UI.hidden: true
OperationActivityComponent.ReservationIsFinallyIssued,
@UI.hidden: true
OperationActivityComponent.MatlCompInstceAssyIsRequired,
@ObjectModel.text.element: 'BillOfMaterialItemCategoryDesc'
OperationActivityComponent.BOMItemCategory,
@UI.hidden: true
OperationActivityComponent._BOMItemCategory._ItemCategoryT[1: Language=$session.system_language].BillOfMaterialItemCategoryDesc,
@ObjectModel.text.element: 'MfgRefStrucItmRefDsgntrDesc'
cast( case OperationActivityComponent.MfgRefStrucItmDetIsContextual
when 'X' then OperationActivityComponent._MfgRefHierItemWithDetails.MfgRefStrucItmRefDesignator
else OperationActivityComponent._MfgRefStrucItemWithDetails.MfgRefStrucItmRefDesignator
end as mpe_mrs_designator preserving type ) as MfgRefStrucItmRefDesignator,
@UI.hidden: true
cast( case OperationActivityComponent.MfgRefStrucItmDetIsContextual
when 'X' then OperationActivityComponent._MfgRefHierItemWithDetails._MfgReferenceHierarchyItmTxt[1: Language=$session.system_language].HierMfgRefDesignatorDesc
else OperationActivityComponent._MfgRefStrucItemWithDetails._MfgReferenceStructureItmTxt[1: Language=$session.system_language].MfgRefStrucItmRefDsgntrDesc
end as mpe_mrs_designator_description preserving type ) as MfgRefStrucItmRefDsgntrDesc,
cast( case OperationActivityComponent.MfgRefStrucItmDetIsContextual
when 'X' then OperationActivityComponent._MfgRefHierItemWithDetails.HierMfgReferenceDesignatorName
else OperationActivityComponent._MfgRefStrucItemWithDetails.MfgRefStrucItmRefDsgntrName
end as mpe_mrs_designator_name preserving type ) as MfgRefStrucItmRefDsgntrName,
cast(coalesce(_MfgBOMItemWithPhantomHier.MfgBOMItemIsPhantomChild, '')
as mpe_bom_phantom_child preserving type) as MfgBOMItemIsPhantomChild,
-- Reference Information to other components
@UI.hidden: true
OperationActivityComponent.RelatedReservation,
@UI.hidden: true
OperationActivityComponent.RelatedReservationItem,
@UI.hidden: true
OperationActivityComponent.RelatedRecordType,
@UI.hidden: true
OperationActivityComponent.RelatedOpActyNtwkInstance,
@UI.hidden: true
OperationActivityComponent.RelatedOpActyNtwkElement,
@UI.hidden: true
OperationActivityComponent.LeadingReservation,
@UI.hidden: true
OperationActivityComponent.LeadingReservationItem,
@UI.hidden: true
OperationActivityComponent.LeadingReservationRecordType,
@UI.hidden: true
OperationActivityComponent.LeadingOpActyNtwkInstance,
@UI.hidden: true
OperationActivityComponent.LeadingOpActyNtwkElement,
-- Additional data needed for corresponding association
@UI.hidden: true
OperationActivityComponent.BillOfMaterialCategory,
@UI.hidden: true
OperationActivityComponent.BillOfMaterial,
@UI.hidden: true
OperationActivityComponent.BillOfMaterialInternalID,
@UI.hidden: true
OperationActivityComponent.BillOfMaterialVersion,
@UI.hidden: true
OperationActivityComponent.BillOfMaterialVariant,
@UI.hidden: true
OperationActivityComponent.InheritedBOMItemNode,
@UI.hidden: true
OperationActivityComponent.BOMItem,
@UI.hidden: true
OperationActivityComponent.BOMItemInternalChangeCount,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.BillOfOperationsType,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.BillOfOperationsGroup,
@UI.hidden: true
OperationActivityComponent.BOOOpBOMItemInternalID,
@UI.hidden: true
OperationActivityComponent.LogicalComponent,
@UI.hidden: true
OperationActivityComponent.MfgRefStrucBOMLeafAssgmtUUID,
@UI.hidden: true
OperationActivityComponent.MfgRefStructureItemDetailUUID,
@UI.hidden: true
OperationActivityComponent.MfgRefStrucItmDetIsContextual,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.OperationActivity,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.OperationActyVersionCounter,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.OrderInternalID,
@UI.hidden: true
OpActyInstceNtwkElmntBasic.OrderOperationInternalID,
// mara.zeinr as ImageID, -- not needed
// *********** next fields cannot come in this view because there can be several assemblies per component **********
// asm.sfi_id as AssembledComponentSFIID, -- is empty in case the component has not been assembled yet
// asm.batch as AssembledComponentBatch,
// sfi.sfi_id as ComponentSFIID,
// sfi.sfi_number as ComponentSFINumber
_MfgOrderCompAssemblyAggrgn,
_OpActyNtwkInstance,
_OperationActivityInstance,
_Material,
_Reservation,
_ProductPlant,
OpActyInstceNtwkElmntBasic._MfgOrder,
OpActyInstceNtwkElmntBasic._MfgOrderOperation,
_ProductionPlant,
_Plant,
OperationActivityComponent._StorageLocation,
_BillOfMaterialItem,
_OpActyCompInstceAssignment,
_OpActyBOOOpBOMIndivItmAssgmt
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLOFMATERIALITEMCATEGORY",
"I_BOMITEMCATEGORYTEXT",
"I_MATERIAL",
"I_MATERIALTEXT",
"I_MATLCOMPASSEMBLECONTROL",
"I_MATLCOMPASSEMBLECONTROLTEXT",
"I_MFGBOMITEMWITHPHANTOMHIER",
"I_MFGREFERENCEHIERARCHYITMTXT",
"I_MFGREFERENCESTRUCTUREITMTXT",
"I_MFGREFHIERITEMWITHDETAILS",
"I_MFGREFSTRUCITEMWITHDETAILS",
"I_OPACTYINSTCENTWKELMNTBASIC",
"P_OPERATIONACTIVITYCOMPONENT"
],
"ASSOCIATED":
[
"C_MFGORDERCOMPASSEMBLYAGGRGN",
"E_BILLOFMATERIALITEMTP",
"I_BILLOFMATERIALITEMBASIC",
"I_MATERIAL",
"I_MFGBOMITEMWITHPHANTOMHIER",
"I_MFGORDER",
"I_MFGORDEROPERATION",
"I_OPACTYBOOOPBOMINDIVITMASSGMT",
"I_OPACTYCOMPINSTCEASSIGNMENT",
"I_OPACTYNTWKINSTANCE",
"I_OPERATIONACTIVITYINSTANCE",
"I_PLANT",
"I_PRODUCTPLANT",
"I_RESERVATIONDOCUMENTHEADER",
"I_STORAGELOCATION"
],
"BASE":
[
"I_OPACTYINSTCENTWKELMNTBASIC",
"P_OPERATIONACTIVITYCOMPONENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/