P_ProcOrdOpStatus

DDL: P_PROCORDOPSTATUS SQL: PPROCORDOPSTS Type: view COMPOSITE Package: VDM_PP_PROC_ORD_MNG

Process Order operations with status basic

P_ProcOrdOpStatus is a Composite CDS View that provides data about "Process Order operations with status basic" in SAP S/4HANA. It reads from 2 data sources (I_OrderOperationBasic, I_MfgOrderBasic) and exposes 23 fields with key fields MfgOrderInternalID, OrderOperationInternalID. Part of development package VDM_PP_PROC_ORD_MNG.

Data Sources (2)

SourceAliasJoin Type
I_OrderOperationBasic afvc from
I_MfgOrderBasic aufv inner

Annotations (10)

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

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY MfgOrderInternalID I_OrderOperationBasic OrderInternalID
KEY OrderOperationInternalID I_OrderOperationBasic OrderOperationInternalID
ManufacturingOrder I_MfgOrderBasic ManufacturingOrder
ManufacturingOrderCategory I_MfgOrderBasic ManufacturingOrderCategory
ProductionPlant I_MfgOrderBasic ProductionPlant
ProductionSupervisor I_MfgOrderBasic ProductionSupervisor
Plant I_OrderOperationBasic Plant
ObjectInternalID I_OrderOperationBasic ObjectInternalID
ManufacturingOrderOperation I_OrderOperationBasic Operation
MfgOrderOperationIsPhase I_OrderOperationBasic MfgOrderOperationIsPhase
ManufacturingOrderSequence I_OrderOperationBasic Sequence
SuperiorOperationInternalID I_OrderOperationBasic SuperiorOperationInternalID
OperationIsCreated
OperationIsReleased
OperationIsConfirmed
OperationIsPartiallyConfirmed
OperationIsPartiallyDelivered
OperationIsDelivered
OperationIsDeleted
OperationIsTechlyCompleted
OperationIsClosed
_OrderInternalID I_OrderOperationBasic _OrderInternalID
_MfgOrderCategory I_MfgOrderBasic _MfgOrderCategory
@AbapCatalog.sqlViewName: 'PPROCORDOPSTS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Process Order operations with status simplified view'

@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.viewType:   #COMPOSITE
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ProcOrdOpStatus
  as select from           I_OrderOperationBasic     as afvc
    inner join             I_MfgOrderBasic           as aufv         on  aufv.OrderInternalID            = afvc.OrderInternalID
                                                                     and aufv.ManufacturingOrderCategory = '40'
    left outer to one join I_StatusObjectStatusBasic as _isCreated   on  _isCreated.StatusObject     = afvc.ObjectInternalID
                                                                     and _isCreated.StatusCode       = 'I0001'
                                                                     and _isCreated.StatusIsInactive = '' // OperationIsCreated

    left outer to one join I_StatusObjectStatusBasic as _isReleased  on  _isReleased.StatusObject     = afvc.ObjectInternalID
                                                                     and _isReleased.StatusCode       = 'I0002'
                                                                     and _isReleased.StatusIsInactive = '' // OperationIsReleased

    left outer to one join I_StatusObjectStatusBasic as _isConfirmed on  _isConfirmed.StatusObject     = afvc.ObjectInternalID
                                                                     and _isConfirmed.StatusCode       = 'I0009'
                                                                     and _isConfirmed.StatusIsInactive = '' // OperationIsConfirmed

    left outer to one join I_StatusObjectStatusBasic as _isPartConf  on  _isPartConf.StatusObject     = afvc.ObjectInternalID
                                                                     and _isPartConf.StatusCode       = 'I0010'
                                                                     and _isPartConf.StatusIsInactive = '' // OperationIsPartiallyConfirmed

    left outer to one join I_StatusObjectStatusBasic as _isDeleted   on  _isDeleted.StatusObject     = afvc.ObjectInternalID
                                                                     and _isDeleted.StatusCode       = 'I0013'
                                                                     and _isDeleted.StatusIsInactive = '' // OperationIsDeleted

    left outer to one join I_StatusObjectStatusBasic as _isTechCompl on  _isTechCompl.StatusObject     = afvc.ObjectInternalID
                                                                     and _isTechCompl.StatusCode       = 'I0045'
                                                                     and _isTechCompl.StatusIsInactive = '' // OperationIsTechlyCompleted

    left outer to one join I_StatusObjectStatusBasic as _isClosed    on  _isClosed.StatusObject     = afvc.ObjectInternalID
                                                                     and _isClosed.StatusCode       = 'I0046'
                                                                     and _isClosed.StatusIsInactive = '' // OperationIsClosed

    left outer to one join I_StatusObjectStatusBasic as _isPartDeliv on  _isPartDeliv.StatusObject     = afvc.ObjectInternalID
                                                                     and _isPartDeliv.StatusCode       = 'I0074'
                                                                     and _isPartDeliv.StatusIsInactive = '' // OperationIsPartiallyDelivered

    left outer to one join I_StatusObjectStatusBasic as _isDelivered on  _isDelivered.StatusObject     = afvc.ObjectInternalID
                                                                     and _isDelivered.StatusCode       = 'I0012'
                                                                     and _isDelivered.StatusIsInactive = '' // OperationIsDelivered

{
  key afvc.OrderInternalID                                              as MfgOrderInternalID,
  key afvc.OrderOperationInternalID,
      aufv.ManufacturingOrder,
      aufv.ManufacturingOrderCategory,
      aufv.ProductionPlant,
      aufv.ProductionSupervisor,
      afvc.Plant,
      afvc.ObjectInternalID,
      afvc.Operation                                                    as ManufacturingOrderOperation,
      afvc.MfgOrderOperationIsPhase,
      afvc.Sequence                                                     as ManufacturingOrderSequence,
      afvc.SuperiorOperationInternalID,
      case when _isCreated.StatusCode      is null then '' else 'X' end as OperationIsCreated,
      case when _isReleased.StatusCode     is null then '' else 'X' end as OperationIsReleased,
      case when _isConfirmed.StatusCode    is null then '' else 'X' end as OperationIsConfirmed,
      case when _isPartConf.StatusCode     is null then '' else 'X' end as OperationIsPartiallyConfirmed,
      case when _isPartDeliv.StatusCode    is null then '' else 'X' end as OperationIsPartiallyDelivered,
      case when _isDelivered.StatusCode    is null then '' else 'X' end as OperationIsDelivered,
      case when _isDeleted.StatusCode      is null then '' else 'X' end as OperationIsDeleted,
      case when _isTechCompl.StatusCode    is null then '' else 'X' end as OperationIsTechlyCompleted,
      case when _isClosed.StatusCode       is null then '' else 'X' end as OperationIsClosed,

      afvc._OrderInternalID,
      aufv._MfgOrderCategory
}
where
      ManufacturingOrderCategory  = '40'
  and MfgOrderOperationIsPhase    = ''
  and Sequence                    = '000000' //only standard sequence

  and SuperiorOperationInternalID = '00000000' //sub operation is not relevant