P_QUEUINGOPERATIONS

CDS View

Queuing Operations

P_QUEUINGOPERATIONS is a CDS View in S/4HANA. Queuing Operations. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
C_ResourceObjPgQueueOp view_entity from CONSUMPTION Queuing operations for Resources
C_WrkCntrObjPgQueueOp view_entity from CONSUMPTION Work Center Queuing Operation
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Queuing Operations'
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}
@VDM.private:true

define view entity P_QueuingOperations
  as select from P_MfgOrderWrkCntrOper as OrdOpWc
  left outer to one join I_StatusObjectStatusBasic as _OrderMarkedForDeletion on  _OrderMarkedForDeletion.StatusObject     = OrdOpWc.ManufacturingObject
                                                                         and _OrderMarkedForDeletion.StatusIsInactive = ''
                                                                         and _OrderMarkedForDeletion.StatusCode       = 'I0076'
  left outer to one join I_StatusObjectStatusBasic as _isClosed       on _isClosed.StatusObject       = OrdOpWc.ManufacturingObject 
                                               and _isClosed.StatusCode       = 'I0046' and _isClosed.StatusIsInactive       = ''
  
//  association [0..1] to I_MfgOrderObjPgOpConfQty as _ConfirmedQty on  $projection.WorkCenterInternalID        = _ConfirmedQty.WorkCenterInternalID

//                                                                  and $projection.ManufacturingOrder          = _ConfirmedQty.ProductionOrder

//                                                                  and $projection.ManufacturingOrderOperation = _ConfirmedQty.Operation

//                                                                  and $projection.ManufacturingOrderCategory  = _ConfirmedQty.OrderCategory

//  association [0..1] to I_MfgOrderStatus         as _OrderStatus  on  $projection.ManufacturingOrder = _OrderStatus.ManufacturingOrder

  
{
  key    OrdOpWc.OrderInternalBillOfOperations,
  key    OrdOpWc.OrderIntBillOfOperationsItem,
  key    OrdOpWc.WorkCenterInternalID,
         OrdOpWc.ManufacturingOrder,
         cast(OrdOpWc.ManufacturingOrderOperation as vdm_vornr preserving type) as ManufacturingOrderOperation,
         OrdOpWc.ManufacturingOrderCategory,
         OrdOpWc.MfgOrderOperationText,
         OrdOpWc.Material,
         cast(OrdOpWc.OperationIsReleased as boolean)                                                                                                                  as OperationIsReleased,
         cast(OrdOpWc.OperationIsCreated as boolean)                                                                                                                   as OperationIsCreated,
         OrdOpWc.OpErlstSchedldExecStrtDte,
         OrdOpWc.OpErlstSchedldExecStrtTme,
         OrdOpWc.OpErlstSchedldExecEndDte,
         OrdOpWc.OpErlstSchedldExecEndTme,
         OrdOpWc.OpPlannedTotalQuantity,
         @Semantics.quantity.unitOfMeasure: 'OperationUnit'
         @DefaultAggregation: #SUM
         OrdOpWc.OpTotalConfirmedYieldQty,
         OrdOpWc.OperationUnit,
         OrdOpWc.ErlstSchedldExecDurnInWorkdays,
         @Semantics.calendarItem.duration: true
         case
         when (OrdOpWc.OpActualExecutionDays          is null and OrdOpWc.ErlstSchedldExecDurnInWorkdays is null) then 0
         when (OrdOpWc.OpActualExecutionDays          is null and OrdOpWc.ErlstSchedldExecDurnInWorkdays is not null) then OrdOpWc.ErlstSchedldExecDurnInWorkdays
         when (OrdOpWc.OpActualExecutionDays          is not null and OrdOpWc.ErlstSchedldExecDurnInWorkdays is null) then 0
         else OrdOpWc.ErlstSchedldExecDurnInWorkdays - OrdOpWc.OpActualExecutionDays
         end                                                                                                                                                   as RemainingDuration,
         OrdOpWc.ManufacturingOrderSequence,
         cast(OrdOpWc.MfgOrderOperationIsPhase as boolean preserving type)                                                                                             as MfgOrderOperationIsPhase,
         OrdOpWc._Material,
         OrdOpWc._MfgOrderSequence,
         OrdOpWc._MfgOrder
         

}
where
      ( OrdOpWc.OperationIsReleased                   = 'X'
   or OrdOpWc.OperationIsCreated              = 'X' )   
  and OrdOpWc.OpActualExecutionStartDate            = '00000000'
  and coalesce(_isClosed.StatusCode, '')       = ''  
  and coalesce(_OrderMarkedForDeletion.StatusCode, '') = ''