P_ProcgExecOperationActivity

DDL: P_PROCGEXECOPERATIONACTIVITY SQL: PMPEOAEXEC Type: view COMPOSITE

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

Data Sources (4)

SourceAliasJoin Type
I_MfgOrderBasic LogisticsOrder inner
I_OrderOperationDateTime MfgOrderOperation inner
I_OpActyInstanceStatusBasic OpActyInstanceStatusBasic from
I_OpActyInstceOpActyNtwkElmnt OpActyInstceOpActyNtwkElmnt inner

Associations (6)

CardinalityTargetAliasCondition
[1..1] I_Plant _ProductionPlant $projection.ProductionPlant = _ProductionPlant.Plant
[0..*] I_MfgOrderDocInfoRecdObjLink _MfgOrderDocInfoRecdObjLink $projection.ManufacturingOrder = _MfgOrderDocInfoRecdObjLink.ManufacturingOrder
[0..*] I_MfgOrderOpDocInfoRecdObjLink _MfgOrderOpDocInfoRecdObjLink $projection.ManufacturingOrder = _MfgOrderOpDocInfoRecdObjLink.ManufacturingOrder and $projection.OrderOperationInternalID = _MfgOrderOpDocInfoRecdObjLink.OrderOperationInternalID
[0..*] I_OpActyDocInfoRecdObjLink _OpActyDocInfoRecdObjLink $projection.OpActyNtwkInstance = _OpActyDocInfoRecdObjLink.OpActyNtwkInstance and $projection.OpActyNtwkElement = _OpActyDocInfoRecdObjLink.OpActyNtwkElement
[0..1] I_WorkCenterBySemanticKey _WorkCenterBySemanticKey $projection.workcenter = _WorkCenterBySemanticKey.WorkCenter and $projection.ProductionPlant = _WorkCenterBySemanticKey.Plant
[0..*] I_OpActyMainWrkCtrMfgUser _OpActyMainWrkCtrMfgUser $projection.OpActyNtwkInstance = _OpActyMainWrkCtrMfgUser.OpActyNtwkInstance and $projection.OpActyNtwkElement = _OpActyMainWrkCtrMfgUser.OpActyNtwkElement

Annotations (10)

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

Fields (62)

