P_RSHOperationsWOExplicitRelat

DDL: P_RSHOPERATIONSWOEXPLICITRELAT SQL: PRSHOPERWOEXREL Type: view CONSUMPTION Package: RSH_CDS_ORD

Operations without explicit Relations

P_RSHOperationsWOExplicitRelat is a Consumption CDS View that provides data about "Operations without explicit Relations" in SAP S/4HANA. It reads from 3 data sources (I_LogisticsOrder, I_MaintenanceOrderOperation, I_ProjectNetworkRelationship) and exposes 10 fields with key fields MaintenanceOrder, MaintenanceOperation. It has 2 associations to related views. Part of development package RSH_CDS_ORD.

Data Sources (3)

SourceAliasJoin Type
I_LogisticsOrder _Order inner
I_MaintenanceOrderOperation mop from
I_ProjectNetworkRelationship rel left_outer

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_SchedulingType _SchedulingType _Order.BasicSchedulingType = _SchedulingType.SchedulingType
[0..1] I_StatusObjectStatusBasic _IsDeletedStatus _IsDeletedStatus.StatusObject = mop.MaintOrderOperationInternalID and _IsDeletedStatus.StatusCode = 'I0013' and _IsDeletedStatus.StatusIsInactive = ' '

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PRSHOPERWOEXREL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
EndUserText.label Operations without explicit Relations view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #META view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder MaintenanceOrder
KEY MaintenanceOperation MaintenanceOrderOperation
MaintOrderRoutingNumber I_MaintenanceOrderOperation MaintOrderRoutingNumber
MaintOrderOperationCounter I_MaintenanceOrderOperation MaintOrderOperationCounter
MaintOrderOperationInternalID MaintOrderOperationInternalID
SchedulingType _SchedulingType SchedulingType
ForwardScheduling _SchedulingType SchedulingIsPerformedForward
BackwardScheduling _SchedulingType SchedulingIsPerformedBackward
CurrentDateScheduling _SchedulingType SchedgIsPerformedFromCurDate
CapacitiveScheduling _SchedulingType CalcOfCapacityRqmtsIsPerformed
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PRSHOPERWOEXREL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck:  #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'Operations without explicit Relations'
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #META
/*
CONTRACT**********************************************************************************************************************

Name:                       Operations without explicit Relationships
Specification:              This view provides Operations which have no explicit (defined) relationships
Requires:                   NA
Ensures:                    Operations without Relationships are returned for operations
                            
Owners:                     TP
Contributors:               TP
Unit Test required Y/N:     Y
Additional comments         None

END OF CONTRACT***************************************************************************************************************
*/

define view P_RSHOperationsWOExplicitRelat 

as select from I_MaintenanceOrderOperation            as mop

    inner join       I_LogisticsOrder                 as _Order  on _Order.OrderID = mop.MaintenanceOrder

    left outer join  I_ProjectNetworkRelationship     as rel on  rel.PredecessorProjNtwkIntID = MaintOrderRoutingNumber or
                                                                 rel.SuccessorProjNtwkIntID   = MaintOrderRoutingNumber

    association [0..1] to I_SchedulingType            as _SchedulingType  on  _Order.BasicSchedulingType = _SchedulingType.SchedulingType

    association [0..1] to I_StatusObjectStatusBasic   as _IsDeletedStatus on  _IsDeletedStatus.StatusObject     = mop.MaintOrderOperationInternalID
                                                                          and _IsDeletedStatus.StatusCode       = 'I0013'
                                                                          and _IsDeletedStatus.StatusIsInactive = ' '
{

  key MaintenanceOrder                                as MaintenanceOrder,
  key MaintenanceOrderOperation                       as MaintenanceOperation,
 
      mop.MaintOrderRoutingNumber,
      mop.MaintOrderOperationCounter,
      MaintOrderOperationInternalID,
      
      _SchedulingType.SchedulingType                  as SchedulingType,
  
      _SchedulingType.SchedulingIsPerformedForward    as ForwardScheduling,
      _SchedulingType.SchedulingIsPerformedBackward   as BackwardScheduling,
      _SchedulingType.SchedgIsPerformedFromCurDate    as CurrentDateScheduling,
      _SchedulingType.CalcOfCapacityRqmtsIsPerformed  as CapacitiveScheduling

}

where
// Consider only those who does *not* use capacitive scheduling   

  _SchedulingType.CalcOfCapacityRqmtsIsPerformed = '' and 
  rel.PredecessorProjNtwkIntID is null and
  _IsDeletedStatus.StatusObject is null