P_EBOC_MaxOrdKeyStatusByPeriod
Event-Based Max Order Key Status By Period
P_EBOC_MaxOrdKeyStatusByPeriod is a Composite CDS View that provides data about "Event-Based Max Order Key Status By Period" in SAP S/4HANA. It reads from 3 data sources (I_FiscalYearPeriodForLedger, I_StatusObjectStatusChange_2, I_SystemStatus) and exposes 2 fields with key field StatusCode. Part of development package ODATA_CO_RT_ORDER_COSTS_DETAIL.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_FiscalYearPeriodForLedger | FiscalYearPeriodForLedger | inner |
| I_StatusObjectStatusChange_2 | StatusChange | from |
| I_SystemStatus | SystemStatus | inner |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_StatusObject | j_objnr | |
| P_Ledger | fins_ledger | |
| P_CompanyCode | fis_bukrs | |
| P_ToFiscalYearPeriod | fins_fyearperiod |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PEBOCMAXORDKYSTS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (2)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | StatusCode | I_StatusObjectStatusChange_2 | StatusCode | |
| MaxObjectStatusChangeNumber |
@AbapCatalog.sqlViewName: 'PEBOCMAXORDKYSTS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view P_EBOC_MaxOrdKeyStatusByPeriod
with parameters
P_StatusObject : j_objnr,
P_Ledger : fins_ledger,
P_CompanyCode : fis_bukrs,
@Semantics.fiscal.yearPeriod: true
P_ToFiscalYearPeriod : fins_fyearperiod
as select from I_StatusObjectStatusChange_2 as StatusChange
inner join I_SystemStatus as SystemStatus on SystemStatus.SystemStatus = StatusChange.StatusCode
inner join I_FiscalYearPeriodForLedger as FiscalYearPeriodForLedger on FiscalYearPeriodForLedger.FiscalYearPeriod = :P_ToFiscalYearPeriod
and FiscalYearPeriodForLedger.CompanyCode = :P_CompanyCode
and FiscalYearPeriodForLedger.Ledger = :P_Ledger
{
key StatusChange.StatusCode,
max(StatusChange.StatusObjectStatusChangeNumber) as MaxObjectStatusChangeNumber // Get the highest Change Number per Object and Code
}
where
StatusChange.StatusObject = :P_StatusObject
and StatusChange.LastChangeDate <= FiscalYearPeriodForLedger.FiscalPeriodEndDate
and SystemStatus.StatusIsHidden = '' // Exclude hidden statuses
and(
StatusChange.StatusCode = 'I0042' // Partially Released
or StatusChange.StatusCode = 'I0002' // Released
or StatusChange.StatusCode = 'I0009' // Confirmed
or StatusChange.StatusCode = 'I0012' // Delivered
or StatusChange.StatusCode = 'I0045' // Technically Completed
or StatusChange.StatusCode = 'I0046' // Closed
or StatusChange.StatusCode = 'I0076' // Deletion Flag
)
group by
StatusChange.StatusCode
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA