1 package ben_process_compensation_w AS
2 /* $Header: bencmpws.pkh 120.0 2005/05/28 03:50:25 appldev noship $*/
3 --
4 -- Global constants
5 g_column_delimiter constant varchar2(3) := '~^|';
6 --
7 --
8 -- ---------------------------------------------------------------------------+
9 -- ---------------------- < get_comp_data_from_tt> -------------------------+
10 -- ---------------------------------------------------------------------------+
11 -- Purpose: This procedure will get transaction data which are saved earlier
12 -- in the current transaction. This is invoked when a user click BACK
13 -- button to go back from the Review page to Update page to correct
14 -- typos or make further changes. Hence, we need to use the item_type
15 -- item_key passed in to retrieve the transaction record.
16 -- This is an overloaded version.
17 -- ---------------------------------------------------------------------------+
18 procedure get_comp_data_from_tt
19 (p_item_type in varchar2
20 ,p_item_key in varchar2
21 ,p_activity_id in number
22 ,p_elig_per_elctbl_chc_id in out nocopy number
23 ,p_prtt_enrt_rslt_id out nocopy number
24 ,p_person_id out nocopy number
25 ,p_per_in_ler_id out nocopy number
26 ,p_pgm_id out nocopy number
27 ,p_pl_id out nocopy number
28 ,p_effective_date out nocopy date
29 ,p_enrt_bnft_id out nocopy number
30 ,p_bnft_amt out nocopy number
31 ,p_enrt_rt_id out nocopy number
32 ,p_prtt_rt_val_id out nocopy number
33 ,p_rt_val out nocopy number
34 ,p_datetrack_mode out nocopy varchar2
35 ,p_effective_start_date out nocopy date
36 ,p_object_version_number out nocopy number
37 ,p_business_group_id out nocopy number
38 ,p_enrt_cvg_strt_dt out nocopy date
39 ,p_enrt_cvg_thru_dt out nocopy date
40 ,p_justification out nocopy varchar2
41 ,p_pl_name out nocopy varchar2
42 ,p_frequency_meaning out nocopy varchar2
43 ,p_frequency_cd out nocopy varchar2
44 ,p_entr_rt_at_enrt_flag out nocopy varchar2
45 ,p_entr_bnft_at_enrt_flag out nocopy varchar2
46 ,p_rt_nnmntry_uom out nocopy varchar2
47 ,p_bnft_nnmntry_uom out nocopy varchar2
48 ,p_rt_uom out nocopy varchar2
49 ,p_bnft_uom out nocopy varchar2
50 ,p_rt_mn_val out nocopy number
51 ,p_rt_mx_val out nocopy number
52 ,p_bnft_mn_val out nocopy number
53 ,p_bnft_mx_val out nocopy number
54 ,p_enrt_cvg_strt_dt_cd out nocopy varchar2
55 ,p_acty_ref_perd_cd out nocopy varchar2
56 ,p_currency_cd out nocopy varchar2
57 ,p_limit_enrt_rt_id out nocopy number
58 ,p_limit_prtt_rt_val_id out nocopy number
59 ,p_limit_rt_val out nocopy number
60 ,p_limit_entr_rt_at_enrt_flag out nocopy varchar2
61 ,p_pl_typ_id out nocopy number
62 ,p_ler_id out nocopy number
63 ,p_limit_dsply_on_enrt_flag out nocopy varchar2
64 ,p_currency_symbol out nocopy varchar2
65 ,p_rt_strt_dt out nocopy date
66 ,p_rt_end_dt out nocopy date
67 ,p_rt_strt_dt_cd out nocopy varchar2
68 ,p_rt_end_dt_cd out nocopy varchar2
69 ,p_rslt_bnft_amt out nocopy number
70 ,p_rtval_rt_end_dt out nocopy date
71 ,p_rtval_rt_val out nocopy number
72 ,p_rtval_limit_rt_val out nocopy number
73 ,p_bnft_typ_meaning out nocopy varchar2
74 ,p_ctfn_names out nocopy varchar2
75 ,p_rt_update_mode out nocopy varchar2
76 ,p_rtval_rt_strt_dt out nocopy date
77 ,p_nip_pl_uom out nocopy varchar2
78 );
79 --
80 -- ---------------------------------------------------------------------------+
81 -- ---------------------- < get_comp_data_from_tt> -------------------------+
82 -- ---------------------------------------------------------------------------+
83 -- Purpose: This procedure will get transaction data which are pending for
84 -- approval in workflow for a transaction step id.
85 -- This is the procedure which does the actual work.
86 -- ---------------------------------------------------------------------------+
87 procedure get_comp_data_from_tt
88 (p_transaction_step_id in number
89 ,p_elig_per_elctbl_chc_id out nocopy number
90 ,p_prtt_enrt_rslt_id out nocopy number
91 ,p_person_id out nocopy number
92 ,p_per_in_ler_id out nocopy number
93 ,p_pgm_id out nocopy number
94 ,p_pl_id out nocopy number
95 ,p_effective_date out nocopy date
96 ,p_enrt_bnft_id out nocopy number
97 ,p_bnft_amt out nocopy number
98 ,p_enrt_rt_id out nocopy number
99 ,p_prtt_rt_val_id out nocopy number
100 ,p_rt_val out nocopy number
101 ,p_datetrack_mode out nocopy varchar2
102 ,p_effective_start_date out nocopy date
103 ,p_object_version_number out nocopy number
104 ,p_business_group_id out nocopy number
105 ,p_enrt_cvg_strt_dt out nocopy date
106 ,p_enrt_cvg_thru_dt out nocopy date
107 ,p_justification out nocopy varchar2
108 ,p_pl_name out nocopy varchar2
109 ,p_frequency_meaning out nocopy varchar2
110 ,p_frequency_cd out nocopy varchar2
111 ,p_entr_rt_at_enrt_flag out nocopy varchar2
112 ,p_entr_bnft_at_enrt_flag out nocopy varchar2
113 ,p_rt_nnmntry_uom out nocopy varchar2
114 ,p_bnft_nnmntry_uom out nocopy varchar2
115 ,p_rt_uom out nocopy varchar2
116 ,p_bnft_uom out nocopy varchar2
117 ,p_rt_mn_val out nocopy number
118 ,p_rt_mx_val out nocopy number
119 ,p_bnft_mn_val out nocopy number
120 ,p_bnft_mx_val out nocopy number
121 ,p_enrt_cvg_strt_dt_cd out nocopy varchar2
122 ,p_acty_ref_perd_cd out nocopy varchar2
123 ,p_currency_cd out nocopy varchar2
124 ,p_limit_enrt_rt_id out nocopy number
125 ,p_limit_prtt_rt_val_id out nocopy number
126 ,p_limit_rt_val out nocopy number
127 ,p_limit_entr_rt_at_enrt_flag out nocopy varchar2
128 ,p_pl_typ_id out nocopy number
129 ,p_ler_id out nocopy number
130 ,p_limit_dsply_on_enrt_flag out nocopy varchar2
131 ,p_currency_symbol out nocopy varchar2
132 ,p_rt_strt_dt out nocopy date
133 ,p_rt_end_dt out nocopy date
134 ,p_rt_strt_dt_cd out nocopy varchar2
135 ,p_rt_end_dt_cd out nocopy varchar2
136 ,p_rslt_bnft_amt out nocopy number
137 ,p_rtval_rt_end_dt out nocopy date
138 ,p_rtval_rt_val out nocopy number
139 ,p_rtval_limit_rt_val out nocopy number
140 ,p_bnft_typ_meaning out nocopy varchar2
141 ,p_ctfn_names out nocopy varchar2
142 ,p_rt_update_mode out nocopy varchar2
143 ,p_rtval_rt_strt_dt out nocopy date
144 ,p_nip_pl_uom out nocopy varchar2);
145 --
146 --
147 procedure get_comp_data_from_tt
148 (p_transaction_step_id in number
149 ,p_column_names in varchar2
150 ,p_column_values out nocopy varchar2);
151 --
152 --
153 procedure get_comp_data_from_tt
154 (p_item_type in varchar2
155 ,p_item_key in varchar2
156 ,p_elig_per_elctbl_chc_id in number
157 ,p_column_names in varchar2
158 ,p_column_values out nocopy varchar2);
159 --
160 -- ---------------------------------------------------------------------------+
161 -- ----------------------- < update_compensation > ---------------------------+
162 -- ---------------------------------------------------------------------------+
163 -- Purpose: This procedure will perform validations when a user presses Next
164 -- on Update Plan Details entry page or on the Review page.
165 -- Either case, the data will be saved to the transaction table.
166 -- If this procedure is invoked from Review page, it will first check
167 -- that if a transaction already exists. If it does, it will update
168 -- the current transaction record.
169 -- ---------------------------------------------------------------------------+
170 procedure update_compensation
171 (p_item_type in varchar2
172 ,p_item_key in varchar2
173 ,p_actid in number
174 ,p_login_person_id in number
175 ,p_process_section_name in varchar2
176 ,p_review_page_region_code in varchar2
177 ,p_elig_per_elctbl_chc_id in number
178 ,p_prtt_enrt_rslt_id in number
179 ,p_person_id in number
180 ,p_per_in_ler_id in number
181 ,p_pgm_id in number
182 ,p_pl_id in number
183 ,p_effective_date in date
184 ,p_enrt_bnft_id in number
185 ,p_bnft_amt in number
186 ,p_enrt_rt_id in number
187 ,p_prtt_rt_val_id in number
188 ,p_rt_val in number
189 ,p_datetrack_mode in varchar2
190 ,p_effective_start_date in date
191 ,p_object_version_number in number
192 ,p_business_group_id in number
193 ,p_enrt_cvg_strt_dt in date
194 ,p_enrt_cvg_thru_dt in date
195 ,p_justification in varchar2
196 ,p_pl_name in varchar2
197 ,p_frequency_meaning in varchar2
198 ,p_frequency_cd in varchar2
199 ,p_entr_rt_at_enrt_flag in varchar2
200 ,p_entr_bnft_at_enrt_flag in varchar2
201 ,p_rt_nnmntry_uom in varchar2
202 ,p_bnft_nnmntry_uom in varchar2
203 ,p_rt_uom in varchar2
204 ,p_bnft_uom in varchar2
205 ,p_rt_mn_val in number
206 ,p_rt_mx_val in number
207 ,p_bnft_mn_val in number
208 ,p_bnft_mx_val in number
209 ,p_enrt_cvg_strt_dt_cd in varchar2
210 ,p_acty_ref_perd_cd in varchar2
211 ,p_currency_cd in varchar2
212 ,p_limit_enrt_rt_id in number
213 ,p_limit_prtt_rt_val_id in number
214 ,p_limit_rt_val in number
215 ,p_limit_entr_rt_at_enrt_flag in varchar2
216 ,p_pl_typ_id in number
217 ,p_ler_id in number
218 ,p_limit_dsply_on_enrt_flag in varchar2
219 ,p_currency_symbol in varchar2
220 ,p_rt_strt_dt in date
221 ,p_rt_end_dt in date
222 ,p_rt_strt_dt_cd in varchar2
223 ,p_rt_end_dt_cd in varchar2
224 ,p_rslt_bnft_amt in number
225 ,p_rtval_rt_end_dt in date
226 ,p_rtval_rt_val in number
227 ,p_rtval_limit_rt_val in number
228 ,p_bnft_typ_meaning in varchar2
229 ,p_ctfn_names in varchar2
230 ,p_rt_update_mode in varchar2
231 ,p_rtval_rt_strt_dt in date
232 ,p_save_mode in varchar2 default null
233 ,p_nip_pl_uom in varchar2
234 );
235 --
236 -- ---------------------------------------------------------------------------+
237 -- ----------------------------- < process_api > -----------------------------+
238 -- ---------------------------------------------------------------------------+
239 -- Purpose: This procedure will be invoked in workflow notification
240 -- when an approver approves all the changes. This procedure
241 -- will call the api to update to the database with p_validate
242 -- equal to false.
243 -- ---------------------------------------------------------------------------+
244 procedure process_api
245 (p_validate in boolean default false
246 ,p_transaction_step_id in number
247 ,p_effective_date in varchar2 default null);
248 --
249 --
250 procedure back_from_review(p_item_type in varchar2,
251 p_item_key in varchar2,
252 p_act_id in number,
253 funmode in varchar2,
254 result out nocopy varchar2);
255 --
256 procedure update_object_version
257 (p_transaction_step_id in number
258 ,p_login_person_id in number);
259 --
260 --
261 end ben_process_compensation_w;
262 --
263 --