@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Order Operation TP'
@VDM.viewType: #COMPOSITE
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
define view entity R_MaintenanceOrderOperationTP
as select from I_MaintOrderOperAndSubOper
association to parent R_MaintenanceOrderTP as _MaintenanceOrder on $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
composition [0..*] of R_MaintOrderOpRelationshipTP as _MaintOrderOpRelationship
composition [0..*] of R_MaintOrderOpComponentTP as _MaintOrderOpComponent
composition [0..*] of R_MaintOrderOpComponentTP_2 as _MaintOrderOpComponent_2
composition [0..*] of R_MaintOrderOpLongTextTP as _MaintOrderOpLongText
composition [0..*] of R_MaintOrderOpPhaseControlTP as _MaintOrderOpPhaseControl
composition [0..*] of R_MaintOrderOpProdnRsceToolTP as _MaintOrderOpProdnRsceTool
composition [0..*] of R_MaintOrderOpRqmtAssgmtTP as _MaintOrderOpRqmtAssgmt
association [0..1] to I_WorkCenter as _OperationWorkCenter on _OperationWorkCenter.WorkCenterInternalID = $projection.OperationWorkCenterInternalID
and _OperationWorkCenter.WorkCenterTypeCode = $projection.OperationWorkCenterTypeCode
association [0..1] to I_WBSElementBasicData as _WBSElement on _WBSElement.WBSElementInternalID = $projection.MaintOrdOpAssgdWBSElmntInt
association [0..*] to I_CostCenterActivityTypeText as _CostCenterActivityTypeText on $projection.ControllingArea = _CostCenterActivityTypeText.ControllingArea
and $projection.ActivityType = _CostCenterActivityTypeText.CostCtrActivityType
and _CostCenterActivityTypeText.ValidityStartDate <= $session.system_date
and _CostCenterActivityTypeText.ValidityEndDate = '99991231'
association [0..*] to I_MaintenanceActivityTypeText as _MaintenanceActivityTypeText on $projection.maintenanceactivitytype = _MaintenanceActivityTypeText.MaintenanceActivityType
association [0..1] to I_MaintOrderOperObjectListLink as _MaintOrderOpObjectListLink on $projection.MaintenanceOrderRoutingNode = _MaintOrderOpObjectListLink.MaintOrderOperationCounter
and $projection.MaintOrderRoutingNumber = _MaintOrderOpObjectListLink.MaintOrderRoutingNumber
-- Extensions, do not expose as association:
association [0..1] to E_MaintenanceOrderOperation as _MaintOrderOperExtension on _MaintOrderOperExtension.MaintOrderRoutingNumber = $projection.MaintOrderRoutingNumber
and _MaintOrderOperExtension.MaintOrderOperationCounter = $projection.MaintenanceOrderRoutingNode
association [0..*] to I_MaterialGroupText as _MaterialGroupText on $projection.MaterialGroup = _MaterialGroupText.MaterialGroup
association [0..1] to I_CostElement as _CostElement on $projection.ControllingArea = _CostElement.ControllingArea
and $projection.CostElement = _CostElement.CostElement
association [0..1] to I_MaintenanceNotification as _MaintenanceNotification on _MaintenanceNotification.MaintenanceNotification = $projection.maintenancenotification
association [0..*] to I_OperationControlProfileText as _OperationControlProfileText on _OperationControlProfileText.OperationControlProfile = $projection.OperationControlKey
association [0..*] to I_MaintOpExecStageCodeText as _MaintOpExecStageCodeText on _MaintOpExecStageCodeText.MaintOperationExecStageCode = $projection.MaintOperationExecStageCode
association [0..*] to I_MaterialText as _AssemblyText on _AssemblyText.Material = $projection.Assembly
association [0..*] to I_EquipmentText as _EquipmentText on _EquipmentText.Equipment = $projection.Equipment
association [0..1] to I_FunctionalLocationLabel as _FunctionalLocationLabel on _FunctionalLocationLabel.FunctionalLocation = $projection.FunctionalLocation
association [0..*] to I_FunctionalLocationText as _FunctionalLocationText on _FunctionalLocationText.FunctionalLocation = $projection.FunctionalLocation
association [0..*] to I_MaintOperationSystConditionT as _MaintOpSystemConditionText on _MaintOpSystemConditionText.OperationSystemCondition = $projection.OperationSystemCondition
association [0..*] to I_WorkCenterText as _WorkCenterText on _WorkCenterText.WorkCenterTypeCode = $projection.OperationWorkCenterTypeCode
and _WorkCenterText.WorkCenterInternalID = $projection.OperationWorkCenterInternalID
association [0..*] to I_OperationCalcControlText as _OperationCalcControlText on _OperationCalcControlText.OperationCalculationControl = $projection.OperationCalculationControl
association [0..*] to I_EAMProcessPhaseText as _EAMProcessPhaseText on _EAMProcessPhaseText.EAMProcessPhaseCode = $projection.MaintOrdOpProcessPhaseCode
association [0..*] to I_EAMProcessSubPhaseText as _EAMProcessSubPhaseText on _EAMProcessSubPhaseText.EAMProcessSubPhaseCode = $projection.MaintOrdOpProcessSubPhaseCode
association [0..*] to I_PurReqnOrResvnGenerationText as _PurReqnOrResvnGenerationText on _PurReqnOrResvnGenerationText.PurReqnOrResvnGeneration = $projection.MaintOrdOperationIsMRPRelevant
association [0..*] to I_MaintOrdOpDeliveryDateAdjmtT as _MaintOrdOpDeliveryDateAdjmtT on _MaintOrdOpDeliveryDateAdjmtT.MaintOrdOpDelivDateAdjustment = $projection.MaintOrdOpDelivDateAdjustment
{
key MaintenanceOrder,
key cast( MaintenanceOrderOperation as maintenanceorderoperation preserving type ) as MaintenanceOrderOperation,
key cast( MaintenanceOrderSubOperation as maintenanceordersuboperation preserving type ) as MaintenanceOrderSubOperation,
@ObjectModel.editableFieldFor: 'MaintenanceOrderOperation'
cast( MaintenanceOrderOperation as maintenanceorderoperation preserving type ) as MaintOrderOperationForEdit,
@ObjectModel.editableFieldFor: 'MaintenanceOrderSubOperation'
cast( MaintenanceOrderSubOperation as maintenanceordersuboperation preserving type ) as MaintOrderSubOperationForEdit,
MaintOrderRoutingNumber,
MaintOrderOperationCounter as MaintenanceOrderRoutingNode,
SuperiorOperationInternalID,
OperationControlKey,
OperationDescription,
OperationWorkCenterInternalID,
_OperationWorkCenter.WorkCenter,
OperationWorkCenterTypeCode,
Plant,
OperationStandardTextCode,
Language,
NumberOfTimeTickets,
OperationPurgInfoRecdSearchTxt,
OperationSupplier,
OpExternalProcessingPrice,
OpExternalProcessingPriceUnit,
CostElement,
OpExternalProcessingCurrency,
OperationPurchasingInfoRecord,
PurchasingOrganization,
PurchasingGroup,
MaterialGroup,
OpPurchaseOutlineAgreement,
OpPurchaseOutlineAgreementItem,
OperationRequisitionerName,
OperationTrackingNumber,
NumberOfCapacities,
OperationWorkPercent,
OperationCalculationControl,
CostCtrActivityType as ActivityType,
OperationSystemCondition,
OperationGoodsRecipientName,
OperationUnloadingPointName,
OperationPersonResponsible,
EAMPlannedDeliveryDurnInDays,
MaintOrderOperationDuration,
MaintOrdOperationDurationUnit,
OpBscStartDateConstraintType,
OpBscEndDateConstraintType,
MaintOrdOperationWorkDuration,
MaintOrdOpWorkDurationUnit,
// Constraint Basic Start Time Date
case when ConstraintTimeForBscStartTime = '240000' and ConstraintDateForBscStartDate is not initial
then cast(dats_tims_to_tstmp( dats_add_days( ConstraintDateForBscStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( ConstraintDateForBscStartDate, ConstraintTimeForBscStartTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as MaintOrdOpConstraintStrtDteTme,
case when ConstraintTimeForBscStartTime = '240000' and ConstraintDateForBscStartDate is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( ConstraintDateForBscStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(ConstraintDateForBscStartDate, ConstraintTimeForBscStartTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as ConstraintDateForBscStartDate,
case when ConstraintTimeForBscStartTime = '240000' and ConstraintDateForBscStartDate is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( ConstraintDateForBscStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(ConstraintDateForBscStartDate, ConstraintTimeForBscStartTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as ConstraintTimeForBscStartTime,
// Constraint Basic Finisch Time Date
case when ConstraintTimeForBscFinishTime = '240000' and ConstraintDateForBscFinishDate is not initial
then cast(dats_tims_to_tstmp( dats_add_days( ConstraintDateForBscFinishDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( ConstraintDateForBscFinishDate, ConstraintTimeForBscFinishTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
end as MaintOrdOpCstrtFinishDteTme,
case when ConstraintTimeForBscFinishTime = '240000' and ConstraintDateForBscFinishDate is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( ConstraintDateForBscFinishDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(ConstraintDateForBscFinishDate, ConstraintTimeForBscFinishTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as ConstraintDateForBscFinishDate,
case when ConstraintTimeForBscFinishTime = '240000' and ConstraintDateForBscFinishDate is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( ConstraintDateForBscFinishDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(ConstraintDateForBscFinishDate, ConstraintTimeForBscFinishTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as ConstraintTimeForBscFinishTime,
MaintOrdOperationExecutionRate,
Equipment,
FunctionalLocation,
// Earliest Start Date Time
case when OpErlstSchedldExecStrtTme = '240000' and OpErlstSchedldExecStrtDte is not initial
then cast(dats_tims_to_tstmp( dats_add_days( OpErlstSchedldExecStrtDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( OpErlstSchedldExecStrtDte, OpErlstSchedldExecStrtTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as OpErlstSchedldExecStrtDteTme,
case when OpErlstSchedldExecStrtTme = '240000' and OpErlstSchedldExecStrtDte is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( OpErlstSchedldExecStrtDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(OpErlstSchedldExecStrtDte, OpErlstSchedldExecStrtTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpErlstSchedldExecStrtDte,
case when OpErlstSchedldExecStrtTme = '240000' and OpErlstSchedldExecStrtDte is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( OpErlstSchedldExecStrtDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(OpErlstSchedldExecStrtDte, OpErlstSchedldExecStrtTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpErlstSchedldExecStrtTme,
// Earliest Finish Date Time
case when OpErlstSchedldExecEndTme = '240000' and OpErlstSchedldExecEndDte is not initial
then cast(dats_tims_to_tstmp( dats_add_days( OpErlstSchedldExecEndDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( OpErlstSchedldExecEndDte, OpErlstSchedldExecEndTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as OpErlstSchedldExecEndDteTme,
case when OpErlstSchedldExecEndTme = '240000' and OpErlstSchedldExecEndDte is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( OpErlstSchedldExecEndDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(OpErlstSchedldExecEndDte, OpErlstSchedldExecEndTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpErlstSchedldExecEndDte,
case when OpErlstSchedldExecEndTme = '240000' and OpErlstSchedldExecEndDte is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( OpErlstSchedldExecEndDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(OpErlstSchedldExecEndDte, OpErlstSchedldExecEndTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpErlstSchedldExecEndTme,
// Latest Start Date Time
case when OpLtstSchedldExecStrtTme = '240000' and OpLtstSchedldExecStrtDte is not initial
then cast(dats_tims_to_tstmp( dats_add_days( OpLtstSchedldExecStrtDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( OpLtstSchedldExecStrtDte, OpLtstSchedldExecStrtTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as OpLtstSchedldExecStrtDteTme,
case when OpLtstSchedldExecStrtTme = '240000' and OpLtstSchedldExecStrtDte is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( OpLtstSchedldExecStrtDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(OpLtstSchedldExecStrtDte, OpLtstSchedldExecStrtTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpLtstSchedldExecStrtDte,
case when OpLtstSchedldExecStrtTme = '240000' and OpLtstSchedldExecStrtDte is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( OpLtstSchedldExecStrtDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(OpLtstSchedldExecStrtDte, OpLtstSchedldExecStrtTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpLtstSchedldExecStrtTme,
// Latest Finish Date Time
case when OpLtstSchedldExecEndTme = '240000' and OpLtstSchedldExecEndDte is not initial
then cast(dats_tims_to_tstmp( dats_add_days( OpLtstSchedldExecEndDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( OpLtstSchedldExecEndDte, OpLtstSchedldExecEndTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as OpLtstSchedldExecEndDteTme,
case when OpLtstSchedldExecEndTme = '240000' and OpLtstSchedldExecEndDte is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( OpLtstSchedldExecEndDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(OpLtstSchedldExecEndDte, OpLtstSchedldExecEndTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpLtstSchedldExecEndDte,
case when OpLtstSchedldExecEndTme = '240000' and OpLtstSchedldExecEndDte is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( OpLtstSchedldExecEndDte, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(OpLtstSchedldExecEndDte, OpLtstSchedldExecEndTme,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpLtstSchedldExecEndTme,
// Actual Start Date Time
case when OpActualExecutionStartTime = '240000' and OpActualExecutionStartDate is not initial
then cast(dats_tims_to_tstmp( dats_add_days( OpActualExecutionStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( OpActualExecutionStartDate, OpActualExecutionStartTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as OpActualExecutionStartDateTime,
case when OpActualExecutionStartTime = '240000' and OpActualExecutionStartDate is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( OpActualExecutionStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(OpActualExecutionStartDate, OpActualExecutionStartTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpActualExecutionStartDate,
case when OpActualExecutionStartTime = '240000' and OpActualExecutionStartDate is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( OpActualExecutionStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(OpActualExecutionStartDate, OpActualExecutionStartTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpActualExecutionStartTime,
// Actual Finish Date Time
case when OpActualExecutionEndTime = '240000' and OpActualExecutionEndDate is not initial
then cast(dats_tims_to_tstmp( dats_add_days( OpActualExecutionEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( OpActualExecutionEndDate, OpActualExecutionEndTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as OpActualExecutionEndDateTime,
case when OpActualExecutionEndTime = '240000' and OpActualExecutionEndDate is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( OpActualExecutionEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(OpActualExecutionEndDate, OpActualExecutionEndTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpActualExecutionEndDate,
case when OpActualExecutionEndTime = '240000' and OpActualExecutionEndDate is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( OpActualExecutionEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(OpActualExecutionEndDate, OpActualExecutionEndTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as OpActualExecutionEndTime,
case when ActyConfFcstdEndTime = '240000' and ActyConfFcstdEndDate is not initial
then tstmp_to_dats( dats_tims_to_tstmp(dats_add_days( ActyConfFcstdEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_dats( dats_tims_to_tstmp(ActyConfFcstdEndDate, ActyConfFcstdEndTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as ActyConfFcstdEndDate,
case when ActyConfFcstdEndTime = '240000' and ActyConfFcstdEndDate is not initial
then tstmp_to_tims( dats_tims_to_tstmp(dats_add_days( ActyConfFcstdEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
else tstmp_to_tims( dats_tims_to_tstmp(ActyConfFcstdEndDate, ActyConfFcstdEndTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL'), 'UTC', $session.client, 'NULL' )
end as ActyConfFcstdEndTime,
case when ActyConfFcstdEndTime = '240000' and ActyConfFcstdEndDate is not initial
then cast(dats_tims_to_tstmp( dats_add_days( ActyConfFcstdEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
abap_system_timezone( $session.client,'NULL' ),
$session.client, 'NULL') as timestamp preserving type)
else cast(dats_tims_to_tstmp( ActyConfFcstdEndDate, ActyConfFcstdEndTime,
abap_system_timezone( $session.client,'NULL' ),
$session.client,'NULL') as timestamp preserving type)
end as ActyConfForecastedEndDateTime,
ForecastWorkQuantity,
ActualWorkQuantity,
_MaintOrdOpAdditionalData.MaintenanceActivityType,
BusinessArea,
ProfitCenter,
CostingSheet,
TaxJurisdiction,
FunctionalArea,
MaintOrdOperationIsMRPRelevant,
MaintControllingObjectClass,
WrkCtrIntCapRqmtsDistr,
MaintOrdOperationOverheadCode,
MaintOrderOperationQuantity,
MaintOrdOperationQuantityUnit,
Assembly,
MaintOperationExecStageCode,
MaintOrdOpAssgdWBSElmntInt,
cast ( _WBSElement.WBSElement as vdm_ps_posid ) as WBSElement,
IsMarkedForDeletion,
MaintOrderOperationInternalID,
_MaintOrderOperObjectListLink.MaintenanceObjectListItem,
PurchaseRequisition,
PurchaseRequisitionItem,
MaintOrdOpProcessPhaseCode,
MaintOrdOpProcessSubPhaseCode,
AllMaintOrdCompCmtdQtsAreKept,
_MaintenanceOrder.ControllingArea as ControllingArea,
MaintOrderConfirmation,
MaintOrderConfCntrValue,
MaintOrdOpHasNoRemainingWork,
MaintOrdOpHasLeanServices,
_MaintOrderOpObjectListLink._MaintenanceItemObject.MaintenanceNotification,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
ExtProcgOperationHasSubcontrg,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
MaintOrdOpDelivDateAdjustment,
TaskListType,
TaskListGroup,
TaskListGroupCounter,
TaskListSequence,
TaskListOperationInternalId,
MaintOperationalChecklistType,
// associations :
_MaintOrderOpRelationship,
_MaintOrderOpComponent,
_MaintOrderOpComponent_2,
_MaintOrderOpRqmtAssgmt,
_MaintenanceOrder,
_OpExternalProcessingCurrency,
_OperationPlanningValues,
_OperationControlKey,
_OperationSystemCondition,
_Plant,
_OperationCalculationControl,
_Assembly,
_Language,
_Supplier,
_PersonResponsible,
_FunctionalLocation,
_Equipment,
_MaintOrderProdnRsceTool,
_PMContactEmployee,
_MaintOperationExecStageCode,
_OperationWorkCenter,
_StatusObjectActiveStatus,
_MaintOrderOpLongText,
_MaintOrderOpPhaseControl,
_MaintOrderOpProdnRsceTool,
_MaintenanceActivityTypeText,
_CostCenterActivityTypeText,
_PersonWorkAgreement,
_WorkAssignment,
_MaintOrderOpObjectListLink,
_EAMProcessPhase,
_EAMProcessSubPhase,
_MaintenanceNotification,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
_MaterialGroupText,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
_PurchasingOrganization,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
_PurchasingGroup,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
_PurReqnOrResvnGeneration,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
_CostElement,
@Feature: 'EAM_F5241_EXTERNAL_OPERATION'
_MaintOrdOpDeliveryDateAdjmt,
_OperationControlProfileText,
_MaintOpExecStageCodeText,
_AssemblyText,
_EquipmentText,
_FunctionalLocationLabel,
_FunctionalLocationText,
_MaintOpSystemConditionText,
_WorkCenterText,
_OperationCalcControlText,
_EAMProcessPhaseText,
_EAMProcessSubPhaseText,
_PurReqnOrResvnGenerationText,
_MaintOrdOpDeliveryDateAdjmtT
}
where
_StatusObjectActiveStatus [1: StatusCode = 'I0013'].StatusCode is null // mark for deletion based on system status