Our maintenance pm calendar generation has been failing for the last couple days, and we can no longer get into Maintenance Plan on a PM Action. I have narrowed it down to the PM Plan Horizon definition.
I believe it was setup this way to not have to remember to update this every year or so.
In our test environment I have changed this value to 2025, and all is well. But I can’t change it back without unchecking the Validation Enabled box.
Specifically it fails here in the Maintenance_Configuration_API:
FUNCTION Get_Def_Dem_Mat_Horizon RETURN NUMBER
IS
FUNCTION Core RETURN NUMBER
IS
mat_horizon_ NUMBER;
BEGIN
mat_horizon_ := TO_DATE( Object_Property_API.Get_Value('MaintenanceConfiguration', '*', 'PM_PLAN_HORIZON')||'12'||'31','YYYYMMDD')- SYSDATE;
RETURN mat_horizon_;
END Core;
BEGIN
RETURN Core;
END Get_Def_Dem_Mat_Horizon;
This has not been changed for my guess is 2+ years.
Any idea on how to keep it dynamically updating?
Is this related to leap year?