P_ProcOrdAORList

DDL: P_PROCORDAORLIST Type: view_entity COMPOSITE Package: VDM_PP_PROC_ORD_MNG

Process Orders for AOR

P_ProcOrdAORList is a Composite CDS View that provides data about "Process Orders for AOR" in SAP S/4HANA. It reads from 5 data sources (I_OrderOperationBasic, I_LogisticsOrder, I_LogisticsOrder, I_PPAreaOfResponsibility, I_PPAreaOfResponsibility) and exposes 17 fields with key field OrderID. Part of development package VDM_PP_PROC_ORD_MNG.

Data Sources (5)

SourceAliasJoin Type
I_OrderOperationBasic _OrderOperBasic inner
I_LogisticsOrder _Orders inner
I_LogisticsOrder _OrdersBasic inner
I_PPAreaOfResponsibility AOR1 from
I_PPAreaOfResponsibility AOR2 union_all

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Process Orders for AOR view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY OrderID I_LogisticsOrder OrderID
OrderInternalID I_LogisticsOrder OrderInternalBillOfOperations
OrderType I_LogisticsOrder OrderType
Plant I_LogisticsOrder Plant
ProductionSupervisor I_LogisticsOrder ProductionSupervisor
ProcessOrderObjectNumber I_LogisticsOrder ObjectInternalID
ScheduledBasicStartDate I_LogisticsOrder ScheduledBasicStartDate
ScheduledBasicEndDate I_LogisticsOrder ScheduledBasicEndDate
OrderID
OrderInternalID I_LogisticsOrder OrderInternalBillOfOperations
OrderType I_LogisticsOrder OrderType
Plant I_LogisticsOrder Plant
ProductionSupervisor I_LogisticsOrder ProductionSupervisor
ProcessOrderObjectNumber I_LogisticsOrder ObjectInternalID
ScheduledBasicStartDate I_LogisticsOrder ScheduledBasicStartDate
ScheduledBasicEndDate I_LogisticsOrder ScheduledBasicEndDate
WorkCenterInternalID I_OrderOperationBasic WorkCenterInternalID
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Process Orders for AOR'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view entity P_ProcOrdAORList
  as
  //  select from I_PPAreaOfResponsibility as AOR

  //  inner join I_LogisticsOrder as _OrderBasic on AOR.Plant = _OrderBasic.Plant and _OrderBasic.ProductionSupervisor = ''

  //                                                    and _OrderBasic.OrderCategory = '40'

  //{

  //     key _OrderBasic.OrderID,

  //     _OrderBasic.OrderInternalBillOfOperations as OrderInternalID,

  //     _OrderBasic.OrderType,

  //     _OrderBasic.Plant,

  //     _OrderBasic.ProductionSupervisor,

  //     _OrderBasic.ObjectInternalID as ProcessOrderObjectNumber,

  //     AOR.WorkCenterInternalID

  //}

  //where AOR.ProductionSupervisor is initial and AOR.WorkCenterInternalID is initial

  //union all


  //select from I_LogisticsOrder as Orders

  //inner join I_PPAreaOfResponsibility as AOR1 on Orders.Plant = AOR1.Plant and Orders.ProductionSupervisor = AOR1.ProductionSupervisor and Orders.OrderCategory = '40'

  select from  I_PPAreaOfResponsibility as AOR1
    inner join I_LogisticsOrder         as _Orders on  AOR1.Plant                = _Orders.Plant
                                                   and AOR1.ProductionSupervisor = _Orders.ProductionSupervisor
                                                   and _Orders.OrderCategory     = '40'

{
  key _Orders.OrderID,
      _Orders.OrderInternalBillOfOperations as OrderInternalID,
      _Orders.OrderType,
      _Orders.Plant,
      _Orders.ProductionSupervisor,
      _Orders.ObjectInternalID              as ProcessOrderObjectNumber,
      //    added for passing filters to AFKO

      _Orders.ScheduledBasicStartDate,
      _Orders.ScheduledBasicEndDate,
      AOR1.WorkCenterInternalID
      //key Orders.OrderID

}
where
  AOR1.WorkCenterInternalID is initial
union all select from I_PPAreaOfResponsibility as AOR2
  inner join          I_OrderOperationBasic    as _OrderOperBasic on _OrderOperBasic.WorkCenterInternalID = AOR2.WorkCenterInternalID
  inner join          I_LogisticsOrder         as _OrdersBasic    on  _OrdersBasic.OrderInternalBillOfOperations = _OrderOperBasic.OrderInternalID
                                                                  and AOR2.Plant                                 = _OrdersBasic.Plant
                                                                  and _OrdersBasic.OrderCategory                 = '40'
{
  key _OrdersBasic.OrderID,
      _OrdersBasic.OrderInternalBillOfOperations as OrderInternalID,
      _OrdersBasic.OrderType,
      _OrdersBasic.Plant,
      _OrdersBasic.ProductionSupervisor,
      _OrdersBasic.ObjectInternalID              as ProcessOrderObjectNumber,
      //    added for passing filters to AFKO

      _OrdersBasic.ScheduledBasicStartDate,
      _OrdersBasic.ScheduledBasicEndDate,
      _OrderOperBasic.WorkCenterInternalID
}
where
      AOR2.ProductionSupervisor is initial
  and AOR2.WorkCenterInternalID is not initial