@AbapCatalog.sqlViewName: 'CMDCHANGEPROCESS'
@EndUserText.label: 'Master Data Change Process'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@VDM.viewType: #CONSUMPTION
@ObjectModel: {
compositionRoot: true,
transactionalProcessingDelegated:true,
createEnabled:true,
updateEnabled:false,
deleteEnabled:true,
draftEnabled:false,
usageType.serviceQuality: #C,
usageType.sizeCategory : #L,
usageType.dataClass: #MIXED,
alternativeKey: [{
id : 'MASTERDATACHANGEPROCESS',
uniqueness : #UNIQUE_IF_NOT_INITIAL,
element : ['MASTERDATACHANGEPROCESS']
}]
// entityChangeStateId: 'MDChgProcessUpdateToken'
}
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: [
'_ProcessRequestorContactCard'
]
@Search.searchable: true
@Metadata.allowExtensions: true
@ObjectModel.semanticKey: ['MasterDataChangeProcess']
@ObjectModel.delegatedAction: [
{ name: 'CHECK_AND_CREATE_MASS_PROCESS', exposureName: 'CheckAndCreateMassProcess' },
{ name: 'CHECK_SELECTION', exposureName: 'CheckProcessSelection' },
{ name: 'CONTINUE_PROCESS', exposureName: 'ContinueProcess' },
{ name: 'FINISH_STEP', exposureName: 'CompleteProcessStep' },
{ name: 'GET_AUDIT_TRAIL', exposureName: 'GetProcessAuditTrail' },
{ name: 'GET_AUDIT_TRAIL_USERS', exposureName: 'GetProcessAuditTrailUsers' },
{ name: 'GET_GRADES', exposureName: 'GetProcessGrades' },
// { name: 'GET_FREE_SOURCES', exposureName: 'GetFreeProcessSources' },
{ name: 'REMOVE_RECORDS', exposureName: 'RemoveProcessRecords' },
{ name: 'RETRY_STEP', exposureName: 'RetryProcessStep' },
{ name: 'REVALIDATE_AND_CONTINUE', exposureName: 'RecheckAndContinueProcess' },
{ name: 'ROLLBACK_PROCESS', exposureName: 'RollbackProcess' },
{ name: 'SPLIT_RECORDS', exposureName: 'SplitProcessRecords' },
{ name: 'START_PROCESS_WITHOUT_SCOPE', exposureName: 'TriggerProcessWithoutScope' },
{ name: 'STOP_PROCESS', exposureName: 'CancelProcess' },
{ name: 'TERMINATE_PROCESS', exposureName: 'TerminateProcess' },
{ name: 'TOUCH', exposureName: 'TriggerProcessDeterminations' },
{ name: 'MANUAL_START_STEP_WORKFLOW', exposureName: 'TriggerProcessStepWorkflow' },
{ name: 'RETRY_START_STEP_WORKFLOW', exposureName: 'RetryStartProcessStepWorkflow' },
{ name: 'ERASE_PROCESS', exposureName: 'DeleteProcess' },
{ name: 'HAS_PROCESS_OPEN_DRAFTS', exposureName: 'CheckProcessHasOpenDrafts' },
{ name: 'VERIFY_CLOUD_READINESS', exposureName: 'VerifyCloudReadiness' }
]
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
define root view C_MasterDataChangeProcess
as select from I_MasterDataChangeProcessTP as Root
association [0..*] to C_MDChgProcessRelatedProcess as _RelatedProcess on _RelatedProcess.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
association [0..*] to C_MDChangeProcessSource as _Source on _Source.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
// association [0..1] to C_MDChangeProcessSource as _SourceFilter on _SourceFilter.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
association [0..1] to I_MDChgProcessSrceRecordsCntr as _NumberOfSouceRecords on _NumberOfSouceRecords.MDChgProcessSourceUUID = $projection.MasterDataChangeProcessUUID
association [0..*] to C_MasterDataChangeProcessStep as _Step on _Step.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
association [0..1] to C_MasterDataChangeProcessStep as _CurrentStep on _CurrentStep.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
and _CurrentStep.MDChgProcessStep = $projection.MDChgProcessCurrentStepNumber
association [0..1] to P_MDChangeProcessStatusState as _ProcessState on _ProcessState.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
association [0..1] to I_MDChangeProcessIsIdle as _ProcessIsIdle on _ProcessIsIdle.MasterDataChangeProcessUUID = $projection.MasterDataChangeProcessUUID
association [0..1] to C_MasterDataChangeProcessUser as _ProcessUserVH on _ProcessUserVH.MDChgProcessRequestor = $projection.MDChgProcessRequestor
// and _ProcessUserVH.MDChgProcessSrceObjectTypeCode = $projection.MDChgProcessSrceObjectTypeCode
association [0..1] to I_UserContactCard as _ProcessRequestorContactCard on $projection.MDChgProcessRequestor = _ProcessRequestorContactCard.ContactCardID
association [0..1] to C_MDChangeProcessStatusStateVH as _ProcessStateVH on _ProcessStateVH.MDChgProcessStatusStateCode = $projection.MDChgProcessStatusStateCode
association [0..1] to C_MDChangeProcessGoalValueHelp as _ProcessGoalVH on _ProcessGoalVH.MDChgProcessGoal = $projection.MDChgProcessGoal
association [0..*] to C_MasterDataChangeProcessGoal as _ProcessGoalText on _ProcessGoalText.MDChgProcessGoal = $projection.MDChgProcessGoal
association [0..1] to C_MDChangeProcessGoalProperty as _GoalProperty on _GoalProperty.MDChgProcessGoal = $projection.MDChgProcessGoal
association [0..1] to I_MDChangeProcessTypeVH as _ProcessTypeVH on _ProcessTypeVH.MDChgProcessTypeID = $projection.MDChgProcessTypeID
and _ProcessTypeVH.MDChgProcessSrceObjectTypeCode = $projection.MDChgProcessSrceObjectTypeCode
and _ProcessTypeVH.MDChgProcessGoal = $projection.MDChgProcessGoal
association [0..*] to I_MDChgProcessTypeText as _ProcessTypeText on _ProcessTypeText.MDChgProcessTypeID = $projection.MDChgProcessTypeID
association [0..1] to C_MDChangeProcessStrategyVH as _ProcessStrategyVH on _ProcessStrategyVH.MDChgProcessDuplicateStrategy = $projection.MDChgProcessDuplicateStrategy
association [0..1] to C_MDQualityEvaluations as _MDQualityEvaluations on _MDQualityEvaluations.MasterDataChangeProcess = $projection.MasterDataChangeProcess
association [0..1] to P_MasterDataAttchLinkCount as _Attachments on $projection.MasterDataChangeProcess = _Attachments.MasterDataAttachmentObjectID
and _Attachments.MasterDataAttachmentObjectType = 'C_MASTERDATACHANGEPROCESS'
{
key Root.MasterDataChangeProcessUUID,
@EndUserText.label: 'Process'
@ObjectModel.text.element: ['MDChgProcessDescription']
@ObjectModel.readOnly: true
@Search.defaultSearchElement: true
Root.MasterDataChangeProcess as MasterDataChangeProcess,
@Semantics.text:true
Root.MDChgProcessDescription,
@Consumption.valueHelpDefinition: [{ association: '_ProcessTypeVH', distinctValues: true }]
@ObjectModel.text.association: '_ProcessTypeText'
@ObjectModel.text.control: #ASSOCIATED_TEXT_UI_HIDDEN
Root.MDChgProcessTypeID,
@Consumption.valueHelpDefinition: [{ association: '_ProcessGoalVH', distinctValues: true }]
@ObjectModel.text.association: '_ProcessGoalText'
@ObjectModel.text.control: #ASSOCIATED_TEXT_UI_HIDDEN
Root.MDChgProcessGoal,
Root.MDChgProcessStatus,
Root.MDChgProcessSrceObjectTypeCode,
Root.MDChgProcessWorkflowTemplate,
@Consumption.valueHelpDefinition: [{ association: '_ProcessUserVH', distinctValues: true }]
@ObjectModel.foreignKey.association: '_ProcessRequestorContactCard'
@Semantics.user.createdBy: true
@EndUserText.label: 'Process Requestor'
Root.MDChgProcessRequestor,
Root.MDChgProcessCreationDate,
Root.MDChgProcessCreationTime,
@ObjectModel.readOnly: true
@ObjectModel.filter.transformedBy: 'ABAP:CL_MDC_PROCESS_FLT_SORT_EXIT'
@ObjectModel.sort.transformedBy: 'ABAP:CL_MDC_PROCESS_FLT_SORT_EXIT'
cast( dats_tims_to_tstmp(Root.MDChgProcessCreationDate, Root.MDChgProcessCreationTime, 'UTC', $session.client, 'NULL')
as timestamp preserving type ) as MDChgProcessCreationDateTime,
Root.MDChgProcessChangeDate,
Root.MDChgProcessChangeTime,
Root.MDChgProcessDelSrceDataIsRqd,
Root.MDChgProcessFinishDate,
Root.MDChgProcessFinishTime,
Root.MDChgProcessUpdateToken,
Root.MDChgProcessIsStarted,
Root.MDChgProcessIsInitialized,
Root.MDChgProcessIsFinalized,
Root.MDChgProcessLastStepIsFinished,
Root.MDChgProcessCurrentStepNumber,
Root.MDChgProcessChkPointIsActive,
Root.MDChgProcessCompletionIsReqd,
Root.MDChgProcessWrkFlwDeltnIsRqd,
Root.MDChgProcessSrceDeletionIsRqd,
Root.MDChgProcessFilterChain,
Root.MDChgProcessErrorsAreLogged,
Root.MDChgProcessLastActKey,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
@EndUserText.label: 'Related Process'
Root.MDChgProcessPredecessor,
Root.MDChgProcessFinalDateTime,
Root.MDChgProcessNextStpAtDateTime,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
@Consumption.valueHelpDefinition: [{ association: '_ProcessStrategyVH', distinctValues: true }]
@ObjectModel.foreignKey.association: '_ProcessStrategyVH'
Root.MDChgProcessDuplicateStrategy,
Root.MDChgProcessIsReliable,
Root.MDChgProcessProtectionReason,
@Consumption.filter: { selectionType : #SINGLE,
defaultValue : ''
}
@EndUserText.label: 'Deleted'
Root.MDChgProcessIsErased,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
'Positive' as MDChgProcessStatusCriticality,
@ObjectModel.readOnly: true
cast( '%' as msehi ) as MDChangeProcessProgressUnit,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
cast( 0 as abap.int1 ) as MDChgProcPrgrsRatioInPercent,
@ObjectModel.readOnly: true
count( distinct _Step.MDChgProcessStep ) as MDChangeProcessNumberOfSteps,
@ObjectModel.readOnly: true
@EndUserText.label: 'Records'
_NumberOfSouceRecords.MDChgProcessNmbrOfSrceRecords as MDChgProcessNmbrOfSrceRecords,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
_ProcessIsIdle.MDChgProcessIsIdle as MDChgProcessIsIdle,
@ObjectModel.readOnly: true
@Consumption.valueHelpDefinition: [{ association: '_ProcessStateVH', distinctValues: true }]
@ObjectModel.foreignKey.association: '_ProcessStateVH'
@EndUserText.label: 'Process Status'
_ProcessState.MDChgProcessStatusStateCode as MDChgProcessStatusStateCode,
@ObjectModel.readOnly: true
@EndUserText.label: 'Process Status'
_ProcessState.MDChgProcessStatusStateName as MDChgProcessStatusStateName,
@ObjectModel.readOnly: true
@EndUserText.label: 'Data Source'
cast( '' as abap.char( 60 ) ) as MDChgProcessSrceSystem,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
cast( ' ' as mdc_table_name preserving type ) as MDChgProcessModelRootTableName,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
cast( '' as abap_boolean preserving type ) as MDChgProcSelectionIsAvailable,
@Consumption.filter: { selectionType : #SINGLE,
defaultValue : ''
}
@ObjectModel.readOnly: true
@EndUserText.label: 'Obsolete'
cast(
case when Root.MDChgProcessIsStarted = 'X'
and _NumberOfSouceRecords.MDChgProcessNmbrOfSrceRecords = 0
then 'X'
else ''
end as abap_boolean preserving type ) as MDChangeProcessIsObsolete,
@ObjectModel.readOnly: true
@EndUserText.label: 'Attachments'
_Attachments.NumberOfAttachments,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
cast( '' as abap_boolean preserving type ) as MDChgProcDspAttchIsAllowed,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
cast('' as mdc_process_id) as MDChgProcVisualizationProcess,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MDC_PROCESS_CALC_EXIT'
cast('' as mdc_business_system) as MDChgProcVisualizationSrceSyst,
Root.MDChgProcRefcdFederationToken,
Root.MDChgProcRefcdFederationStp,
Root.MDChgProcFederationBusSystName,
/* Associations */
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_Source,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_Step,
@Consumption.filter.hidden: true
_MDQualityEvaluations,
// _SourceFilter,
_ProcessUserVH,
_ProcessGoalVH,
_ProcessStateVH,
_ProcessTypeVH,
_ProcessGoalText,
_GoalProperty,
_ProcessTypeText,
_ProcessStrategyVH,
_RelatedProcess,
@Consumption.filter.hidden: true
_ProcessRequestorContactCard
}
group by
Root.MasterDataChangeProcessUUID,
Root.MasterDataChangeProcess,
Root.MDChgProcessDescription,
Root.MDChgProcessTypeID,
Root.MDChgProcessGoal,
Root.MDChgProcessStatus,
Root.MDChgProcessSrceObjectTypeCode,
Root.MDChgProcessWorkflowTemplate,
Root.MDChgProcessRequestor,
Root.MDChgProcessDelSrceDataIsRqd,
Root.MDChgProcessCreationDate,
Root.MDChgProcessCreationTime,
Root.MDChgProcessChangeDate,
Root.MDChgProcessChangeTime,
Root.MDChgProcessFinishDate,
Root.MDChgProcessFinishTime,
Root.MDChgProcessUpdateToken,
Root.MDChgProcessIsStarted,
Root.MDChgProcessIsInitialized,
Root.MDChgProcessIsFinalized,
Root.MDChgProcessLastStepIsFinished,
Root.MDChgProcessCurrentStepNumber,
Root.MDChgProcessChkPointIsActive,
Root.MDChgProcessCompletionIsReqd,
Root.MDChgProcessWrkFlwDeltnIsRqd,
Root.MDChgProcessSrceDeletionIsRqd,
Root.MDChgProcessFilterChain,
Root.MDChgProcessErrorsAreLogged,
Root.MDChgProcessLastActKey,
Root.MDChgProcessPredecessor,
Root.MDChgProcessFinalDateTime,
Root.MDChgProcessNextStpAtDateTime,
Root.MDChgProcessDuplicateStrategy,
Root.MDChgProcessIsReliable,
Root.MDChgProcessProtectionReason,
Root.MDChgProcessIsErased,
Root.MDChgProcRefcdFederationToken,
Root.MDChgProcRefcdFederationStp,
Root.MDChgProcFederationBusSystName,
_CurrentStep.MDChgProcessStepStatus,
_CurrentStep.MDChgProcessStepType,
_NumberOfSouceRecords.MDChgProcessNmbrOfSrceRecords,
_ProcessState.MDChgProcessStatusStateCode,
_ProcessState.MDChgProcessStatusStateName,
_ProcessIsIdle.MDChgProcessIsIdle,
_Attachments.NumberOfAttachments,
_MDQualityEvaluations.MDQltyNmbrOfBusRuleEvalResults
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_MASTERDATACHANGEPROCESSSTEP",
"C_MDQUALITYEVALUATIONS",
"I_MASTERDATACHANGEPROCESSTP",
"I_MDCHANGEPROCESSISIDLE",
"I_MDCHGPROCESSSRCERECORDSCNTR",
"P_MASTERDATAATTCHLINKCOUNT",
"P_MDCHANGEPROCESSSTATUSSTATE"
],
"ASSOCIATED":
[
"C_MASTERDATACHANGEPROCESSGOAL",
"C_MASTERDATACHANGEPROCESSSTEP",
"C_MASTERDATACHANGEPROCESSUSER",
"C_MDCHANGEPROCESSGOALPROPERTY",
"C_MDCHANGEPROCESSGOALVALUEHELP",
"C_MDCHANGEPROCESSSOURCE",
"C_MDCHANGEPROCESSSTATUSSTATEVH",
"C_MDCHANGEPROCESSSTRATEGYVH",
"C_MDCHGPROCESSRELATEDPROCESS",
"C_MDQUALITYEVALUATIONS",
"I_MDCHANGEPROCESSISIDLE",
"I_MDCHANGEPROCESSTYPEVH",
"I_MDCHGPROCESSSRCERECORDSCNTR",
"I_MDCHGPROCESSTYPETEXT",
"I_USERCONTACTCARD",
"P_MASTERDATAATTCHLINKCOUNT",
"P_MDCHANGEPROCESSSTATUSSTATE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/