@AbapCatalog.sqlViewName: 'CMPESFOOA'
@AbapCatalog.compiler.compareFilter: true
@Metadata.allowExtensions: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: ['_SkippedByUserContactCard']
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MIXED},
semanticKey: ['ManufacturingOrderOperation']
}
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@VDM.viewType: #CONSUMPTION
@UI.headerInfo:{
typeName: 'Operation Activity',
typeNamePlural: 'Operation Activities',
title: { label: 'Operation Activity', type: #STANDARD, value: 'OperationActivityName' },
description: { label: 'Product in Operation Activity', type: #STANDARD, value: 'OperationActivityName' }
}
@UI.presentationVariant.sortOrder: [ {by: 'ManufacturingOrderOperation', direction: #ASC},
{by: 'OpActyNtwkElementExternalID', direction: #ASC} ]
@EndUserText.label: 'Shop Floor Order Operation Activity'
--@UI.lineItem: [{criticality: 'ReworkOperationCriticality'}]
define view C_ShopFloorOrderOperationActy
as select from I_OpActyInstceOpActyNtwkElmnt as OpActyInstanceOpActyNtwkElmnt
inner join I_OpActyInstanceStatusBasic as OpActyInstanceStatusBasic on OpActyInstanceStatusBasic.OpActyNtwkInstance = OpActyInstanceOpActyNtwkElmnt.OpActyNtwkInstance
and OpActyInstanceStatusBasic.OpActyNtwkElement = OpActyInstanceOpActyNtwkElmnt.OpActyNtwkElement
inner join I_OrderOperationBasic as OrderOperation on OrderOperation.OrderInternalID = OpActyInstanceOpActyNtwkElmnt.OrderInternalID
and OrderOperation.OrderOperationInternalID = OpActyInstanceOpActyNtwkElmnt.OrderOperationInternalID
left outer to one join I_OpActyWorkInstructionAssgmt as OpActyWorkInstructionAssgmt on OpActyWorkInstructionAssgmt.OperationActivity = OpActyInstanceOpActyNtwkElmnt.OperationActivity
and OpActyWorkInstructionAssgmt.OperationActyVersionCounter = OpActyInstanceOpActyNtwkElmnt.OperationActyVersionCounter
left outer to one join I_OpActyNtwkGroupElement as OpActyNtwkGroupElementRel on OpActyInstanceOpActyNtwkElmnt.OperationActivityNetwork = OpActyNtwkGroupElementRel.OperationActivityNetwork
and OpActyInstanceOpActyNtwkElmnt.OpActyNtwkVersionCounter = OpActyNtwkGroupElementRel.OpActyNtwkVersionCounter
and OpActyInstanceOpActyNtwkElmnt.OpActyNtwkElement = OpActyNtwkGroupElementRel.OpActyNtwkGroupChildElement
left outer to one join I_OpActyNtwkElement as OpActyNtwkGroupElement on OpActyNtwkGroupElement.OperationActivityNetwork = OpActyNtwkGroupElementRel.OperationActivityNetwork
and OpActyNtwkGroupElement.OpActyNtwkVersionCounter = OpActyNtwkGroupElementRel.OpActyNtwkVersionCounter
and OpActyNtwkGroupElement.OpActyNtwkElement = OpActyNtwkGroupElementRel.OpActyNtwkGroupParentElement
and OpActyNtwkGroupElement.OpActyNtwkElementType = 5 //group
association [0..*] to C_OperationActyPRTAssignment as _OperationActyPRTAssignment on $projection.OpActyNtwkInstance = _OperationActyPRTAssignment.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _OperationActyPRTAssignment.OpActyNtwkElement
association [0..*] to C_SFOAssldTraceableComponent as _SFOAssldTraceableComponent on $projection.OpActyNtwkInstance = _SFOAssldTraceableComponent.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _SFOAssldTraceableComponent.OpActyNtwkElement
association [0..*] to C_SFOAssldNonTrcblComponent as _SFOAssldNonTrcblComponent on $projection.OpActyNtwkInstance = _SFOAssldNonTrcblComponent.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _SFOAssldNonTrcblComponent.OpActyNtwkElement
association [0..*] to C_MfgExecEventHistory as _MfgExecEventHistory on $projection.OpActyNtwkInstance = _MfgExecEventHistory.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _MfgExecEventHistory.OpActyNtwkElement
association [0..1] to P_OpActyProdnRsceToolAssAgg2 as _OpActyProdnRsceToolAssAgg on $projection.OpActyNtwkInstance = _OpActyProdnRsceToolAssAgg.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _OpActyProdnRsceToolAssAgg.OpActyNtwkElement
association [0..1] to I_OpActyInstanceStatusBasic as _OpActyInstanceStatusBasic on $projection.OpActyNtwkInstance = _OpActyInstanceStatusBasic.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _OpActyInstanceStatusBasic.OpActyNtwkElement
association [0..*] to I_SASStatusText as _SASStatusText on $projection.StatusAndActionSchemaStatus = _SASStatusText.StatusAndActionSchemaStatus
association [0..*] to I_OANSegmentTypeText as _OANSegmentTypeText on $projection.OpActyNtwkSegmentType = _OANSegmentTypeText.OpActyNtwkSegmentType
association [1..1] to I_OrdInternalBillOfOperations as _OrdInternalBillOfOperations on $projection.OrderInternalID = _OrdInternalBillOfOperations.OrderInternalBillOfOperations
association [0..1] to I_MfgWorkInstruction as _MfgWorkInstruction on $projection.WorkInstruction = _MfgWorkInstruction.MfgWorkInstruction
and $projection.WorkInstructionVersionCounter = _MfgWorkInstruction.MfgWorkInstructionVersCounter
association [0..1] to I_MfgWorkInstructionVersion as _MfgWorkInstructionVersion on $projection.WorkInstruction = _MfgWorkInstructionVersion.MfgWorkInstruction
and $projection.WorkInstructionVersionCounter = _MfgWorkInstructionVersion.MfgWorkInstructionVersCounter
and _MfgWorkInstructionVersion.Language = $session.system_language
association [0..*] to I_MfgOrderOpActyInspCharcs as _MfgOrderOpActyInspCharcs on $projection.OrderOperationInternalID = _MfgOrderOpActyInspCharcs.OrderOperationInternalID
and $projection.OpActyNtwkInstance = _MfgOrderOpActyInspCharcs.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _MfgOrderOpActyInspCharcs.OpActyNtwkElement
-- contact card
association [0..1] to I_UserContactCard as _SkippedByUserContactCard on $projection.CreatedByUserName = _SkippedByUserContactCard.ContactCardID
association [0..*] to I_MfgOrderOpDocInfoRecdObjLink as _MfgOrderOpDocInfoRecdObjLink on $projection.ManufacturingOrder = _MfgOrderOpDocInfoRecdObjLink.ManufacturingOrder
and $projection.OrderOperationInternalID = _MfgOrderOpDocInfoRecdObjLink.OrderOperationInternalID
association [0..*] to I_MfgOrderDocInfoRecdObjLink as _MfgOrderDocInfoRecdObjLink on $projection.ManufacturingOrder = _MfgOrderDocInfoRecdObjLink.ManufacturingOrder
association [0..*] to C_MfgQualifnOpActyAssgmt as _MfgQualifnOpActyAssgmt on $projection.OpActyNtwkInstance = _MfgQualifnOpActyAssgmt.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _MfgQualifnOpActyAssgmt.OpActyNtwkElement
association [0..*] to C_SFOOpActyTrcblUsedPRT as _SFOOpActyTrcblUsedPRT on $projection.OrderInternalID = _SFOOpActyTrcblUsedPRT.OrderInternalID
and $projection.OpActyNtwkInstance = _SFOOpActyTrcblUsedPRT.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _SFOOpActyTrcblUsedPRT.OpActyNtwkElement
association [0..*] to C_SFOOpActyNonTrcblUsedPRT as _SFOOpActyNonTrcblUsedPRT on $projection.OrderInternalID = _SFOOpActyNonTrcblUsedPRT.OrderInternalID
and $projection.OpActyNtwkInstance = _SFOOpActyNonTrcblUsedPRT.OpActyNtwkInstance
and $projection.OpActyNtwkElement = _SFOOpActyNonTrcblUsedPRT.OpActyNtwkElement
{
@UI.facet: [
{
purpose: #STANDARD,
id: 'GENERAL',
label: 'General Information',
type: #IDENTIFICATION_REFERENCE,
position: 10
},
-- Components: One collection which consists of two collection with one table each
-- The two collections are required to get the tables below (instead of next to) each other
{
purpose: #STANDARD,
label: 'Components',
id: 'COMPONENTS',
type: #COLLECTION,
position: 20
},
{
purpose: #STANDARD,
label: 'Traceable Components',
id: 'TRACEABLE_COMP_COLL',
parentId: 'COMPONENTS',
type: #COLLECTION,
position: 10
},
{
purpose: #STANDARD,
label: 'Traceable Components',
id: 'TRACEABLE_COMP',
parentId: 'TRACEABLE_COMP_COLL',
type: #LINEITEM_REFERENCE,
targetElement: '_SFOAssldTraceableComponent',
position: 10
},
{
purpose: #STANDARD,
label: 'Non-Traceable Components',
id: 'NON_TRACEABLE_COMP_COLL',
parentId: 'COMPONENTS',
type: #COLLECTION,
position: 20
},
{
purpose: #STANDARD,
label: 'Non-Traceable Components',
id: 'NON_TRACEABLE_COMP',
parentId: 'NON_TRACEABLE_COMP_COLL',
type: #LINEITEM_REFERENCE,
targetElement: '_SFOAssldNonTrcblComponent',
position: 10
},
-- PRTs
{
purpose: #STANDARD,
label: 'PRTs',
id: 'PRTS',
type: #COLLECTION,
position: 30
},
{
purpose: #STANDARD,
label: 'Traceable PRTs',
id: 'TRACEABLE_PRT_COLL',
parentId: 'PRTS',
type: #COLLECTION,
position: 10
},
{
purpose: #STANDARD,
label: 'Traceable PRTs',
id: 'TRACEABLE_PRT',
parentId: 'TRACEABLE_PRT_COLL',
type: #LINEITEM_REFERENCE,
targetElement: '_SFOOpActyTrcblUsedPRT',
position: 10
},
{
purpose: #STANDARD,
label: 'Non-Traceable PRTs',
id: 'NON_TRACEABLE_PRT_COLL',
parentId: 'PRTS',
type: #COLLECTION,
position: 20
},
{
purpose: #STANDARD,
label: 'Non-Traceable PRTs',
id: 'NON_TRACEABLE_PRT',
parentId: 'NON_TRACEABLE_PRT_COLL',
type: #LINEITEM_REFERENCE,
targetElement: '_SFOOpActyNonTrcblUsedPRT',
position: 10
},
-- ICs
{
purpose: #STANDARD,
id: 'IC',
label: 'Inspection Characteristics',
targetElement: '_MfgOrderOpActyInspCharcs',
type: #LINEITEM_REFERENCE,
position: 40
},
-- Qualifications
{
purpose: #STANDARD,
id: 'QF',
label: 'Qualifications',
targetElement: '_MfgQualifnOpActyAssgmt',
type: #LINEITEM_REFERENCE,
position: 80
}
]
--- keys
@UI.hidden: true
key OpActyInstanceOpActyNtwkElmnt.OpActyNtwkInstance as OpActyNtwkInstance,
@UI.hidden: true
key OpActyInstanceOpActyNtwkElmnt.OpActyNtwkElement as OpActyNtwkElement,
@ObjectModel.foreignKey.association: '_OrdInternalBillOfOperations'
@UI.hidden: true
OpActyInstanceOpActyNtwkElmnt.OrderInternalID as OrderInternalID,
@UI.hidden: true
OpActyInstanceOpActyNtwkElmnt.OrderOperationInternalID as OrderOperationInternalID,
@UI.hidden: true
OrderOperation.Plant as ProductionPlant,
@UI: {
statusInfo.position: 20,
selectionField.position: 20,
fieldGroup.position: 20,
dataPoint:{ title: 'Order'}
}
@ObjectModel.foreignKey.association: '_MfgOrder'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' } } ]
OpActyInstanceOpActyNtwkElmnt.ManufacturingOrder,
@UI: {
statusInfo.position: 30,
selectionField.position: 30,
fieldGroup.position: 30,
dataPoint:{ title: 'Material'}
}
@ObjectModel: {
foreignKey.association: '_Material',
text.element: 'MaterialName'
}
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
OpActyInstanceOpActyNtwkElmnt._MfgOrder.Material,
@UI.hidden: true
OpActyInstanceOpActyNtwkElmnt._MfgOrder._Material._Text[1: Language=$session.system_language].MaterialName,
@UI: {
lineItem: {position: 10},
statusInfo.position: 40,
selectionField.position: 40,
fieldGroup.position: 40,
dataPoint:{ title: 'Operation'},
textArrangement: #TEXT_LAST
}
@ObjectModel.text.element: 'MfgOrderOperationText'
cast(OrderOperation.Operation as mpe_vornr_char preserving type) as ManufacturingOrderOperation,
@UI.hidden: true
@Semantics.text: true
cast(OrderOperation.OperationText as mfgorderoperationtext preserving type) as MfgOrderOperationText,
@UI: {
lineItem: {position: 20},
statusInfo.position: 50,
selectionField.position: 50,
fieldGroup.position: 50,
dataPoint:{ title: 'Operation Activity'},
textArrangement: #TEXT_LAST
}
@ObjectModel.text.element: 'OperationActivityName'
cast(OpActyInstanceOpActyNtwkElmnt.OpActyNtwkElementExternalID as mpe_oa_number_ext preserving type) as OpActyNtwkElementExternalID,
@UI.hidden: true
OpActyInstanceOpActyNtwkElmnt._OperationActivityText[1: Language=$session.system_language].OperationActivityName,
--Group the PA belongs to
@UI.hidden: true
OpActyNtwkGroupElement.OpActyNtwkElementElement as OperationActivityNetworkGroup,
@UI.hidden: true
OpActyNtwkGroupElement.OpActyNtwkElementElmntVersCntr as OpActyNtwkGroupVersionCounter,
cast(OpActyNtwkGroupElement.OpActyNtwkElementExternalID as mpe_group_number_ext preserving type) as OpActyNtwkGroupExternalID,
-- Status of the OA
@ObjectModel.text.element: 'SASStatusName'
@UI.lineItem: {position: 40 }
@UI.textArrangement: #TEXT_ONLY
OpActyInstanceStatusBasic.StatusAndActionSchemaStatus as StatusAndActionSchemaStatus,
@UI.hidden: true
OpActyInstanceStatusBasic._SASStatus.SASStatusCategory,
@UI.hidden: true
cast(OpActyInstanceStatusBasic._SASStatus._Text[1: Language=$session.system_language].SASStatusName
as mpe_oa_status_description preserving type) as SASStatusName,
-- Who and when skipped the SFI for this OA
@UI: {
identification: {position: 60, type: #AS_CONTACT, label: 'Skipped By', value: '_SkippedByUserContactCard'},
statusInfo.position: 60,
selectionField.position: 60,
fieldGroup.position: 60,
lineItem: {position: 80, type: #AS_CONTACT, label: 'Skipped By', value: '_SkippedByUserContactCard'}
}
cast(case
when OpActyInstanceStatusBasic._SASStatus.SASStatusCategory = 4 --skipped
then OpActyInstanceStatusBasic._OpActyStsLastChgdByOpActyConf.CreatedByUser
else ''
end as mpe_skipped_by preserving type) as CreatedByUserName,
@UI: {
lineItem: {position: 90},
identification.position: 70,
statusInfo.position: 70,
selectionField.position: 70,
fieldGroup.position: 70
}
cast(case
when OpActyInstanceStatusBasic._SASStatus.SASStatusCategory = 4 --skipped
then OpActyInstanceStatusBasic._OpActyStsLastChgdByOpActyConf.CreationDateTime
else 0
end as mpe_skip_timestampl preserving type) as CreationDateTime,
@UI.hidden: true
@ObjectModel.readOnly: true
case _OpActyInstanceStatusBasic._SASStatus.SASStatusCategory
when 4 then 2 --Skipped
else 0
end as SASStatusCriticality,
@ObjectModel.text.association: '_OANSegmentTypeText'
@UI: {
lineItem: {position: 30},
textArrangement: #TEXT_ONLY
}
OpActyInstanceOpActyNtwkElmnt.OpActyNtwkSegmentType,
@UI.hidden: true
cast( case
when _OpActyProdnRsceToolAssAgg.OpActyNtwkInstance is null then ''
else 'X'
end as boolean preserving type) as OpActyHasAssgdProdnRsceTools,
@UI.hidden: true
OpActyWorkInstructionAssgmt.WorkInstruction,
@UI.hidden: true
OpActyWorkInstructionAssgmt.WorkInstructionVersionCounter,
@UI.hidden: true
@ObjectModel: {
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_MPE_CREATE_WI_HTML_CONTENT'
}
_MfgWorkInstructionVersion.MfgWorkInstructionContent as MfgWorkInstructionContent,
@UI.hidden: true
_MfgWorkInstruction.MfgWorkInstructionMode,
@Consumption.filter.hidden: true
_OperationActyPRTAssignment,
@Consumption.filter.hidden: true
_SFOAssldTraceableComponent,
@Consumption.filter.hidden: true
_SFOAssldNonTrcblComponent,
@Consumption.filter.hidden: true
_MfgExecEventHistory,
@Consumption.filter.hidden: true
OpActyInstanceOpActyNtwkElmnt._MfgOrder,
@Consumption.filter.hidden: true
OpActyInstanceOpActyNtwkElmnt._MfgOrder._Material,
@Consumption.filter.hidden: true
_SkippedByUserContactCard,
@Consumption.filter.hidden: true
_OpActyInstanceStatusBasic,
@Consumption.filter.hidden: true
OpActyInstanceStatusBasic._SASStatus,
@Consumption.filter.hidden: true
OpActyInstanceStatusBasic._SASStatus._SASStatusCategory,
@Consumption.filter.hidden: true
_SASStatusText,
@Consumption.filter.hidden: true
_OANSegmentTypeText,
@Consumption.filter.hidden: true
_OrdInternalBillOfOperations,
@Consumption.filter.hidden: true
_MfgWorkInstruction,
@Consumption.filter.hidden: true
_MfgWorkInstructionVersion,
@Consumption.filter.hidden: true
_MfgOrderOpActyInspCharcs,
@Consumption.filter.hidden: true
OpActyWorkInstructionAssgmt._WorkInstructionInternalId,
@Consumption.filter.hidden: true
OpActyWorkInstructionAssgmt._WorkInstruction,
@Consumption.filter.hidden: true
OpActyInstanceOpActyNtwkElmnt._OANSegmentType,
@Consumption.filter.hidden: true
OpActyInstanceOpActyNtwkElmnt._OpActyNtwkInstance,
@Consumption.filter.hidden: true
_MfgOrderOpDocInfoRecdObjLink,
@Consumption.filter.hidden: true
_MfgOrderDocInfoRecdObjLink,
@Consumption.filter.hidden: true
_MfgQualifnOpActyAssgmt,
@Consumption.filter.hidden: true
_SFOOpActyTrcblUsedPRT,
@Consumption.filter.hidden: true
_SFOOpActyNonTrcblUsedPRT
}
where
-- Only those Operation Activities at which SAS-actions have been posted which have not been fully reverted
OpActyInstanceStatusBasic._SASStatus.SASStatusCategory <> 1 -- Not initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIAL",
"I_MATERIALTEXT",
"I_MFGORDER",
"I_MFGWORKINSTRUCTION",
"I_MFGWORKINSTRUCTIONVERSION",
"I_OPACTYCONFIRMATION",
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_OPACTYNTWKELEMENT",
"I_OPACTYNTWKGROUPELEMENT",
"I_OPACTYWORKINSTRUCTIONASSGMT",
"I_OPERATIONACTIVITYTEXT",
"I_ORDEROPERATIONBASIC",
"I_SASSTATUS",
"I_SASSTATUSTEXT",
"P_OPACTYPRODNRSCETOOLASSAGG2"
],
"ASSOCIATED":
[
"C_MFGEXECEVENTHISTORY",
"C_MFGQUALIFNOPACTYASSGMT",
"C_OPERATIONACTYPRTASSIGNMENT",
"C_SFOASSLDNONTRCBLCOMPONENT",
"C_SFOASSLDTRACEABLECOMPONENT",
"C_SFOOPACTYNONTRCBLUSEDPRT",
"C_SFOOPACTYTRCBLUSEDPRT",
"I_MATERIAL",
"I_MFGORDER",
"I_MFGORDERDOCINFORECDOBJLINK",
"I_MFGORDEROPACTYINSPCHARCS",
"I_MFGORDEROPDOCINFORECDOBJLINK",
"I_MFGWORKINSTRUCTION",
"I_MFGWORKINSTRUCTIONINTERNALID",
"I_MFGWORKINSTRUCTIONTP",
"I_MFGWORKINSTRUCTIONVERSION",
"I_OANSEGMENTTYPE",
"I_OANSEGMENTTYPETEXT",
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYNTWKINSTANCE",
"I_ORDINTERNALBILLOFOPERATIONS",
"I_SASSTATUS",
"I_SASSTATUSCATEGORY",
"I_SASSTATUSTEXT",
"I_USERCONTACTCARD",
"P_OPACTYPRODNRSCETOOLASSAGG2"
],
"BASE":
[
"I_MFGORDER",
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_OPACTYWORKINSTRUCTIONASSGMT",
"I_SASSTATUS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/