In order to know the BCWP, i use the following query;
Select ITD_BCWP from prj_ev_history bac where bac.PROJECT_ID = inv.id and OBJECT_TYPE = 'PROJECT' ANd PERIOD_NUMBER = (Select MAX(PERIOD_NUMBER) From prj_ev_history where prj_ev_history.PROJECT_ID = inv.id)
Till date i was using this query and i had no issues, until i ran into confusion today. here are the details,
I have a project those %complete is set to manual. I made all the level 1 task as 100% complete. In my table
prj_ev_history, has two records for this project where for OBJECT_TYPE = 'PROJECT'.
now instead of the BCWP being udpated on the row here PERIOD_NUMBER =1, it is updating on the row where PERIOD_NUMBER =0. I always take the values from the row where period_number is max.
Any suggestions and corrections are welcome.
Regards