[Home] [Help]
PACKAGE BODY: APPS.BEN_MATCHING_RATES_API
Source
1 Package Body ben_MATCHING_RATES_api as
2 /* $Header: bemtrapi.pkb 115.4 2002/12/16 17:38:59 glingapp ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_MATCHING_RATES_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_MATCHING_RATES >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_MATCHING_RATES
13 (p_validate in boolean default false
14 ,p_mtchg_rt_id out nocopy number
15 ,p_effective_start_date out nocopy date
16 ,p_effective_end_date out nocopy date
17 ,p_ordr_num in number default null
18 ,p_from_pct_val in number default null
19 ,p_to_pct_val in number default null
20 ,p_pct_val in number default null
21 ,p_mx_amt_of_py_num in number default null
22 ,p_mx_pct_of_py_num in number default null
23 ,p_mx_mtch_amt in number default null
24 ,p_mn_mtch_amt in number default null
25 ,p_mtchg_rt_calc_rl in number default null
26 ,p_no_mx_mtch_amt_flag in varchar2 default null
27 ,p_no_mx_pct_of_py_num_flag in varchar2 default null
28 ,p_cntnu_mtch_aftr_mx_rl_flag in varchar2 default null
29 ,p_no_mx_amt_of_py_num_flag in varchar2 default null
30 ,p_acty_base_rt_id in number default null
31 ,p_comp_lvl_fctr_id in number default null
32 ,p_business_group_id in number default null
33 ,p_mtr_attribute_category in varchar2 default null
34 ,p_mtr_attribute1 in varchar2 default null
35 ,p_mtr_attribute2 in varchar2 default null
36 ,p_mtr_attribute3 in varchar2 default null
37 ,p_mtr_attribute4 in varchar2 default null
38 ,p_mtr_attribute5 in varchar2 default null
39 ,p_mtr_attribute6 in varchar2 default null
40 ,p_mtr_attribute7 in varchar2 default null
41 ,p_mtr_attribute8 in varchar2 default null
42 ,p_mtr_attribute9 in varchar2 default null
43 ,p_mtr_attribute10 in varchar2 default null
44 ,p_mtr_attribute11 in varchar2 default null
45 ,p_mtr_attribute12 in varchar2 default null
46 ,p_mtr_attribute13 in varchar2 default null
47 ,p_mtr_attribute14 in varchar2 default null
48 ,p_mtr_attribute15 in varchar2 default null
49 ,p_mtr_attribute16 in varchar2 default null
50 ,p_mtr_attribute17 in varchar2 default null
51 ,p_mtr_attribute18 in varchar2 default null
52 ,p_mtr_attribute19 in varchar2 default null
53 ,p_mtr_attribute20 in varchar2 default null
54 ,p_mtr_attribute21 in varchar2 default null
55 ,p_mtr_attribute22 in varchar2 default null
56 ,p_mtr_attribute23 in varchar2 default null
57 ,p_mtr_attribute24 in varchar2 default null
58 ,p_mtr_attribute25 in varchar2 default null
59 ,p_mtr_attribute26 in varchar2 default null
60 ,p_mtr_attribute27 in varchar2 default null
61 ,p_mtr_attribute28 in varchar2 default null
62 ,p_mtr_attribute29 in varchar2 default null
63 ,p_mtr_attribute30 in varchar2 default null
64 ,p_object_version_number out nocopy number
65 ,p_effective_date in date
66 ) is
67 --
68 -- Declare cursors and local variables
69 --
70 l_mtchg_rt_id ben_mtchg_rt_f.mtchg_rt_id%TYPE;
71 l_effective_start_date ben_mtchg_rt_f.effective_start_date%TYPE;
72 l_effective_end_date ben_mtchg_rt_f.effective_end_date%TYPE;
73 l_proc varchar2(72) := g_package||'create_MATCHING_RATES';
74 l_object_version_number ben_mtchg_rt_f.object_version_number%TYPE;
75 --
76 begin
77 --
78 hr_utility.set_location('Entering:'|| l_proc, 10);
79 --
80 -- Issue a savepoint if operating in validation only mode
81 --
82 savepoint create_MATCHING_RATES;
83 --
84 hr_utility.set_location(l_proc, 20);
85 --
86 -- Process Logic
87 --
88 begin
89 --
90 -- Start of API User Hook for the before hook of create_MATCHING_RATES
91 --
92 ben_MATCHING_RATES_bk1.create_MATCHING_RATES_b
93 (
94 p_ordr_num => p_ordr_num
95 ,p_from_pct_val => p_from_pct_val
96 ,p_to_pct_val => p_to_pct_val
97 ,p_pct_val => p_pct_val
98 ,p_mx_amt_of_py_num => p_mx_amt_of_py_num
99 ,p_mx_pct_of_py_num => p_mx_pct_of_py_num
103 ,p_no_mx_mtch_amt_flag => p_no_mx_mtch_amt_flag
100 ,p_mx_mtch_amt => p_mx_mtch_amt
101 ,p_mn_mtch_amt => p_mn_mtch_amt
102 ,p_mtchg_rt_calc_rl => p_mtchg_rt_calc_rl
104 ,p_no_mx_pct_of_py_num_flag => p_no_mx_pct_of_py_num_flag
105 ,p_cntnu_mtch_aftr_mx_rl_flag => p_cntnu_mtch_aftr_mx_rl_flag
106 ,p_no_mx_amt_of_py_num_flag => p_no_mx_amt_of_py_num_flag
107 ,p_acty_base_rt_id => p_acty_base_rt_id
108 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
109 ,p_business_group_id => p_business_group_id
110 ,p_mtr_attribute_category => p_mtr_attribute_category
111 ,p_mtr_attribute1 => p_mtr_attribute1
112 ,p_mtr_attribute2 => p_mtr_attribute2
113 ,p_mtr_attribute3 => p_mtr_attribute3
114 ,p_mtr_attribute4 => p_mtr_attribute4
115 ,p_mtr_attribute5 => p_mtr_attribute5
116 ,p_mtr_attribute6 => p_mtr_attribute6
117 ,p_mtr_attribute7 => p_mtr_attribute7
118 ,p_mtr_attribute8 => p_mtr_attribute8
119 ,p_mtr_attribute9 => p_mtr_attribute9
120 ,p_mtr_attribute10 => p_mtr_attribute10
121 ,p_mtr_attribute11 => p_mtr_attribute11
122 ,p_mtr_attribute12 => p_mtr_attribute12
123 ,p_mtr_attribute13 => p_mtr_attribute13
124 ,p_mtr_attribute14 => p_mtr_attribute14
125 ,p_mtr_attribute15 => p_mtr_attribute15
126 ,p_mtr_attribute16 => p_mtr_attribute16
127 ,p_mtr_attribute17 => p_mtr_attribute17
128 ,p_mtr_attribute18 => p_mtr_attribute18
129 ,p_mtr_attribute19 => p_mtr_attribute19
130 ,p_mtr_attribute20 => p_mtr_attribute20
131 ,p_mtr_attribute21 => p_mtr_attribute21
132 ,p_mtr_attribute22 => p_mtr_attribute22
133 ,p_mtr_attribute23 => p_mtr_attribute23
134 ,p_mtr_attribute24 => p_mtr_attribute24
135 ,p_mtr_attribute25 => p_mtr_attribute25
136 ,p_mtr_attribute26 => p_mtr_attribute26
137 ,p_mtr_attribute27 => p_mtr_attribute27
138 ,p_mtr_attribute28 => p_mtr_attribute28
139 ,p_mtr_attribute29 => p_mtr_attribute29
140 ,p_mtr_attribute30 => p_mtr_attribute30
141 ,p_effective_date => trunc(p_effective_date)
142 );
143 exception
144 when hr_api.cannot_find_prog_unit then
145 hr_api.cannot_find_prog_unit_error
146 (
147 p_module_name => 'CREATE_MATCHING_RATES'
148 ,p_hook_type => 'BP'
149 );
150 --
151 -- End of API User Hook for the before hook of create_MATCHING_RATES
152 --
153 end;
154 --
155 ben_mtr_ins.ins
156 (
157 p_mtchg_rt_id => l_mtchg_rt_id
158 ,p_effective_start_date => l_effective_start_date
159 ,p_effective_end_date => l_effective_end_date
160 ,p_ordr_num => p_ordr_num
161 ,p_from_pct_val => p_from_pct_val
162 ,p_to_pct_val => p_to_pct_val
163 ,p_pct_val => p_pct_val
164 ,p_mx_amt_of_py_num => p_mx_amt_of_py_num
165 ,p_mx_pct_of_py_num => p_mx_pct_of_py_num
166 ,p_mx_mtch_amt => p_mx_mtch_amt
167 ,p_mn_mtch_amt => p_mn_mtch_amt
168 ,p_mtchg_rt_calc_rl => p_mtchg_rt_calc_rl
169 ,p_no_mx_mtch_amt_flag => p_no_mx_mtch_amt_flag
170 ,p_no_mx_pct_of_py_num_flag => p_no_mx_pct_of_py_num_flag
171 ,p_cntnu_mtch_aftr_mx_rl_flag => p_cntnu_mtch_aftr_mx_rl_flag
172 ,p_no_mx_amt_of_py_num_flag => p_no_mx_amt_of_py_num_flag
173 ,p_acty_base_rt_id => p_acty_base_rt_id
174 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
175 ,p_business_group_id => p_business_group_id
176 ,p_mtr_attribute_category => p_mtr_attribute_category
177 ,p_mtr_attribute1 => p_mtr_attribute1
178 ,p_mtr_attribute2 => p_mtr_attribute2
179 ,p_mtr_attribute3 => p_mtr_attribute3
180 ,p_mtr_attribute4 => p_mtr_attribute4
181 ,p_mtr_attribute5 => p_mtr_attribute5
182 ,p_mtr_attribute6 => p_mtr_attribute6
183 ,p_mtr_attribute7 => p_mtr_attribute7
184 ,p_mtr_attribute8 => p_mtr_attribute8
185 ,p_mtr_attribute9 => p_mtr_attribute9
186 ,p_mtr_attribute10 => p_mtr_attribute10
187 ,p_mtr_attribute11 => p_mtr_attribute11
188 ,p_mtr_attribute12 => p_mtr_attribute12
189 ,p_mtr_attribute13 => p_mtr_attribute13
190 ,p_mtr_attribute14 => p_mtr_attribute14
191 ,p_mtr_attribute15 => p_mtr_attribute15
192 ,p_mtr_attribute16 => p_mtr_attribute16
193 ,p_mtr_attribute17 => p_mtr_attribute17
194 ,p_mtr_attribute18 => p_mtr_attribute18
195 ,p_mtr_attribute19 => p_mtr_attribute19
196 ,p_mtr_attribute20 => p_mtr_attribute20
197 ,p_mtr_attribute21 => p_mtr_attribute21
198 ,p_mtr_attribute22 => p_mtr_attribute22
199 ,p_mtr_attribute23 => p_mtr_attribute23
200 ,p_mtr_attribute24 => p_mtr_attribute24
201 ,p_mtr_attribute25 => p_mtr_attribute25
202 ,p_mtr_attribute26 => p_mtr_attribute26
206 ,p_mtr_attribute30 => p_mtr_attribute30
203 ,p_mtr_attribute27 => p_mtr_attribute27
204 ,p_mtr_attribute28 => p_mtr_attribute28
205 ,p_mtr_attribute29 => p_mtr_attribute29
207 ,p_object_version_number => l_object_version_number
208 ,p_effective_date => trunc(p_effective_date)
209 );
210 --
211 begin
212 --
213 -- Start of API User Hook for the after hook of create_MATCHING_RATES
214 --
215 ben_MATCHING_RATES_bk1.create_MATCHING_RATES_a
216 (
217 p_mtchg_rt_id => l_mtchg_rt_id
218 ,p_effective_start_date => l_effective_start_date
219 ,p_effective_end_date => l_effective_end_date
220 ,p_ordr_num => p_ordr_num
221 ,p_from_pct_val => p_from_pct_val
222 ,p_to_pct_val => p_to_pct_val
223 ,p_pct_val => p_pct_val
224 ,p_mx_amt_of_py_num => p_mx_amt_of_py_num
225 ,p_mx_pct_of_py_num => p_mx_pct_of_py_num
226 ,p_mx_mtch_amt => p_mx_mtch_amt
227 ,p_mn_mtch_amt => p_mn_mtch_amt
228 ,p_mtchg_rt_calc_rl => p_mtchg_rt_calc_rl
229 ,p_no_mx_mtch_amt_flag => p_no_mx_mtch_amt_flag
230 ,p_no_mx_pct_of_py_num_flag => p_no_mx_pct_of_py_num_flag
231 ,p_cntnu_mtch_aftr_mx_rl_flag => p_cntnu_mtch_aftr_mx_rl_flag
232 ,p_no_mx_amt_of_py_num_flag => p_no_mx_amt_of_py_num_flag
233 ,p_acty_base_rt_id => p_acty_base_rt_id
234 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
235 ,p_business_group_id => p_business_group_id
236 ,p_mtr_attribute_category => p_mtr_attribute_category
237 ,p_mtr_attribute1 => p_mtr_attribute1
238 ,p_mtr_attribute2 => p_mtr_attribute2
239 ,p_mtr_attribute3 => p_mtr_attribute3
240 ,p_mtr_attribute4 => p_mtr_attribute4
241 ,p_mtr_attribute5 => p_mtr_attribute5
242 ,p_mtr_attribute6 => p_mtr_attribute6
243 ,p_mtr_attribute7 => p_mtr_attribute7
244 ,p_mtr_attribute8 => p_mtr_attribute8
245 ,p_mtr_attribute9 => p_mtr_attribute9
246 ,p_mtr_attribute10 => p_mtr_attribute10
247 ,p_mtr_attribute11 => p_mtr_attribute11
248 ,p_mtr_attribute12 => p_mtr_attribute12
249 ,p_mtr_attribute13 => p_mtr_attribute13
250 ,p_mtr_attribute14 => p_mtr_attribute14
251 ,p_mtr_attribute15 => p_mtr_attribute15
252 ,p_mtr_attribute16 => p_mtr_attribute16
253 ,p_mtr_attribute17 => p_mtr_attribute17
254 ,p_mtr_attribute18 => p_mtr_attribute18
255 ,p_mtr_attribute19 => p_mtr_attribute19
256 ,p_mtr_attribute20 => p_mtr_attribute20
257 ,p_mtr_attribute21 => p_mtr_attribute21
258 ,p_mtr_attribute22 => p_mtr_attribute22
259 ,p_mtr_attribute23 => p_mtr_attribute23
260 ,p_mtr_attribute24 => p_mtr_attribute24
261 ,p_mtr_attribute25 => p_mtr_attribute25
262 ,p_mtr_attribute26 => p_mtr_attribute26
263 ,p_mtr_attribute27 => p_mtr_attribute27
264 ,p_mtr_attribute28 => p_mtr_attribute28
265 ,p_mtr_attribute29 => p_mtr_attribute29
266 ,p_mtr_attribute30 => p_mtr_attribute30
267 ,p_object_version_number => l_object_version_number
268 ,p_effective_date => trunc(p_effective_date)
269 );
270 exception
271 when hr_api.cannot_find_prog_unit then
272 hr_api.cannot_find_prog_unit_error
273 (p_module_name => 'CREATE_MATCHING_RATES'
274 ,p_hook_type => 'AP'
275 );
276 --
277 -- End of API User Hook for the after hook of create_MATCHING_RATES
278 --
279 end;
280 --
281 hr_utility.set_location(l_proc, 60);
282 --
283 -- When in validation only mode raise the Validate_Enabled exception
284 --
285 if p_validate then
286 raise hr_api.validate_enabled;
287 end if;
288 --
289 -- Set all output arguments
290 --
291 p_mtchg_rt_id := l_mtchg_rt_id;
292 p_effective_start_date := l_effective_start_date;
293 p_effective_end_date := l_effective_end_date;
294 p_object_version_number := l_object_version_number;
295 --
296 hr_utility.set_location(' Leaving:'||l_proc, 70);
297 --
298 exception
299 --
300 when hr_api.validate_enabled then
301 --
302 -- As the Validate_Enabled exception has been raised
303 -- we must rollback to the savepoint
304 --
305 ROLLBACK TO create_MATCHING_RATES;
306 --
307 -- Only set output warning arguments
308 -- (Any key or derived arguments must be set to null
309 -- when validation only mode is being used.)
310 --
311 p_mtchg_rt_id := null;
312 p_effective_start_date := null;
313 p_effective_end_date := null;
314 p_object_version_number := null;
315 hr_utility.set_location(' Leaving:'||l_proc, 80);
316 --
317 when others then
318 --
319 -- A validation or unexpected error has occured
320 --
321 ROLLBACK TO create_MATCHING_RATES;
322 p_mtchg_rt_id := null;
323 p_effective_start_date := null;
324 p_effective_end_date := null;
325 p_object_version_number := null;
329 -- ----------------------------------------------------------------------------
326 raise;
327 --
328 end create_MATCHING_RATES;
330 -- |------------------------< update_MATCHING_RATES >--- ------------------|
331 -- ----------------------------------------------------------------------------
332 --
333 procedure update_MATCHING_RATES
334 (p_validate in boolean default false
335 ,p_mtchg_rt_id in number
336 ,p_effective_start_date out nocopy date
337 ,p_effective_end_date out nocopy date
338 ,p_ordr_num in number default hr_api.g_number
339 ,p_from_pct_val in number default hr_api.g_number
340 ,p_to_pct_val in number default hr_api.g_number
341 ,p_pct_val in number default hr_api.g_number
342 ,p_mx_amt_of_py_num in number default hr_api.g_number
343 ,p_mx_pct_of_py_num in number default hr_api.g_number
344 ,p_mx_mtch_amt in number default hr_api.g_number
345 ,p_mn_mtch_amt in number default hr_api.g_number
346 ,p_mtchg_rt_calc_rl in number default hr_api.g_number
347 ,p_no_mx_mtch_amt_flag in varchar2 default hr_api.g_varchar2
348 ,p_no_mx_pct_of_py_num_flag in varchar2 default hr_api.g_varchar2
349 ,p_cntnu_mtch_aftr_mx_rl_flag in varchar2 default hr_api.g_varchar2
350 ,p_no_mx_amt_of_py_num_flag in varchar2 default hr_api.g_varchar2
351 ,p_acty_base_rt_id in number default hr_api.g_number
352 ,p_comp_lvl_fctr_id in number default hr_api.g_number
353 ,p_business_group_id in number default hr_api.g_number
354 ,p_mtr_attribute_category in varchar2 default hr_api.g_varchar2
355 ,p_mtr_attribute1 in varchar2 default hr_api.g_varchar2
356 ,p_mtr_attribute2 in varchar2 default hr_api.g_varchar2
357 ,p_mtr_attribute3 in varchar2 default hr_api.g_varchar2
358 ,p_mtr_attribute4 in varchar2 default hr_api.g_varchar2
359 ,p_mtr_attribute5 in varchar2 default hr_api.g_varchar2
360 ,p_mtr_attribute6 in varchar2 default hr_api.g_varchar2
361 ,p_mtr_attribute7 in varchar2 default hr_api.g_varchar2
362 ,p_mtr_attribute8 in varchar2 default hr_api.g_varchar2
363 ,p_mtr_attribute9 in varchar2 default hr_api.g_varchar2
364 ,p_mtr_attribute10 in varchar2 default hr_api.g_varchar2
365 ,p_mtr_attribute11 in varchar2 default hr_api.g_varchar2
366 ,p_mtr_attribute12 in varchar2 default hr_api.g_varchar2
367 ,p_mtr_attribute13 in varchar2 default hr_api.g_varchar2
368 ,p_mtr_attribute14 in varchar2 default hr_api.g_varchar2
369 ,p_mtr_attribute15 in varchar2 default hr_api.g_varchar2
370 ,p_mtr_attribute16 in varchar2 default hr_api.g_varchar2
371 ,p_mtr_attribute17 in varchar2 default hr_api.g_varchar2
372 ,p_mtr_attribute18 in varchar2 default hr_api.g_varchar2
373 ,p_mtr_attribute19 in varchar2 default hr_api.g_varchar2
374 ,p_mtr_attribute20 in varchar2 default hr_api.g_varchar2
375 ,p_mtr_attribute21 in varchar2 default hr_api.g_varchar2
376 ,p_mtr_attribute22 in varchar2 default hr_api.g_varchar2
377 ,p_mtr_attribute23 in varchar2 default hr_api.g_varchar2
378 ,p_mtr_attribute24 in varchar2 default hr_api.g_varchar2
379 ,p_mtr_attribute25 in varchar2 default hr_api.g_varchar2
380 ,p_mtr_attribute26 in varchar2 default hr_api.g_varchar2
381 ,p_mtr_attribute27 in varchar2 default hr_api.g_varchar2
382 ,p_mtr_attribute28 in varchar2 default hr_api.g_varchar2
383 ,p_mtr_attribute29 in varchar2 default hr_api.g_varchar2
384 ,p_mtr_attribute30 in varchar2 default hr_api.g_varchar2
385 ,p_object_version_number in out nocopy number
386 ,p_effective_date in date
387 ,p_datetrack_mode in varchar2
388 ) is
389 --
390 -- Declare cursors and local variables
391 --
392 l_proc varchar2(72) := g_package||'update_MATCHING_RATES';
393 l_object_version_number ben_mtchg_rt_f.object_version_number%TYPE;
394 l_effective_start_date ben_mtchg_rt_f.effective_start_date%TYPE;
395 l_effective_end_date ben_mtchg_rt_f.effective_end_date%TYPE;
396 --
397 begin
398 --
399 hr_utility.set_location('Entering:'|| l_proc, 10);
400 --
401 -- Issue a savepoint if operating in validation only mode
402 --
403 savepoint update_MATCHING_RATES;
404 --
405 hr_utility.set_location(l_proc, 20);
406 --
407 -- Process Logic
408 --
409 l_object_version_number := p_object_version_number;
410 --
411 begin
412 --
413 -- Start of API User Hook for the before hook of update_MATCHING_RATES
414 --
415 ben_MATCHING_RATES_bk2.update_MATCHING_RATES_b
416 (
417 p_mtchg_rt_id => p_mtchg_rt_id
418 ,p_ordr_num => p_ordr_num
419 ,p_from_pct_val => p_from_pct_val
420 ,p_to_pct_val => p_to_pct_val
421 ,p_pct_val => p_pct_val
422 ,p_mx_amt_of_py_num => p_mx_amt_of_py_num
423 ,p_mx_pct_of_py_num => p_mx_pct_of_py_num
424 ,p_mx_mtch_amt => p_mx_mtch_amt
425 ,p_mn_mtch_amt => p_mn_mtch_amt
426 ,p_mtchg_rt_calc_rl => p_mtchg_rt_calc_rl
430 ,p_no_mx_amt_of_py_num_flag => p_no_mx_amt_of_py_num_flag
427 ,p_no_mx_mtch_amt_flag => p_no_mx_mtch_amt_flag
428 ,p_no_mx_pct_of_py_num_flag => p_no_mx_pct_of_py_num_flag
429 ,p_cntnu_mtch_aftr_mx_rl_flag => p_cntnu_mtch_aftr_mx_rl_flag
431 ,p_acty_base_rt_id => p_acty_base_rt_id
432 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
433 ,p_business_group_id => p_business_group_id
434 ,p_mtr_attribute_category => p_mtr_attribute_category
435 ,p_mtr_attribute1 => p_mtr_attribute1
436 ,p_mtr_attribute2 => p_mtr_attribute2
437 ,p_mtr_attribute3 => p_mtr_attribute3
438 ,p_mtr_attribute4 => p_mtr_attribute4
439 ,p_mtr_attribute5 => p_mtr_attribute5
440 ,p_mtr_attribute6 => p_mtr_attribute6
441 ,p_mtr_attribute7 => p_mtr_attribute7
442 ,p_mtr_attribute8 => p_mtr_attribute8
443 ,p_mtr_attribute9 => p_mtr_attribute9
444 ,p_mtr_attribute10 => p_mtr_attribute10
445 ,p_mtr_attribute11 => p_mtr_attribute11
446 ,p_mtr_attribute12 => p_mtr_attribute12
447 ,p_mtr_attribute13 => p_mtr_attribute13
448 ,p_mtr_attribute14 => p_mtr_attribute14
449 ,p_mtr_attribute15 => p_mtr_attribute15
450 ,p_mtr_attribute16 => p_mtr_attribute16
451 ,p_mtr_attribute17 => p_mtr_attribute17
452 ,p_mtr_attribute18 => p_mtr_attribute18
453 ,p_mtr_attribute19 => p_mtr_attribute19
454 ,p_mtr_attribute20 => p_mtr_attribute20
455 ,p_mtr_attribute21 => p_mtr_attribute21
456 ,p_mtr_attribute22 => p_mtr_attribute22
457 ,p_mtr_attribute23 => p_mtr_attribute23
458 ,p_mtr_attribute24 => p_mtr_attribute24
459 ,p_mtr_attribute25 => p_mtr_attribute25
460 ,p_mtr_attribute26 => p_mtr_attribute26
461 ,p_mtr_attribute27 => p_mtr_attribute27
462 ,p_mtr_attribute28 => p_mtr_attribute28
463 ,p_mtr_attribute29 => p_mtr_attribute29
464 ,p_mtr_attribute30 => p_mtr_attribute30
465 ,p_object_version_number => p_object_version_number
466 ,p_effective_date => trunc(p_effective_date)
467 ,p_datetrack_mode => p_datetrack_mode
468 );
469 exception
470 when hr_api.cannot_find_prog_unit then
471 hr_api.cannot_find_prog_unit_error
472 (p_module_name => 'UPDATE_MATCHING_RATES'
473 ,p_hook_type => 'BP'
474 );
475 --
476 -- End of API User Hook for the before hook of update_MATCHING_RATES
477 --
478 end;
479 --
480 ben_mtr_upd.upd
481 (
482 p_mtchg_rt_id => p_mtchg_rt_id
483 ,p_effective_start_date => l_effective_start_date
484 ,p_effective_end_date => l_effective_end_date
485 ,p_ordr_num => p_ordr_num
486 ,p_from_pct_val => p_from_pct_val
487 ,p_to_pct_val => p_to_pct_val
488 ,p_pct_val => p_pct_val
489 ,p_mx_amt_of_py_num => p_mx_amt_of_py_num
490 ,p_mx_pct_of_py_num => p_mx_pct_of_py_num
491 ,p_mx_mtch_amt => p_mx_mtch_amt
492 ,p_mn_mtch_amt => p_mn_mtch_amt
493 ,p_mtchg_rt_calc_rl => p_mtchg_rt_calc_rl
494 ,p_no_mx_mtch_amt_flag => p_no_mx_mtch_amt_flag
495 ,p_no_mx_pct_of_py_num_flag => p_no_mx_pct_of_py_num_flag
496 ,p_cntnu_mtch_aftr_mx_rl_flag => p_cntnu_mtch_aftr_mx_rl_flag
497 ,p_no_mx_amt_of_py_num_flag => p_no_mx_amt_of_py_num_flag
498 ,p_acty_base_rt_id => p_acty_base_rt_id
499 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
500 ,p_business_group_id => p_business_group_id
501 ,p_mtr_attribute_category => p_mtr_attribute_category
502 ,p_mtr_attribute1 => p_mtr_attribute1
503 ,p_mtr_attribute2 => p_mtr_attribute2
504 ,p_mtr_attribute3 => p_mtr_attribute3
505 ,p_mtr_attribute4 => p_mtr_attribute4
506 ,p_mtr_attribute5 => p_mtr_attribute5
507 ,p_mtr_attribute6 => p_mtr_attribute6
508 ,p_mtr_attribute7 => p_mtr_attribute7
509 ,p_mtr_attribute8 => p_mtr_attribute8
510 ,p_mtr_attribute9 => p_mtr_attribute9
511 ,p_mtr_attribute10 => p_mtr_attribute10
512 ,p_mtr_attribute11 => p_mtr_attribute11
513 ,p_mtr_attribute12 => p_mtr_attribute12
514 ,p_mtr_attribute13 => p_mtr_attribute13
515 ,p_mtr_attribute14 => p_mtr_attribute14
516 ,p_mtr_attribute15 => p_mtr_attribute15
517 ,p_mtr_attribute16 => p_mtr_attribute16
518 ,p_mtr_attribute17 => p_mtr_attribute17
519 ,p_mtr_attribute18 => p_mtr_attribute18
520 ,p_mtr_attribute19 => p_mtr_attribute19
521 ,p_mtr_attribute20 => p_mtr_attribute20
522 ,p_mtr_attribute21 => p_mtr_attribute21
523 ,p_mtr_attribute22 => p_mtr_attribute22
524 ,p_mtr_attribute23 => p_mtr_attribute23
525 ,p_mtr_attribute24 => p_mtr_attribute24
526 ,p_mtr_attribute25 => p_mtr_attribute25
527 ,p_mtr_attribute26 => p_mtr_attribute26
531 ,p_mtr_attribute30 => p_mtr_attribute30
528 ,p_mtr_attribute27 => p_mtr_attribute27
529 ,p_mtr_attribute28 => p_mtr_attribute28
530 ,p_mtr_attribute29 => p_mtr_attribute29
532 ,p_object_version_number => l_object_version_number
533 ,p_effective_date => trunc(p_effective_date)
534 ,p_datetrack_mode => p_datetrack_mode
535 );
536 --
537 begin
538 --
539 -- Start of API User Hook for the after hook of update_MATCHING_RATES
540 --
541 ben_MATCHING_RATES_bk2.update_MATCHING_RATES_a
542 (
543 p_mtchg_rt_id => p_mtchg_rt_id
544 ,p_effective_start_date => l_effective_start_date
545 ,p_effective_end_date => l_effective_end_date
546 ,p_ordr_num => p_ordr_num
547 ,p_from_pct_val => p_from_pct_val
548 ,p_to_pct_val => p_to_pct_val
549 ,p_pct_val => p_pct_val
550 ,p_mx_amt_of_py_num => p_mx_amt_of_py_num
551 ,p_mx_pct_of_py_num => p_mx_pct_of_py_num
552 ,p_mx_mtch_amt => p_mx_mtch_amt
553 ,p_mn_mtch_amt => p_mn_mtch_amt
554 ,p_mtchg_rt_calc_rl => p_mtchg_rt_calc_rl
555 ,p_no_mx_mtch_amt_flag => p_no_mx_mtch_amt_flag
556 ,p_no_mx_pct_of_py_num_flag => p_no_mx_pct_of_py_num_flag
557 ,p_cntnu_mtch_aftr_mx_rl_flag => p_cntnu_mtch_aftr_mx_rl_flag
558 ,p_no_mx_amt_of_py_num_flag => p_no_mx_amt_of_py_num_flag
559 ,p_acty_base_rt_id => p_acty_base_rt_id
560 ,p_comp_lvl_fctr_id => p_comp_lvl_fctr_id
561 ,p_business_group_id => p_business_group_id
562 ,p_mtr_attribute_category => p_mtr_attribute_category
563 ,p_mtr_attribute1 => p_mtr_attribute1
564 ,p_mtr_attribute2 => p_mtr_attribute2
565 ,p_mtr_attribute3 => p_mtr_attribute3
566 ,p_mtr_attribute4 => p_mtr_attribute4
567 ,p_mtr_attribute5 => p_mtr_attribute5
568 ,p_mtr_attribute6 => p_mtr_attribute6
569 ,p_mtr_attribute7 => p_mtr_attribute7
570 ,p_mtr_attribute8 => p_mtr_attribute8
571 ,p_mtr_attribute9 => p_mtr_attribute9
572 ,p_mtr_attribute10 => p_mtr_attribute10
573 ,p_mtr_attribute11 => p_mtr_attribute11
574 ,p_mtr_attribute12 => p_mtr_attribute12
575 ,p_mtr_attribute13 => p_mtr_attribute13
576 ,p_mtr_attribute14 => p_mtr_attribute14
577 ,p_mtr_attribute15 => p_mtr_attribute15
578 ,p_mtr_attribute16 => p_mtr_attribute16
579 ,p_mtr_attribute17 => p_mtr_attribute17
580 ,p_mtr_attribute18 => p_mtr_attribute18
581 ,p_mtr_attribute19 => p_mtr_attribute19
582 ,p_mtr_attribute20 => p_mtr_attribute20
583 ,p_mtr_attribute21 => p_mtr_attribute21
584 ,p_mtr_attribute22 => p_mtr_attribute22
585 ,p_mtr_attribute23 => p_mtr_attribute23
586 ,p_mtr_attribute24 => p_mtr_attribute24
587 ,p_mtr_attribute25 => p_mtr_attribute25
588 ,p_mtr_attribute26 => p_mtr_attribute26
589 ,p_mtr_attribute27 => p_mtr_attribute27
590 ,p_mtr_attribute28 => p_mtr_attribute28
591 ,p_mtr_attribute29 => p_mtr_attribute29
592 ,p_mtr_attribute30 => p_mtr_attribute30
593 ,p_object_version_number => l_object_version_number
594 ,p_effective_date => trunc(p_effective_date)
595 ,p_datetrack_mode => p_datetrack_mode
596 );
597 exception
598 when hr_api.cannot_find_prog_unit then
599 hr_api.cannot_find_prog_unit_error
600 (p_module_name => 'UPDATE_MATCHING_RATES'
601 ,p_hook_type => 'AP'
602 );
603 --
604 -- End of API User Hook for the after hook of update_MATCHING_RATES
605 --
606 end;
607 --
608 hr_utility.set_location(l_proc, 60);
609 --
610 -- When in validation only mode raise the Validate_Enabled exception
611 --
612 if p_validate then
613 raise hr_api.validate_enabled;
614 end if;
615 --
616 -- Set all output arguments
617 --
618 p_object_version_number := l_object_version_number;
619 p_effective_start_date := l_effective_start_date;
620 p_effective_end_date := l_effective_end_date;
621 --
622 hr_utility.set_location(' Leaving:'||l_proc, 70);
623 --
624 exception
625 --
626 when hr_api.validate_enabled then
627 --
628 -- As the Validate_Enabled exception has been raised
629 -- we must rollback to the savepoint
630 --
631 ROLLBACK TO update_MATCHING_RATES;
632 --
633 -- Only set output warning arguments
634 -- (Any key or derived arguments must be set to null
635 -- when validation only mode is being used.)
636 --
637 p_effective_start_date := null;
638 p_effective_end_date := null;
639 hr_utility.set_location(' Leaving:'||l_proc, 80);
640 --
641 when others then
642 --
643 -- A validation or unexpected error has occured
644 --
645 ROLLBACK TO update_MATCHING_RATES;
646 p_effective_start_date := null;
650 end update_MATCHING_RATES;
647 p_effective_end_date := null;
648 raise;
649 --
651 -- ----------------------------------------------------------------------------
652 -- |------------------------< delete_MATCHING_RATES >----------------------|
653 -- ----------------------------------------------------------------------------
654 --
655 procedure delete_MATCHING_RATES
656 (p_validate in boolean default false
657 ,p_mtchg_rt_id in number
658 ,p_effective_start_date out nocopy date
659 ,p_effective_end_date out nocopy date
660 ,p_object_version_number in out nocopy number
661 ,p_effective_date in date
662 ,p_datetrack_mode in varchar2
663 ) is
664 --
665 -- Declare cursors and local variables
666 --
667 l_proc varchar2(72) := g_package||'update_MATCHING_RATES';
668 l_object_version_number ben_mtchg_rt_f.object_version_number%TYPE;
669 l_effective_start_date ben_mtchg_rt_f.effective_start_date%TYPE;
670 l_effective_end_date ben_mtchg_rt_f.effective_end_date%TYPE;
671 --
672 begin
673 --
674 hr_utility.set_location('Entering:'|| l_proc, 10);
675 --
676 -- Issue a savepoint if operating in validation only mode
677 --
678 savepoint delete_MATCHING_RATES;
679 --
680 hr_utility.set_location(l_proc, 20);
681 --
682 -- Process Logic
683 --
684 l_object_version_number := p_object_version_number;
685 --
686 --
687 begin
688 --
689 -- Start of API User Hook for the before hook of delete_MATCHING_RATES
690 --
691 ben_MATCHING_RATES_bk3.delete_MATCHING_RATES_b
692 (
693 p_mtchg_rt_id => p_mtchg_rt_id
694 ,p_object_version_number => p_object_version_number
695 ,p_effective_date => trunc(p_effective_date)
696 ,p_datetrack_mode => p_datetrack_mode
697 );
698 exception
699 when hr_api.cannot_find_prog_unit then
700 hr_api.cannot_find_prog_unit_error
701 (p_module_name => 'DELETE_MATCHING_RATES'
702 ,p_hook_type => 'BP'
703 );
704 --
705 -- End of API User Hook for the before hook of delete_MATCHING_RATES
706 --
707 end;
708 --
709 ben_mtr_del.del
710 (
711 p_mtchg_rt_id => p_mtchg_rt_id
712 ,p_effective_start_date => l_effective_start_date
713 ,p_effective_end_date => l_effective_end_date
714 ,p_object_version_number => l_object_version_number
715 ,p_effective_date => p_effective_date
716 ,p_datetrack_mode => p_datetrack_mode
717 );
718 --
719 begin
720 --
721 -- Start of API User Hook for the after hook of delete_MATCHING_RATES
722 --
723 ben_MATCHING_RATES_bk3.delete_MATCHING_RATES_a
724 (
725 p_mtchg_rt_id => p_mtchg_rt_id
726 ,p_effective_start_date => l_effective_start_date
727 ,p_effective_end_date => l_effective_end_date
728 ,p_object_version_number => l_object_version_number
729 ,p_effective_date => trunc(p_effective_date)
730 ,p_datetrack_mode => p_datetrack_mode
731 );
732 exception
733 when hr_api.cannot_find_prog_unit then
734 hr_api.cannot_find_prog_unit_error
735 (p_module_name => 'DELETE_MATCHING_RATES'
736 ,p_hook_type => 'AP'
737 );
738 --
739 -- End of API User Hook for the after hook of delete_MATCHING_RATES
740 --
741 end;
742 --
743 hr_utility.set_location(l_proc, 60);
744 --
745 -- When in validation only mode raise the Validate_Enabled exception
746 --
747 if p_validate then
748 raise hr_api.validate_enabled;
749 end if;
750 --
751 hr_utility.set_location(' Leaving:'||l_proc, 70);
752 --
753 exception
754 --
755 when hr_api.validate_enabled then
756 --
757 -- As the Validate_Enabled exception has been raised
758 -- we must rollback to the savepoint
759 --
760 ROLLBACK TO delete_MATCHING_RATES;
761 --
762 -- Only set output warning arguments
763 -- (Any key or derived arguments must be set to null
764 -- when validation only mode is being used.)
765 --
766 p_effective_start_date := null;
767 p_effective_end_date := null;
768 --
769 when others then
770 --
771 -- A validation or unexpected error has occured
772 --
773 ROLLBACK TO delete_MATCHING_RATES;
774 p_effective_start_date := null;
775 p_effective_end_date := null;
776 raise;
777 --
778 end delete_MATCHING_RATES;
779 --
780 -- ----------------------------------------------------------------------------
781 -- |-------------------------------< lck >------------------------------------|
782 -- ----------------------------------------------------------------------------
783 --
784 procedure lck
785 (
786 p_mtchg_rt_id in number
787 ,p_object_version_number in number
788 ,p_effective_date in date
789 ,p_datetrack_mode in varchar2
790 ,p_validation_start_date out nocopy date
791 ,p_validation_end_date out nocopy date
792 ) is
793 --
794 --
795 -- Declare cursors and local variables
796 --
797 l_proc varchar2(72) := g_package||'lck';
798 l_validation_start_date date;
799 l_validation_end_date date;
800 --
801 begin
802 --
803 hr_utility.set_location('Entering:'|| l_proc, 10);
804 --
805 ben_mtr_shd.lck
806 (
807 p_mtchg_rt_id => p_mtchg_rt_id
808 ,p_validation_start_date => l_validation_start_date
809 ,p_validation_end_date => l_validation_end_date
810 ,p_object_version_number => p_object_version_number
811 ,p_effective_date => p_effective_date
812 ,p_datetrack_mode => p_datetrack_mode
813 );
814 --
815 hr_utility.set_location(' Leaving:'||l_proc, 70);
816 --
817 end lck;
818 --
819 end ben_MATCHING_RATES_api;