Actuals Query

J

James from Sage

Hi,

I'm using MPS 2003 and would am looking for a table(s) that would allow me
to query actuals as they appear in the adjust actuals view.

Thanks,

- James
 
J

James Fraser

Hi,

I'm using MPS 2003 and would am looking for a table(s) that would allow me
to query actuals as they appear in the adjust actuals view.

Thanks,

- James

MSP_WEB_WORK
Watch out for when the work spans multiple days. It will be only one
row in the table if the time is identical for consecutive days.


James Fraser
 
J

James from Sage

Hi James,

Thanks for your response!

I've noticed that about the MSP_WEB_WORK table.

There was row where the work spanned two days with two days for each day but
the WWORK_VALUE only contained the equivalent of 2 hrs.

Is there an alternative? What tables does the Adjust Actuals view use?

Thanks,

- James

James Fraser said:
MSP_WEB_WORK
Watch out for when the work spans multiple days. It will be only one
row in the table if the time is identical for consecutive days.


James Fraser

Thanks for your response James.

I've noticed this in the table.

Is the fix to multiply the
 
J

James from Sage

Hi James,

Is this a bug in the table? Does work only span multiple days when the time
is identical in consecutive days? Otherwise, I can't see how I could tell the
difference between a range that has identical times and any other range.

Thanks,

- James
 
J

James from Sage

Hi Rod,

MSP_VIEW_PROJ_ASSN_TP_BY_DAY is the table I was originally using but I
noticed that the data there didn't 100% the data in the Adjust Actuals view
or the data in the Resource or Task Usage views (which also don't match
Adjust Actuals 100%).

I'm interested in getting info that matches the Adjust actuals view as
that's what the users of EPM can see.

Is there any hope for me?

Thanks,

- James
 
C

Chak

Hi,

I'm using MPS 2003 and would am looking for a table(s) that would allow me
to query actuals as they appear in the adjust actuals view.

Thanks,

- James

Hi James,

Run the following SQL script on SQL query analyzer. You will get the
entire data " resource name, resource type, project name, date, work,
actual work" etc.

Please set your period at the begining of the query as per your need.
(Start Dt, End Dt)

**************************************************************************************************
DECLARE
@StartDt As DateTime,
@EndDt As DateTime

SET @StartDt = '1/1/2007'
SET @EndDt = '12/1/2007'

SELECT dbo.MSP_WEB_PROJECTS.PROJ_NAME AS PROJ_NAME,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart AS ASSN_DAY,
CASE
WHEN DATEPART(dw,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart) = 1 Then
DATEADD(dd,-6,dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart)
WHEN DATEPART(dw,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart) = 3 Then
DATEADD(dd,-1,dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart)
WHEN DATEPART(dw,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart) = 4 Then
DATEADD(dd,-2,dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart)
WHEN DATEPART(dw,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart) = 5 Then
DATEADD(dd,-3,dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart)
WHEN DATEPART(dw,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart) = 6 Then
DATEADD(dd,-4,dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart)
WHEN DATEPART(dw,
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart) = 7 Then
DATEADD(dd,-5,dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart)
ELSE dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart
END AS WK_START,
ROUND(dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeRegularWork /
60000,0) AS REG_WRK,
ROUND(dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeActualWork /
60000,0) AS ACTUAL_WRK,
dbo.MSP_RESOURCES.RES_NAME AS RES_NAME,
CASE
WHEN dbo.MSP_RESOURCES.RES_EUID IS NULL THEN 'Local'
WHEN dbo.MSP_RESOURCES.RES_EUID > 0 THEN 'Enterprise'
END AS RES_TYPE,
CASE
WHEN dbo.MSP_RESOURCES.RES_EUID > 0 AND
dbo.MSP_RESOURCES.RES_RTYPE = 0 THEN 'Real'
WHEN dbo.MSP_RESOURCES.RES_EUID > 0 AND
dbo.MSP_RESOURCES.RES_RTYPE = 1 THEN 'Generic'
END AS GENERIC,
dbo.MSP_TASKS.TASK_NAME AS TASK_NAME, dbo.MSP_TASKS.TASK_PCT_COMP AS
PCT_COMP,
dbo.MSP_TASKS.TASK_PCT_WORK_COMP AS PCT_WRKCOMP
FROM dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY INNER JOIN
dbo.MSP_ASSIGNMENTS ON
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.ProjectUniqueID =
dbo.MSP_ASSIGNMENTS.PROJ_ID AND
dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentUniqueID =
dbo.MSP_ASSIGNMENTS.ASSN_UID INNER JOIN
dbo.MSP_RESOURCES ON dbo.MSP_ASSIGNMENTS.PROJ_ID =
dbo.MSP_RESOURCES.PROJ_ID AND
dbo.MSP_ASSIGNMENTS.RES_UID = dbo.MSP_RESOURCES.RES_UID INNER JOIN
dbo.MSP_TASKS ON dbo.MSP_ASSIGNMENTS.PROJ_ID = dbo.MSP_TASKS.PROJ_ID
AND
dbo.MSP_ASSIGNMENTS.TASK_UID = dbo.MSP_TASKS.TASK_UID INNER JOIN
dbo.MSP_WEB_PROJECTS ON dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.WPROJ_ID =
dbo.MSP_WEB_PROJECTS.WPROJ_ID
WHERE (dbo.MSP_RESOURCES.RES_NAME IS NOT NULL) AND
(dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart >= @StartDt
AND dbo.MSP_VIEW_PROJ_ASSN_TP_BY_DAY.AssignmentTimeStart <= @EndDt)

************************************************************************************************************

Thanks
Chak
 
J

James from Sage

Thanks Chak,

The info looks good after using the query analyzer - I'll give it a try in
my report.

- James
 
J

James Fraser

Hi James,

Is this a bug in the table? Does work only span multiple days when the time
is identical in consecutive days? Otherwise, I can't see how I could tell the
difference between a range that has identical times and any other range.
....
"James Fraser" wrote: ....

Not a bug. Yes, it only combines days when work is identical. I
believe this is just some compression. Assigned work is also in this
table, and it is often the same for days at a time, so the compression
makes some sense.

I am pretty sure that msp_web_work is the table that Adjust Actuals
uses.


James Fraser
 
J

James Fraser

Hi James,

Run the following SQL script on SQL query analyzer. You will get the
entire data " resource name, resource type, project name, date, work,
actual work" etc.
.... query deleted ...

As mentioned, the view tables will only include work that has been
published back into Project Server. Also, you should use the
_protected fields, such as AssignmentTimeActualWorkProtected


James Fraser
 
C

Chak

That View shows data from Project Professional the last time the project was
published. You can try using the WEB tables, but no guarantees.

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
             http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
             http://projectservertraining.com/learning/index..aspx

---------------------------------------------------------------------------­-------------------------









- Show quoted text -

Hi James,

Yes, Rod is correct. The SQL script, I provided will give the data
which shows the same as Resource Usage view in your project plan. If
you are just looking the actuals not approved, you have to look
MS_WEB_Work; MS_WEB_Assignments tables.

Thanks
Chak
 
Top