P_MfgOperAORList

DDL: P_MFGOPERAORLIST Type: view_entity COMPOSITE Package: ODATA_MPE_MFGORDER

Operations matching the assigned AORs

P_MfgOperAORList is a Composite CDS View that provides data about "Operations matching the assigned AORs" in SAP S/4HANA. It reads from 2 data sources (I_OrderOperationBasic, I_OrderBasic) and exposes 2 fields with key fields OrderInternalID, OrderOperationInternalID. Part of development package ODATA_MPE_MFGORDER.

Data Sources (2)

SourceAliasJoin Type
I_OrderOperationBasic list from
I_OrderBasic ordAufk inner

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view
Metadata.ignorePropagatedAnnotations true view

Fields (2)

KeyFieldSource TableSource FieldDescription
KEY OrderInternalID I_OrderOperationBasic OrderInternalID
KEY OrderOperationInternalID I_OrderOperationBasic OrderOperationInternalID
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Operations matching the assigned AORs'

@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}
@VDM.viewType:  #COMPOSITE
@VDM.private: true
@Metadata.ignorePropagatedAnnotations: true
define view entity P_MfgOperAORList as  
  select from I_OrderOperationBasic as list 
  left outer to one join I_LogisticsOrderBasic as ordAfko on ordAfko.OrderInternalID = list.OrderInternalID
  
  inner join I_OrderBasic          as ordAufk on ordAufk.OrderID = ordAfko.OrderID and ordAufk.OrderCategory = '10'
      
  left outer to one join I_PPAreaOfResponsibility as _AORPlant                on list.Plant = _AORPlant.Plant 
                                                                                and _AORPlant.ProductionSupervisor is initial 
                                                                                and _AORPlant.WorkCenterInternalID is initial 
                                                                                and ordAfko.ProductionSupervisor is initial
  left outer to one join I_PPAreaOfResponsibility as _AORSupervisor           on list.Plant                 = _AORSupervisor.Plant  
                                                                                and ordAfko.ProductionSupervisor = _AORSupervisor.ProductionSupervisor
                                                                                and _AORSupervisor.ProductionSupervisor is not initial 
                                                                                and ordAfko.ProductionSupervisor is not initial 
                                                                                and _AORSupervisor.WorkCenterInternalID is initial 
  left outer to one join I_PPAreaOfResponsibility as _AORWorkcenter           on list.Plant                = _AORWorkcenter.Plant  
                                                                                and list.WorkCenterInternalID = _AORWorkcenter.WorkCenterInternalID 
                                                                                and _AORWorkcenter.ProductionSupervisor is initial                                     
                                                                                and _AORWorkcenter.WorkCenterInternalID is not initial
                                                                                and list.WorkCenterInternalID is not initial 
{
     key list.OrderInternalID,
     key list.OrderOperationInternalID
     // AOR

//      case when _AORPlant.UserID            is not null then 'X' end as AORPlant,

//      case when _AORSupervisor.UserID       is not null then 'X' end as AORSupervisor,

//      case when _AORWorkcenter.UserID       is not null then 'X' end as AORWorkcenter

}
where ( _AORPlant.UserID is not null
 or _AORSupervisor.UserID is not null
 or _AORWorkcenter.UserID is not null ) 
// and ordAufk.OrderCategory = '10'