[Home] [Help]
PACKAGE BODY: APPS.PQH_FR_STAT_SITUATIONS_API
Source
1 Package Body pqh_fr_stat_situations_api as
2 /* $Header: pqstsapi.pkb 120.0 2005/05/29 02:43:03 appldev noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' pqh_fr_stat_situations_api.';
7 g_debug boolean := hr_utility.debug_enabled;
8 --
9 -- ----------------------------------------------------------------------------
10 -- |--------------------------<CREATE_STATUTORY_SITUATION >--------------------|
11 -- ----------------------------------------------------------------------------
12 --
13 procedure create_statutory_situation
14 (p_validate in boolean default false
15 ,p_effective_date in date default sysdate
16 ,p_business_group_id in number
17 ,p_situation_name in varchar2
18 ,p_type_of_ps in varchar2
19 ,p_situation_type in varchar2
20 ,p_sub_type in varchar2 default null
21 ,p_source in varchar2 default null
22 ,p_location in varchar2 default null
23 ,p_reason in varchar2 default null
24 ,p_is_default in varchar2 default null
25 ,p_date_from in date default null
26 ,p_date_to in date default null
27 ,p_request_type in varchar2 default null
28 ,p_employee_agreement_needed in varchar2 default null
29 ,p_manager_agreement_needed in varchar2 default null
30 ,p_print_arrette in varchar2 default null
31 ,p_reserve_position in varchar2 default null
32 ,p_allow_progressions in varchar2 default null
33 ,p_extend_probation_period in varchar2 default null
34 ,p_remuneration_paid in varchar2 default null
35 ,p_pay_share in number default null
36 ,p_pay_periods in number default null
37 ,p_frequency in varchar2 default null
38 ,p_first_period_max_duration in number default null
39 ,p_min_duration_per_request in number default null
40 ,p_max_duration_per_request in number default null
41 ,p_max_duration_whole_career in number default null
42 ,p_renewable_allowed in varchar2 default null
43 ,p_max_no_of_renewals in number default null
44 ,p_max_duration_per_renewal in number default null
45 ,p_max_tot_continuous_duration in number default null
46 ,p_remunerate_assign_status_id in number default null
47 ,p_statutory_situation_id out nocopy number
48 ,p_object_version_number out nocopy number
49 ) is
50 --
51 -- Declare cursors and local variables
52 --
53 l_in_out_parameter number;
54 l_effective_date date;
55 l_proc varchar2(72) := g_package||'create_statutory_situation';
56 l_object_version_number number(9);
57 l_statutory_situation_id pqh_fr_stat_situations.statutory_situation_id%type;
58
59 begin
60
61 g_debug := hr_utility.debug_enabled;
62
63 if g_debug then
64 --
65 hr_utility.set_location('Entering:'|| l_proc, 10);
66 --
67 End if;
68
69 --
70 -- Issue a savepoint
71 --
72 savepoint create_statutory_situation;
73 --
74 -- Remember IN OUT parameter IN values
75 --
76 --
77 -- Truncate the time portion from all IN date parameters
78 --
79 l_effective_date := trunc(p_effective_date);
80
81 --
82 -- Call Before Process User Hook
83 --
84 begin
85 pqh_fr_stat_situations_bk1.create_statutory_situation_b
86 ( p_effective_date => l_effective_date
87 ,p_business_group_id => p_business_group_id
88 ,p_situation_name => p_situation_name
89 ,p_type_of_ps => p_type_of_ps
90 ,p_situation_type => p_situation_type
91 ,p_sub_type => p_sub_type
92 ,p_source => p_source
93 ,p_location => p_location
94 ,p_reason => p_reason
95 ,p_is_default => p_is_default
96 ,p_date_from => p_date_from
97 ,p_date_to => p_date_to
98 ,p_request_type => p_request_type
99 ,p_employee_agreement_needed => p_employee_agreement_needed
100 ,p_manager_agreement_needed => p_manager_agreement_needed
101 ,p_print_arrette => p_print_arrette
102 ,p_reserve_position => p_reserve_position
103 ,p_allow_progressions => p_allow_progressions
104 ,p_extend_probation_period => p_extend_probation_period
105 ,p_remuneration_paid => p_remuneration_paid
106 ,p_pay_share => p_pay_share
107 ,p_pay_periods => p_pay_periods
108 ,p_frequency => p_frequency
109 ,p_first_period_max_duration => p_first_period_max_duration
110 ,p_min_duration_per_request => p_min_duration_per_request
111 ,p_max_duration_per_request => p_max_duration_per_request
112 ,p_max_duration_whole_career => p_max_duration_whole_career
113 ,p_renewable_allowed => p_renewable_allowed
114 ,p_max_no_of_renewals => p_max_no_of_renewals
115 ,p_max_duration_per_renewal => p_max_duration_per_renewal
116 ,p_max_tot_continuous_duration => p_max_tot_continuous_duration
117 ,p_remunerate_assign_status_id => p_remunerate_assign_status_id
118 );
119 exception
120 when hr_api.cannot_find_prog_unit then
121 hr_api.cannot_find_prog_unit_error
122 (p_module_name => 'CREATE_STATUTORY_SITUATION'
123 ,p_hook_type => 'BP'
124 );
125 end;
126 --
127 -- Validation in addition to Row Handlers
128 --
129
130 --
131 -- Process Logic
132 --
133 pqh_sts_ins.ins
134 (p_effective_date => p_effective_date
135 ,p_business_group_id => p_business_group_id
136 ,p_situation_name => p_situation_name
137 ,p_type_of_ps => p_type_of_ps
138 ,p_situation_type => p_situation_type
139 ,p_sub_type => p_sub_type
140 ,p_source => p_source
141 ,p_location => p_location
142 ,p_reason => p_reason
143 ,p_is_default => p_is_default
144 ,p_date_from => p_date_from
145 ,p_date_to => p_date_to
146 ,p_request_type => p_request_type
147 ,p_employee_agreement_needed => p_employee_agreement_needed
148 ,p_manager_agreement_needed => p_manager_agreement_needed
149 ,p_print_arrette => p_print_arrette
150 ,p_reserve_position => p_reserve_position
151 ,p_allow_progressions => p_allow_progressions
152 ,p_extend_probation_period => p_extend_probation_period
153 ,p_remuneration_paid => p_remuneration_paid
154 ,p_pay_share => p_pay_share
155 ,p_pay_periods => p_pay_periods
156 ,p_frequency => p_frequency
157 ,p_first_period_max_duration => p_first_period_max_duration
158 ,p_min_duration_per_request => p_min_duration_per_request
159 ,p_max_duration_per_request => p_max_duration_per_request
160 ,p_max_duration_whole_career => p_max_duration_whole_career
161 ,p_renewable_allowed => p_renewable_allowed
162 ,p_max_no_of_renewals => p_max_no_of_renewals
163 ,p_max_duration_per_renewal => p_max_duration_per_renewal
164 ,p_max_tot_continuous_duration => p_max_tot_continuous_duration
165 ,p_statutory_situation_id => l_statutory_situation_id
166 ,p_object_version_number => l_object_version_number
167 ,p_remunerate_assign_status_id => p_remunerate_assign_status_id
168 );
169
170
171
172 --
173 -- Call After Process User Hook
174 --
175 begin
176 pqh_fr_stat_situations_bk1.create_statutory_situation_a
177 ( p_effective_date => l_effective_date
178 ,p_business_group_id => p_business_group_id
179 ,p_situation_name => p_situation_name
180 ,p_type_of_ps => p_type_of_ps
181 ,p_situation_type => p_situation_type
182 ,p_sub_type => p_sub_type
183 ,p_source => p_source
184 ,p_location => p_location
185 ,p_reason => p_reason
186 ,p_is_default => p_is_default
187 ,p_date_from => p_date_from
188 ,p_date_to => p_date_to
189 ,p_request_type => p_request_type
190 ,p_employee_agreement_needed => p_employee_agreement_needed
191 ,p_manager_agreement_needed => p_manager_agreement_needed
192 ,p_print_arrette => p_print_arrette
193 ,p_reserve_position => p_reserve_position
194 ,p_allow_progressions => p_allow_progressions
195 ,p_extend_probation_period => p_extend_probation_period
196 ,p_remuneration_paid => p_remuneration_paid
197 ,p_pay_share => p_pay_share
198 ,p_pay_periods => p_pay_periods
199 ,p_frequency => p_frequency
200 ,p_first_period_max_duration => p_first_period_max_duration
201 ,p_min_duration_per_request => p_min_duration_per_request
202 ,p_max_duration_per_request => p_max_duration_per_request
203 ,p_max_duration_whole_career => p_max_duration_whole_career
204 ,p_renewable_allowed => p_renewable_allowed
205 ,p_max_no_of_renewals => p_max_no_of_renewals
206 ,p_max_duration_per_renewal => p_max_duration_per_renewal
207 ,p_max_tot_continuous_duration => p_max_tot_continuous_duration
208 ,p_statutory_situation_id => l_statutory_situation_id
209 ,p_object_version_number => l_object_version_number
210 ,p_remunerate_assign_status_id => p_remunerate_assign_status_id
211 );
212 exception
213 when hr_api.cannot_find_prog_unit then
214 hr_api.cannot_find_prog_unit_error
215 (p_module_name => 'CREATE_STATUTORY_SITUATION'
216 ,p_hook_type => 'AP'
217 );
218 end;
219 --
220 -- When in validation only mode raise the Validate_Enabled exception
221 --
222 if p_validate then
223 raise hr_api.validate_enabled;
224 end if;
225 --
226 -- Set all IN OUT and OUT parameters with out values
227 --
228 p_statutory_situation_id := l_statutory_situation_id;
229 p_object_version_number := l_object_version_number;
230 --
231 if g_debug then
232 --
233 hr_utility.set_location(' Leaving:'||l_proc, 70);
234 --
235 End if;
236
237 exception
238 when hr_api.validate_enabled then
239 --
240 -- As the Validate_Enabled exception has been raised
241 -- we must rollback to the savepoint
242 --
243 rollback to CREATE_STATUTORY_SITUATION;
244 --
245 -- Reset IN OUT parameters and set OUT parameters
246 -- (Any key or derived arguments must be set to null
247 -- when validation only mode is being used.)
248 --
249 p_statutory_situation_id := null;
250 p_object_version_number := null;
251
252 if g_debug then
253 --
254 hr_utility.set_location(' Leaving:'||l_proc, 80);
255 --
256 End if;
257
258 when others then
259 --
260 -- A validation or unexpected error has occured
261 --
262 rollback to CREATE_STATUTORY_SITUATION;
263 --
264 -- Reset IN OUT parameters and set all
265 -- OUT parameters, including warnings, to null
266 --
267 p_statutory_situation_id := null;
268 p_object_version_number := null;
269
270 raise;
271
272 end CREATE_STATUTORY_SITUATION;
273 --
274
275 -- ----------------------------------------------------------------------------
276 -- |--------------------------<UPDATE_STATUTORY_SITUATION >--------------------|
277 -- ----------------------------------------------------------------------------
278 --
279 procedure update_statutory_situation
280 ( p_validate in boolean default false
281 ,p_effective_date in date default sysdate
282 ,p_statutory_situation_id in number
283 ,p_object_version_number in out nocopy number
284 ,p_business_group_id in number default hr_api.g_number
285 ,p_situation_name in varchar2 default hr_api.g_varchar2
286 ,p_type_of_ps in varchar2 default hr_api.g_varchar2
287 ,p_situation_type in varchar2 default hr_api.g_varchar2
288 ,p_sub_type in varchar2 default hr_api.g_varchar2
289 ,p_source in varchar2 default hr_api.g_varchar2
290 ,p_location in varchar2 default hr_api.g_varchar2
291 ,p_reason in varchar2 default hr_api.g_varchar2
292 ,p_is_default in varchar2 default hr_api.g_varchar2
293 ,p_date_from in date default hr_api.g_date
294 ,p_date_to in date default hr_api.g_date
295 ,p_request_type in varchar2 default hr_api.g_varchar2
296 ,p_employee_agreement_needed in varchar2 default hr_api.g_varchar2
297 ,p_manager_agreement_needed in varchar2 default hr_api.g_varchar2
298 ,p_print_arrette in varchar2 default hr_api.g_varchar2
299 ,p_reserve_position in varchar2 default hr_api.g_varchar2
300 ,p_allow_progressions in varchar2 default hr_api.g_varchar2
301 ,p_extend_probation_period in varchar2 default hr_api.g_varchar2
302 ,p_remuneration_paid in varchar2 default hr_api.g_varchar2
303 ,p_pay_share in number default hr_api.g_number
304 ,p_pay_periods in number default hr_api.g_number
305 ,p_frequency in varchar2 default hr_api.g_varchar2
306 ,p_first_period_max_duration in number default hr_api.g_number
307 ,p_min_duration_per_request in number default hr_api.g_number
308 ,p_max_duration_per_request in number default hr_api.g_number
309 ,p_max_duration_whole_career in number default hr_api.g_number
310 ,p_renewable_allowed in varchar2 default hr_api.g_varchar2
311 ,p_max_no_of_renewals in number default hr_api.g_number
312 ,p_max_duration_per_renewal in number default hr_api.g_number
313 ,p_max_tot_continuous_duration in number default hr_api.g_number
314 ,p_remunerate_assign_status_id in number default hr_api.g_number
315 ) is
316 --
317 -- Declare cursors and local variables
318 --
319 l_in_out_parameter number;
320 l_effective_date date;
321 l_proc varchar2(72) := g_package||'update_statutory_situation';
322 l_object_version_number number(9);
323 l_in_out_ovn number(9);
327
324 l_statutory_situation_id pqh_fr_stat_situations.statutory_situation_id%type;
325
326 begin
328 g_debug := hr_utility.debug_enabled;
329
330 if g_debug then
331 --
332 hr_utility.set_location('Entering:'|| l_proc, 10);
333 --
334 End if;
335 --
336 -- Issue a savepoint
337 --
338 savepoint update_statutory_situation;
339 --
340 -- Remember IN OUT parameter IN values
341 --
342 --l_in_out_parameter := p_in_out_parameter;
343
344 l_object_version_number := p_object_version_number;
345
346
347 --
348 -- Truncate the time portion from all IN date parameters
349 --
350 l_effective_date := trunc(p_effective_date);
351
352 --
353 -- Call Before Process User Hook
354 --
355 begin
356 pqh_fr_stat_situations_bk2.update_statutory_situation_b
357 ( p_effective_date => l_effective_date
358 ,p_business_group_id => p_business_group_id
359 ,p_situation_name => p_situation_name
360 ,p_type_of_ps => p_type_of_ps
361 ,p_situation_type => p_situation_type
362 ,p_sub_type => p_sub_type
363 ,p_source => p_source
364 ,p_location => p_location
365 ,p_reason => p_reason
366 ,p_is_default => p_is_default
367 ,p_date_from => p_date_from
368 ,p_date_to => p_date_to
369 ,p_request_type => p_request_type
370 ,p_employee_agreement_needed => p_employee_agreement_needed
371 ,p_manager_agreement_needed => p_manager_agreement_needed
372 ,p_print_arrette => p_print_arrette
373 ,p_reserve_position => p_reserve_position
374 ,p_allow_progressions => p_allow_progressions
375 ,p_extend_probation_period => p_extend_probation_period
376 ,p_remuneration_paid => p_remuneration_paid
377 ,p_pay_share => p_pay_share
378 ,p_pay_periods => p_pay_periods
379 ,p_frequency => p_frequency
380 ,p_first_period_max_duration => p_first_period_max_duration
381 ,p_min_duration_per_request => p_min_duration_per_request
382 ,p_max_duration_per_request => p_max_duration_per_request
383 ,p_max_duration_whole_career => p_max_duration_whole_career
384 ,p_renewable_allowed => p_renewable_allowed
385 ,p_max_no_of_renewals => p_max_no_of_renewals
386 ,p_max_duration_per_renewal => p_max_duration_per_renewal
387 ,p_max_tot_continuous_duration => p_max_tot_continuous_duration
388 ,p_statutory_situation_id => p_statutory_situation_id
389 ,p_object_version_number => l_object_version_number
390 ,p_remunerate_assign_status_id => p_remunerate_assign_status_id
391 );
392 exception
393 when hr_api.cannot_find_prog_unit then
394 hr_api.cannot_find_prog_unit_error
395 (p_module_name => 'UPDATE_STATUTORY_SITUATION'
396 ,p_hook_type => 'BP'
397 );
398 end;
399 --
400 -- Validation in addition to Row Handlers
401 --
402
403 pqh_sts_upd.upd
404 (
405 p_effective_date => l_effective_date
406 ,p_statutory_situation_id => p_statutory_situation_id
407 ,p_object_version_number => l_object_version_number
408 ,p_business_group_id => p_business_group_id
409 ,p_situation_name => p_situation_name
410 ,p_type_of_ps => p_type_of_ps
411 ,p_situation_type => p_situation_type
412 ,p_sub_type => p_sub_type
413 ,p_source => p_source
414 ,p_location => p_location
415 ,p_reason => p_reason
416 ,p_is_default => p_is_default
417 ,p_date_from => p_date_from
418 ,p_date_to => p_date_to
419 ,p_request_type => p_request_type
420 ,p_employee_agreement_needed => p_employee_agreement_needed
421 ,p_manager_agreement_needed => p_manager_agreement_needed
422 ,p_print_arrette => p_print_arrette
423 ,p_reserve_position => p_reserve_position
424 ,p_allow_progressions => p_allow_progressions
428 ,p_pay_periods => p_pay_periods
425 ,p_extend_probation_period => p_extend_probation_period
426 ,p_remuneration_paid => p_remuneration_paid
427 ,p_pay_share => p_pay_share
429 ,p_frequency => p_frequency
430 ,p_first_period_max_duration => p_first_period_max_duration
431 ,p_min_duration_per_request => p_min_duration_per_request
432 ,p_max_duration_per_request => p_max_duration_per_request
433 ,p_max_duration_whole_career => p_max_duration_whole_career
434 ,p_renewable_allowed => p_renewable_allowed
435 ,p_max_no_of_renewals => p_max_no_of_renewals
436 ,p_max_duration_per_renewal => p_max_duration_per_renewal
437 ,p_max_tot_continuous_duration => p_max_tot_continuous_duration
438 ,p_remunerate_assign_status_id => p_remunerate_assign_status_id
439 );
440
441
442
443 --
444 -- Call After Process User Hook
445 --
446 begin
447 pqh_fr_stat_situations_bk2.update_statutory_situation_a
448 ( p_effective_date => l_effective_date
449 ,p_business_group_id => p_business_group_id
450 ,p_situation_name => p_situation_name
451 ,p_type_of_ps => p_type_of_ps
452 ,p_situation_type => p_situation_type
453 ,p_sub_type => p_sub_type
454 ,p_source => p_source
455 ,p_location => p_location
456 ,p_reason => p_reason
457 ,p_is_default => p_is_default
458 ,p_date_from => p_date_from
459 ,p_date_to => p_date_to
460 ,p_request_type => p_request_type
461 ,p_employee_agreement_needed => p_employee_agreement_needed
462 ,p_manager_agreement_needed => p_manager_agreement_needed
463 ,p_print_arrette => p_print_arrette
464 ,p_reserve_position => p_reserve_position
465 ,p_allow_progressions => p_allow_progressions
466 ,p_extend_probation_period => p_extend_probation_period
467 ,p_remuneration_paid => p_remuneration_paid
468 ,p_pay_share => p_pay_share
469 ,p_pay_periods => p_pay_periods
470 ,p_frequency => p_frequency
471 ,p_first_period_max_duration => p_first_period_max_duration
472 ,p_min_duration_per_request => p_min_duration_per_request
473 ,p_max_duration_per_request => p_max_duration_per_request
474 ,p_max_duration_whole_career => p_max_duration_whole_career
475 ,p_renewable_allowed => p_renewable_allowed
476 ,p_max_no_of_renewals => p_max_no_of_renewals
477 ,p_max_duration_per_renewal => p_max_duration_per_renewal
478 ,p_max_tot_continuous_duration => p_max_tot_continuous_duration
479 ,p_statutory_situation_id => p_statutory_situation_id
480 ,p_object_version_number => l_object_version_number
481 ,p_remunerate_assign_status_id => p_remunerate_assign_status_id
482 );
483 exception
484 when hr_api.cannot_find_prog_unit then
485 hr_api.cannot_find_prog_unit_error
486 (p_module_name => 'UPDATE_STATUTORY_SITUATION'
487 ,p_hook_type => 'AP'
488 );
489 end;
490 --
491 -- When in validation only mode raise the Validate_Enabled exception
492 --
493 if p_validate then
494 raise hr_api.validate_enabled;
495 end if;
496 --
497 -- Set all IN OUT and OUT parameters with out values
498 --
499 p_object_version_number := l_object_version_number;
500 --
501 if g_debug then
502 --
503 hr_utility.set_location(' Leaving:'||l_proc, 70);
504 --
505 End if;
506
507 exception
508 when hr_api.validate_enabled then
509 --
510 -- As the Validate_Enabled exception has been raised
511 -- we must rollback to the savepoint
512 --
513 rollback to UPDATE_STATUTORY_SITUATION;
514 --
515 -- Reset IN OUT parameters and set OUT parameters
516 -- (Any key or derived arguments must be set to null
517 -- when validation only mode is being used.)
518 --
519 p_object_version_number := l_object_version_number;
520
521 if g_debug then
522 --
523 hr_utility.set_location(' Leaving:'||l_proc, 80);
524 --
525 End if;
526
527 when others then
528 --
529 -- A validation or unexpected error has occured
530 --
531 rollback to UPDATE_STATUTORY_SITUATION;
532 --
533 -- Reset IN OUT parameters and set all
534 -- OUT parameters, including warnings, to null
535 --
536 p_object_version_number := l_object_version_number;
537
538 raise;
539
540 end UPDATE_STATUTORY_SITUATION;
541 --
542
543 -- ----------------------------------------------------------------------------
544 -- |--------------------------<DELETE_STATUTORY_SITUATION >--------------------|
545 -- ----------------------------------------------------------------------------
546 --
547 procedure delete_statutory_situation
548 (p_validate in boolean default false
549 ,p_statutory_situation_id in number
550 ,p_object_version_number in number
551 ) is
552
553 --
554 -- Declare cursors and local variables
555 --
556 l_in_out_parameter number;
557 l_effective_date date;
561
558 l_proc varchar2(72) := g_package||'delete_statutory_situation';
559 l_object_version_number number(9);
560 l_statutory_situation_id pqh_fr_stat_situations.statutory_situation_id%type;
562 --
563 Cursor Csr_Any_Civil_Servant_On_Sit IS
564 Select null
565 From pqh_fr_emp_stat_situations
566 Where statutory_situation_id = p_statutory_situation_id;
567 --
568 l_temp varchar2(1);
569
570 begin
571
572 g_debug := hr_utility.debug_enabled;
573
574 if g_debug then
575 --
576 hr_utility.set_location('Entering:'|| l_proc, 10);
577 --
578 End if;
579
580 --
581 -- Issue a savepoint
582 --
583 savepoint delete_statutory_situation;
584 --
585 -- Remember IN OUT parameter IN values
586 --
587 --l_in_out_parameter := p_in_out_parameter;
588
589 l_object_version_number := p_object_version_number;
590
591 -- Adding Validation
592 Open Csr_Any_Civil_Servant_On_Sit;
593 Fetch Csr_Any_Civil_Servant_On_Sit into l_temp;
594 If Csr_Any_Civil_Servant_On_Sit%FOUND Then
595 --
596 fnd_message.set_name('PQH','PQH_FR_CIVIL_SERVANT_ONSIT');
597 hr_multi_message.add();
598 --
599 End If;
600 --
601 -- Truncate the time portion from all IN date parameters
602 --
603 -- l_effective_date := trunc(p_effective_date);
604
605 --
606 -- Call Before Process User Hook
607 --
608 begin
609 pqh_fr_stat_situations_bk3.delete_statutory_situation_b
610 ( p_statutory_situation_id => p_statutory_situation_id
611 ,p_object_version_number => l_object_version_number
612 );
613
614 exception
615 when hr_api.cannot_find_prog_unit then
616 hr_api.cannot_find_prog_unit_error
617 (p_module_name => 'DELETE_STATUTORY_SITUATION'
618 ,p_hook_type => 'BP'
619 );
620 end;
621 --
622 -- Validation in addition to Row Handlers
623 --
624
625 pqh_sts_del.del
626 (
627 p_statutory_situation_id => p_statutory_situation_id
628 ,p_object_version_number => l_object_version_number
629 );
630
631
632
633 --
634 -- Call After Process User Hook
635 --
636 begin
637 pqh_fr_stat_situations_bk3.delete_statutory_situation_a
638 (
639 p_statutory_situation_id => p_statutory_situation_id
640 ,p_object_version_number => l_object_version_number
641 );
642 exception
643 when hr_api.cannot_find_prog_unit then
644 hr_api.cannot_find_prog_unit_error
645 (p_module_name => 'DELETE_STATUTORY_SITUATION'
646 ,p_hook_type => 'AP'
647 );
648 end;
649 --
650 -- When in validation only mode raise the Validate_Enabled exception
651 --
652 if p_validate then
653 raise hr_api.validate_enabled;
654 end if;
655 --
656 -- Set all IN OUT and OUT parameters with out values
657 --
658 -- p_object_version_number := l_object_version_number;
659 --
660 if g_debug then
661 --
662 hr_utility.set_location(' Leaving:'||l_proc, 70);
663 --
664 End if;
665
666 exception
667 when hr_api.validate_enabled then
668 --
669 -- As the Validate_Enabled exception has been raised
670 -- we must rollback to the savepoint
671 --
672 rollback to DELETE_STATUTORY_SITUATION;
673 --
674 -- Reset IN OUT parameters and set OUT parameters
675 -- (Any key or derived arguments must be set to null
676 -- when validation only mode is being used.)
677 --
678 if g_debug then
679 --
680 hr_utility.set_location(' Leaving:'||l_proc, 80);
681 --
682 End if;
683
684 when others then
685 --
686 -- A validation or unexpected error has occured
687 --
688 rollback to DELETE_STATUTORY_SITUATION;
689 --
690 -- Reset IN OUT parameters and set all
691 -- OUT parameters, including warnings, to null
692 --
693
694 raise;
695
696 end DELETE_STATUTORY_SITUATION;
697 --
698
699 end PQH_FR_STAT_SITUATIONS_API;