I_BPRelshpProcessKPIRecordType is a Transactional CDS View that provides data about "MD Chg Proc Record Type KPI of a Record" in SAP S/4HANA. It reads from 5 data sources (I_MDChgProcessStep, I_MDChgProcessStep, I_MDChgProcessStep, I_MDChgProcessStep, I_MDChgProcessStep) and exposes 26 fields with key fields MasterDataChangeProcess, MDChgProcessStep, MDChgProcessSrceSystem, MDChgProcessSrceObject, MDChgProcessStep. It has 3 associations to related views.
@AbapCatalog.sqlViewName: 'IBPRPRORECKPITYP'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@AccessControl.authorizationCheck: #NOT_REQUIRED@ClientHandling.algorithm: #SESSION_VARIABLE@EndUserText.label: 'MD Chg Proc Record Type KPI of a Record'
@ObjectModel : {
usageType : {
dataClass: #MIXED,
serviceQuality: #C,
sizeCategory: #M
}
}
@VDM.viewType: #TRANSACTIONALdefineview I_BPRelshpProcessKPIRecordType
// New Single Record
asselectfrom I_MDChgProcessStep as Step
join I_MasterDataChangeProcess as Process on Step.MasterDataChangeProcess = Process.MasterDataChangeProcess
leftouter to many join I_BusPartRelationshipProcess as BusPartRelation on BusPartRelation.MasterDataChangeProcess = Step.MasterDataChangeProcess
and BusPartRelation.MDChgProcessStep = Step.MDChgProcessStep
leftouter to many join I_MDChgProcessMatchGroupRecord as MatchGroup on BusPartRelation.MasterDataChangeProcess = MatchGroup.MasterDataChangeProcess
and BusPartRelation.MDChgProcessSrceSystem = MatchGroup.MDChgProcessSrceSystem
and BusPartRelation.MDChgProcessSrceObject = MatchGroup.MDChgProcessSrceObject
association [0..1] to P_MDChgProcessOpenMatchGroup as _OpenMatchGroup on _OpenMatchGroup.MasterDataChangeProcess = MatchGroup.MasterDataChangeProcess
and _OpenMatchGroup.MDChgProcessMatchGroupID = MatchGroup.MDChgProcessMatchGroupID
association [0..1] to I_MDChgProcKPIFilterRecordType as _KPIRecordTypeText on $projection.MDChgProcKPIRecordType = _KPIRecordTypeText.MDChangeProcKPIValueKey
association [0..1] to I_MDChgProcessStep as _MTCStep on $projection.MasterDataChangeProcess = _MTCStep.MasterDataChangeProcess
and _MTCStep.MDChgProcessStepType = 'MTC'
and _MTCStep.MDChgProcessSrceObjectTypeCode = '1405'
{
key BusPartRelation.MasterDataChangeProcess,
key BusPartRelation.MDChgProcessStep,
key BusPartRelation.MDChgProcessSrceSystem,
key BusPartRelation.MDChgProcessSrceObject,
cast ('S' as mdc_kpi_filter_val ) as MDChgProcKPIRecordType,
@ObjectModel.text.element: ['_KPIRecordTypeText.MDChangeProcKPIValueKeyDesc']
_KPIRecordTypeText
}
where
Process.MDChgProcessGoal <> 'U'
and Process.MDChgProcessGoal <> 'B'
and Process.MDChgProcessGoal <> 'R'
and Process.MDChgProcessGoal <> 'D'
and Process.MDChgProcessGoal <> 'E'
and(
Step.MDChgProcessStepType = 'VAL'
or Step.MDChgProcessStepType = 'BRC'
)
and(
MatchGroup.MDChgProcessMatchGroupID isnullor MatchGroup.MDChgProcMatchGrpApprvlStatus = 'D'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = ''
or _OpenMatchGroup.MDChgProcessMatchGroupID isnotnullor Step.MDChgProcessStep < _MTCStep.MDChgProcessStep
)
// Update
unionselectfrom I_MDChgProcessStep as Step
join I_MasterDataChangeProcess as Process on Step.MasterDataChangeProcess = Process.MasterDataChangeProcess
leftouter to many join I_BusPartRelationshipProcess as BusPartRelation on BusPartRelation.MasterDataChangeProcess = Step.MasterDataChangeProcess
and BusPartRelation.MDChgProcessStep = Step.MDChgProcessStep
join mdc_own_bus_sys as OwnBusSystem on BusPartRelation.MDChgProcessSrceSystem = OwnBusSystem.own_business_system
join I_MDChgProcessMatchGroupRecord as MatchGroup on BusPartRelation.MasterDataChangeProcess = MatchGroup.MasterDataChangeProcess
and BusPartRelation.MDChgProcessSrceSystem = MatchGroup.MDChgProcessSrceSystem
and BusPartRelation.MDChgProcessSrceObject = MatchGroup.MDChgProcessSrceObject
association [0..1] to I_MDChgProcKPIFilterRecordType as _KPIRecordTypeText on $projection.MDChgProcKPIRecordType = _KPIRecordTypeText.MDChangeProcKPIValueKey
{
key BusPartRelation.MasterDataChangeProcess,
key BusPartRelation.MDChgProcessStep,
key BusPartRelation.MDChgProcessSrceSystem,
key BusPartRelation.MDChgProcessSrceObject,
cast ('U' as mdc_kpi_filter_val ) as MDChgProcKPIRecordType,
@ObjectModel.text.element: ['_KPIRecordTypeText.MDChangeProcKPIValueKeyDesc']
_KPIRecordTypeText
}
where
(
Step.MDChgProcessStepType = 'VAL'
or Step.MDChgProcessStepType = 'BRC'
)
and MatchGroup.MDChgProcMatchGrpIsBestRecord = 'X'
and(
MatchGroup.MDChgProcMatchGrpApprvlStatus = 'A'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = 'M'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = 'U'
)
// Update
unionselectfrom I_MDChgProcessStep as Step
join I_MasterDataChangeProcess as Process on Step.MasterDataChangeProcess = Process.MasterDataChangeProcess
leftouter to many join I_BusPartRelationshipProcess as BusPartRelation on BusPartRelation.MasterDataChangeProcess = Step.MasterDataChangeProcess
and BusPartRelation.MDChgProcessStep = Step.MDChgProcessStep
join mdc_own_bus_sys as OwnBusSystem on BusPartRelation.MDChgProcessSrceSystem = OwnBusSystem.own_business_system
join I_MDChgProcessMatchGroupRecord as MatchGroup on BusPartRelation.MasterDataChangeProcess = MatchGroup.MasterDataChangeProcess
and BusPartRelation.MDChgProcessSrceSystem = MatchGroup.MDChgProcessSrceSystem
and BusPartRelation.MDChgProcessSrceObject = MatchGroup.MDChgProcessSrceObject
association [0..1] to I_MDChgProcKPIFilterRecordType as _KPIRecordTypeText on $projection.MDChgProcKPIRecordType = _KPIRecordTypeText.MDChangeProcKPIValueKey
{
key BusPartRelation.MasterDataChangeProcess,
key BusPartRelation.MDChgProcessStep,
key BusPartRelation.MDChgProcessSrceSystem,
key BusPartRelation.MDChgProcessSrceObject,
cast ('U' as mdc_kpi_filter_val ) as MDChgProcKPIRecordType,
@ObjectModel.text.element: ['_KPIRecordTypeText.MDChangeProcKPIValueKeyDesc']
_KPIRecordTypeText
}
where
(
Step.MDChgProcessStepType = 'VAL'
or Step.MDChgProcessStepType = 'BRC'
)
and MatchGroup.MDChgProcMatchGrpIsBestRecord = 'X'
and(
MatchGroup.MDChgProcMatchGrpApprvlStatus = 'A'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = 'M'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = 'U'
)
// Update without MTC
unionselectfrom I_MDChgProcessStep as Step
join I_MasterDataChangeProcess as Process on Step.MasterDataChangeProcess = Process.MasterDataChangeProcess
leftouter to many join I_BusPartRelationshipProcess as BusPartRelation on BusPartRelation.MasterDataChangeProcess = Step.MasterDataChangeProcess
and BusPartRelation.MDChgProcessStep = Step.MDChgProcessStep
join mdc_own_bus_sys as OwnBusSystem on BusPartRelation.MDChgProcessSrceSystem = OwnBusSystem.own_business_system
association [0..1] to I_MDChgProcKPIFilterRecordType as _KPIRecordTypeText on $projection.MDChgProcKPIRecordType = _KPIRecordTypeText.MDChangeProcKPIValueKey
{
key BusPartRelation.MasterDataChangeProcess,
key BusPartRelation.MDChgProcessStep,
key BusPartRelation.MDChgProcessSrceSystem,
key BusPartRelation.MDChgProcessSrceObject,
cast ('U' as mdc_kpi_filter_val ) as MDChgProcKPIRecordType,
@ObjectModel.text.element: ['_KPIRecordTypeText.MDChangeProcKPIValueKeyDesc']
_KPIRecordTypeText
}
where
Process.MDChgProcessGoal = 'U'
or Process.MDChgProcessGoal = 'B'
or Process.MDChgProcessGoal = 'R'
or Process.MDChgProcessGoal = 'D'
or Process.MDChgProcessGoal = 'E'
and(
Step.MDChgProcessStepType = 'VAL'
or Step.MDChgProcessStepType = 'BRC'
)
// New Best Record
unionselectfrom I_MDChgProcessStep as Step
join I_MasterDataChangeProcess as Process on Step.MasterDataChangeProcess = Process.MasterDataChangeProcess
leftouter to many join I_BusPartRelationshipProcess as BusPartRelation on BusPartRelation.MasterDataChangeProcess = Step.MasterDataChangeProcess
and BusPartRelation.MDChgProcessStep = Step.MDChgProcessStep
join mdc_own_bus_sys as OwnBusSystem on BusPartRelation.MDChgProcessSrceSystem <> OwnBusSystem.own_business_system
join I_MDChgProcessMatchGroupRecord as MatchGroup on BusPartRelation.MasterDataChangeProcess = MatchGroup.MasterDataChangeProcess
and BusPartRelation.MDChgProcessSrceSystem = MatchGroup.MDChgProcessSrceSystem
and BusPartRelation.MDChgProcessSrceObject = MatchGroup.MDChgProcessSrceObject
association [0..1] to P_MDChgProcessOpenMatchGroup as _OpenMatchGroup on _OpenMatchGroup.MasterDataChangeProcess = MatchGroup.MasterDataChangeProcess
and _OpenMatchGroup.MDChgProcessMatchGroupID = MatchGroup.MDChgProcessMatchGroupID
association [0..1] to I_MDChgProcKPIFilterRecordType as _KPIRecordTypeText on $projection.MDChgProcKPIRecordType = _KPIRecordTypeText.MDChangeProcKPIValueKey
{
key BusPartRelation.MasterDataChangeProcess,
key BusPartRelation.MDChgProcessStep,
key BusPartRelation.MDChgProcessSrceSystem,
key BusPartRelation.MDChgProcessSrceObject,
cast ('B' as mdc_kpi_filter_val ) as MDChgProcKPIRecordType,
@ObjectModel.text.element: ['_KPIRecordTypeText.MDChangeProcKPIValueKeyDesc']
_KPIRecordTypeText
}
where
(
Step.MDChgProcessStepType = 'VAL'
or Step.MDChgProcessStepType = 'BRC'
)
and MatchGroup.MDChgProcMatchGrpIsBestRecord = 'X'
and _OpenMatchGroup.MDChgProcessMatchGroupID isnulland(
MatchGroup.MDChgProcMatchGrpApprvlStatus = 'A'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = 'M'
or MatchGroup.MDChgProcMatchGrpApprvlStatus = 'U'
)