P_MfgOrderOperationStatus

DDL: P_MFGORDEROPERATIONSTATUS Type: view_entity COMPOSITE

P_MfgOrderOperationStatus is a Composite CDS View 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.

Data Sources (3)

SourceAliasJoin Type
I_OrderOperationBasic afvc from
I_MfgOrderBasic aufv inner
I_StatusObjectStatus jest inner

Annotations (6)

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

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY OrderInternalID I_OrderOperationBasic OrderInternalID
KEY OrderOperationInternalID I_OrderOperationBasic OrderOperationInternalID
ObjectInternalID I_OrderOperationBasic ObjectInternalID
@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

define view entity P_MfgOrderOperationStatus
    as select from I_OrderOperationBasic as afvc 
      inner join   I_MfgOrderBasic       as aufv on  aufv.OrderInternalID = afvc.OrderInternalID
      inner join   I_StatusObjectStatus  as jest on  jest.StatusObject    = afvc.ObjectInternalID
                                                 and jest.StatusIsInactive = '' 
{
    // Technical Key

    key afvc.OrderInternalID,
    key afvc.OrderOperationInternalID,

    // Status

    afvc.ObjectInternalID,
    case jest.StatusCode
      when 'I0001' then 'X'
      else ''
     end as OperationIsCreated,
    case jest.StatusCode
      when 'I0002' then 'X'
      else ''
    end as OperationIsReleased,
    case jest.StatusCode
      when 'I0007' then 'X'
      else ''
    end as OperationIsPrinted,
    case jest.StatusCode
      when 'I0009' then 'X'
      else ''
    end as OperationIsConfirmed,
    case jest.StatusCode
      when 'I0010' then 'X'
      else ''
    end as OperationIsPartiallyConfirmed,
    case jest.StatusCode
      when 'I0013' then 'X'
      else ''
    end as OperationIsDeleted,
    case jest.StatusCode
      when 'I0045'then 'X'
      else ''
    end as OperationIsTechlyCompleted,
    case jest.StatusCode
      when 'I0046'then 'X'
      else ''
    end as OperationIsClosed,
    case jest.StatusCode
      when 'I0051' then 'X' 
      else '' 
    end as OperationIsConfdByMilestone,
    case jest.StatusCode
      when 'I0052' then 'X' 
      else '' 
    end as OperationIsManuallyConfirmed,
    case jest.StatusCode
      when 'I0117' then 'X'
      else ''
    end as OperationIsScheduled,
    case jest.StatusCode
      when 'I0328' then 'X' 
      else '' 
    end as OperationIsGenerated,      
    case jest.StatusCode
      when 'I0377' then 'X'
      else ''
    end as OperationIsPartiallyDelivered,
    case jest.StatusCode
      when 'I0378' then 'X'
      else ''
    end as OperationIsDelivered,
    case jest.StatusCode
      when 'I0650' then 'X' 
      else '' 
    end as 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' );
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MFGORDERBASIC",
"I_ORDEROPERATIONBASIC",
"I_STATUSOBJECTSTATUS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/