KeyFieldSource TableSource FieldDescription
KEY OpActyNtwkInstance I_OpActyInstceOpActyNtwkElmnt OpActyNtwkInstance
KEY OpActyNtwkElement I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElement
OperationActivityNetwork I_OpActyInstceOpActyNtwkElmnt OperationActivityNetwork
OpActyNtwkVersionCounter I_OpActyInstceOpActyNtwkElmnt OpActyNtwkVersionCounter
OpPlannedScrapQuantity I_OpActyInstceOpActyNtwkElmnt OpPlannedScrapQuantity
OpPlannedYieldQuantity I_OpActyInstceOpActyNtwkElmnt OpPlannedYieldQuantity
ProductionUnit I_OpActyInstceOpActyNtwkElmnt ProductionUnit
OpActyExpdExecDurnInSeconds I_OpActyInstceOpActyNtwkElmnt OpActyExpdExecDurnInSeconds
OpActyExpdExecLaborDurnInSecs I_OpActyInstceOpActyNtwkElmnt OpActyExpdExecLaborDurnInSecs
OrderInternalID I_OpActyInstceOpActyNtwkElmnt OrderInternalID
OrderOperationInternalID I_OpActyInstceOpActyNtwkElmnt OrderOperationInternalID
StatusAndActionSchema I_OpActyInstceOpActyNtwkElmnt StatusAndActionSchema
StatusAndActionSchemaStatus I_OpActyInstanceStatusBasic StatusAndActionSchemaStatus
OpActyConfIsSFIBased
OpActyNtwkElementExternalID I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElementExternalID
OperationActivity I_OpActyInstceOpActyNtwkElmnt OperationActivity
OperationActyVersionCounter I_OpActyInstceOpActyNtwkElmnt OperationActyVersionCounter
OpActyNtwkElementElement I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElementElement
OpActyNtwkElementElmntVersCntr I_OpActyInstceOpActyNtwkElmnt OpActyNtwkElementElmntVersCntr
OpActyNtwkSegmentType I_OpActyInstceOpActyNtwkElmnt OpActyNtwkSegmentType
OANElementDisplaySqncNumber I_OpActyInstceOpActyNtwkElmnt OANElementDisplaySqncNumber
SASStatusCriticality
SASStatusCategory
OpActualExecutionStartDate I_OrderOperationDateTime OpActualExecutionStartDate
OpActualExecutionStartTime I_OrderOperationDateTime OpActualExecutionStartTime
OpLtstSchedldExecStrtDte I_OrderOperationDateTime OpLtstSchedldExecStrtDte
OpLtstSchedldExecStrtTme I_OrderOperationDateTime OpLtstSchedldExecStrtTme
OpLtstSchedldProcgStrtDte I_OrderOperationDateTime OpLtstSchedldProcgStrtDte
OpLtstSchedldProcgStrtTme I_OrderOperationDateTime OpLtstSchedldProcgStrtTme
OpLtstSchedldTrdwnStrtDte I_OrderOperationDateTime OpLtstSchedldTrdwnStrtDte
OpLtstSchedldTrdwnStrtTme I_OrderOperationDateTime OpLtstSchedldTrdwnStrtTme
ManufacturingOrder I_OpActyInstceOpActyNtwkElmnt ManufacturingOrder
ManufacturingOrderText I_MfgOrderBasic ManufacturingOrderText
ManufacturingOrderImportance I_MfgOrderBasic ManufacturingOrderImportance
ManufacturingOrderOperation I_OrderOperationDateTime Operation
MfgOrderOperationText I_OrderOperationDateTime OperationText
MfgOrderOperationOrSubOp I_OrderOperationDateTime Operation
ProductionPlant I_OrderOperationDateTime Plant
ProductionPlantName I_OrderOperationDateTime PlantName
WorkCenterInternalID I_OrderOperationDateTime WorkCenterInternalID
WorkCenterTypeCode I_OrderOperationDateTime WorkCenterTypeCode
WorkCenter
WorkCenterText
LaborTrackingIsRequired
OpPlannedTotalQuantity I_OrderOperationDateTime OpPlannedTotalQuantity
OperationUnit I_OrderOperationDateTime OperationUnit
_OpActyNtwkInstance I_OpActyInstceOpActyNtwkElmnt _OpActyNtwkInstance
_SASSchema I_OpActyInstceOpActyNtwkElmnt _SASSchema
_SASStatus I_OpActyInstanceStatusBasic _SASStatus
_OpActyNtwkInternalId I_OpActyInstceOpActyNtwkElmnt _OpActyNtwkInternalId
_OperationActivityNetwork I_OpActyInstceOpActyNtwkElmnt _OperationActivityNetwork
_OrderInternalID I_OpActyInstceOpActyNtwkElmnt _OrderInternalID
_MfgOrder I_OpActyInstceOpActyNtwkElmnt _MfgOrder
_OperationActivityText I_OpActyInstceOpActyNtwkElmnt _OperationActivityText
_ProductionPlant _ProductionPlant
_WorkCenter I_OrderOperationDateTime _WorkCenter
_WorkCenterType _WorkCenterType
_WorkCenterBySemanticKey _WorkCenterBySemanticKey
_MfgOrderDocInfoRecdObjLink _MfgOrderDocInfoRecdObjLink
_MfgOrderOpDocInfoRecdObjLink _MfgOrderOpDocInfoRecdObjLink
_OpActyDocInfoRecdObjLink _OpActyDocInfoRecdObjLink
_OpActyMainWrkCtrMfgUser _OpActyMainWrkCtrMfgUser
@AbapCatalog.sqlViewName: 'PMPEOAEXEC'
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MIXED}
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AbapCatalog.compiler.compareFilter: true

