Saturday 26 March 2016

Process to remove the error message, "Actual Dates May Not Be In The Future"

Question :

Is it possible to remove the error message, "Actual Dates May Not Be In The Future" ?


Cause:
The time zone of the database determines the timestamp for a record update. A routine is run when an update is executed to determine if the time-based fields for Labor Actual records are not in the future. In version 7.5 and greater, there is a tolerance setting for this in the Organizations application.


Answer:
In the table MAXVARS, in the VARNAME field, you can set the value to 1 where the varname is SUPPRESSACTCHECK. The result of this is that it will suppress a routine that checks for the actual date and time, so that the error message will not be presented to screen in a scenario whereby the client PC is in a time zone that is at least one hour ahead of the database which is being updated from the client.
The default setting of Maximo is to display this error message. With maxvar SUPPRESSACTCHECK set to 1 and when the database and application server are set to a time zone that is earlier than the time zone of the currently logged-in user, you should be able to enter actual start times and end times in the current Time Zone without getting that error message which actual dates being in the future.

At a database prompt you can run an update SQL query similar to:

update maxvars

set varvalue = 1 where varname = 'SUPPRESSACTCHECK';

commit;

You will have to stop and restart the Maximo server for this change to become persistent.
Please note that this configuration will not prevent the entry of future times in the current Time Zone. This is currently a known limitation of Maximo functionality.

Reference :http://www-01.ibm.com/support/docview.wss?uid=swg21391274

Reporting Actual Labor Usage Due to Timezone Difference.

Aim:  To to complete work orders if the user and server are located in different timezones




If the server/client machines are in different time zones and the labor reporting tolerance is set to not allow future date/time, then it is not possible to change the status of work orders to complete.
ENVIRONMENT: The server is in Central time and the user is in Eastern Standard time.

MAXVARS.SUPPRESSACTCHECK suppresses the check for past or future time when entering actual labor hours

MAXVARS.LABTRANSTOLERANCE allows future Labor Transaction Tolerance in Hours when reporting into the future

MAXVARS.USECLIENTTIMEZONE allows user time zone to be taken into account (as per the timezone defined in the user's default profile or users application)

STEPS:
Bring up an approved work order, go to the Actuals tab, Labor sub-tab.
Enter start time, end time, and regular hours.
Then try to complete the work order.
Get error: BMXAA4590E - Could not change Work Order 1006 status to COMP.
BMXAA4494E - Specify actual dates that are in the past.


SCENARIO 1:

With the MAXVARS.SUPPRESSACTCHECK set to 0, the user cannot complete the work order.
With MAXVARS.SUPPRESSACTCHECK set to 1 and labor tolerance set to 1 hour, the user can complete the work order. However, this workaround is not acceptable because it allows the user to enter future time.

For example, the current time on a machine is 12:45pm EST, the user can enter 1pm EST as the start time and complete the work order.

SCENARIO 2: 

With MAXVARS.SUPPRESSACTCHECK SET TO 0 and labor tolerance MAXVARS.LABTRANSTOLERANCE set to 1 hour.

If the current time on a machine is 1:07pm EST, the user receives the following message when trying to complete the work order:

BMXAA4590E - Could not change Work Order 1006 status to COMP.
BMXAA4494E - Specify actual dates that are in the past.

Server time converts the time to 12:07 pm CST and users cannot complete the work order due to the error message.

Cause

Timezone difference between server and client machine

Resolving the problem

Unable to report actual labor problem has been tracked as APAR IZ90431 and has been addressed in 7.5.0.4 fixpack and above. i.e. Users should be able to report actual labor and complete work orders.

For the fix to work properly, the following configuration settings must be in place.

Run the queries below to check the database settings:

SELECT varname ,varvalue , orgid,siteid,maxvarsid from maxvars where varname ='USECLIENTTIMEZONE';

SELECT varname ,varvalue , orgid,siteid,maxvarsid from maxvars where varname ='SUPPRESSACTCHECK';

SELECT varname ,varvalue , orgid,siteid,maxvarsid FROM MAXVARS WHERE VARNAME ='LABTRANSTOLERANCE' AND orgid='EAGLENA';

NOTE: the labor tolerance (maxvars.labtranstolerance) can be also set in the Organizations application, "Select Action", "Future Labor Transaction Tolerance in Hours", and enter 0:00 for the tolerance.

If the maxvars have not been set, run the update statements to set the varvalues:

update maxvars set varvalue =1 where varname ='USECLIENTTIMEZONE'
update maxvars set varvalue =0 where varname ='SUPPRESSACTCHECK'
update maxvars set varvalue ='0:00' where varname ='LABTRANSTOLERANCE'


output:


Restart the application server for the new maxvars settings to take effect.

To verify the fix actually addressed the problem:

For example, the current time is 5:38PM EST on a remote laptop and the server is running on CST time.

1. Log in to Maximo, set the default user profile to use US/Eastern.
2. Bring up an approved work order, go to the Actuals tab, Labor sub-tab.
3. Enter a valid labor code.
4. Enter the actual start time and the end time when the work has been completed.

You should now be able to save / complete the work order without issue.

In addition, the fix should prevent the user from entering future dates and time:

For example, if a future date is entered, you will receive the following error:

BMXAA2641E - You cannot enter actual labor with future dates and times.




If I enter a future time, the following error will be received:

BMXAA2641E - You cannot enter actual labor with future dates and times.


Reference: http://www-01.ibm.com/support/docview.wss?uid=swg21621991

Setup an escalation to be notified of a status change on a work order

Create an escalation and fill in the following fields:

Applies to :WORKORDER
Condition: STATUS='APPR' and STATUSDATE >=(sysdate -1/1440) (USE this is on Oracle DB)
Condition: STATUS='APPR' and STATUSDATE >= dateadd(mi, -1, getdate()) (USE this if on SQL Server DB)
Schedule: 1 minute

Escalation Point section:

Elapsed Time Attribute: STATUSDATE
Escalation Point condition: 1=1
Check Repeats Box


Attached a Communication Template to my Notification Section

Communication Template specifics;

Applies to : WORKORDER
Accessible From: ALL
To: Role you choose
Send From: Maximo Administrator
Subject: :WONUM has changed status 
Message: The :WONUM has been changed status to :STATUS on :STATUSDATE

****NOTE: The REPEATS needs to be checked in order for it to notify you on the same work order being changed to APPR back to WAPPR back to APPR.....

The following query STATUSDATE >=(sysdate -1/1440)

this will check when a STATUSDATE is changed within that last minute...

Sysdate means it checks the Date on the Server

-1 means it will check for any changes to the STATUSDATE within the last minute the crontask was running as the schedule is every minute

1440 is the following calculation

1440 divided by 60 Seconds ( 1minute)= 24 HOURS

24 Hours X 60 Seconds= 1440

The Crontask runs every minute...but only will send an email when a work order's STATUSDATE is changed within the last time it ran and the work order is changed to APPR.

Reference :http://www-01.ibm.com/support/docview.wss?uid=swg21319721