One of the scenario that i came across is client wanted to have the cost rates assigned at the role level. With the standard functionality this is not possible.
So we decided to create a form to assign the rates to the project roles. But i would prefer enabling the flexfield in the Project Roles definition form and then assigning rates in one of the segments.
The first step here is enabling the flexfield in the Project Roles forms.
1. Enable DFF segments for the Project Role Type DFF.
2. Add the Cost Rate Segment – Which maps to the Attribute1 of the PA_PROJECT_ROLE_TYPES_B table.
3. In the PA Implementation SU resp, Setup->Projects-> Roles,assign the cost rate to the respective roles.
4. Now we have to modify the Labor costing client extension provided by Oracle . Below is an example of how to obtain the cost rate and calculate the cost.
Labor Costing Extension Package: PA_Client_Extn_Costing
x_transaction_type in varchar2 default ‘ACTUAL’,
x_expenditure_item_id in number,
x_sys_linkage_function in varchar2,
x_denom_raw_cost in out number,
x_status in out number )
— Reset the output parameters.
x_denom_raw_cost := NULL;
x_status := 0;
if ( x_transaction_type = ‘ACTUAL’) then
if (x_sys_linkage_function = ‘ST’) then
into l_cost_rate, l_quantity
from pa_project_role_types_vl roltyp,pa_expenditure_items_all ei,
pa_project_players ppp, pa_expenditures_all exp
where roltyp.project_role_type = ppp.project_role_type
and ppp.project_id = ei.project_id
and ei.expenditure_id = exp.expenditure_id
and ppp.person_id = exp.incurred_by_person_id
and ei.expenditure_item_id = x_expenditure_item_id;
x_denom_raw_cost := l_cost_rate * l_quantity;
When no_data_found then
— Add your calculation of overtime expenditure item.
elsif ( x_transaction_type = ‘FORECAST’) then
— Add your calculation for forecast
when others then
— Add your exception handler here.
— To raise an application error, assign a positive number to x_status.
— To raise an ORACLE error, assign SQLCODE to x_status.
Assumption: Here we are assuming that all employees who enter expenditures for the project are assigned Roles.