P_MfgProcgExecOrdOpMainStatus

DDL: P_MFGPROCGEXECORDOPMAINSTATUS SQL: PMPEOPSTATUS Type: view CONSUMPTION

P_MfgProcgExecOrdOpMainStatus is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_OrderOperationStatus) and exposes 6 fields with key fields OrderInternalID, OrderOperationInternalID. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_OrderOperationStatus stat from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_StatusObjectStatus _StatusObjectStatus $projection.StatusCode = _StatusObjectStatus.StatusCode and $projection.StatusObject = _StatusObjectStatus.StatusObject

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PMPEOPSTATUS view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY OrderInternalID I_OrderOperationStatus OrderInternalID
KEY OrderOperationInternalID I_OrderOperationStatus OrderOperationInternalID
StatusObject I_OrderOperationStatus ObjectInternalID
numc2asOperationMainStatus
OperationIsReleased I_OrderOperationStatus OperationIsReleased
_StatusObjectStatus _StatusObjectStatus
@AbapCatalog.sqlViewName: 'PMPEOPSTATUS'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #B, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.viewType: #CONSUMPTION
@VDM.private: true
// Used in P_MFGPROCGEXECORDOPMAINSTATUS2 to get status of operation


/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view P_MfgProcgExecOrdOpMainStatus
  as select from I_OrderOperationStatus as stat
  association [1..1] to I_StatusObjectStatus as _StatusObjectStatus on  $projection.StatusCode   = _StatusObjectStatus.StatusCode
                                                                    and $projection.StatusObject = _StatusObjectStatus.StatusObject
{
  key stat.OrderInternalID,
  key stat.OrderOperationInternalID,

      stat.ObjectInternalID                                                      as  StatusObject,

      //  _StatusCode.StatusProfile as StatusProfile,


      cast( case stat.OperationIsDeleted
      when 'X' then '10'
      else case stat.OperationIsClosed
      when 'X' then '09'
      else case stat.OperationIsTechlyCompleted
           when 'X' then '08'
           else case stat.OperationIsDelivered
           when 'X' then '07'
           else case stat.OperationIsPartiallyDelivered
           when 'X' then '06'
           else case stat.OperationIsConfirmed
           when 'X' then '05'
           else case stat.OperationIsPartiallyConfirmed
           when 'X' then '04'
           else case stat.OperationIsReleased
           when 'X' then '03'
           else case stat.OperationIsScheduled
           when 'X' then '02'
           else case stat.OperationIsCreated
           when 'X' then '01'
           else '00'
           end end end end end end end end end end as abap.numc(2))              as  OperationMainStatus,

      cast( case stat.OperationIsDeleted
        when 'X' then 'I0013'
        else case stat.OperationIsClosed
        when 'X' then 'I0046'
        else case stat.OperationIsTechlyCompleted
             when 'X' then 'I0045'
             else case stat.OperationIsDelivered
             when 'X' then 'I0378'
             else case stat.OperationIsPartiallyDelivered
             when 'X' then 'I0377'
             else case stat.OperationIsConfirmed
             when 'X' then 'I0009'
             else case stat.OperationIsPartiallyConfirmed
             when 'X' then 'I0010'
             else case stat.OperationIsReleased
             when 'X' then 'I0002'
             else case stat.OperationIsScheduled
             when 'X' then 'I0117'
             else case stat.OperationIsCreated
             when 'X' then 'I0001'
             else ''
             end end end end end end end end end end as j_istat preserving type) as  StatusCode,



      //      cast( case stat.OperationIsDeleted

      //        when 'X' then 'Deleted'

      //        else case stat.OperationIsClosed

      //        when 'X' then 'Closed'

      //        else case stat.OperationIsTechlyCompleted

      //             when 'X' then 'Technically Completed'

      //             else case stat.OperationIsDelivered

      //             when 'X' then 'Delivered'

      //             else case stat.OperationIsPartiallyDelivered

      //             when 'X' then 'Partially Delivered'

      //             else case stat.OperationIsConfirmed

      //             when 'X' then 'Confirmed'

      //             else case stat.OperationIsPartiallyConfirmed

      //             when 'X' then 'Partially Confirmed'

      //             else case stat.OperationIsReleased

      //             when 'X' then 'Released'

      //             else case stat.OperationIsScheduled

      //             when 'X' then 'Scheduled'

      //             else case stat.OperationIsCreated

      //             when 'X' then 'Created'

      //             else ''

      //             end end end end end end end end end end as mpe_object_description_type) as OperationStatusText,


      //        case stat.OperationIsDeleted

      //        when 'X' then 1 --red

      //        else case stat.OperationIsClosed

      //        when 'X' then 0

      //        else case stat.OperationIsTechlyCompleted

      //             when 'X' then 0

      //             else case stat.OperationIsDelivered

      //             when 'X' then 3

      //             else case stat.OperationIsPartiallyDelivered

      //             when 'X' then 2

      //             else case stat.OperationIsConfirmed

      //             when 'X' then 3

      //             else case stat.OperationIsPartiallyConfirmed

      //             when 'X' then 2

      //             else case stat.OperationIsReleased

      //             when 'X' then 0

      //             else case stat.OperationIsScheduled

      //             when 'X' then 0

      //             else case stat.OperationIsCreated

      //             when 'X' then 0

      //             else 0

      ////            end end end end end end end end end end as  OperationStatusCriticality,


      stat.OperationIsReleased,

      _StatusObjectStatus
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ORDEROPERATIONSTATUS"
],
"ASSOCIATED":
[
"I_STATUSOBJECTSTATUS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/