@AbapCatalog.sqlViewName : 'CMNTNOTIFDATMON'
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label : 'Date Monitor'
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
define view C_MaintNotificationDateMonitor
with parameters
@Consumption.hidden: true
@Environment.systemField: #SYSTEM_DATE
P_KeyDate : sydate,
@Consumption.hidden: true
@Environment.systemField: #SYSTEM_TIME
P_KeyTime : sytime
as select from I_MaintenanceNotification
{
key I_MaintenanceNotification.MaintenanceNotification,
// Calculated Date Monitor Field
case when ( RequiredStartDate is null or RequiredStartDate = '00000000' ) and
( RequiredEndDate is null or RequiredEndDate = '00000000' )
then 'I' // Inactive
else
case when RequiredStartDate > $parameters .P_KeyDate or
( RequiredStartDate = $parameters .P_KeyDate and RequiredStartTime > $parameters .P_KeyTime)
then 'G' // Green --> Start Date not reached
else
case when RequiredEndDate > $parameters .P_KeyDate or
RequiredEndDate is null or RequiredEndDate = '00000000' or
( RequiredEndDate = $parameters .P_KeyDate and RequiredEndTime > $parameters .P_KeyTime )
then 'Y' // Yellow --> End Date not reached
else 'R' // Red --> End Date reached
end
end
end as DateMonitor,
-- For DCL:
@Consumption.hidden: true
NotificationType,
@Consumption.hidden: true
_PMNotifMaintenanceData._LocationAccountAssignment.MaintenancePlant,
@Consumption.hidden: true
_PMNotifMaintenanceData._LocationAccountAssignment.ControllingArea,
@Consumption.hidden: true
_PMNotifMaintenanceData._LocationAccountAssignment.CostCenter,
@Consumption.hidden: true
_PMNotifMaintenanceData.MaintenancePlanningPlant,
@Consumption.hidden: true
_PMNotifMaintenanceData.MaintenancePlannerGroup,
@Consumption.hidden: true
_PMNotifMaintenanceData._LocationAccountAssignment.FunctionalLocation,
@Consumption.hidden: true
_PMNotifMaintenanceData.Equipment,
@Consumption.hidden: true
_PMNotifMaintenanceData._LocationAccountAssignment._FunctionalLocation,
@Consumption.hidden: true
_PMNotifMaintenanceData._Equipment
}
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_LOCATIONACCOUNTASSIGNMENT",
"I_MAINTENANCENOTIFICATION",
"I_PMNOTIFMAINTENANCEDATA"
],
"ASSOCIATED":
[
"I_EQUIPMENT",
"I_FUNCTIONALLOCATION"
],
"BASE":
[
"I_LOCATIONACCOUNTASSIGNMENT",
"I_PMNOTIFMAINTENANCEDATA"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
C_MaintNotificationDateMonitor view