P_ProcOrdMgmtOpIssueCalc

DDL: P_PROCORDMGMTOPISSUECALC SQL: PPORMOPISSCALC Type: view COMPOSITE

P_ProcOrdMgmtOpIssueCalc is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_ProcOrdAORListDistinct, I_ProcOrdMgmtOpBasic) and exposes 42 fields with key fields OrderInternalID, OrderOperationInternalID. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
P_ProcOrdAORListDistinct _AORList inner
I_ProcOrdMgmtOpBasic Op from

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_ProcOrdMgmtOp afvp afvp.OrderInternalID = Op.OrderInternalID and afvp.ProcessOrder = Op.ProcessOrder and afvp.ManufacturingOrderCategory = '40' and afvp.ProductionSupervisor = Op.ProductionSupervisor and afvp.ProductionPlant = Op.ProductionPlant and afvp.OrderOperationInternalID = Op.OrderIntBillOfOpItemOfPhase

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPORMOPISSCALC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY OrderInternalID I_ProcOrdMgmtOpBasic OrderInternalID
KEY OrderOperationInternalID OrderOperationInternalID
ProcessOrder ProcessOrder
ManufacturingOrderCategory ManufacturingOrderCategory
ProductionPlant ProductionPlant
ProductionSupervisor ProductionSupervisor
Sequence Sequence
Operation Operation
BillOfOperationsSequence BillOfOperationsSequence
BillOfOperationsType BillOfOperationsType
BillOfOperationsGroup BillOfOperationsGroup
BillOfOperationsVariant BillOfOperationsVariant
BOOOperationInternalID BOOOperationInternalID
BillOfOperationsVersion BillOfOperationsVersion
BillOfMaterialCategory BillOfMaterialCategory
BillOfMaterialInternalID BillOfMaterialInternalID
BillOfMaterialItemNodeNumber BillOfMaterialItemNodeNumber
BOMItemNodeCount BOMItemNodeCount
SuperiorOperationInternalID SuperiorOperationInternalID
WorkCenterInternalID WorkCenterInternalID
Plant Plant
ObjectInternalID ObjectInternalID
OperationText OperationText
Language Language
OrderIntBillOfOpItemOfPhase OrderIntBillOfOpItemOfPhase
MfgOrderOperationIsPhase MfgOrderOperationIsPhase
OperationUnit OperationUnit
OpPlannedTotalQuantity OpPlannedTotalQuantity
OpPlannedScrapQuantity OpPlannedScrapQuantity
OpTotalConfirmedYieldQty OpTotalConfirmedYieldQty
OpTotalConfirmedScrapQty OpTotalConfirmedScrapQty
OpPlannedYieldQuantity OpPlannedYieldQuantity
OpLtstSchedldExecStrtDte OpLtstSchedldExecStrtDte
OpLtstSchedldExecStrtTme OpLtstSchedldExecStrtTme
OpLtstSchedldExecEndDte OpLtstSchedldExecEndDte
OpLtstSchedldExecEndTme OpLtstSchedldExecEndTme
OpActualExecutionStartDate OpActualExecutionStartDate
OpActualExecutionStartTime OpActualExecutionStartTime
OpActualExecutionEndDate OpActualExecutionEndDate
OpActualExecutionEndTime OpActualExecutionEndTime
MfgOrderPhaseSuperiorOperation
_OrderInternalID _OrderInternalID
@AbapCatalog.sqlViewName: 'PPORMOPISSCALC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
//@EndUserText.label: 'process order operation quantity and quality issue'

