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