@AbapCatalog.sqlViewName: 'CMPETEAMOPNOA'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}
@EndUserText.label: 'Open operation activities assigned to a team'
define view C_TeamOpenOpActyAssignment
as select from I_OpActyRespyMgmtTeamAssgmtBsc as OpActyRespyMgmtTeamAssgmtBsc
inner join I_OpActyInstceOpActyNtwkElmnt as OpActyInstceOpActyNtwkElmnt on OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance = OpActyRespyMgmtTeamAssgmtBsc.OpActyNtwkInstance
and OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement = OpActyRespyMgmtTeamAssgmtBsc.OpActyNtwkElement
inner join I_OpActyInstanceStatusBasic as OpActyInstanceStatusBasic on OpActyInstanceStatusBasic.OpActyNtwkInstance = OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance
and OpActyInstanceStatusBasic.OpActyNtwkElement = OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement
inner join I_OrderOperationDateTime as OrderOperationDateTime on OrderOperationDateTime.OrderInternalID = OpActyInstceOpActyNtwkElmnt.OrderInternalID
and OrderOperationDateTime.OrderOperationInternalID = OpActyInstceOpActyNtwkElmnt.OrderOperationInternalID
{
key OpActyRespyMgmtTeamAssgmtBsc.RespyMgmtTeamID,
key OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance,
key OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement,
@ObjectModel.text.element: 'OperationActivityName'
cast(OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementExternalID as mpe_oa_number_ext preserving type) as OpActyNtwkElementExternalID,
@UI.hidden: true
@Semantics.text: true
OpActyInstceOpActyNtwkElmnt._OperationActivityText[1: Language=$session.system_language].OperationActivityName as OperationActivityName,
@UI.hidden: true
OpActyInstceOpActyNtwkElmnt.OpActyNtwkSegmentType,
OpActyInstceOpActyNtwkElmnt.ManufacturingOrder as ManufacturingOrder,
@ObjectModel.text.element: 'MfgOrderOperationText'
cast(OrderOperationDateTime.Operation as mpe_vornr_char preserving type ) as ManufacturingOrderOperation,
@UI.hidden: true
@Semantics.text: true
OrderOperationDateTime.OperationText as MfgOrderOperationText,
@UI.hidden: true
OrderOperationDateTime.WorkCenterInternalID,
@UI.hidden: true
OrderOperationDateTime.WorkCenterTypeCode,
OrderOperationDateTime.Plant as ProductionPlant,
//Scheduled Timestamps
@Semantics.dateTime: true
cast( case OpActyInstceOpActyNtwkElmnt.OpActyNtwkSegmentType
when '1' then
OrderOperationDateTime.OpLtstSchedldExecStrtDteTme
when '2' then
OrderOperationDateTime.OpLtstSchedldProcgStrtDteTme
else
OrderOperationDateTime.OpLtstSchedldTrdwnStrtDteTme
end as mpe_oper_schedld_start_time preserving type ) as OpLtstSchedldExecStrtDteTme,
OpActyRespyMgmtTeamAssgmtBsc.MfgOpActyExecutionPriority,
OpActyInstceOpActyNtwkElmnt._OpActyNtwkInstance,
OpActyInstceOpActyNtwkElmnt._OperationActivityInstance,
OpActyInstceOpActyNtwkElmnt._OANSegmentType,
OpActyInstceOpActyNtwkElmnt._MfgOrder,
OrderOperationDateTime._WorkCenter
}
where
-- Only "open" Operation Activities
OpActyInstanceStatusBasic._SASStatus.SASStatusCategory = 1 -- Initial
or OpActyInstanceStatusBasic._SASStatus.SASStatusCategory = 2 -- In Process
or OpActyInstanceStatusBasic._SASStatus.SASStatusCategory = 5 -- Paused
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_OPACTYRESPYMGMTTEAMASSGMTBSC",
"I_OPERATIONACTIVITYTEXT",
"I_ORDEROPERATIONDATETIME",
"I_SASSTATUS"
],
"ASSOCIATED":
[
"I_MFGORDER",
"I_OANSEGMENTTYPE",
"I_OPACTYNTWKINSTANCE",
"I_OPERATIONACTIVITYINSTANCE",
"I_WORKCENTER"
],
"BASE":
[
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_ORDEROPERATIONDATETIME"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/