Maximo Open Forum

 Labor Reporting Query

  • Everything Maximo
  • Reporting
  • Work Management
Genevieve Ahern's profile image
Genevieve Ahern posted 07-06-2022 16:07
I have been trying to make a query for labor reporting to automatically show the amount of labor reported on work orders each day. I tried entering "TODAY" in the 'To' and 'From' date fields, but it will not automatically generate labor hours each consecutive day. Is there a way to accomplish this?
pavan Kumar's profile image
pavan Kumar
Hi Ahern,
Following Approach can be done from Application Level.
Yes, we can know the Labor's Planned and Actual cost and labor hours on each work orders, to that we need to display the 2 fields ESTLABCOST(Planned Labors Cost) and ACTLABCOST(Actuals Labor Cost),ACTLABHRS(Actual Labor Hours) and ESTLABHRS(Estimated Labor Hours) in Application list View and  save the below query in Application where clause, so that you can easily Know the amount of labors reported.
This query will display the Work orders Created on today along with the planned Labors.

wonum in (select WPLABOR.wonum from WPLABOR) and woclass = 'WORKORDER' and historyflag = 0 and istask = 0 and date(reportdate)=date(sysdate).

I am attaching the Sample Screenshot.

If you need to generate a report, then we have the default Labor Reporting Report, which displays all the workorders finished the work by the labors, we need to modify accordingly to requirement by adding parameters.
Attachment  View in library
WO_TRACK.PNG 23 KB
Nikolaus Despain's profile image
Nikolaus Despain
For an Oracle machine - the key for you should be -

(Sysdate -1)

Try something in the Where Clause in LABOR REPORTING like -

startedate >= (sysdate - 1)
Mack Parrott's profile image
Mack Parrott
This query (SQL Server) will fetch time that the logged in user charged to work orders for the current day . . . you can add it to a start center portlet, easy to use.

exists(select 1 from labor where laborcode=labtrans.laborcode and orgid=labtrans.orgid and personid=(select personid from maxuser where userid =:USER))

and 1=(case when (datepart(hh,getdate())<1 and startdate=cast(getdate()-1 as date)) or (datepart(hh,getdate())>=1 and startdate=cast(getdate() as date)) then 1 else 0 end)