P_EBPC_OrderStatusByPeriod

DDL: P_EBPC_ORDERSTATUSBYPERIOD SQL: PEBPCORDSTAT Type: view COMPOSITE Package: ODATA_CO_RT_PRODUCTION_COSTS

Event-Based Order Status By Period

P_EBPC_OrderStatusByPeriod is a Composite CDS View that provides data about "Event-Based Order Status By Period" in SAP S/4HANA. It reads from 2 data sources (P_EBPC_MaxOrderStatusByPeriod, I_StatusObjectStatusChange_2) and exposes 7 fields with key fields Ledger, CompanyCode, StatusObject, StatusCode. It has 1 association to related views. Part of development package ODATA_CO_RT_PRODUCTION_COSTS.

Data Sources (2)

SourceAliasJoin Type
P_EBPC_MaxOrderStatusByPeriod P_EBPC_MaxOrderStatusByPeriod inner
I_StatusObjectStatusChange_2 StatusChange from

Parameters (1)

NameTypeDefault
P_ToFiscalYearPeriod fins_fyearperiod

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_SystemStatusText _SystemStatusText $projection.StatusCode = _SystemStatusText.SystemStatus

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PEBPCORDSTAT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY Ledger MaxOrderStatus Ledger
KEY CompanyCode MaxOrderStatus CompanyCode
KEY StatusObject I_StatusObjectStatusChange_2 StatusObject
KEY StatusCode I_StatusObjectStatusChange_2 StatusCode
StatusObjectStatusChangeNumber StatusObjectStatusChangeNumber
StatusShortName
StatusName
@AbapCatalog.sqlViewName: 'PEBPCORDSTAT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.private: true
@VDM.viewType: #COMPOSITE

define view P_EBPC_OrderStatusByPeriod
  with parameters
    @Semantics.fiscal.yearPeriod: true
    P_ToFiscalYearPeriod : fins_fyearperiod
  as select from I_StatusObjectStatusChange_2                                                  as StatusChange
    inner join   P_EBPC_MaxOrderStatusByPeriod( P_ToFiscalYearPeriod : :P_ToFiscalYearPeriod ) as MaxOrderStatus on  MaxOrderStatus.StatusObject                = StatusChange.StatusObject
                                                                                                                 and MaxOrderStatus.StatusCode                  = StatusChange.StatusCode
                                                                                                                 and MaxOrderStatus.MaxObjectStatusChangeNumber = StatusChange.StatusObjectStatusChangeNumber

  association [0..*] to I_SystemStatusText as _SystemStatusText on $projection.StatusCode = _SystemStatusText.SystemStatus
{
  key MaxOrderStatus.Ledger,
  key MaxOrderStatus.CompanyCode,
  key StatusChange.StatusObject,
  key StatusChange.StatusCode,

      StatusObjectStatusChangeNumber,

      _SystemStatusText[1: Language = $session.system_language].SystemStatusShortName                     as StatusShortName,
      cast(_SystemStatusText[1: Language = $session.system_language].SystemStatusName as fco_status_name) as StatusName
}
where
  StatusChange.StatusIsInactive = '' // Exclude inactive statuses