P_MfgOrderOperationStatus is a Composite CDS View that provides data about "Manufacturing Order Operation Status" in SAP S/4HANA. It reads from 3 data sources (I_OrderOperationBasic, I_MfgOrderBasic, I_StatusObjectStatus) and exposes 3 fields with key fields OrderInternalID, OrderOperationInternalID. Part of development package VDM_PP_SFC.
@AccessControl.authorizationCheck: #NOT_REQUIRED@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL}@VDM.viewType: #COMPOSITE@VDM.private: true// provides the non-aggregated status per order operation (multiple lines per key)
// to be used in aggregation views such as I_MfgOrderOperationStatus only
defineviewentity P_MfgOrderOperationStatus
asselectfrom I_OrderOperationBasic as afvc
innerjoin I_MfgOrderBasic as aufv on aufv.OrderInternalID = afvc.OrderInternalID
innerjoin I_StatusObjectStatus as jest on jest.StatusObject = afvc.ObjectInternalID
and jest.StatusIsInactive = ''
{
// Technical Keykey afvc.OrderInternalID,
key afvc.OrderOperationInternalID,
// Status
afvc.ObjectInternalID,
case jest.StatusCode
when 'I0001' then 'X'
else ''
endas OperationIsCreated,
case jest.StatusCode
when 'I0002' then 'X'
else ''
endas OperationIsReleased,
case jest.StatusCode
when 'I0007' then 'X'
else ''
endas OperationIsPrinted,
case jest.StatusCode
when 'I0009' then 'X'
else ''
endas OperationIsConfirmed,
case jest.StatusCode
when 'I0010' then 'X'
else ''
endas OperationIsPartiallyConfirmed,
case jest.StatusCode
when 'I0013' then 'X'
else ''
endas OperationIsDeleted,
case jest.StatusCode
when 'I0045'then 'X'
else ''
endas OperationIsTechlyCompleted,
case jest.StatusCode
when 'I0046'then 'X'
else ''
endas OperationIsClosed,
case jest.StatusCode
when 'I0051' then 'X'
else ''
endas OperationIsConfdByMilestone,
case jest.StatusCode
when 'I0052' then 'X'
else ''
endas OperationIsManuallyConfirmed,
case jest.StatusCode
when 'I0117' then 'X'
else ''
endas OperationIsScheduled,
case jest.StatusCode
when 'I0328' then 'X'
else ''
endas OperationIsGenerated,
case jest.StatusCode
when 'I0377' then 'X'
else ''
endas OperationIsPartiallyDelivered,
case jest.StatusCode
when 'I0378' then 'X'
else ''
endas OperationIsDelivered,
case jest.StatusCode
when 'I0650' then 'X'
else ''
endas ControlRecipeIsCreated
}
where ( aufv.ManufacturingOrderCategory = '10' //Manufacturing orders only
or aufv.ManufacturingOrderCategory = '40' )
and jest.StatusObject like 'OV%'
and ( jest.StatusCode = 'I0001'
or jest.StatusCode = 'I0002'
or jest.StatusCode = 'I0007'
or jest.StatusCode = 'I0009'
or jest.StatusCode = 'I0010'
or jest.StatusCode = 'I0013'
or jest.StatusCode = 'I0045'
or jest.StatusCode = 'I0046'
or jest.StatusCode = 'I0051'
or jest.StatusCode = 'I0052'
or jest.StatusCode = 'I0117'
or jest.StatusCode = 'I0328'
or jest.StatusCode = 'I0377'
or jest.StatusCode = 'I0378'
or jest.StatusCode = 'I0650' );