@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #TRANSACTIONAL}
@VDM.viewType:  #COMPOSITE
@VDM.private: true
define view P_ProcOrdMgmtOpIssueCalc
  as select from I_ProcOrdMgmtOpBasic as Op
  inner join P_ProcOrdAORListDistinct as _AORList on  _AORList.OrderID   = Op.ProcessOrder
  association [0..1] to P_ProcOrdMgmtOp as afvp on  afvp.OrderInternalID            = Op.OrderInternalID //phase handling

                                                and afvp.ProcessOrder               = Op.ProcessOrder
                                                and afvp.ManufacturingOrderCategory = '40'
                                                and afvp.ProductionSupervisor       = Op.ProductionSupervisor
                                                and afvp.ProductionPlant            = Op.ProductionPlant
                                                and afvp.OrderOperationInternalID   = Op.OrderIntBillOfOpItemOfPhase
{
      //Op

  key Op.OrderInternalID,
  key OrderOperationInternalID,
      ProcessOrder,
      ManufacturingOrderCategory,
      ProductionPlant,
      ProductionSupervisor,
      Sequence,
      Operation,
      BillOfOperationsSequence,
      BillOfOperationsType,
      BillOfOperationsGroup,
      BillOfOperationsVariant,
      BOOOperationInternalID,
      BillOfOperationsVersion,
      BillOfMaterialCategory,
      BillOfMaterialInternalID,
      BillOfMaterialItemNodeNumber,
      BOMItemNodeCount,
      SuperiorOperationInternalID,
      WorkCenterInternalID,
      Plant,
      ObjectInternalID,
      OperationText,
      Language,
      OrderIntBillOfOpItemOfPhase,
      MfgOrderOperationIsPhase,
      OperationUnit,
      OpPlannedTotalQuantity,
      OpPlannedScrapQuantity,
      OpTotalConfirmedYieldQty,
      OpTotalConfirmedScrapQty,
      OpPlannedYieldQuantity,

      OpLtstSchedldExecStrtDte,
      OpLtstSchedldExecStrtTme,
      OpLtstSchedldExecEndDte,
      OpLtstSchedldExecEndTme,
      OpActualExecutionStartDate,
      OpActualExecutionStartTime,
      OpActualExecutionEndDate,
      OpActualExecutionEndTime,

      case OpLtstSchedldExecStrtTme when '240000' then
             cast(cast(concat(OpLtstSchedldExecStrtDte,cast('235959' as tims))as abap.numc(15)) as timestamp)
             else
             cast(cast(concat(OpLtstSchedldExecStrtDte , OpLtstSchedldExecStrtTme)as abap.numc(15)) as timestamp)
             end as ProcOrdOpSchedldStartDateTime,

      case OpLtstSchedldExecEndTme when '240000' then
      cast(cast(concat(OpLtstSchedldExecEndDte,cast('235959' as tims))as abap.numc(15)) as timestamp)
      else
      cast(cast(concat(OpLtstSchedldExecEndDte , OpLtstSchedldExecEndTme)as abap.numc(15)) as timestamp)
      end        as ProcOrdOpSchedldEndDateTime,


      case OpActualExecutionStartTime when '240000' then
      cast(cast(concat(OpActualExecutionStartDate,cast('235959' as tims))as abap.numc(15)) as timestamp)
      else
      cast(cast(concat(OpActualExecutionStartDate , OpActualExecutionStartTime)as abap.numc(15)) as timestamp)
      end        as ProcOrdOpActualStartDateTime,


      case OpActualExecutionEndTime when '240000' then
           cast(cast(concat(OpActualExecutionEndDate,cast('235959' as tims))as abap.numc(15)) as timestamp)
          else
           cast(cast(concat(OpActualExecutionEndDate , OpActualExecutionEndTime)as abap.numc(15)) as timestamp)
          end    as ProcOrdOpActualEndDateTime,


      case when ( OpTotalConfirmedYieldQty  < OpPlannedYieldQuantity )
        then 'X'
        else ''
        end      as ProcOrdOpHasQuantityIssue,

      case
        when ( OpTotalConfirmedScrapQty > OpPlannedScrapQuantity)
        then 'X'
        else ''
        end      as ProcOrdOpHasQualityIssue,

      cast(afvp.Operation as vdm_supop preserving type) as MfgOrderPhaseSuperiorOperation,

      /* Associations */
      _OrderInternalID
}
where
      ManufacturingOrderCategory  = '40'
  and SuperiorOperationInternalID is initial
  and Sequence                    = '000000'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PROCORDMGMTOPBASIC",
"P_PROCORDAORLISTDISTINCT",
"P_PROCORDMGMTOP"
],
"ASSOCIATED":
[
"I_ORDERINTERNALID",
"P_PROCORDMGMTOP"
],
"BASE":
[
"I_PROCORDMGMTOPBASIC"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/