Wednesday, July 7, 2010

PA Budget API



pa_budget_pub.create_draft_finplan
(p_api_version_number => 1.0,
p_commit => 'F',
p_init_msg_list => 'T',
p_pm_product_code => 'LEGACY',
p_pa_project_id => l_project_id,
p_fin_plan_type_name => 'Approved Cost',
p_version_type => 'COST',
p_time_phased_code => '',
p_resource_list_name => 'RESOURCE LIST BY EXPENDITURE CATEGORY', p_fin_plan_level_code => 'P',
p_budget_version_name => '1.0',
p_description => 'CONVERSION',
p_raw_cost_flag => 'Y',
p_burdened_cost_flag => 'Y',
p_create_new_curr_working_flag => 'N',
p_replace_current_working_flag => 'Y',
p_using_resource_lists_flag => 'Y',
p_finplan_trans_tab => t_finplan_tbl,
x_finplan_version_id => x_finplan_version_id,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);

Where t_finplan_tbl is table type variable. Assign record type variable to it as below
t_finplan_tbl (i) := t_finplan_rec;
t_finplan_rec.pm_product_code := 'LEGACY';
t_finplan_rec.task_id := l_task_id;
t_finplan_rec.pm_task_reference := '1';
t_finplan_rec.currency_code := 'EUR';
t_finplan_rec.resource_alias := '1';
t_finplan_rec.resource_list_member_id := '1023';
t_finplan_rec.raw_cost := rec_tasks.raw_cost;
t_finplan_rec.burdened_cost := rec_tasks.burdened_cost;

pa_budget_pub.baseline_budget
(p_api_version_number => 1.0,
p_commit => 'F',
p_init_msg_list => 'T',
p_msg_count => x_msg_count2,
p_msg_data => x_msg_data2,
p_return_status => x_return_status2,
p_workflow_started => x_workflow_started,
p_pm_product_code => 'LEGACY',
p_pa_project_id => l_project_id,
p_pm_project_reference => rec_budget.project_number, p_budget_type_code => '',
p_mark_as_original => '',
p_fin_plan_type_id => 10020,
p_fin_plan_type_name => 'Approved Cost',
p_version_type => 'COST'
);

1 comment:

  1. PA budget API is explained in this post. The coding doesn't seem easy but if you are aware of the Oracle basics then you can understand this program in one time. I think for beginners its bit difficult to understand.

    ReplyDelete

Note: Only a member of this blog may post a comment.