1 PACKAGE PA_FP_PJI_INTG_PKG AUTHID CURRENT_USER AS
2 --$Header: PAFPUT4S.pls 120.3 2007/02/06 10:15:03 dthakker ship $
3
4 /* This is the main api called from calculate, budget generation process to update the
5 * reporting PJI data when budget lines are created,updated or deleted.
6 * The following params values must be passed
7 * p_activity_code 'UPDATE',/'DELETE'
8 * p_calling_module name of API, for calculate 'CALCULATE_API'
9 * p_start_date BudgetLine StartDate
10 * p_end_date BudgetLine Enddate
11 * If activity = 'UPDATE' then all the amounts and currency columns must be passed
12 * if activity = 'DELETE' then -ve budgetLine amounts will be selected from DB and passed in params will be ignored
13 * NOTE: BEFORE CALLING THIS API, a record must exists in pa_resource_assignments for the p_resource_assignment_id
14 * AND CALL THIS API ONLY IF THERE ARE NO REJECTION CODES STAMPED ON THE BUDGET LINES
15 */
16 PROCEDURE update_reporting_lines
17 (p_calling_module IN Varchar2 Default 'CALCULATE_API'
18 ,p_activity_code IN Varchar2 Default 'UPDATE'
19 ,p_budget_version_id IN Number
20 ,p_budget_line_id IN Number
21 ,p_resource_assignment_id IN Number
22 ,p_start_date IN Date
23 ,p_end_date IN Date
24 ,p_period_name IN Varchar2
25 ,p_txn_currency_code IN Varchar2
26 ,p_quantity IN Number
27 ,p_txn_raw_cost IN Number
28 ,p_txn_burdened_cost IN Number
29 ,p_txn_revenue IN Number
30 ,p_project_currency_code IN Varchar2
31 ,p_project_raw_cost IN Number
32 ,p_project_burdened_cost IN Number
33 ,p_project_revenue IN Number
34 ,p_projfunc_currency_code IN Varchar2
35 ,p_projfunc_raw_cost IN Number
36 ,p_projfunc_burdened_cost IN Number
37 ,p_projfunc_revenue IN Number
38 ,x_msg_data OUT NOCOPY Varchar2
39 ,x_msg_count OUT NOCOPY Number
40 ,x_return_status OUT NOCOPY Varchar2
41 ) ;
42
43 /* THIS API IS CREATED FOR BULK PROCESS OF DATA.
44 * NOTE: ALL PARAMS MUST BE PASSED , passing Null or incomplete params will error out
45 * the calling API must initialize all params and pass it
46 */
47 PROCEDURE blk_update_reporting_lines
48 (p_calling_module IN Varchar2 Default 'CALCULATE_API'
49 ,p_activity_code IN Varchar2 Default 'UPDATE'
50 ,p_budget_version_id IN Number
51 ,p_rep_budget_line_id_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
52 ,p_rep_res_assignment_id_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
53 ,p_rep_start_date_tab IN SYSTEM.pa_date_tbl_type := SYSTEM.pa_date_tbl_type()
54 ,p_rep_end_date_tab IN SYSTEM.pa_date_tbl_type := SYSTEM.pa_date_tbl_type()
55 ,p_rep_period_name_tab IN SYSTEM.pa_varchar2_30_tbl_type := SYSTEM.pa_varchar2_30_tbl_type()
56 ,p_rep_txn_curr_code_tab IN SYSTEM.pa_varchar2_15_tbl_type := SYSTEM.pa_varchar2_15_tbl_type()
57 ,p_rep_quantity_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
58 ,p_rep_txn_raw_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
59 ,p_rep_txn_burdened_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
60 ,p_rep_txn_revenue_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
61 ,p_rep_project_curr_code_tab IN SYSTEM.pa_varchar2_15_tbl_type := SYSTEM.pa_varchar2_15_tbl_type()
62 ,p_rep_project_raw_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
63 ,p_rep_project_burden_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
64 ,p_rep_project_revenue_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
65 ,p_rep_projfunc_curr_code_tab IN SYSTEM.pa_varchar2_15_tbl_type := SYSTEM.pa_varchar2_15_tbl_type()
66 ,p_rep_projfunc_raw_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
67 ,p_rep_projfunc_burden_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
68 ,p_rep_projfunc_revenue_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
69 ,p_rep_act_quantity_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
70 ,p_rep_txn_act_raw_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
71 ,p_rep_txn_act_burd_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
72 ,p_rep_txn_act_rev_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
73 ,p_rep_prj_act_raw_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
74 ,p_rep_prj_act_burd_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
75 ,p_rep_prj_act_rev_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
76 ,p_rep_pf_act_raw_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
77 ,p_rep_pf_act_burd_cost_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
78 ,p_rep_pf_act_rev_tab IN SYSTEM.pa_num_tbl_type := SYSTEM.pa_num_tbl_type()
79 /* bug fix:5116157 */
80 ,p_rep_line_mode_tab IN SYSTEM.pa_varchar2_15_tbl_type := SYSTEM.pa_varchar2_15_tbl_type()
81 ,p_rep_rate_base_flag_tab IN SYSTEM.pa_varchar2_15_tbl_type := SYSTEM.pa_varchar2_15_tbl_type()
82 ,x_msg_data OUT NOCOPY Varchar2
83 ,x_msg_count OUT NOCOPY Number
84 ,x_return_status OUT NOCOPY Varchar2
85 ) ;
86
87 /* This is an wrapper api, which in turn calls update_reporting_lines and passes
88 * each budget line to reporting api
89 *This is the main api called from calculate, budget generation process to update the
90 * reporting PJI data when budget lines are created,updated or deleted.
91 * The following params values must be passed
92 * p_activity_code 'UPDATE',/'DELETE'
93 * p_calling_module name of API, for ex: 'CALCULATE_API'
94 * If activity = 'UPDATE' then +ve budgetLine amounts will be selected from DB
95 * if activity = 'DELETE' then -ve budgetLine amounts will be selected from DB
96 * NOTE: BEFORE CALLING THIS API, a record must exists in pa_resource_assignments for the p_resource_assignment_id
97 * AND a budget line must exists in pa_budget_lines for the given p_budget_line_id .
98 */
99 PROCEDURE update_reporting_lines_frombl
100 (p_calling_module IN Varchar2 Default 'CALCULATE_API'
101 ,p_activity_code IN Varchar2 Default 'UPDATE'
102 ,p_budget_version_id IN Number
103 ,p_resource_assignment_id IN Number
104 ,p_budget_line_id IN Number
105 ,x_msg_data OUT NOCOPY Varchar2
106 ,x_msg_count OUT NOCOPY Number
107 ,x_return_status OUT NOCOPY Varchar2
108 ) ;
109
110 END PA_FP_PJI_INTG_PKG;