define view P_ProcgExecOperationActivity
  as select from I_OpActyInstanceStatusBasic   as OpActyInstanceStatusBasic
    inner join   I_OpActyInstceOpActyNtwkElmnt as OpActyInstceOpActyNtwkElmnt on  OpActyInstanceStatusBasic.OpActyNtwkInstance = OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance
                                                                              and OpActyInstanceStatusBasic.OpActyNtwkElement  = OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement
    inner join   I_OrderOperationDateTime      as MfgOrderOperation           on  MfgOrderOperation.OrderInternalID          = OpActyInstceOpActyNtwkElmnt.OrderInternalID
                                                                              and MfgOrderOperation.OrderOperationInternalID = OpActyInstceOpActyNtwkElmnt.OrderOperationInternalID
    inner join   I_MfgOrderBasic               as LogisticsOrder              on LogisticsOrder.ManufacturingOrder = OpActyInstceOpActyNtwkElmnt.ManufacturingOrder
  association [1..1] to I_Plant                        as _ProductionPlant              on  $projection.ProductionPlant = _ProductionPlant.Plant
  association [0..*] to I_MfgOrderDocInfoRecdObjLink   as _MfgOrderDocInfoRecdObjLink   on  $projection.ManufacturingOrder = _MfgOrderDocInfoRecdObjLink.ManufacturingOrder
  association [0..*] to I_MfgOrderOpDocInfoRecdObjLink as _MfgOrderOpDocInfoRecdObjLink on  $projection.ManufacturingOrder       = _MfgOrderOpDocInfoRecdObjLink.ManufacturingOrder
                                                                                        and $projection.OrderOperationInternalID = _MfgOrderOpDocInfoRecdObjLink.OrderOperationInternalID
  association [0..*] to I_OpActyDocInfoRecdObjLink     as _OpActyDocInfoRecdObjLink     on  $projection.OpActyNtwkInstance = _OpActyDocInfoRecdObjLink.OpActyNtwkInstance
                                                                                        and $projection.OpActyNtwkElement  = _OpActyDocInfoRecdObjLink.OpActyNtwkElement
  association [0..1] to I_WorkCenterBySemanticKey      as _WorkCenterBySemanticKey      on  $projection.workcenter      = _WorkCenterBySemanticKey.WorkCenter
                                                                                        and $projection.ProductionPlant = _WorkCenterBySemanticKey.Plant
  association [0..*] to I_OpActyMainWrkCtrMfgUser      as _OpActyMainWrkCtrMfgUser      on  $projection.OpActyNtwkInstance = _OpActyMainWrkCtrMfgUser.OpActyNtwkInstance
                                                                                        and $projection.OpActyNtwkElement  = _OpActyMainWrkCtrMfgUser.OpActyNtwkElement
{
      @ObjectModel.foreignKey.association: '_OpActyNtwkInstance'
  key OpActyInstceOpActyNtwkElmnt.OpActyNtwkInstance,
  key OpActyInstceOpActyNtwkElmnt.OpActyNtwkElement,
      @ObjectModel.foreignKey.association: '_OpActyNtwkInternalId'
      OpActyInstceOpActyNtwkElmnt.OperationActivityNetwork,
      @ObjectModel.foreignKey.association: '_OperationActivityNetwork'
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkVersionCounter,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      OpActyInstceOpActyNtwkElmnt.OpPlannedScrapQuantity,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      OpActyInstceOpActyNtwkElmnt.OpPlannedYieldQuantity,
      @Semantics.unitOfMeasure: true
      OpActyInstceOpActyNtwkElmnt.ProductionUnit,
      @Semantics.durationInSeconds: true
      OpActyInstceOpActyNtwkElmnt.OpActyExpdExecDurnInSeconds,
      @Semantics.durationInSeconds: true
      OpActyInstceOpActyNtwkElmnt.OpActyExpdExecLaborDurnInSecs,
      @ObjectModel.foreignKey.association: '_OrderInternalID'
      OpActyInstceOpActyNtwkElmnt.OrderInternalID,
      OpActyInstceOpActyNtwkElmnt.OrderOperationInternalID,
      @ObjectModel.foreignKey.association: '_SASSchema'
      OpActyInstceOpActyNtwkElmnt.StatusAndActionSchema,
      @ObjectModel.foreignKey.association: '_SASStatus'
      OpActyInstanceStatusBasic.StatusAndActionSchemaStatus,

      cast(OpActyInstceOpActyNtwkElmnt.OpActyConfIsSFIBased as boolean preserving type) as OpActyConfIsSFIBased,

      OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementExternalID,
      OpActyInstceOpActyNtwkElmnt.OperationActivity,
      OpActyInstceOpActyNtwkElmnt.OperationActyVersionCounter,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementElement,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkElementElmntVersCntr,
      OpActyInstceOpActyNtwkElmnt.OpActyNtwkSegmentType,
      OpActyInstceOpActyNtwkElmnt.OANElementDisplaySqncNumber,
      OpActyInstanceStatusBasic._SASStatus.SASStatusCriticality,
      OpActyInstanceStatusBasic._SASStatus.SASStatusCategory,

      @Semantics.calendarItem.dtStart: true
      MfgOrderOperation.OpActualExecutionStartDate,
      MfgOrderOperation.OpActualExecutionStartTime,
      @Semantics.calendarItem.dtStart: true
      MfgOrderOperation.OpLtstSchedldExecStrtDte,
      MfgOrderOperation.OpLtstSchedldExecStrtTme,
      @Semantics.calendarItem.dtStart: true
      MfgOrderOperation.OpLtstSchedldProcgStrtDte,
      MfgOrderOperation.OpLtstSchedldProcgStrtTme,
      @Semantics.calendarItem.dtStart: true
      MfgOrderOperation.OpLtstSchedldTrdwnStrtDte,
      MfgOrderOperation.OpLtstSchedldTrdwnStrtTme,
      cast( case
        when MfgOrderOperation.OpActualExecutionStartDate <> '00000000' then
          MfgOrderOperation.OpActualExecutionStartDateTime
         when OpActyInstceOpActyNtwkElmnt.OpActyNtwkSegmentType = '1' then
           MfgOrderOperation.OpLtstSchedldExecStrtDteTme
         when OpActyInstceOpActyNtwkElmnt.OpActyNtwkSegmentType = '2' then
           MfgOrderOperation.OpLtstSchedldProcgStrtDteTme
         else
           MfgOrderOperation.OpLtstSchedldTrdwnStrtDteTme
      end as mpe_oper_schedld_start_time preserving type )                              as OpLtstSchedldExecStrtDteTme,
      cast( case
        when MfgOrderOperation.OpActualExecutionStartDate <> '00000000' then 'X'
        else ''
      end as boolean preserving type )                                                  as DateIsActualDate,

      @ObjectModel.foreignKey.association: '_MfgOrder'
      @ObjectModel.text.element: 'ManufacturingOrderText'
      OpActyInstceOpActyNtwkElmnt.ManufacturingOrder,
      LogisticsOrder.ManufacturingOrderText,
      LogisticsOrder.ManufacturingOrderImportance,
      @ObjectModel.text.element: 'MfgOrderOperationText'
      MfgOrderOperation.Operation                                                       as ManufacturingOrderOperation,
      @Semantics.text: true
      MfgOrderOperation.OperationText                                                   as MfgOrderOperationText,
      MfgOrderOperation.Operation                                                       as MfgOrderOperationOrSubOp, --Used for search only

      LogisticsOrder.ExtdQualityCheckIsRequired                                         as ExtdQualityCheckIsRequired,
            
      @ObjectModel.foreignKey.association: '_ProductionPlant'
      @ObjectModel.text.element: 'ProductionPlantName'
      MfgOrderOperation.Plant                                                           as ProductionPlant,
      MfgOrderOperation.PlantName                                                       as ProductionPlantName,
      @ObjectModel.foreignKey.association: '_WorkCenter'
      MfgOrderOperation.WorkCenterInternalID,
      @ObjectModel.foreignKey.association: '_WorkCenterType'
      MfgOrderOperation.WorkCenterTypeCode,
      @ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
      MfgOrderOperation._WorkCenter.WorkCenter,
      MfgOrderOperation._WorkCenter._Text[1: Language=$session.system_language].WorkCenterText,
      MfgOrderOperation._WorkCenter.LaborTrackingIsRequired,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      MfgOrderOperation.OpPlannedTotalQuantity,
      @Semantics.unitOfMeasure: true
      MfgOrderOperation.OperationUnit,

      OpActyInstceOpActyNtwkElmnt._OpActyNtwkInstance,
      OpActyInstceOpActyNtwkElmnt._SASSchema,
      OpActyInstanceStatusBasic._SASStatus,
      OpActyInstceOpActyNtwkElmnt._OpActyNtwkInternalId,
      OpActyInstceOpActyNtwkElmnt._OperationActivityNetwork,
      OpActyInstceOpActyNtwkElmnt._OrderInternalID,
      OpActyInstceOpActyNtwkElmnt._MfgOrder,
      OpActyInstceOpActyNtwkElmnt._OperationActivityText,
      _ProductionPlant,
      MfgOrderOperation._WorkCenter,
      _WorkCenterType,
      _WorkCenterBySemanticKey,
      _MfgOrderDocInfoRecdObjLink,
      _MfgOrderOpDocInfoRecdObjLink,
      _OpActyDocInfoRecdObjLink,
      _OpActyMainWrkCtrMfgUser
}
where
  -- Only "open" Operation Activities
  (
       OpActyInstanceStatusBasic._SASStatus.SASStatusCategory  = 1 -- Initial
    or OpActyInstanceStatusBasic._SASStatus.SASStatusCategory  = 2 -- In Process
    or OpActyInstanceStatusBasic._SASStatus.SASStatusCategory  = 5 -- Paused
  )
  and(
       OpActyInstceOpActyNtwkElmnt.OpActyConfirmationIsAllowed = 'X'
    or OpActyInstceOpActyNtwkElmnt.OpActyConfNotAllowedReason  = 1
    or OpActyInstceOpActyNtwkElmnt.OpActyConfNotAllowedReason  = 2
    or OpActyInstceOpActyNtwkElmnt.OpActyConfNotAllowedReason  = 4
    or OpActyInstceOpActyNtwkElmnt.OpActyConfNotAllowedReason  = 5
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MFGORDERBASIC",
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_ORDEROPERATIONDATETIME",
"I_SASSTATUS",
"I_WORKCENTER",
"I_WORKCENTERTEXT"
],
"ASSOCIATED":
[
"I_MFGORDER",
"I_MFGORDERDOCINFORECDOBJLINK",
"I_MFGORDEROPDOCINFORECDOBJLINK",
"I_OPACTYDOCINFORECDOBJLINK",
"I_OPACTYMAINWRKCTRMFGUSER",
"I_OPACTYNTWKINSTANCE",
"I_OPACTYNTWKINTERNALID",
"I_OPERATIONACTIVITYNETWORK",
"I_OPERATIONACTIVITYTEXT",
"I_ORDINTERNALBILLOFOPERATIONS",
"I_PLANT",
"I_SASSCHEMA",
"I_SASSTATUS",
"I_WORKCENTER",
"I_WORKCENTERBYSEMANTICKEY",
"I_WORKCENTERTYPE"
],
"BASE":
[
"I_OPACTYINSTANCESTATUSBASIC",
"I_OPACTYINSTCEOPACTYNTWKELMNT",
"I_ORDEROPERATIONDATETIME"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/