[Home] [Help]
PACKAGE BODY: APPS.PQH_FR_GLOBAL_PAYSCALE_API
Source
1 Package Body pqh_fr_global_payscale_api as
2 /* $Header: pqginapi.pkb 115.3 2004/02/23 03:22:46 svorugan noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' pqh_fr_global_payscale_api.';
7 g_debug boolean := hr_utility.debug_enabled;
8 --
9 -- ----------------------------------------------------------------------------
10 -- |--------------------------<create_indemnity_rate>-------------------------|
11 -- ----------------------------------------------------------------------------
12 --
13 procedure create_indemnity_rate
14 ( p_validate in boolean default false
15 ,p_effective_date in date
16 ,p_basic_salary_rate in number default null
17 ,p_housing_indemnity_rate in number default null
18 ,p_currency_code in varchar2
19 ,p_global_index_id out nocopy number
20 ,p_object_version_number out nocopy number
21 ,p_effective_start_date out nocopy date
22 ,p_effective_end_date out nocopy date
23 )
24 is
25 --
26 -- Declare cursors and local variables
27 --
28 l_in_out_parameter number;
29 l_effective_date date;
30 l_proc varchar2(72) := g_package||'create_indemnity_rate';
31 l_object_version_number number(9);
32 l_global_index_id pqh_fr_global_indices_f.global_index_id%type;
33 l_effective_start_date date;
34 l_effective_end_date date;
35
36 begin
37
38 g_debug := hr_utility.debug_enabled;
39
40 if g_debug then
41 --
42 hr_utility.set_location('Entering:'|| l_proc, 10);
43 --
44 End if;
45
46 --
47 -- Issue a savepoint
48 --
49 savepoint create_indemnity_rate;
50 --
51 -- Remember IN OUT parameter IN values
52 --
53 --
54 -- Truncate the time portion from all IN date parameters
55 --
56 l_effective_date := trunc(p_effective_date);
57
58 --
59 -- Call Before Process User Hook
60 --
61 begin
62 pqh_fr_global_payscale_bk1.create_indemnity_rate_b
63 (
64 p_effective_date => l_effective_date
65 ,p_basic_salary_rate => p_basic_salary_rate
66 ,p_housing_indemnity_rate => p_housing_indemnity_rate
67 ,p_currency_code => p_currency_code
68 );
69 exception
70 when hr_api.cannot_find_prog_unit then
71 hr_api.cannot_find_prog_unit_error
72 (p_module_name => 'CREATE_INDEMNITY_RATE'
73 ,p_hook_type => 'BP'
74 );
75 end;
76 --
77 -- Process Logic
78 --
79 pqh_gin_ins.ins
80 (p_effective_date => l_effective_date
81 ,p_type_of_record => 'INM'
82 ,p_basic_salary_rate => p_basic_salary_rate
83 ,p_housing_indemnity_rate => p_housing_indemnity_rate
84 ,p_currency_code => p_currency_code
85 ,p_global_index_id => l_global_index_id
86 ,p_object_version_number => l_object_version_number
87 ,p_effective_start_date => l_effective_start_date
88 ,p_effective_end_date => l_effective_end_date
89 );
90
91 --
92 -- Call After Process User Hook
93 --
94 begin
95
96 pqh_fr_global_payscale_bk1.create_indemnity_rate_a
97 ( p_effective_date => l_effective_date
98 ,p_basic_salary_rate => p_basic_salary_rate
99 ,p_housing_indemnity_rate => p_housing_indemnity_rate
100 ,p_currency_code => p_currency_code
101 ,p_global_index_id => l_global_index_id
102 ,p_object_version_number => l_object_version_number
103 ,p_effective_start_date => l_effective_start_date
104 ,p_effective_end_date => l_effective_end_date
105 );
106 exception
107 when hr_api.cannot_find_prog_unit then
108 hr_api.cannot_find_prog_unit_error
109 (p_module_name => 'CREATE_INDEMNITY_RATE'
110 ,p_hook_type => 'AP'
111 );
112 end;
113 --
114 -- When in validation only mode raise the Validate_Enabled exception
115 --
116 if p_validate then
117 raise hr_api.validate_enabled;
118 end if;
119 --
120 -- Set all IN OUT and OUT parameters with out values
121 --
122 p_global_index_id := l_global_index_id;
123 p_object_version_number := l_object_version_number;
124 p_effective_start_date := l_effective_start_date;
125 p_effective_end_date := l_effective_end_date;
126 --
127 if g_debug then
128 --
129 hr_utility.set_location(' Leaving:'||l_proc, 70);
130 --
131 End if;
132
133 exception
134 when hr_api.validate_enabled then
135 --
136 -- As the Validate_Enabled exception has been raised
137 -- we must rollback to the savepoint
138 --
139 rollback to create_indemnity_rate;
140 --
141 -- Reset IN OUT parameters and set OUT parameters
142 -- (Any key or derived arguments must be set to null
143 -- when validation only mode is being used.)
144 --
145 p_global_index_id := null;
146 p_object_version_number := null;
147 p_effective_start_date := null;
148 p_effective_end_date := null;
149
150 if g_debug then
151 --
152 hr_utility.set_location(' Leaving:'||l_proc, 80);
153 --
154 End if;
155
156 when others then
157 --
158 -- A validation or unexpected error has occured
159 --
160 rollback to create_indemnity_rate;
161 --
162 -- Reset IN OUT parameters and set all
163 -- OUT parameters, including warnings, to null
164 --
165 p_global_index_id := null;
166 p_object_version_number := null;
167 p_effective_start_date := null;
168 p_effective_end_date := null;
169
170 raise;
171
172 end create_indemnity_rate;
173 --
174 -- ----------------------------------------------------------------------------
175 -- |--------------------------< create_global_index >--------------------------|
176 -- ----------------------------------------------------------------------------
177 --
178 procedure create_global_index
179 (p_validate in boolean default false
180 ,p_effective_date in date
181 ,p_gross_index in number default null
182 ,p_increased_index in number default null
183 ,p_global_index_id out nocopy number
184 ,p_object_version_number out nocopy number
185 ,p_effective_start_date out nocopy date
186 ,p_effective_end_date out nocopy date
187 ) is
188
189 --
190 -- Declare cursors and local variables
191 --
192 l_in_out_parameter number;
193 l_effective_date date;
194 l_proc varchar2(72) := g_package||'create_global_index';
195 l_object_version_number number(9);
196 l_global_index_id pqh_fr_global_indices_f.global_index_id%type;
197 l_effective_start_date date;
198 l_effective_end_date date;
199
200 begin
201
202 g_debug := hr_utility.debug_enabled;
203
204 if g_debug then
205 --
206 hr_utility.set_location('Entering:'|| l_proc, 10);
207 --
208 End if;
209
210 --
211 -- Issue a savepoint
212 --
213 savepoint create_global_index;
214 --
215 --
216 -- Remember IN OUT parameter IN values
217 --
218 --
219 -- Truncate the time portion from all IN date parameters
220 --
221 l_effective_date := trunc(p_effective_date);
222
223 --
224 -- Call Before Process User Hook
225 --
226 begin
227 pqh_fr_global_payscale_bk2.create_global_index_b
228 (p_effective_date => l_effective_date
229 ,p_gross_index => p_gross_index
230 ,p_increased_index => p_increased_index
231 );
232 exception
233 when hr_api.cannot_find_prog_unit then
234 hr_api.cannot_find_prog_unit_error
235 (p_module_name => 'CREATE_GLOBAL_INDEX'
236 ,p_hook_type => 'BP'
237 );
238 end;
239
240 hr_utility.set_location('After Before Hook :'|| l_proc, 11);
241 --
242 -- Validation in addition to Row Handlers
243 --
244 --
245 -- Process Logic
246 --
247 pqh_gin_ins.ins
248 (p_effective_date => l_effective_date
249 ,p_type_of_record => 'IND'
250 ,p_gross_index => p_gross_index
251 ,p_increased_index => p_increased_index
252 ,p_global_index_id => l_global_index_id
253 ,p_object_version_number => l_object_version_number
254 ,p_effective_start_date => l_effective_start_date
255 ,p_effective_end_date => l_effective_end_date
256 );
257 --
258 hr_utility.set_location('After Process Logic:'|| l_proc, 12);
259 -- Call After Process User Hook
260 --
261 begin
262
263 pqh_fr_global_payscale_bk2.create_global_index_a
264 (p_effective_date => l_effective_date
265 ,p_gross_index => p_gross_index
266 ,p_increased_index => p_increased_index
267 ,p_global_index_id => l_global_index_id
268 ,p_object_version_number => l_object_version_number
269 ,p_effective_start_date => l_effective_start_date
270 ,p_effective_end_date => l_effective_end_date
271 );
272 exception
273 when hr_api.cannot_find_prog_unit then
274 hr_api.cannot_find_prog_unit_error
275 (p_module_name => 'CREATE_GLOBAL_INDEX'
276 ,p_hook_type => 'AP'
277 );
278 end;
279 --
280 --
281 hr_utility.set_location('After After Hook:'|| l_proc, 13);
282 -- When in validation only mode raise the Validate_Enabled exception
283 --
284 if p_validate then
285 raise hr_api.validate_enabled;
286 end if;
287 --
288 -- Set all IN OUT and OUT parameters with out values
289 --
290 p_global_index_id := l_global_index_id;
291 p_object_version_number := l_object_version_number;
292 p_effective_start_date := l_effective_start_date;
293 p_effective_end_date := l_effective_end_date;
294 --
295 if g_debug then
296 --
300
297 hr_utility.set_location(' Leaving:'||l_proc, 70);
298 --
299 End if;
301 exception
302 when hr_api.validate_enabled then
303 --
304 -- As the Validate_Enabled exception has been raised
305 -- we must rollback to the savepoint
306 --
307 rollback to create_global_index;
308 --
309 -- Reset IN OUT parameters and set OUT parameters
310 -- (Any key or derived arguments must be set to null
311 -- when validation only mode is being used.)
312 --
313 p_global_index_id := null;
314 p_object_version_number := null;
315 p_effective_start_date := null;
316 p_effective_end_date := null;
317
318 if g_debug then
319 --
320 hr_utility.set_location(' Leaving:'||l_proc, 80);
321 --
322 End if;
323
324 when others then
325 --
326 -- A validation or unexpected error has occured
327 --
328 rollback to create_global_index;
329 --
330 -- Reset IN OUT parameters and set all
331 -- OUT parameters, including warnings, to null
332 --
333 p_global_index_id := null;
334 p_object_version_number := null;
335 p_effective_start_date := null;
336 p_effective_end_date := null;
337
338 raise;
339
340 end create_global_index;
341 --
342 -- ----------------------------------------------------------------------------
343 -- |--------------------------<update_indemnity_rate >------------------------|
344 -- ----------------------------------------------------------------------------
345 --
346 procedure update_indemnity_rate
347 (p_validate in boolean default false
348 ,p_effective_date in date
349 ,p_datetrack_mode in varchar2
350 ,p_global_index_id in number
351 ,p_object_version_number in out nocopy number
352 ,p_basic_salary_rate in number default hr_api.g_number
353 ,p_housing_indemnity_rate in number default hr_api.g_number
354 ,p_currency_code in varchar2
355 ,p_effective_start_date out nocopy date
356 ,p_effective_end_date out nocopy date
357 ) is
358 --
359 -- Declare cursors and local variables
360 --
361 l_in_out_parameter number;
362 l_effective_date date;
363 l_proc varchar2(72) := g_package||'update_indemnity_rate';
364 l_object_version_number number(9);
365 l_global_index_id pqh_fr_global_indices_f.global_index_id%type;
366 l_effective_start_date date;
367 l_effective_end_date date;
368
369 begin
370
371 g_debug := hr_utility.debug_enabled;
372
373 if g_debug then
374 --
375 hr_utility.set_location('Entering:'|| l_proc, 10);
376 --
377 End if;
378
379 --
380 -- Issue a savepoint
381 --
382 savepoint update_indemnity_rate;
383 --
384 -- Remember IN OUT parameter IN values
385 --
386 --l_in_out_parameter := p_in_out_parameter;
387
388 l_object_version_number := p_object_version_number;
389 l_global_index_id := p_global_index_id;
390
391
392 --
393 -- Truncate the time portion from all IN date parameters
394 --
395 l_effective_date := trunc(p_effective_date);
396
397 --
398 -- Call Before Process User Hook
399 --
400 begin
401 pqh_fr_global_payscale_bk3.update_indemnity_rate_b
402 (
403 p_effective_date => l_effective_date
404 ,p_datetrack_mode => p_datetrack_mode
405 ,p_global_index_id => p_global_index_id
406 ,p_object_version_number => p_object_version_number
407 ,p_basic_salary_rate => p_basic_salary_rate
408 ,p_housing_indemnity_rate => p_housing_indemnity_rate
409 ,p_currency_code => p_currency_code
410 );
411
412 exception
413 when hr_api.cannot_find_prog_unit then
414 hr_api.cannot_find_prog_unit_error
415 (p_module_name => 'UPDATE_INDEMNITY_RATE'
416 ,p_hook_type => 'BP'
417 );
418 end;
419 --
420 -- Validation in addition to Row Handlers
421 --
422 pqh_gin_upd.upd
423 (p_effective_date => l_effective_date
424 ,p_datetrack_mode => p_datetrack_mode
425 ,p_global_index_id => p_global_index_id
426 ,p_object_version_number => p_object_version_number
427 ,p_type_of_record => 'INM'
428 ,p_basic_salary_rate => p_basic_salary_rate
429 ,p_housing_indemnity_rate => p_housing_indemnity_rate
430 ,p_currency_code => p_currency_code
431 ,p_effective_start_date => l_effective_start_date
432 ,p_effective_end_date => l_effective_end_date
433 );
434
435 --
436 -- Call After Process User Hook
437 --
438 begin
439 pqh_fr_global_payscale_bk3.update_indemnity_rate_a
440 (
441 p_effective_date => l_effective_date
442 ,p_datetrack_mode => p_datetrack_mode
443 ,p_global_index_id => p_global_index_id
444 ,p_object_version_number => p_object_version_number
445 ,p_basic_salary_rate => p_basic_salary_rate
446 ,p_housing_indemnity_rate => p_housing_indemnity_rate
447 ,p_currency_code => p_currency_code
448 ,p_effective_start_date => l_effective_start_date
452 exception
449 ,p_effective_end_date => l_effective_end_date
450
451 );
453 when hr_api.cannot_find_prog_unit then
454 hr_api.cannot_find_prog_unit_error
455 (p_module_name => 'UPDATE_INDEMNITY_RATE'
456 ,p_hook_type => 'AP'
457 );
458 end;
459 --
460 -- When in validation only mode raise the Validate_Enabled exception
461 --
462 if p_validate then
463 raise hr_api.validate_enabled;
464 end if;
465 --
466 -- Set all IN OUT and OUT parameters with out values
467 --
468 p_object_version_number := l_object_version_number;
469 --
470 if g_debug then
471 --
472 hr_utility.set_location(' Leaving:'||l_proc, 70);
473 --
474 End if;
475
476 exception
477 when hr_api.validate_enabled then
478 --
479 -- As the Validate_Enabled exception has been raised
480 -- we must rollback to the savepoint
481 --
482 rollback to update_indemnity_rate;
483 --
484 -- Reset IN OUT parameters and set OUT parameters
485 -- (Any key or derived arguments must be set to null
486 -- when validation only mode is being used.)
487 --
488 p_object_version_number := l_object_version_number;
489
490
491 if g_debug then
492 --
493 hr_utility.set_location(' Leaving:'||l_proc, 80);
494 --
495 End if;
496
497 when others then
498 --
499 -- A validation or unexpected error has occured
500 --
501 rollback to update_indemnity_rate;
502 --
503 -- Reset IN OUT parameters and set all
504 -- OUT parameters, including warnings, to null
505 --
506 p_object_version_number := l_object_version_number;
507
508 raise;
509
510 end update_indemnity_rate;
511 --
512 --
513 -- ----------------------------------------------------------------------------
514 -- |--------------------------< update_global_index >-----------------|
515 -- ----------------------------------------------------------------------------
516 --
517 procedure update_global_index
518 (p_validate in boolean default false
519 ,p_effective_date in date
520 ,p_datetrack_mode in varchar2
521 ,p_global_index_id in number
522 ,p_object_version_number in out nocopy number
523 ,p_gross_index in number default hr_api.g_number
524 ,p_increased_index in number default hr_api.g_number
525 ,p_effective_start_date out nocopy date
526 ,p_effective_end_date out nocopy date
527 ) is
528
529 --
530 -- Declare cursors and local variables
531 --
532 l_in_out_parameter number;
533 l_effective_date date;
534 l_proc varchar2(72) := g_package||'update_global_index';
535 l_object_version_number number(9);
536 l_global_index_id pqh_fr_global_indices_f.global_index_id%type;
537 l_effective_start_date date;
538 l_effective_end_date date;
539
540 begin
541
542 g_debug := hr_utility.debug_enabled;
543
544 if g_debug then
545 --
546 hr_utility.set_location('Entering:'|| l_proc, 10);
547 --
548 End if;
549
550 --
551 -- Issue a savepoint
552 --
553 savepoint update_global_index;
554 --
555 --
556 -- Remember IN OUT parameter IN values
557 --
558 --
559 -- Truncate the time portion from all IN date parameters
560 --
561 l_effective_date := trunc(p_effective_date);
562
563 --
564 -- Call Before Process User Hook
565 --
566 begin
567 pqh_fr_global_payscale_bk4.update_global_index_b
568 (p_effective_date => l_effective_date
569 ,p_gross_index => p_gross_index
570 ,p_increased_index => p_increased_index
571 ,p_datetrack_mode => p_datetrack_mode
572 ,p_global_index_id => p_global_index_id
573 ,p_object_version_number => p_object_version_number
574 ,p_effective_start_date => p_effective_start_date
575 ,p_effective_end_date => p_effective_end_date
576
577 );
578
579 exception
580 when hr_api.cannot_find_prog_unit then
581 hr_api.cannot_find_prog_unit_error
582 (p_module_name => 'UPDATE_GLOBAL_INDEX'
583 ,p_hook_type => 'BP'
584 );
585 end;
586 --
587 -- Validation in addition to Row Handlers
588 --
589 --
590 -- Process Logic
591 --
592 pqh_gin_upd.upd
593 (p_effective_date => l_effective_date
594 ,p_type_of_record => 'IND'
595 ,p_gross_index => p_gross_index
596 ,p_datetrack_mode => p_datetrack_mode
597 ,p_increased_index => p_increased_index
598 ,p_global_index_id => p_global_index_id
599 ,p_object_version_number => p_object_version_number
600 ,p_effective_start_date => l_effective_start_date
601 ,p_effective_end_date => l_effective_end_date
602 );
603 --
604 -- Call After Process User Hook
605 --
606 begin
607
611 ,p_increased_index => p_increased_index
608 pqh_fr_global_payscale_bk4.update_global_index_a
609 (p_effective_date => l_effective_date
610 ,p_gross_index => p_gross_index
612 ,p_datetrack_mode => p_datetrack_mode
613 ,p_global_index_id => p_global_index_id
614 ,p_object_version_number => p_object_version_number
615 ,p_effective_start_date => p_effective_start_date
616 ,p_effective_end_date => p_effective_end_date
617 );
618 exception
619 when hr_api.cannot_find_prog_unit then
620 hr_api.cannot_find_prog_unit_error
621 (p_module_name => 'UPDATE_GLOBAL_INDEX'
622 ,p_hook_type => 'AP'
623 );
624 end;
625 --
626 --
627 -- When in validation only mode raise the Validate_Enabled exception
628 --
629 if p_validate then
630 raise hr_api.validate_enabled;
631 end if;
632 --
633 -- Set all IN OUT and OUT parameters with out values
634 --
635 p_object_version_number := l_object_version_number;
636 p_effective_start_date := l_effective_start_date;
637 p_effective_end_date := l_effective_end_date;
638 --
639 if g_debug then
640 --
641 hr_utility.set_location(' Leaving:'||l_proc, 70);
642 --
643 End if;
644
645 exception
646 when hr_api.validate_enabled then
647 --
648 -- As the Validate_Enabled exception has been raised
649 -- we must rollback to the savepoint
650 --
651 rollback to update_global_index;
652 --
653 -- Reset IN OUT parameters and set OUT parameters
654 -- (Any key or derived arguments must be set to null
655 -- when validation only mode is being used.)
656 --
657 p_object_version_number := null;
658 p_effective_start_date := null;
659 p_effective_end_date := null;
660
661 if g_debug then
662 --
663 hr_utility.set_location(' Leaving:'||l_proc, 80);
664 --
665 End if;
666
667 when others then
668 --
669 -- A validation or unexpected error has occured
670 --
671 rollback to update_global_index;
672 --
673 -- Reset IN OUT parameters and set all
674 -- OUT parameters, including warnings, to null
675 --
676
677 p_object_version_number := null;
678 p_effective_start_date := null;
679 p_effective_end_date := null;
680
681 raise;
682
683 end update_global_index;
684 --
685 -- ----------------------------------------------------------------------------
686 -- |--------------------------<delete_indemnity_rate >--------------------|
687 -- ----------------------------------------------------------------------------
688 --
689 procedure delete_indemnity_rate
690 (p_validate in boolean default false
691 ,p_effective_date in date
692 ,p_datetrack_mode in varchar2
693 ,p_global_index_id in number
694 ,p_object_version_number in out nocopy number
695 ,p_effective_start_date out nocopy date
696 ,p_effective_end_date out nocopy date
697 )
698 is
699 --
700 -- Declare cursors and local variables
701 --
702 l_in_out_parameter number;
703 l_effective_date date;
704 l_proc varchar2(72) := g_package||'delete_indemnity_rate';
705 l_object_version_number number(9);
706
707
708 begin
709
710 g_debug := hr_utility.debug_enabled;
711
712 if g_debug then
713 --
714 hr_utility.set_location('Entering:'|| l_proc, 10);
715 --
716 End if;
717
718 --
719 -- Issue a savepoint
720 --
721 savepoint delete_indemnity_rate;
722 --
723 -- Remember IN OUT parameter IN values
724 --
725 --l_in_out_parameter := p_in_out_parameter;
726
727 l_object_version_number := p_object_version_number;
728 --
729 -- Truncate the time portion from all IN date parameters
730 --
731
732 l_effective_date := trunc(p_effective_date);
733
734 --
735 -- Call Before Process User Hook
736 --
737 begin
738 pqh_fr_global_payscale_bk5.delete_indemnity_rate_b
739 (p_effective_date => l_effective_date
740 ,p_datetrack_mode => p_datetrack_mode
741 ,p_global_index_id => p_global_index_id
742 ,p_object_version_number => p_object_version_number
743 );
744
745 exception
746 when hr_api.cannot_find_prog_unit then
747 hr_api.cannot_find_prog_unit_error
748 (p_module_name => 'DELETE_INDEMNITY_RATE'
749 ,p_hook_type => 'BP'
750 );
751 end;
752 --
753 -- Validation in addition to Row Handlers
754 --
755
756 pqh_gin_del.del
757 (p_effective_date => l_effective_date
758 ,p_datetrack_mode => p_datetrack_mode
759 ,p_global_index_id => p_global_index_id
760 ,p_object_version_number => p_object_version_number
761 ,p_effective_start_date => p_effective_start_date
762 ,p_effective_end_date => p_effective_end_date
763 );
764
768 begin
765 --
766 -- Call After Process User Hook
767 --
769 pqh_fr_global_payscale_bk5.delete_indemnity_rate_a
770 (p_effective_date => l_effective_date
771 ,p_datetrack_mode => p_datetrack_mode
772 ,p_global_index_id => p_global_index_id
773 ,p_object_version_number => p_object_version_number
774 ,p_effective_start_date => p_effective_start_date
775 ,p_effective_end_date => p_effective_end_date
776
777 );
778 exception
779 when hr_api.cannot_find_prog_unit then
780 hr_api.cannot_find_prog_unit_error
781 (p_module_name => 'DELETE_INDEMNITY_RATE'
782 ,p_hook_type => 'AP'
783 );
784 end;
785 --
786 -- When in validation only mode raise the Validate_Enabled exception
787 --
788 if p_validate then
789 raise hr_api.validate_enabled;
790 end if;
791 --
792 -- Set all IN OUT and OUT parameters with out values
793 --
794 -- p_object_version_number := l_object_version_number;
795 --
796 if g_debug then
797 --
798 hr_utility.set_location(' Leaving:'||l_proc, 70);
799 --
800 End if;
801
802 exception
803 when hr_api.validate_enabled then
804 --
805 -- As the Validate_Enabled exception has been raised
806 -- we must rollback to the savepoint
807 --
808 rollback to delete_indemnity_rate;
809 --
810 -- Reset IN OUT parameters and set OUT parameters
811 -- (Any key or derived arguments must be set to null
812 -- when validation only mode is being used.)
813 --
814 if g_debug then
815 --
816 hr_utility.set_location(' Leaving:'||l_proc, 80);
817 --
818 End if;
819
820 when others then
821 --
822 -- A validation or unexpected error has occured
823 --
824 rollback to delete_indemnity_rate;
825 --
826 -- Reset IN OUT parameters and set all
827 -- OUT parameters, including warnings, to null
828 --
829 raise;
830
831 end delete_indemnity_rate;
832 --
833 -- ----------------------------------------------------------------------------
834 -- |--------------------------<delete_global_index >-------------------|
835 -- ----------------------------------------------------------------------------
836 --
837 procedure delete_global_index
838 (p_validate in boolean default false
839 ,p_effective_date in date
840 ,p_datetrack_mode in varchar2
841 ,p_global_index_id in number
842 ,p_object_version_number in out nocopy number
843 ,p_effective_start_date out nocopy date
844 ,p_effective_end_date out nocopy date
845 )
846 Is
847 --
848 -- Declare cursors and local variables
849 --
850 l_in_out_parameter number;
851 l_effective_date date;
852 l_proc varchar2(72) := g_package||'delete_global_index';
853 l_object_version_number number(9);
854
855
856 begin
857
858 g_debug := hr_utility.debug_enabled;
859
860 if g_debug then
861 --
862 hr_utility.set_location('Entering:'|| l_proc, 10);
863 --
864 End if;
865
866 --
867 -- Issue a savepoint
868 --
869 savepoint delete_global_index;
870 --
871 -- Remember IN OUT parameter IN values
872 --
873 --l_in_out_parameter := p_in_out_parameter;
874
875 l_object_version_number := p_object_version_number;
876 --
877 -- Truncate the time portion from all IN date parameters
878 --
879
880 l_effective_date := trunc(p_effective_date);
881
882 --
883 -- Call Before Process User Hook
884 --
885 begin
886 pqh_fr_global_payscale_bk6.delete_global_index_b
887 (p_effective_date => l_effective_date
888 ,p_datetrack_mode => p_datetrack_mode
889 ,p_global_index_id => p_global_index_id
890 ,p_object_version_number => p_object_version_number
891 );
892 exception
893 when hr_api.cannot_find_prog_unit then
894 hr_api.cannot_find_prog_unit_error
895 (p_module_name => 'DELETE_GLOBAL_INDEX'
896 ,p_hook_type => 'BP'
897 );
898 end;
899 --
900 -- Validation in addition to Row Handlers
901 --
902
903 pqh_gin_del.del
904 (p_effective_date => l_effective_date
905 ,p_datetrack_mode => p_datetrack_mode
906 ,p_global_index_id => p_global_index_id
907 ,p_object_version_number => p_object_version_number
908 ,p_effective_start_date => p_effective_start_date
909 ,p_effective_end_date => p_effective_end_date
910 );
911 --
912 -- Call After Process User Hook
913 --
914 begin
915 pqh_fr_global_payscale_bk6.delete_global_index_a
916 (p_effective_date => l_effective_date
917 ,p_datetrack_mode => p_datetrack_mode
918 ,p_global_index_id => p_global_index_id
922 );
919 ,p_object_version_number => p_object_version_number
920 ,p_effective_start_date => p_effective_start_date
921 ,p_effective_end_date => p_effective_end_date
923 exception
924 when hr_api.cannot_find_prog_unit then
925 hr_api.cannot_find_prog_unit_error
926 (p_module_name => 'DELETE_GLOBAL_INDEX'
927 ,p_hook_type => 'AP'
928 );
929 end;
930 --
931 -- When in validation only mode raise the Validate_Enabled exception
932 --
933 if p_validate then
934 raise hr_api.validate_enabled;
935 end if;
936 --
937 -- Set all IN OUT and OUT parameters with out values
938 --
939 if g_debug then
940 --
941 hr_utility.set_location(' Leaving:'||l_proc, 70);
942 --
943 End if;
944
945 exception
946 when hr_api.validate_enabled then
947 --
948 -- As the Validate_Enabled exception has been raised
949 -- we must rollback to the savepoint
950 --
951 rollback to delete_global_index;
952 --
953 -- Reset IN OUT parameters and set OUT parameters
954 -- (Any key or derived arguments must be set to null
955 -- when validation only mode is being used.)
956 --
957 if g_debug then
958 --
959 hr_utility.set_location(' Leaving:'||l_proc, 80);
960 --
961 End if;
962
963 when others then
964 --
965 -- A validation or unexpected error has occured
966 --
967 rollback to delete_global_index;
968 --
969 -- Reset IN OUT parameters and set all
970 -- OUT parameters, including warnings, to null
971
972 raise;
973
974 end delete_global_index;
975 --
976
977 end pqh_fr_global_payscale_api;