P_OperationActivityWorklist

DDL: P_OPERATIONACTIVITYWORKLIST SQL: PMPEOAIWRKLST Type: view COMPOSITE

P_OperationActivityWorklist is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_OpActyInstanceStatusBasic, I_OpActyInstceOpActyNtwkElmnt, I_OrderOperationDateTime) and exposes 42 fields with key fields OpActyNtwkInstance, OpActyNtwkElement. It has 5 associations to related views.

Data Sources (3)

SourceAliasJoin Type
I_OpActyInstanceStatusBasic OpActyInstanceStatusBasic inner
I_OpActyInstceOpActyNtwkElmnt OpActyInstceOpActyNtwkElmnt from
I_OrderOperationDateTime OrderOperationDateTime inner

Associations (5)

CardinalityTargetAliasCondition
[0..*] I_OpActyUserAssgmt _OpActyUserAssgmt $projection.OpActyNtwkInstance = _OpActyUserAssgmt.OpActyNtwkInstance and $projection.OpActyNtwkElement = _OpActyUserAssgmt.OpActyNtwkElement
[1..1] I_User _User $projection.UserID = _User.UserID
[1..1] I_Plant _ProductionPlant $projection.ProductionPlant = _ProductionPlant.Plant
[0..1] I_WorkCenterBySemanticKey _WorkCenterBySemanticKey $projection.WorkCenter = _WorkCenterBySemanticKey.WorkCenter and $projection.ProductionPlant = _WorkCenterBySemanticKey.Plant
[0..1] I_WorkCenterType _WorkCenterType $projection.WorkCenterTypeCode = _WorkCenterType.WorkCenterTypeCode

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PMPEOAIWRKLST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY OpActyNtwkInstance I_OpActyInstceOpActyNtwkElmnt OpActyNtwkInstance
KEY OpActyNtwkElement I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElement
OpActyNtwkElementElement I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElementElement
OpActyNtwkElementElmntVersCntr I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElementElmntVersCntr
ManufacturingOrder I_OpActyInstceOpActyNtwkElmnt ManufacturingOrder
ManufacturingOrderOperation I_OrderOperationDateTime Operation
MfgOrderOperationText I_OrderOperationDateTime OperationText
WorkCenter WorkCenter WorkCenter
WorkCenterInternalID WorkCenter WorkCenterInternalID
WorkCenterTypeCode WorkCenter WorkCenterTypeCode
ProductionPlant I_OrderOperationDateTime Plant
StatusAndActionSchema StatusAndActionSchema
StatusAndActionSchemaStatus StatusAndActionSchemaStatus
SASStatusCategory
ProductionUnit I_OpActyInstceOpActyNtwkElmnt ProductionUnit
OpPlannedYieldQuantity I_OpActyInstceOpActyNtwkElmnt OpPlannedYieldQuantity
OpPlannedScrapQuantity I_OpActyInstceOpActyNtwkElmnt OpPlannedScrapQuantity
OpActyExpdExecDurnInSeconds I_OpActyInstceOpActyNtwkElmnt OpActyExpdExecDurnInSeconds
OpActyExpdExecLaborDurnInSecs I_OpActyInstceOpActyNtwkElmnt OpActyExpdExecLaborDurnInSecs
OpActyNtwkElementExternalID I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElementExternalID
OperationActivityNetwork I_OpActyInstceOpActyNtwkElmnt OperationActivityNetwork
OpActyNtwkVersionCounter I_OpActyInstceOpActyNtwkElmnt OpActyNtwkVersionCounter
OpActyNtwkSegmentType I_OpActyInstceOpActyNtwkElmnt OpActyNtwkSegmentType
OpActyConfIsSFIBased I_OpActyInstceOpActyNtwkElmnt OpActyConfIsSFIBased
OperationActivity I_OpActyInstceOpActyNtwkElmnt OperationActivity
OperationActyVersionCounter I_OpActyInstceOpActyNtwkElmnt OperationActyVersionCounter
OpActyIsSeldForRtactvPostg I_OpActyInstanceStatusBasic OpActyIsSeldForRtactvPostg
OrderInternalID I_OpActyInstceOpActyNtwkElmnt OrderInternalID
OrderOperationInternalID I_OpActyInstceOpActyNtwkElmnt OrderOperationInternalID
_OpActyNtwkInstance I_OpActyInstceOpActyNtwkElmnt _OpActyNtwkInstance
_OperationActivityText I_OpActyInstceOpActyNtwkElmnt _OperationActivityText
_User _User
_MfgOrder I_OpActyInstceOpActyNtwkElmnt _MfgOrder
_OpActyNtwkInternalId _OpActyNtwkInternalId
_OperationActivityNetwork _OperationActivityNetwork
_SASSchema _SASSchema
_UnitOfMeasure _UnitOfMeasure
_SASStatus _SASStatus
_ProductionPlant _ProductionPlant
_WorkCenterBySemanticKey _WorkCenterBySemanticKey
_WorkCenterType _WorkCenterType
_OpActyUserAssgmt _OpActyUserAssgmt
@AbapCatalog.sqlViewName: 'PMPEOAIWRKLST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {
  serviceQuality: #D,
  sizeCategory:   #L,
  dataClass:      #MIXED
}
@VDM: {
  private: true,
  viewType: #COMPOSITE
}
define view P_OperationActivityWorklist
  as select from           I_OpActyInstceOpActyNtwkElmnt as OpActyInstceOpActyNtwkElmnt
    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
    left outer to one join I_WorkCenter                  as WorkCenter                  on  WorkCenter.WorkCenterTypeCode   = OrderOperationDateTime.WorkCenterTypeCode
                                                                                        and WorkCenter.WorkCenterInternalID = OrderOperationDateTime.WorkCenterInternalID
  // Every OA just has to be shown once in the Worklist. Thus,

    left outer to one join P_NrOfOpActyUserAssgmnts      as NrOfOpActyUserAssgmnts      on  NrOfOpActyUserAssgmnts.OpActyNtwkInstance = OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance
                                                                                        and NrOfOpActyUserAssgmnts.OpActyNtwkElement  = OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement
    left outer to one join P_NrOfOpActyTeamAssgmnts      as NrOfOpActyTeamAssgmnts      on  NrOfOpActyTeamAssgmnts.OpActyNtwkInstance = OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance
                                                                                        and NrOfOpActyTeamAssgmnts.OpActyNtwkElement  = OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement
  // Needed to identify whether the session user is assigned to the Operation Activity

    left outer to one join I_OpActyUserAssgmtBasic       as OpActySessionUserAssgmt     on  OpActySessionUserAssgmt.OpActyNtwkInstance = OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance
                                                                                        and OpActySessionUserAssgmt.OpActyNtwkElement  = OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement
                                                                                        and OpActySessionUserAssgmt.UserID             = $session.user

  association [0..*] to I_OpActyUserAssgmt        as _OpActyUserAssgmt        on  $projection.OpActyNtwkInstance = _OpActyUserAssgmt.OpActyNtwkInstance
                                                                              and $projection.OpActyNtwkElement  = _OpActyUserAssgmt.OpActyNtwkElement
  association [1..1] to I_User                    as _User                    on  $projection.UserID = _User.UserID
  association [1..1] to I_Plant                   as _ProductionPlant         on  $projection.ProductionPlant = _ProductionPlant.Plant
  association [0..1] to I_WorkCenterBySemanticKey as _WorkCenterBySemanticKey on  $projection.WorkCenter      = _WorkCenterBySemanticKey.WorkCenter
                                                                              and $projection.ProductionPlant = _WorkCenterBySemanticKey.Plant
  association [0..1] to I_WorkCenterType          as _WorkCenterType          on  $projection.WorkCenterTypeCode = _WorkCenterType.WorkCenterTypeCode
{
  key OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance,
  key OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement,
      cast(case
        when OpActySessionUserAssgmt.UserID is not null then OpActySessionUserAssgmt.UserID
        else NrOfOpActyUserAssgmnts.UserID
      end as mpe_user preserving type)                             as UserID,
      cast(case
        when OpActySessionUserAssgmt.MfgOpActyExecutionPriority is not null then OpActySessionUserAssgmt.MfgOpActyExecutionPriority
        else NrOfOpActyUserAssgmnts.MfgOpActyExecutionPriority
      end as mpe_oa_exec_prio preserving type)                     as MfgOpActyExecutionPriority,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementElement,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementElmntVersCntr,
      OpActyInstceOpActyNtwkElmnt.ManufacturingOrder,
      OrderOperationDateTime.Operation                             as ManufacturingOrderOperation,
      OrderOperationDateTime.OperationText                         as MfgOrderOperationText,
      WorkCenter.WorkCenter,
      WorkCenter.WorkCenterInternalID,
      WorkCenter.WorkCenterTypeCode,
      OrderOperationDateTime.Plant                                 as ProductionPlant,
      StatusAndActionSchema,
      StatusAndActionSchemaStatus,
      OpActyInstanceStatusBasic._SASStatus.SASStatusCategory,
      OpActyInstceOpActyNtwkElmnt.ProductionUnit,
      OpActyInstceOpActyNtwkElmnt.OpPlannedYieldQuantity,
      OpActyInstceOpActyNtwkElmnt.OpPlannedScrapQuantity,
      OpActyInstceOpActyNtwkElmnt.OpActyExpdExecDurnInSeconds,
      OpActyInstceOpActyNtwkElmnt.OpActyExpdExecLaborDurnInSecs,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementExternalID,
      OpActyInstceOpActyNtwkElmnt.OperationActivityNetwork,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkVersionCounter,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkSegmentType,
      OpActyInstceOpActyNtwkElmnt.OpActyConfIsSFIBased,
      OpActyInstceOpActyNtwkElmnt.OperationActivity,
      OpActyInstceOpActyNtwkElmnt.OperationActyVersionCounter,
      OpActyInstanceStatusBasic.OpActyIsSeldForRtactvPostg,
      //      CreatedByUser,

      //      CreationDateTime,

      cast(
        coalesce(NrOfOpActyUserAssgmnts.NrOfOpActyUserAssignments, 0)
        as mpe_exec_usr_assgnmts preserving type )                 as NrOfOpActyUserAssignments,
      cast(
        coalesce(NrOfOpActyTeamAssgmnts.NrOfOpActyTeamAssignments, 0)
        as mpe_exec_team_assgnmts preserving type )                as NrOfOpActyTeamAssignments,
      cast(
        coalesce(NrOfOpActyTeamAssgmnts.RespyMgmtTeamID, '')
        as mpe_team_id )                                           as RespyMgmtTeamID,
      OpActyInstceOpActyNtwkElmnt.OrderInternalID,
      OpActyInstceOpActyNtwkElmnt.OrderOperationInternalID,

      //_MfgOrderOpAdaptedDates

      //Scheduled Timestamps

      cast( case OpActyNtwkSegmentType
        when '1' then
          OrderOperationDateTime.OpLtstSchedldExecStrtDteTme
        when '2' then
          OrderOperationDateTime.OpLtstSchedldProcgStrtDteTme
        else
          OrderOperationDateTime.OpLtstSchedldTrdwnStrtDteTme
      end as mpe_start_time preserving type )                      as OpLtstSchedldExecStrtDteTme,

      cast( case OpActyNtwkSegmentType
        when '1' then
          OrderOperationDateTime.OpLtstSchedldProcgStrtDteTme
        when '2' then
          OrderOperationDateTime.OpLtstSchedldTrdwnStrtDteTme
        else
          OrderOperationDateTime.OpLtstSchedldExecEndDteTme
      end as mpe_start_time preserving type )                      as OpLtstSchedldExecEndDteTme,

      //Actual Timestamps

      cast( case OpActyNtwkSegmentType
        when '1' then
          OrderOperationDateTime.OpActualExecutionStartDateTime
        when '2' then
          OrderOperationDateTime.OpActualProcessingStartDteTme
        else
          OrderOperationDateTime.OpActualTeardownStartDateTime
      end as mpe_start_time preserving type )                      as OpActualExecutionStartDateTime,

      cast( case OpActyNtwkSegmentType
        when '1' then
          OrderOperationDateTime.OpActualSetupEndDateTime
        when '2' then
          OrderOperationDateTime.OpActualProcessingEndDateTime
        else
          OrderOperationDateTime.OpActualExecutionEndDateTime
      end as mpe_start_time preserving type )                      as OpActualExecutionEndDateTime,

      /* Associations */
      OpActyInstceOpActyNtwkElmnt._OpActyNtwkInstance,
      OpActyInstceOpActyNtwkElmnt._OperationActivityText,
      _User,
      OpActyInstceOpActyNtwkElmnt._MfgOrder,
      _OpActyNtwkInternalId,
      _OperationActivityNetwork,
      _SASSchema,
      _UnitOfMeasure,
      _SASStatus,
      _ProductionPlant,
      _WorkCenterBySemanticKey,
      _WorkCenterType,
      _OpActyUserAssgmt
}
where
  OpActyInstceOpActyNtwkElmnt.OpActyConfirmationIsAllowed = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_OPACTYUSERASSGMTBASIC",
"I_ORDEROPERATIONDATETIME",
"I_SASSTATUS",
"I_WORKCENTER",
"P_NROFOPACTYTEAMASSGMNTS",
"P_NROFOPACTYUSERASSGMNTS"
],
"ASSOCIATED":
[
"I_MFGORDER",
"I_OPACTYNTWKINSTANCE",
"I_OPACTYNTWKINTERNALID",
"I_OPACTYUSERASSGMT",
"I_OPERATIONACTIVITYNETWORK",
"I_OPERATIONACTIVITYTEXT",
"I_PLANT",
"I_SASSCHEMA",
"I_SASSTATUS",
"I_UNITOFMEASURE",
"I_USER",
"I_WORKCENTERBYSEMANTICKEY",
"I_WORKCENTERTYPE"
],
"BASE":
[
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/