[Home] [Help]
PACKAGE BODY: APPS.BEN_CVG_AMT_CALC_API
Source
1 Package Body ben_Cvg_Amt_Calc_api as
2 /* $Header: beccmapi.pkb 120.0 2005/05/28 00:57:00 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_Cvg_Amt_Calc_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_Cvg_Amt_Calc >---------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_Cvg_Amt_Calc
13 (p_validate in boolean default false
14 ,p_cvg_amt_calc_mthd_id out nocopy number
15 ,p_effective_start_date out nocopy date
16 ,p_effective_end_date out nocopy date
17 ,p_name in varchar2 default null
18 ,p_incrmt_val in number default null
19 ,p_mx_val in number default null
20 ,p_mn_val in number default null
21 ,p_no_mx_val_dfnd_flag in varchar2 default null
22 ,p_no_mn_val_dfnd_flag in varchar2 default null
23 ,p_rndg_cd in varchar2 default null
24 ,p_rndg_rl in number default null
25 ,p_lwr_lmt_val in number default null
26 ,p_lwr_lmt_calc_rl in number default null
27 ,p_upr_lmt_val in number default null
28 ,p_upr_lmt_calc_rl in number default null
29 ,p_val in number default null
30 ,p_val_ovrid_alwd_flag in varchar2 default null
31 ,p_val_calc_rl in number default null
32 ,p_uom in varchar2 default null
33 ,p_nnmntry_uom in varchar2 default null
34 ,p_bndry_perd_cd in varchar2 default null
35 ,p_bnft_typ_cd in varchar2 default null
36 ,p_cvg_mlt_cd in varchar2 default null
37 ,p_rt_typ_cd in varchar2 default null
38 ,p_dflt_val in number default null
39 ,p_entr_val_at_enrt_flag in varchar2 default null
40 ,p_dflt_flag in varchar2 default null
41 ,p_comp_lvl_fctr_id in number default null
42 ,p_oipl_id in number default null
43 ,p_pl_id in number default null
44 ,p_plip_id in number default null
45 ,p_business_group_id in number default null
46 ,p_ccm_attribute_category in varchar2 default null
47 ,p_ccm_attribute1 in varchar2 default null
48 ,p_ccm_attribute2 in varchar2 default null
49 ,p_ccm_attribute3 in varchar2 default null
50 ,p_ccm_attribute4 in varchar2 default null
51 ,p_ccm_attribute5 in varchar2 default null
52 ,p_ccm_attribute6 in varchar2 default null
53 ,p_ccm_attribute7 in varchar2 default null
54 ,p_ccm_attribute8 in varchar2 default null
55 ,p_ccm_attribute9 in varchar2 default null
56 ,p_ccm_attribute10 in varchar2 default null
57 ,p_ccm_attribute11 in varchar2 default null
58 ,p_ccm_attribute12 in varchar2 default null
59 ,p_ccm_attribute13 in varchar2 default null
60 ,p_ccm_attribute14 in varchar2 default null
61 ,p_ccm_attribute15 in varchar2 default null
62 ,p_ccm_attribute16 in varchar2 default null
63 ,p_ccm_attribute17 in varchar2 default null
64 ,p_ccm_attribute18 in varchar2 default null
65 ,p_ccm_attribute19 in varchar2 default null
66 ,p_ccm_attribute20 in varchar2 default null
67 ,p_ccm_attribute21 in varchar2 default null
68 ,p_ccm_attribute22 in varchar2 default null
69 ,p_ccm_attribute23 in varchar2 default null
70 ,p_ccm_attribute24 in varchar2 default null
71 ,p_ccm_attribute25 in varchar2 default null
72 ,p_ccm_attribute26 in varchar2 default null
73 ,p_ccm_attribute27 in varchar2 default null
74 ,p_ccm_attribute28 in varchar2 default null
75 ,p_ccm_attribute29 in varchar2 default null
76 ,p_ccm_attribute30 in varchar2 default null
77 ,p_object_version_number out nocopy number
78 ,p_effective_date in date) is
79 --
80 -- Declare cursors and local variables
81 --
82 l_cvg_amt_calc_mthd_id ben_cvg_amt_calc_mthd_f.cvg_amt_calc_mthd_id%TYPE;
83 l_effective_start_date ben_cvg_amt_calc_mthd_f.effective_start_date%TYPE;
84 l_effective_end_date ben_cvg_amt_calc_mthd_f.effective_end_date%TYPE;
85 l_proc varchar2(72) := g_package||'create_Cvg_Amt_Calc';
86 l_object_version_number ben_cvg_amt_calc_mthd_f.object_version_number%TYPE;
87 --
88 begin
89 --
90 hr_utility.set_location('Entering:'|| l_proc, 10);
91 --
92 -- Issue a savepoint if operating in validation only mode
93 --
94 savepoint create_Cvg_Amt_Calc;
95 --
96 hr_utility.set_location(l_proc, 20);
97 --
98 -- Process Logic
99 --
100 begin
101 --
102 -- Start of API User Hook for the before hook of create_Cvg_Amt_Calc
103 --
104 ben_Cvg_Amt_Calc_bk1.create_Cvg_Amt_Calc_b
105 (p_name => p_name
106 ,p_incrmt_val => p_incrmt_val
107 ,p_mx_val => p_mx_val
108 ,p_mn_val => p_mn_val
109 ,p_no_mx_val_dfnd_flag => p_no_mx_val_dfnd_flag
110 ,p_no_mn_val_dfnd_flag => p_no_mn_val_dfnd_flag
111 ,p_rndg_cd => p_rndg_cd
112 ,p_rndg_rl => p_rndg_rl
113 ,p_lwr_lmt_val => p_lwr_lmt_val
114 ,p_lwr_lmt_calc_rl => p_lwr_lmt_calc_rl
115 ,p_upr_lmt_val => p_upr_lmt_val
116 ,p_upr_lmt_calc_rl => p_upr_lmt_calc_rl
117 ,p_val => p_val
118 ,p_val_ovrid_alwd_flag => p_val_ovrid_alwd_flag
119 ,p_val_calc_rl => p_val_calc_rl
120 ,p_uom => p_uom
121 ,p_nnmntry_uom => p_nnmntry_uom
122 ,p_bndry_perd_cd => p_bndry_perd_cd
123 ,p_bnft_typ_cd => p_bnft_typ_cd
124 ,p_cvg_mlt_cd => p_cvg_mlt_cd
125 ,p_rt_typ_cd => p_rt_typ_cd
126 ,p_dflt_val => p_dflt_val
127 ,p_entr_val_at_enrt_flag => p_entr_val_at_enrt_flag
128 ,p_dflt_flag => p_dflt_flag
129 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
130 ,p_oipl_id => p_oipl_id
131 ,p_pl_id => p_pl_id
132 ,p_plip_id => p_plip_id
133 ,p_business_group_id => p_business_group_id
134 ,p_ccm_attribute_category => p_ccm_attribute_category
135 ,p_ccm_attribute1 => p_ccm_attribute1
136 ,p_ccm_attribute2 => p_ccm_attribute2
137 ,p_ccm_attribute3 => p_ccm_attribute3
138 ,p_ccm_attribute4 => p_ccm_attribute4
139 ,p_ccm_attribute5 => p_ccm_attribute5
140 ,p_ccm_attribute6 => p_ccm_attribute6
141 ,p_ccm_attribute7 => p_ccm_attribute7
142 ,p_ccm_attribute8 => p_ccm_attribute8
143 ,p_ccm_attribute9 => p_ccm_attribute9
144 ,p_ccm_attribute10 => p_ccm_attribute10
145 ,p_ccm_attribute11 => p_ccm_attribute11
146 ,p_ccm_attribute12 => p_ccm_attribute12
147 ,p_ccm_attribute13 => p_ccm_attribute13
148 ,p_ccm_attribute14 => p_ccm_attribute14
149 ,p_ccm_attribute15 => p_ccm_attribute15
150 ,p_ccm_attribute16 => p_ccm_attribute16
151 ,p_ccm_attribute17 => p_ccm_attribute17
152 ,p_ccm_attribute18 => p_ccm_attribute18
153 ,p_ccm_attribute19 => p_ccm_attribute19
154 ,p_ccm_attribute20 => p_ccm_attribute20
155 ,p_ccm_attribute21 => p_ccm_attribute21
156 ,p_ccm_attribute22 => p_ccm_attribute22
157 ,p_ccm_attribute23 => p_ccm_attribute23
158 ,p_ccm_attribute24 => p_ccm_attribute24
159 ,p_ccm_attribute25 => p_ccm_attribute25
160 ,p_ccm_attribute26 => p_ccm_attribute26
161 ,p_ccm_attribute27 => p_ccm_attribute27
162 ,p_ccm_attribute28 => p_ccm_attribute28
163 ,p_ccm_attribute29 => p_ccm_attribute29
164 ,p_ccm_attribute30 => p_ccm_attribute30
165 ,p_effective_date => trunc(p_effective_date));
166 --
167 exception
168 --
169 when hr_api.cannot_find_prog_unit then
170 --
171 hr_api.cannot_find_prog_unit_error
172 (p_module_name => 'CREATE_Cvg_Amt_Calc'
173 ,p_hook_type => 'BP');
174 --
175 -- End of API User Hook for the before hook of create_Cvg_Amt_Calc
176 --
177 end;
178 --
179 ben_ccm_ins.ins
180 (p_cvg_amt_calc_mthd_id => l_cvg_amt_calc_mthd_id
181 ,p_effective_start_date => l_effective_start_date
182 ,p_effective_end_date => l_effective_end_date
183 ,p_name => p_name
184 ,p_incrmt_val => p_incrmt_val
185 ,p_mx_val => p_mx_val
186 ,p_mn_val => p_mn_val
187 ,p_no_mx_val_dfnd_flag => p_no_mx_val_dfnd_flag
188 ,p_no_mn_val_dfnd_flag => p_no_mn_val_dfnd_flag
189 ,p_rndg_cd => p_rndg_cd
190 ,p_rndg_rl => p_rndg_rl
191 ,p_lwr_lmt_val => p_lwr_lmt_val
192 ,p_lwr_lmt_calc_rl => p_lwr_lmt_calc_rl
193 ,p_upr_lmt_val => p_upr_lmt_val
194 ,p_upr_lmt_calc_rl => p_upr_lmt_calc_rl
195 ,p_val => p_val
196 ,p_val_ovrid_alwd_flag => p_val_ovrid_alwd_flag
197 ,p_val_calc_rl => p_val_calc_rl
198 ,p_uom => p_uom
199 ,p_nnmntry_uom => p_nnmntry_uom
200 ,p_bndry_perd_cd => p_bndry_perd_cd
201 ,p_bnft_typ_cd => p_bnft_typ_cd
202 ,p_cvg_mlt_cd => p_cvg_mlt_cd
203 ,p_rt_typ_cd => p_rt_typ_cd
204 ,p_dflt_val => p_dflt_val
205 ,p_entr_val_at_enrt_flag => p_entr_val_at_enrt_flag
206 ,p_dflt_flag => p_dflt_flag
207 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
208 ,p_oipl_id => p_oipl_id
209 ,p_pl_id => p_pl_id
210 ,p_plip_id => p_plip_id
211 ,p_business_group_id => p_business_group_id
212 ,p_ccm_attribute_category => p_ccm_attribute_category
213 ,p_ccm_attribute1 => p_ccm_attribute1
214 ,p_ccm_attribute2 => p_ccm_attribute2
215 ,p_ccm_attribute3 => p_ccm_attribute3
216 ,p_ccm_attribute4 => p_ccm_attribute4
217 ,p_ccm_attribute5 => p_ccm_attribute5
218 ,p_ccm_attribute6 => p_ccm_attribute6
219 ,p_ccm_attribute7 => p_ccm_attribute7
220 ,p_ccm_attribute8 => p_ccm_attribute8
221 ,p_ccm_attribute9 => p_ccm_attribute9
222 ,p_ccm_attribute10 => p_ccm_attribute10
223 ,p_ccm_attribute11 => p_ccm_attribute11
224 ,p_ccm_attribute12 => p_ccm_attribute12
225 ,p_ccm_attribute13 => p_ccm_attribute13
226 ,p_ccm_attribute14 => p_ccm_attribute14
227 ,p_ccm_attribute15 => p_ccm_attribute15
228 ,p_ccm_attribute16 => p_ccm_attribute16
229 ,p_ccm_attribute17 => p_ccm_attribute17
230 ,p_ccm_attribute18 => p_ccm_attribute18
231 ,p_ccm_attribute19 => p_ccm_attribute19
232 ,p_ccm_attribute20 => p_ccm_attribute20
233 ,p_ccm_attribute21 => p_ccm_attribute21
234 ,p_ccm_attribute22 => p_ccm_attribute22
235 ,p_ccm_attribute23 => p_ccm_attribute23
236 ,p_ccm_attribute24 => p_ccm_attribute24
237 ,p_ccm_attribute25 => p_ccm_attribute25
238 ,p_ccm_attribute26 => p_ccm_attribute26
239 ,p_ccm_attribute27 => p_ccm_attribute27
240 ,p_ccm_attribute28 => p_ccm_attribute28
241 ,p_ccm_attribute29 => p_ccm_attribute29
242 ,p_ccm_attribute30 => p_ccm_attribute30
243 ,p_object_version_number => l_object_version_number
244 ,p_effective_date => trunc(p_effective_date));
245 --
246 begin
247 --
248 -- Start of API User Hook for the after hook of create_Cvg_Amt_Calc
249 --
250 ben_Cvg_Amt_Calc_bk1.create_Cvg_Amt_Calc_a
251 (p_cvg_amt_calc_mthd_id => l_cvg_amt_calc_mthd_id
252 ,p_effective_start_date => l_effective_start_date
253 ,p_effective_end_date => l_effective_end_date
254 ,p_name => p_name
255 ,p_incrmt_val => p_incrmt_val
256 ,p_mx_val => p_mx_val
257 ,p_mn_val => p_mn_val
258 ,p_no_mx_val_dfnd_flag => p_no_mx_val_dfnd_flag
259 ,p_no_mn_val_dfnd_flag => p_no_mn_val_dfnd_flag
260 ,p_rndg_cd => p_rndg_cd
261 ,p_rndg_rl => p_rndg_rl
262 ,p_lwr_lmt_val => p_lwr_lmt_val
263 ,p_lwr_lmt_calc_rl => p_lwr_lmt_calc_rl
264 ,p_upr_lmt_val => p_upr_lmt_val
265 ,p_upr_lmt_calc_rl => p_upr_lmt_calc_rl
266 ,p_val => p_val
267 ,p_val_ovrid_alwd_flag => p_val_ovrid_alwd_flag
268 ,p_val_calc_rl => p_val_calc_rl
269 ,p_uom => p_uom
270 ,p_nnmntry_uom => p_nnmntry_uom
271 ,p_bndry_perd_cd => p_bndry_perd_cd
272 ,p_bnft_typ_cd => p_bnft_typ_cd
273 ,p_cvg_mlt_cd => p_cvg_mlt_cd
274 ,p_rt_typ_cd => p_rt_typ_cd
275 ,p_dflt_val => p_dflt_val
276 ,p_entr_val_at_enrt_flag => p_entr_val_at_enrt_flag
277 ,p_dflt_flag => p_dflt_flag
278 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
279 ,p_oipl_id => p_oipl_id
280 ,p_pl_id => p_pl_id
281 ,p_plip_id => p_plip_id
282 ,p_business_group_id => p_business_group_id
283 ,p_ccm_attribute_category => p_ccm_attribute_category
284 ,p_ccm_attribute1 => p_ccm_attribute1
285 ,p_ccm_attribute2 => p_ccm_attribute2
286 ,p_ccm_attribute3 => p_ccm_attribute3
287 ,p_ccm_attribute4 => p_ccm_attribute4
288 ,p_ccm_attribute5 => p_ccm_attribute5
289 ,p_ccm_attribute6 => p_ccm_attribute6
290 ,p_ccm_attribute7 => p_ccm_attribute7
291 ,p_ccm_attribute8 => p_ccm_attribute8
292 ,p_ccm_attribute9 => p_ccm_attribute9
293 ,p_ccm_attribute10 => p_ccm_attribute10
294 ,p_ccm_attribute11 => p_ccm_attribute11
295 ,p_ccm_attribute12 => p_ccm_attribute12
296 ,p_ccm_attribute13 => p_ccm_attribute13
297 ,p_ccm_attribute14 => p_ccm_attribute14
298 ,p_ccm_attribute15 => p_ccm_attribute15
299 ,p_ccm_attribute16 => p_ccm_attribute16
300 ,p_ccm_attribute17 => p_ccm_attribute17
301 ,p_ccm_attribute18 => p_ccm_attribute18
302 ,p_ccm_attribute19 => p_ccm_attribute19
303 ,p_ccm_attribute20 => p_ccm_attribute20
304 ,p_ccm_attribute21 => p_ccm_attribute21
305 ,p_ccm_attribute22 => p_ccm_attribute22
306 ,p_ccm_attribute23 => p_ccm_attribute23
307 ,p_ccm_attribute24 => p_ccm_attribute24
308 ,p_ccm_attribute25 => p_ccm_attribute25
309 ,p_ccm_attribute26 => p_ccm_attribute26
310 ,p_ccm_attribute27 => p_ccm_attribute27
311 ,p_ccm_attribute28 => p_ccm_attribute28
312 ,p_ccm_attribute29 => p_ccm_attribute29
313 ,p_ccm_attribute30 => p_ccm_attribute30
314 ,p_object_version_number => l_object_version_number
315 ,p_effective_date => trunc(p_effective_date));
316 --
317 exception
318 --
319 when hr_api.cannot_find_prog_unit then
320 hr_api.cannot_find_prog_unit_error
321 (p_module_name => 'CREATE_Cvg_Amt_Calc'
322 ,p_hook_type => 'AP');
323 --
324 -- End of API User Hook for the after hook of create_Cvg_Amt_Calc
325 --
326 end;
327 --
328 hr_utility.set_location(l_proc, 60);
329 --
330 -- When in validation only mode raise the Validate_Enabled exception
331 --
332 if p_validate then
333 raise hr_api.validate_enabled;
334 end if;
335 --
336 -- Set all output arguments
337 --
338 p_cvg_amt_calc_mthd_id := l_cvg_amt_calc_mthd_id;
339 p_effective_start_date := l_effective_start_date;
340 p_effective_end_date := l_effective_end_date;
341 p_object_version_number := l_object_version_number;
342 --
343 hr_utility.set_location(' Leaving:'||l_proc, 70);
344 --
345 exception
346 --
347 when hr_api.validate_enabled then
348 --
349 -- As the Validate_Enabled exception has been raised
350 -- we must rollback to the savepoint
351 --
352 ROLLBACK TO create_Cvg_Amt_Calc;
353 --
354 -- Only set output warning arguments
355 -- (Any key or derived arguments must be set to null
356 -- when validation only mode is being used.)
357 --
358 p_cvg_amt_calc_mthd_id := null;
359 p_effective_start_date := null;
360 p_effective_end_date := null;
361 p_object_version_number := null;
362 hr_utility.set_location(' Leaving:'||l_proc, 80);
363 --
364 when others then
365 --
366 -- A validation or unexpected error has occured
367 --
368 ROLLBACK TO create_Cvg_Amt_Calc;
369 -- NOCOPY Changes
370 p_cvg_amt_calc_mthd_id := null;
371 p_effective_start_date := null;
372 p_effective_end_date := null;
373 p_object_version_number := null ;
374 hr_utility.set_location(' Leaving:'||l_proc, 90);
375 raise;
376 --
377 end create_Cvg_Amt_Calc;
378 -- ----------------------------------------------------------------------------
379 -- |------------------------< update_Cvg_Amt_Calc >---------------------------|
380 -- ----------------------------------------------------------------------------
381 --
382 procedure update_Cvg_Amt_Calc
383 (p_validate in boolean default false
384 ,p_cvg_amt_calc_mthd_id in number
385 ,p_effective_start_date out nocopy date
386 ,p_effective_end_date out nocopy date
387 ,p_name in varchar2 default hr_api.g_varchar2
388 ,p_incrmt_val in number default hr_api.g_number
389 ,p_mx_val in number default hr_api.g_number
390 ,p_mn_val in number default hr_api.g_number
391 ,p_no_mx_val_dfnd_flag in varchar2 default hr_api.g_varchar2
392 ,p_no_mn_val_dfnd_flag in varchar2 default hr_api.g_varchar2
393 ,p_rndg_cd in varchar2 default hr_api.g_varchar2
394 ,p_rndg_rl in number default hr_api.g_number
395 ,p_lwr_lmt_val in number default hr_api.g_number
396 ,p_lwr_lmt_calc_rl in number default hr_api.g_number
397 ,p_upr_lmt_val in number default hr_api.g_number
398 ,p_upr_lmt_calc_rl in number default hr_api.g_number
399 ,p_val in number default hr_api.g_number
400 ,p_val_ovrid_alwd_flag in varchar2 default hr_api.g_varchar2
401 ,p_val_calc_rl in number default hr_api.g_number
402 ,p_uom in varchar2 default hr_api.g_varchar2
403 ,p_nnmntry_uom in varchar2 default hr_api.g_varchar2
404 ,p_bndry_perd_cd in varchar2 default hr_api.g_varchar2
405 ,p_bnft_typ_cd in varchar2 default hr_api.g_varchar2
406 ,p_cvg_mlt_cd in varchar2 default hr_api.g_varchar2
407 ,p_rt_typ_cd in varchar2 default hr_api.g_varchar2
408 ,p_dflt_val in number default hr_api.g_number
409 ,p_entr_val_at_enrt_flag in varchar2 default hr_api.g_varchar2
410 ,p_dflt_flag in varchar2 default hr_api.g_varchar2
411 ,p_comp_lvl_fctr_id in number default hr_api.g_number
412 ,p_oipl_id in number default hr_api.g_number
413 ,p_pl_id in number default hr_api.g_number
414 ,p_plip_id in number default hr_api.g_number
415 ,p_business_group_id in number default hr_api.g_number
416 ,p_ccm_attribute_category in varchar2 default hr_api.g_varchar2
417 ,p_ccm_attribute1 in varchar2 default hr_api.g_varchar2
418 ,p_ccm_attribute2 in varchar2 default hr_api.g_varchar2
419 ,p_ccm_attribute3 in varchar2 default hr_api.g_varchar2
420 ,p_ccm_attribute4 in varchar2 default hr_api.g_varchar2
421 ,p_ccm_attribute5 in varchar2 default hr_api.g_varchar2
422 ,p_ccm_attribute6 in varchar2 default hr_api.g_varchar2
423 ,p_ccm_attribute7 in varchar2 default hr_api.g_varchar2
424 ,p_ccm_attribute8 in varchar2 default hr_api.g_varchar2
425 ,p_ccm_attribute9 in varchar2 default hr_api.g_varchar2
426 ,p_ccm_attribute10 in varchar2 default hr_api.g_varchar2
427 ,p_ccm_attribute11 in varchar2 default hr_api.g_varchar2
428 ,p_ccm_attribute12 in varchar2 default hr_api.g_varchar2
429 ,p_ccm_attribute13 in varchar2 default hr_api.g_varchar2
430 ,p_ccm_attribute14 in varchar2 default hr_api.g_varchar2
431 ,p_ccm_attribute15 in varchar2 default hr_api.g_varchar2
432 ,p_ccm_attribute16 in varchar2 default hr_api.g_varchar2
433 ,p_ccm_attribute17 in varchar2 default hr_api.g_varchar2
434 ,p_ccm_attribute18 in varchar2 default hr_api.g_varchar2
435 ,p_ccm_attribute19 in varchar2 default hr_api.g_varchar2
436 ,p_ccm_attribute20 in varchar2 default hr_api.g_varchar2
437 ,p_ccm_attribute21 in varchar2 default hr_api.g_varchar2
438 ,p_ccm_attribute22 in varchar2 default hr_api.g_varchar2
439 ,p_ccm_attribute23 in varchar2 default hr_api.g_varchar2
440 ,p_ccm_attribute24 in varchar2 default hr_api.g_varchar2
441 ,p_ccm_attribute25 in varchar2 default hr_api.g_varchar2
442 ,p_ccm_attribute26 in varchar2 default hr_api.g_varchar2
443 ,p_ccm_attribute27 in varchar2 default hr_api.g_varchar2
444 ,p_ccm_attribute28 in varchar2 default hr_api.g_varchar2
445 ,p_ccm_attribute29 in varchar2 default hr_api.g_varchar2
446 ,p_ccm_attribute30 in varchar2 default hr_api.g_varchar2
447 ,p_object_version_number in out nocopy number
448 ,p_effective_date in date
449 ,p_datetrack_mode in varchar2) is
450 --
451 -- Declare cursors and local variables
452 --
453 l_proc varchar2(72) := g_package||'update_Cvg_Amt_Calc';
454 l_object_version_number ben_cvg_amt_calc_mthd_f.object_version_number%TYPE;
455 l_effective_start_date ben_cvg_amt_calc_mthd_f.effective_start_date%TYPE;
456 l_effective_end_date ben_cvg_amt_calc_mthd_f.effective_end_date%TYPE;
457 --
458 begin
459 --
460 hr_utility.set_location('Entering:'|| l_proc, 10);
461 --
462 -- Issue a savepoint if operating in validation only mode
463 --
464 savepoint update_Cvg_Amt_Calc;
465 --
466 hr_utility.set_location(l_proc, 20);
467 --
468 -- Process Logic
469 --
470 l_object_version_number := p_object_version_number;
471 --
472 begin
473 --
474 -- Start of API User Hook for the before hook of update_Cvg_Amt_Calc
475 --
476 ben_Cvg_Amt_Calc_bk2.update_Cvg_Amt_Calc_b
477 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
478 ,p_name => p_name
479 ,p_incrmt_val => p_incrmt_val
480 ,p_mx_val => p_mx_val
481 ,p_mn_val => p_mn_val
482 ,p_no_mx_val_dfnd_flag => p_no_mx_val_dfnd_flag
483 ,p_no_mn_val_dfnd_flag => p_no_mn_val_dfnd_flag
484 ,p_rndg_cd => p_rndg_cd
485 ,p_rndg_rl => p_rndg_rl
486 ,p_lwr_lmt_val => p_lwr_lmt_val
487 ,p_lwr_lmt_calc_rl => p_lwr_lmt_calc_rl
488 ,p_upr_lmt_val => p_upr_lmt_val
489 ,p_upr_lmt_calc_rl => p_upr_lmt_calc_rl
490 ,p_val => p_val
491 ,p_val_ovrid_alwd_flag => p_val_ovrid_alwd_flag
492 ,p_val_calc_rl => p_val_calc_rl
493 ,p_uom => p_uom
494 ,p_nnmntry_uom => p_nnmntry_uom
495 ,p_bndry_perd_cd => p_bndry_perd_cd
496 ,p_bnft_typ_cd => p_bnft_typ_cd
497 ,p_cvg_mlt_cd => p_cvg_mlt_cd
498 ,p_rt_typ_cd => p_rt_typ_cd
499 ,p_dflt_val => p_dflt_val
500 ,p_entr_val_at_enrt_flag => p_entr_val_at_enrt_flag
501 ,p_dflt_flag => p_dflt_flag
502 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
503 ,p_oipl_id => p_oipl_id
504 ,p_pl_id => p_pl_id
505 ,p_plip_id => p_plip_id
506 ,p_business_group_id => p_business_group_id
507 ,p_ccm_attribute_category => p_ccm_attribute_category
508 ,p_ccm_attribute1 => p_ccm_attribute1
509 ,p_ccm_attribute2 => p_ccm_attribute2
510 ,p_ccm_attribute3 => p_ccm_attribute3
511 ,p_ccm_attribute4 => p_ccm_attribute4
512 ,p_ccm_attribute5 => p_ccm_attribute5
513 ,p_ccm_attribute6 => p_ccm_attribute6
514 ,p_ccm_attribute7 => p_ccm_attribute7
515 ,p_ccm_attribute8 => p_ccm_attribute8
516 ,p_ccm_attribute9 => p_ccm_attribute9
517 ,p_ccm_attribute10 => p_ccm_attribute10
518 ,p_ccm_attribute11 => p_ccm_attribute11
519 ,p_ccm_attribute12 => p_ccm_attribute12
520 ,p_ccm_attribute13 => p_ccm_attribute13
521 ,p_ccm_attribute14 => p_ccm_attribute14
522 ,p_ccm_attribute15 => p_ccm_attribute15
523 ,p_ccm_attribute16 => p_ccm_attribute16
524 ,p_ccm_attribute17 => p_ccm_attribute17
525 ,p_ccm_attribute18 => p_ccm_attribute18
526 ,p_ccm_attribute19 => p_ccm_attribute19
527 ,p_ccm_attribute20 => p_ccm_attribute20
528 ,p_ccm_attribute21 => p_ccm_attribute21
529 ,p_ccm_attribute22 => p_ccm_attribute22
530 ,p_ccm_attribute23 => p_ccm_attribute23
531 ,p_ccm_attribute24 => p_ccm_attribute24
532 ,p_ccm_attribute25 => p_ccm_attribute25
533 ,p_ccm_attribute26 => p_ccm_attribute26
534 ,p_ccm_attribute27 => p_ccm_attribute27
535 ,p_ccm_attribute28 => p_ccm_attribute28
536 ,p_ccm_attribute29 => p_ccm_attribute29
537 ,p_ccm_attribute30 => p_ccm_attribute30
538 ,p_object_version_number => p_object_version_number
539 ,p_effective_date => trunc(p_effective_date)
540 ,p_datetrack_mode => p_datetrack_mode);
541 --
542 exception
543 --
544 when hr_api.cannot_find_prog_unit then
545 --
546 hr_api.cannot_find_prog_unit_error
547 (p_module_name => 'UPDATE_Cvg_Amt_Calc'
548 ,p_hook_type => 'BP');
549 --
550 -- End of API User Hook for the before hook of update_Cvg_Amt_Calc
551 --
552 end;
553 --
554 ben_ccm_upd.upd
555 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
556 ,p_effective_start_date => l_effective_start_date
557 ,p_effective_end_date => l_effective_end_date
558 ,p_name => p_name
559 ,p_incrmt_val => p_incrmt_val
560 ,p_mx_val => p_mx_val
561 ,p_mn_val => p_mn_val
562 ,p_no_mx_val_dfnd_flag => p_no_mx_val_dfnd_flag
563 ,p_no_mn_val_dfnd_flag => p_no_mn_val_dfnd_flag
564 ,p_rndg_cd => p_rndg_cd
565 ,p_rndg_rl => p_rndg_rl
566 ,p_lwr_lmt_val => p_lwr_lmt_val
567 ,p_lwr_lmt_calc_rl => p_lwr_lmt_calc_rl
568 ,p_upr_lmt_val => p_upr_lmt_val
569 ,p_upr_lmt_calc_rl => p_upr_lmt_calc_rl
570 ,p_val => p_val
571 ,p_val_ovrid_alwd_flag => p_val_ovrid_alwd_flag
572 ,p_val_calc_rl => p_val_calc_rl
573 ,p_uom => p_uom
574 ,p_nnmntry_uom => p_nnmntry_uom
575 ,p_bndry_perd_cd => p_bndry_perd_cd
576 ,p_bnft_typ_cd => p_bnft_typ_cd
577 ,p_cvg_mlt_cd => p_cvg_mlt_cd
578 ,p_rt_typ_cd => p_rt_typ_cd
579 ,p_dflt_val => p_dflt_val
580 ,p_entr_val_at_enrt_flag => p_entr_val_at_enrt_flag
581 ,p_dflt_flag => p_dflt_flag
582 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
583 ,p_oipl_id => p_oipl_id
584 ,p_pl_id => p_pl_id
585 ,p_plip_id => p_plip_id
586 ,p_business_group_id => p_business_group_id
587 ,p_ccm_attribute_category => p_ccm_attribute_category
588 ,p_ccm_attribute1 => p_ccm_attribute1
589 ,p_ccm_attribute2 => p_ccm_attribute2
590 ,p_ccm_attribute3 => p_ccm_attribute3
591 ,p_ccm_attribute4 => p_ccm_attribute4
592 ,p_ccm_attribute5 => p_ccm_attribute5
593 ,p_ccm_attribute6 => p_ccm_attribute6
594 ,p_ccm_attribute7 => p_ccm_attribute7
595 ,p_ccm_attribute8 => p_ccm_attribute8
596 ,p_ccm_attribute9 => p_ccm_attribute9
597 ,p_ccm_attribute10 => p_ccm_attribute10
598 ,p_ccm_attribute11 => p_ccm_attribute11
599 ,p_ccm_attribute12 => p_ccm_attribute12
600 ,p_ccm_attribute13 => p_ccm_attribute13
601 ,p_ccm_attribute14 => p_ccm_attribute14
602 ,p_ccm_attribute15 => p_ccm_attribute15
603 ,p_ccm_attribute16 => p_ccm_attribute16
604 ,p_ccm_attribute17 => p_ccm_attribute17
605 ,p_ccm_attribute18 => p_ccm_attribute18
606 ,p_ccm_attribute19 => p_ccm_attribute19
607 ,p_ccm_attribute20 => p_ccm_attribute20
608 ,p_ccm_attribute21 => p_ccm_attribute21
609 ,p_ccm_attribute22 => p_ccm_attribute22
610 ,p_ccm_attribute23 => p_ccm_attribute23
611 ,p_ccm_attribute24 => p_ccm_attribute24
612 ,p_ccm_attribute25 => p_ccm_attribute25
613 ,p_ccm_attribute26 => p_ccm_attribute26
614 ,p_ccm_attribute27 => p_ccm_attribute27
615 ,p_ccm_attribute28 => p_ccm_attribute28
616 ,p_ccm_attribute29 => p_ccm_attribute29
617 ,p_ccm_attribute30 => p_ccm_attribute30
618 ,p_object_version_number => l_object_version_number
619 ,p_effective_date => trunc(p_effective_date)
620 ,p_datetrack_mode => p_datetrack_mode);
621 --
622 begin
623 --
624 -- Start of API User Hook for the after hook of update_Cvg_Amt_Calc
625 --
626 ben_Cvg_Amt_Calc_bk2.update_Cvg_Amt_Calc_a
627 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
628 ,p_effective_start_date => l_effective_start_date
629 ,p_effective_end_date => l_effective_end_date
630 ,p_name => p_name
631 ,p_incrmt_val => p_incrmt_val
632 ,p_mx_val => p_mx_val
633 ,p_mn_val => p_mn_val
634 ,p_no_mx_val_dfnd_flag => p_no_mx_val_dfnd_flag
635 ,p_no_mn_val_dfnd_flag => p_no_mn_val_dfnd_flag
636 ,p_rndg_cd => p_rndg_cd
637 ,p_rndg_rl => p_rndg_rl
638 ,p_lwr_lmt_val => p_lwr_lmt_val
639 ,p_lwr_lmt_calc_rl => p_lwr_lmt_calc_rl
640 ,p_upr_lmt_val => p_upr_lmt_val
641 ,p_upr_lmt_calc_rl => p_upr_lmt_calc_rl
642 ,p_val => p_val
643 ,p_val_ovrid_alwd_flag => p_val_ovrid_alwd_flag
644 ,p_val_calc_rl => p_val_calc_rl
645 ,p_uom => p_uom
646 ,p_nnmntry_uom => p_nnmntry_uom
647 ,p_bndry_perd_cd => p_bndry_perd_cd
648 ,p_bnft_typ_cd => p_bnft_typ_cd
649 ,p_cvg_mlt_cd => p_cvg_mlt_cd
650 ,p_rt_typ_cd => p_rt_typ_cd
651 ,p_dflt_val => p_dflt_val
652 ,p_entr_val_at_enrt_flag => p_entr_val_at_enrt_flag
653 ,p_dflt_flag => p_dflt_flag
654 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
655 ,p_oipl_id => p_oipl_id
656 ,p_pl_id => p_pl_id
657 ,p_plip_id => p_plip_id
658 ,p_business_group_id => p_business_group_id
659 ,p_ccm_attribute_category => p_ccm_attribute_category
660 ,p_ccm_attribute1 => p_ccm_attribute1
661 ,p_ccm_attribute2 => p_ccm_attribute2
662 ,p_ccm_attribute3 => p_ccm_attribute3
663 ,p_ccm_attribute4 => p_ccm_attribute4
664 ,p_ccm_attribute5 => p_ccm_attribute5
665 ,p_ccm_attribute6 => p_ccm_attribute6
666 ,p_ccm_attribute7 => p_ccm_attribute7
667 ,p_ccm_attribute8 => p_ccm_attribute8
668 ,p_ccm_attribute9 => p_ccm_attribute9
669 ,p_ccm_attribute10 => p_ccm_attribute10
670 ,p_ccm_attribute11 => p_ccm_attribute11
671 ,p_ccm_attribute12 => p_ccm_attribute12
672 ,p_ccm_attribute13 => p_ccm_attribute13
673 ,p_ccm_attribute14 => p_ccm_attribute14
674 ,p_ccm_attribute15 => p_ccm_attribute15
675 ,p_ccm_attribute16 => p_ccm_attribute16
676 ,p_ccm_attribute17 => p_ccm_attribute17
677 ,p_ccm_attribute18 => p_ccm_attribute18
678 ,p_ccm_attribute19 => p_ccm_attribute19
679 ,p_ccm_attribute20 => p_ccm_attribute20
680 ,p_ccm_attribute21 => p_ccm_attribute21
681 ,p_ccm_attribute22 => p_ccm_attribute22
682 ,p_ccm_attribute23 => p_ccm_attribute23
683 ,p_ccm_attribute24 => p_ccm_attribute24
684 ,p_ccm_attribute25 => p_ccm_attribute25
685 ,p_ccm_attribute26 => p_ccm_attribute26
686 ,p_ccm_attribute27 => p_ccm_attribute27
687 ,p_ccm_attribute28 => p_ccm_attribute28
688 ,p_ccm_attribute29 => p_ccm_attribute29
689 ,p_ccm_attribute30 => p_ccm_attribute30
690 ,p_object_version_number => l_object_version_number
691 ,p_effective_date => trunc(p_effective_date)
692 ,p_datetrack_mode => p_datetrack_mode);
693 --
694 exception
695 --
696 when hr_api.cannot_find_prog_unit then
697 --
698 hr_api.cannot_find_prog_unit_error
699 (p_module_name => 'UPDATE_Cvg_Amt_Calc'
700 ,p_hook_type => 'AP');
701 --
702 -- End of API User Hook for the after hook of update_Cvg_Amt_Calc
703 --
704 end;
705 --
706 hr_utility.set_location(l_proc, 60);
707 --
708 -- When in validation only mode raise the Validate_Enabled exception
709 --
710 if p_validate then
711 raise hr_api.validate_enabled;
712 end if;
713 --
714 -- Set all output arguments
715 --
716 p_object_version_number := l_object_version_number;
717 p_effective_start_date := l_effective_start_date;
718 p_effective_end_date := l_effective_end_date;
719 --
720 hr_utility.set_location(' Leaving:'||l_proc, 70);
721 --
722 exception
723 --
724 when hr_api.validate_enabled then
725 --
726 -- As the Validate_Enabled exception has been raised
727 -- we must rollback to the savepoint
728 --
729 ROLLBACK TO update_Cvg_Amt_Calc;
730 --
731 -- Only set output warning arguments
732 -- (Any key or derived arguments must be set to null
733 -- when validation only mode is being used.)
734 --
735 hr_utility.set_location(' Leaving:'||l_proc, 80);
736 --
737 when others then
738 --
739 -- A validation or unexpected error has occured
740 --
741 ROLLBACK TO update_Cvg_Amt_Calc;
742 -- NOCOPY Changes
743 p_effective_start_date := null;
744 p_effective_end_date := null;
745 p_object_version_number := l_object_version_number ;
746 hr_utility.set_location(' Leaving:'||l_proc, 90);
747 raise;
748 --
749 end update_Cvg_Amt_Calc;
750 -- ----------------------------------------------------------------------------
751 -- |-----------------------------< delete_Cvg_Amt_Calc >----------------------|
752 -- ----------------------------------------------------------------------------
753 --
754 procedure delete_Cvg_Amt_Calc
755 (p_validate in boolean default false
756 ,p_cvg_amt_calc_mthd_id in number
757 ,p_effective_start_date out nocopy date
758 ,p_effective_end_date out nocopy date
759 ,p_object_version_number in out nocopy number
760 ,p_effective_date in date
761 ,p_datetrack_mode in varchar2) is
762 --
763 -- Declare cursors and local variables
764 --
765 l_proc varchar2(72) := g_package||'update_Cvg_Amt_Calc';
766 l_object_version_number ben_cvg_amt_calc_mthd_f.object_version_number%TYPE;
767 l_effective_start_date ben_cvg_amt_calc_mthd_f.effective_start_date%TYPE;
768 l_effective_end_date ben_cvg_amt_calc_mthd_f.effective_end_date%TYPE;
769 --
770 begin
771 --
772 hr_utility.set_location('Entering:'|| l_proc, 10);
773 --
774 -- Issue a savepoint if operating in validation only mode
775 --
776 savepoint delete_Cvg_Amt_Calc;
777 --
778 hr_utility.set_location(l_proc, 20);
779 --
780 -- Process Logic
781 --
782 l_object_version_number := p_object_version_number;
783 --
784 --
785 begin
786 --
787 -- Start of API User Hook for the before hook of delete_Cvg_Amt_Calc
788 --
789 ben_Cvg_Amt_Calc_bk3.delete_Cvg_Amt_Calc_b
790 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
791 ,p_object_version_number => p_object_version_number
792 ,p_effective_date => trunc(p_effective_date)
793 ,p_datetrack_mode => p_datetrack_mode);
794 --
795 exception
796 --
797 when hr_api.cannot_find_prog_unit then
798 --
799 hr_api.cannot_find_prog_unit_error
800 (p_module_name => 'DELETE_Cvg_Amt_Calc'
801 ,p_hook_type => 'BP');
802 --
803 -- End of API User Hook for the before hook of delete_Cvg_Amt_Calc
804 --
805 end;
806 --
807 ben_ccm_del.del
808 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
809 ,p_effective_start_date => l_effective_start_date
810 ,p_effective_end_date => l_effective_end_date
811 ,p_object_version_number => l_object_version_number
812 ,p_effective_date => p_effective_date
813 ,p_datetrack_mode => p_datetrack_mode);
814 --
815 begin
816 --
817 -- Start of API User Hook for the after hook of delete_Cvg_Amt_Calc
818 --
819 ben_Cvg_Amt_Calc_bk3.delete_Cvg_Amt_Calc_a
820 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
821 ,p_effective_start_date => l_effective_start_date
822 ,p_effective_end_date => l_effective_end_date
823 ,p_object_version_number => l_object_version_number
824 ,p_effective_date => trunc(p_effective_date)
825 ,p_datetrack_mode => p_datetrack_mode);
826 --
827 exception
828 --
829 when hr_api.cannot_find_prog_unit then
830 --
831 hr_api.cannot_find_prog_unit_error
832 (p_module_name => 'DELETE_Cvg_Amt_Calc'
833 ,p_hook_type => 'AP');
834 --
835 -- End of API User Hook for the after hook of delete_Cvg_Amt_Calc
836 --
837 end;
838 --
839 hr_utility.set_location(l_proc, 60);
840 --
841 -- When in validation only mode raise the Validate_Enabled exception
842 --
843 if p_validate then
844 raise hr_api.validate_enabled;
845 end if;
846 --
847 hr_utility.set_location(' Leaving:'||l_proc, 70);
848 --
849 exception
850 --
851 when hr_api.validate_enabled then
852 --
853 -- As the Validate_Enabled exception has been raised
854 -- we must rollback to the savepoint
855 --
856 ROLLBACK TO delete_Cvg_Amt_Calc;
857 --
858 -- Only set output warning arguments
859 -- (Any key or derived arguments must be set to null
860 -- when validation only mode is being used.)
861 --
862 p_effective_start_date := null;
863 p_effective_end_date := null;
864 --
865 when others then
866 --
867 -- A validation or unexpected error has occured
868 --
869 ROLLBACK TO delete_Cvg_Amt_Calc;
870 -- NOCOPY Changes
871 p_effective_start_date := null;
872 p_effective_end_date := null;
873 p_object_version_number := l_object_version_number ;
874 hr_utility.set_location(' Leaving:'||l_proc, 90);
875 raise;
876 --
877 end delete_Cvg_Amt_Calc;
878 --
879 -- ----------------------------------------------------------------------------
880 -- |-------------------------------< lck >------------------------------------|
881 -- ----------------------------------------------------------------------------
882 --
883 procedure lck
884 (p_cvg_amt_calc_mthd_id in number
885 ,p_object_version_number in number
886 ,p_effective_date in date
887 ,p_datetrack_mode in varchar2
888 ,p_validation_start_date out nocopy date
889 ,p_validation_end_date out nocopy date) is
890 --
891 --
892 -- Declare cursors and local variables
893 --
894 l_proc varchar2(72) := g_package||'lck';
895 l_validation_start_date date;
896 l_validation_end_date date;
897 --
898 begin
899 --
900 hr_utility.set_location('Entering:'|| l_proc, 10);
901 --
902 ben_ccm_shd.lck
903 (p_cvg_amt_calc_mthd_id => p_cvg_amt_calc_mthd_id
904 ,p_validation_start_date => l_validation_start_date
905 ,p_validation_end_date => l_validation_end_date
906 ,p_object_version_number => p_object_version_number
907 ,p_effective_date => p_effective_date
908 ,p_datetrack_mode => p_datetrack_mode);
909 --
910 hr_utility.set_location(' Leaving:'||l_proc, 70);
911 --
912 end lck;
913 --
914 end ben_Cvg_Amt_Calc_api;