[Home] [Help]
PACKAGE BODY: APPS.PQH_FR_ASSIGNMENT_SWI
Source
1 Package Body pqh_fr_assignment_swi As
2 /* $Header: pqastswi.pkb 120.0 2005/05/29 01:26 appldev noship $ */
3 --
4 -- Package variables
5 --
6 g_package varchar2(33) := 'pqh_fr_assignment_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< create_affectation >--------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_affectation
12 (p_validate in number default hr_api.g_false_num
13 ,p_effective_date in date
14 ,p_organization_id in number
15 ,p_position_id in number
16 ,p_person_id in number
17 ,p_job_id in number
18 ,p_supervisor_id in number default null
19 ,p_assignment_number in out nocopy varchar2
20 ,p_assignment_status_type_id in number
21 ,p_identifier in varchar2
22 ,p_affectation_type in varchar2
23 ,p_percent_effected in varchar2
24 ,p_primary_affectation in varchar2 default null
25 ,p_group_name out nocopy varchar2
26 ,p_scl_concat_segments in varchar2 default null
27 ,p_assignment_id out nocopy number
28 ,p_soft_coding_keyflex_id in out nocopy number
29 ,p_object_version_number out nocopy number
30 ,p_effective_start_date out nocopy date
31 ,p_effective_end_date out nocopy date
32 ,p_assignment_sequence out nocopy number
33 ,p_return_status out nocopy varchar2
34 ) is
35 --
36 -- Variables for API Boolean parameters
37 l_validate boolean;
38 --
39 -- Variables for IN/OUT parameters
40 l_assignment_number varchar2(100);
41 l_soft_coding_keyflex_id number;
42 --
43 -- Other variables
44 l_proc varchar2(72) := g_package ||'create_affectation';
45 Begin
46 hr_utility.set_location(' Entering:' || l_proc,10);
47 --
48 -- Issue a savepoint
49 --
50 savepoint create_affectation_swi;
51 --
52 -- Initialise Multiple Message Detection
53 --
54 hr_multi_message.enable_message_list;
55 --
56 -- Remember IN OUT parameter IN values
57 --
58 l_assignment_number := p_assignment_number;
59 l_soft_coding_keyflex_id := p_soft_coding_keyflex_id;
60 --
61 -- Convert constant values to their corresponding boolean value
62 --
63 l_validate :=
64 hr_api.constant_to_boolean
65 (p_constant_value => p_validate);
66 --
67 -- Register Surrogate ID or user key values
68 --
69 --
70 -- Call API
71 --
72 pqh_fr_assignment_api.create_affectation
73 (p_validate => l_validate
74 ,p_effective_date => p_effective_date
75 ,p_organization_id => p_organization_id
76 ,p_position_id => p_position_id
77 ,p_person_id => p_person_id
78 ,p_job_id => p_job_id
79 ,p_supervisor_id => p_supervisor_id
80 ,p_assignment_number => p_assignment_number
81 ,p_assignment_status_type_id => p_assignment_status_type_id
82 ,p_identifier => p_identifier
83 ,p_affectation_type => p_affectation_type
84 ,p_percent_effected => p_percent_effected
85 ,p_primary_affectation => p_primary_affectation
86 ,p_group_name => p_group_name
87 ,p_scl_concat_segments => p_scl_concat_segments
88 ,p_assignment_id => p_assignment_id
89 ,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
90 ,p_object_version_number => p_object_version_number
91 ,p_effective_start_date => p_effective_start_date
92 ,p_effective_end_date => p_effective_end_date
93 ,p_assignment_sequence => p_assignment_sequence
94 );
95 --
96 -- Convert API warning boolean parameter values to specific
97 -- messages and add them to Multiple Message List
98 --
99 --
100 -- Convert API non-warning boolean parameter values
101 --
102 --
103 -- Derive the API return status value based on whether
104 -- messages of any type exist in the Multiple Message List.
105 -- Also disable Multiple Message Detection.
106 --
107 p_return_status := hr_multi_message.get_return_status_disable;
108 hr_utility.set_location(' Leaving:' || l_proc,20);
109 --
110 exception
111 when hr_multi_message.error_message_exist then
112 --
113 -- Catch the Multiple Message List exception which
114 -- indicates API processing has been aborted because
115 -- at least one message exists in the list.
116 --
117 rollback to create_affectation_swi;
118 --
119 -- Reset IN OUT parameters and set OUT parameters
120 --
121 p_assignment_number := l_assignment_number;
122 p_group_name := null;
123 p_assignment_id := null;
124 p_soft_coding_keyflex_id := l_soft_coding_keyflex_id;
125 p_object_version_number := null;
126 p_effective_start_date := null;
127 p_effective_end_date := null;
128 p_assignment_sequence := null;
129 p_return_status := hr_multi_message.get_return_status_disable;
130 hr_utility.set_location(' Leaving:' || l_proc, 30);
131 when others then
132 --
133 -- When Multiple Message Detection is enabled catch
134 -- any Application specific or other unexpected
135 -- exceptions. Adding appropriate details to the
136 -- Multiple Message List. Otherwise re-raise the
137 -- error.
138 --
139 rollback to create_affectation_swi;
140 if hr_multi_message.unexpected_error_add(l_proc) then
141 hr_utility.set_location(' Leaving:' || l_proc,40);
142 raise;
143 end if;
144 --
145 -- Reset IN OUT and set OUT parameters
146 --
147 p_assignment_number := l_assignment_number;
148 p_group_name := null;
149 p_assignment_id := null;
150 p_soft_coding_keyflex_id := l_soft_coding_keyflex_id;
151 p_object_version_number := null;
152 p_effective_start_date := null;
153 p_effective_end_date := null;
154 p_assignment_sequence := null;
155 p_return_status := hr_multi_message.get_return_status_disable;
156 hr_utility.set_location(' Leaving:' || l_proc,50);
157 end create_affectation;
158 -- ----------------------------------------------------------------------------
159 -- |--------------------------< update_affectation >--------------------------|
160 -- ----------------------------------------------------------------------------
161 PROCEDURE update_affectation
162 (p_validate in number default hr_api.g_false_num
163 ,p_datetrack_update_mode in varchar2
164 ,p_effective_date in date
165 ,p_organization_id in number default hr_api.g_number
166 ,p_position_id in number default hr_api.g_number
167 ,p_person_id in number
168 ,p_job_id in number default hr_api.g_number
169 ,p_supervisor_id in number default hr_api.g_number
170 ,p_assignment_number in varchar2 default hr_api.g_varchar2
171 ,p_assignment_status_type_id in number default hr_api.g_number
172 ,p_identifier in varchar2 default hr_api.g_varchar2
173 ,p_affectation_type in varchar2 default hr_api.g_varchar2
174 ,p_percent_effected in varchar2 default hr_api.g_varchar2
175 ,p_primary_affectation in varchar2 default hr_api.g_varchar2
176 ,p_group_name out nocopy varchar2
177 ,p_scl_concat_segments in varchar2 default hr_api.g_varchar2
178 ,p_assignment_id in number
179 ,p_soft_coding_keyflex_id out nocopy number
180 ,p_object_version_number in out nocopy number
181 ,p_effective_start_date out nocopy date
182 ,p_effective_end_date out nocopy date
183 ,p_assignment_sequence out nocopy number
184 ,p_return_status out nocopy varchar2
185 ) is
186 --
187 -- Variables for API Boolean parameters
188 l_validate boolean;
189 --
190 -- Variables for IN/OUT parameters
191 l_object_version_number number;
192 --
193 -- Other variables
194 l_proc varchar2(72) := g_package ||'update_affectation';
195 Begin
196 hr_utility.set_location(' Entering:' || l_proc,10);
197 --
198 -- Issue a savepoint
199 --
200 savepoint update_affectation_swi;
201 --
202 -- Initialise Multiple Message Detection
203 --
204 hr_multi_message.enable_message_list;
205 --
206 -- Remember IN OUT parameter IN values
207 --
208 l_object_version_number := p_object_version_number;
209 --
210 -- Convert constant values to their corresponding boolean value
211 --
212 l_validate :=
213 hr_api.constant_to_boolean
214 (p_constant_value => p_validate);
215 --
216 -- Register Surrogate ID or user key values
217 --
218 --
219 -- Call API
220 --
221 pqh_fr_assignment_api.update_affectation
222 (p_validate => l_validate
223 ,p_datetrack_update_mode => p_datetrack_update_mode
224 ,p_effective_date => p_effective_date
225 ,p_organization_id => p_organization_id
226 ,p_position_id => p_position_id
227 ,p_person_id => p_person_id
228 ,p_job_id => p_job_id
229 ,p_supervisor_id => p_supervisor_id
230 ,p_assignment_number => p_assignment_number
231 ,p_assignment_status_type_id => p_assignment_status_type_id
232 ,p_identifier => p_identifier
233 ,p_affectation_type => p_affectation_type
234 ,p_percent_effected => p_percent_effected
235 ,p_primary_affectation => p_primary_affectation
236 ,p_group_name => p_group_name
237 ,p_scl_concat_segments => p_scl_concat_segments
238 ,p_assignment_id => p_assignment_id
239 ,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
240 ,p_object_version_number => p_object_version_number
241 ,p_effective_start_date => p_effective_start_date
242 ,p_effective_end_date => p_effective_end_date
243 ,p_assignment_sequence => p_assignment_sequence
244 );
245 --
246 -- Convert API warning boolean parameter values to specific
247 -- messages and add them to Multiple Message List
248 --
249 --
250 -- Convert API non-warning boolean parameter values
251 --
252 --
253 -- Derive the API return status value based on whether
254 -- messages of any type exist in the Multiple Message List.
255 -- Also disable Multiple Message Detection.
256 --
257 p_return_status := hr_multi_message.get_return_status_disable;
258 hr_utility.set_location(' Leaving:' || l_proc,20);
259 --
260 exception
261 when hr_multi_message.error_message_exist then
262 --
263 -- Catch the Multiple Message List exception which
264 -- indicates API processing has been aborted because
265 -- at least one message exists in the list.
266 --
267 rollback to update_affectation_swi;
268 --
269 -- Reset IN OUT parameters and set OUT parameters
270 --
271 p_group_name := null;
272 p_soft_coding_keyflex_id := null;
273 p_object_version_number := l_object_version_number;
274 p_effective_start_date := null;
275 p_effective_end_date := null;
276 p_assignment_sequence := null;
277 p_return_status := hr_multi_message.get_return_status_disable;
278 hr_utility.set_location(' Leaving:' || l_proc, 30);
279 when others then
280 --
281 -- When Multiple Message Detection is enabled catch
282 -- any Application specific or other unexpected
283 -- exceptions. Adding appropriate details to the
284 -- Multiple Message List. Otherwise re-raise the
285 -- error.
286 --
287 rollback to update_affectation_swi;
288 if hr_multi_message.unexpected_error_add(l_proc) then
289 hr_utility.set_location(' Leaving:' || l_proc,40);
290 raise;
291 end if;
292 --
293 -- Reset IN OUT and set OUT parameters
294 --
295 p_group_name := null;
296 p_soft_coding_keyflex_id := null;
297 p_object_version_number := l_object_version_number;
298 p_effective_start_date := null;
299 p_effective_end_date := null;
300 p_assignment_sequence := null;
301 p_return_status := hr_multi_message.get_return_status_disable;
302 hr_utility.set_location(' Leaving:' || l_proc,50);
303 end update_affectation;
304 -- ----------------------------------------------------------------------------
305 -- |------------------------< update_employment_terms >-----------------------|
306 -- ----------------------------------------------------------------------------
307 PROCEDURE update_employment_terms
308 (p_validate in number default hr_api.g_false_num
309 ,p_datetrack_update_mode in varchar2
310 ,p_effective_date in date
311 ,p_assignment_id in number
312 ,p_establishment_id in number
313 ,p_comments in varchar2 default hr_api.g_varchar2
314 ,p_assignment_category in varchar2
315 ,p_reason_for_parttime in varchar2 default hr_api.g_varchar2
316 ,p_working_hours_share in varchar2 default hr_api.g_varchar2
317 ,p_contract_id in number default hr_api.g_number
318 ,p_change_reason in varchar2 default hr_api.g_varchar2
319 ,p_normal_hours in number default hr_api.g_number
320 ,p_frequency in varchar2 default hr_api.g_varchar2
321 ,p_soft_coding_keyflex_id out nocopy number
322 ,p_object_version_number in out nocopy number
323 ,p_effective_start_date out nocopy date
324 ,p_effective_end_date out nocopy date
325 ,p_assignment_sequence out nocopy number
326 ,p_return_status out nocopy varchar2
327 ) is
328 --
329 -- Variables for API Boolean parameters
330 l_validate boolean;
331 --
332 -- Variables for IN/OUT parameters
333 l_object_version_number number;
334 --
335 -- Other variables
336 l_proc varchar2(72) := g_package ||'update_employment_terms';
337 Begin
338 hr_utility.set_location(' Entering:' || l_proc,10);
339 --
340 -- Issue a savepoint
341 --
342 savepoint update_employment_terms_swi;
343 --
344 -- Initialise Multiple Message Detection
345 --
346 hr_multi_message.enable_message_list;
347 --
348 -- Remember IN OUT parameter IN values
349 --
350 l_object_version_number := p_object_version_number;
351 --
352 -- Convert constant values to their corresponding boolean value
353 --
354 l_validate :=
355 hr_api.constant_to_boolean
356 (p_constant_value => p_validate);
357 --
358 -- Register Surrogate ID or user key values
359 --
360 --
361 -- Call API
362 --
363 pqh_fr_assignment_api.update_employment_terms
364 (p_validate => l_validate
365 ,p_datetrack_update_mode => p_datetrack_update_mode
366 ,p_effective_date => p_effective_date
367 ,p_assignment_id => p_assignment_id
368 ,p_establishment_id => p_establishment_id
369 ,p_comments => p_comments
370 ,p_assignment_category => p_assignment_category
371 ,p_reason_for_parttime => p_reason_for_parttime
372 ,p_working_hours_share => p_working_hours_share
373 ,p_contract_id => p_contract_id
374 ,p_change_reason => p_change_reason
375 ,p_normal_hours => p_normal_hours
376 ,p_frequency => p_frequency
377 ,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
378 ,p_object_version_number => p_object_version_number
379 ,p_effective_start_date => p_effective_start_date
380 ,p_effective_end_date => p_effective_end_date
381 ,p_assignment_sequence => p_assignment_sequence
382 );
383 --
384 -- Convert API warning boolean parameter values to specific
385 -- messages and add them to Multiple Message List
386 --
387 --
388 -- Convert API non-warning boolean parameter values
389 --
390 --
391 -- Derive the API return status value based on whether
392 -- messages of any type exist in the Multiple Message List.
393 -- Also disable Multiple Message Detection.
394 --
395 p_return_status := hr_multi_message.get_return_status_disable;
396 hr_utility.set_location(' Leaving:' || l_proc,20);
397 --
398 exception
399 when hr_multi_message.error_message_exist then
400 --
401 -- Catch the Multiple Message List exception which
402 -- indicates API processing has been aborted because
403 -- at least one message exists in the list.
404 --
405 rollback to update_employment_terms_swi;
406 --
407 -- Reset IN OUT parameters and set OUT parameters
408 --
409 p_soft_coding_keyflex_id := null;
410 p_object_version_number := l_object_version_number;
411 p_effective_start_date := null;
412 p_effective_end_date := null;
413 p_assignment_sequence := null;
414 p_return_status := hr_multi_message.get_return_status_disable;
415 hr_utility.set_location(' Leaving:' || l_proc, 30);
416 when others then
417 --
418 -- When Multiple Message Detection is enabled catch
419 -- any Application specific or other unexpected
420 -- exceptions. Adding appropriate details to the
421 -- Multiple Message List. Otherwise re-raise the
422 -- error.
423 --
424 rollback to update_employment_terms_swi;
425 if hr_multi_message.unexpected_error_add(l_proc) then
426 hr_utility.set_location(' Leaving:' || l_proc,40);
427 raise;
428 end if;
429 --
430 -- Reset IN OUT and set OUT parameters
431 --
432 p_soft_coding_keyflex_id := null;
433 p_object_version_number := l_object_version_number;
434 p_effective_start_date := null;
435 p_effective_end_date := null;
436 p_assignment_sequence := null;
437 p_return_status := hr_multi_message.get_return_status_disable;
438 hr_utility.set_location(' Leaving:' || l_proc,50);
439 end update_employment_terms;
440 -- ----------------------------------------------------------------------------
441 -- |---------------------< update_administrative_career >---------------------|
442 -- ----------------------------------------------------------------------------
443 PROCEDURE update_administrative_career
444 (p_validate in number default hr_api.g_false_num
445 ,p_datetrack_update_mode in varchar2
446 ,p_effective_date in date
447 ,p_assignment_id in number
448 ,p_corps_id in number
449 ,p_grade_id in number
450 ,p_step_id in number
451 ,p_progression_speed in varchar2
452 ,p_personal_gross_index in varchar2
453 ,p_employee_category in varchar2
454 ,p_soft_coding_keyflex_id out nocopy number
455 ,p_object_version_number in out nocopy number
456 ,p_effective_start_date out nocopy date
457 ,p_effective_end_date out nocopy date
458 ,p_assignment_sequence out nocopy number
459 ,p_return_status out nocopy varchar2
460 ) is
461 --
462 -- Variables for API Boolean parameters
463 l_validate boolean;
464 --
465 -- Variables for IN/OUT parameters
466 l_object_version_number number;
467 --
468 -- Other variables
469 l_proc varchar2(72) := g_package ||'update_administrative_career';
470 Begin
471 hr_utility.set_location(' Entering:' || l_proc,10);
472 --
473 -- Issue a savepoint
474 --
475 savepoint update_admin_career_swi;
476 --
477 -- Initialise Multiple Message Detection
478 --
479 hr_multi_message.enable_message_list;
480 --
481 -- Remember IN OUT parameter IN values
482 --
483 l_object_version_number := p_object_version_number;
484 --
485 -- Convert constant values to their corresponding boolean value
486 --
487 l_validate :=
488 hr_api.constant_to_boolean
489 (p_constant_value => p_validate);
490 --
491 -- Register Surrogate ID or user key values
492 --
493 --
494 -- Call API
495 --
496 pqh_fr_assignment_api.update_administrative_career
497 (p_validate => l_validate
498 ,p_datetrack_update_mode => p_datetrack_update_mode
499 ,p_effective_date => p_effective_date
500 ,p_assignment_id => p_assignment_id
501 ,p_corps_id => p_corps_id
502 ,p_grade_id => p_grade_id
503 ,p_step_id => p_step_id
504 ,p_progression_speed => p_progression_speed
505 ,p_personal_gross_index => p_personal_gross_index
506 ,p_employee_category => p_employee_category
507 ,p_soft_coding_keyflex_id => p_soft_coding_keyflex_id
508 ,p_object_version_number => p_object_version_number
509 ,p_effective_start_date => p_effective_start_date
510 ,p_effective_end_date => p_effective_end_date
511 ,p_assignment_sequence => p_assignment_sequence
512 );
513 --
514 -- Convert API warning boolean parameter values to specific
515 -- messages and add them to Multiple Message List
516 --
517 --
518 -- Convert API non-warning boolean parameter values
519 --
520 --
521 -- Derive the API return status value based on whether
522 -- messages of any type exist in the Multiple Message List.
523 -- Also disable Multiple Message Detection.
524 --
525 p_return_status := hr_multi_message.get_return_status_disable;
526 hr_utility.set_location(' Leaving:' || l_proc,20);
527 --
528 exception
529 when hr_multi_message.error_message_exist then
530 --
531 -- Catch the Multiple Message List exception which
532 -- indicates API processing has been aborted because
533 -- at least one message exists in the list.
534 --
535 rollback to update_admin_career_swi;
536 --
537 -- Reset IN OUT parameters and set OUT parameters
538 --
539 p_soft_coding_keyflex_id := null;
540 p_object_version_number := l_object_version_number;
541 p_effective_start_date := null;
542 p_effective_end_date := null;
543 p_assignment_sequence := null;
544 p_return_status := hr_multi_message.get_return_status_disable;
545 hr_utility.set_location(' Leaving:' || l_proc, 30);
546 when others then
547 --
548 -- When Multiple Message Detection is enabled catch
549 -- any Application specific or other unexpected
550 -- exceptions. Adding appropriate details to the
551 -- Multiple Message List. Otherwise re-raise the
552 -- error.
553 --
554 rollback to update_admin_career_swi;
555 if hr_multi_message.unexpected_error_add(l_proc) then
556 hr_utility.set_location(' Leaving:' || l_proc,40);
557 raise;
558 end if;
559 --
560 -- Reset IN OUT and set OUT parameters
561 --
562 p_soft_coding_keyflex_id := null;
563 p_object_version_number := l_object_version_number;
564 p_effective_start_date := null;
565 p_effective_end_date := null;
566 p_assignment_sequence := null;
567 p_return_status := hr_multi_message.get_return_status_disable;
568 hr_utility.set_location(' Leaving:' || l_proc,50);
569 end update_administrative_career;
570
571 PROCEDURE terminate_affectation
572 (p_validate in number default hr_api.g_false_num
573 ,p_assignment_id in number
574 ,p_effective_date in date
575 ,p_assignment_status_type_id in number
576 ,p_primary_affectation in varchar2 default null
577 ,p_group_name out nocopy varchar2
578 ,p_object_version_number in out nocopy number
579 ,p_effective_start_date out nocopy date
580 ,p_effective_end_date out nocopy date
581 ,p_return_status out nocopy varchar2
582 ) is
583 --
584 -- Variables for API Boolean parameters
585 l_validate boolean;
586 --
587 -- Variables for IN/OUT parameters
588 --
589 -- Other variables
590 l_proc varchar2(72) := g_package ||'terminate_affectation';
591 Begin
592 hr_utility.set_location(' Entering:' || l_proc,10);
593 --
594 -- Issue a savepoint
595 --
596 savepoint terminate_affectation_swi;
597 --
598 -- Initialise Multiple Message Detection
599 --
600 hr_multi_message.enable_message_list;
601 --
602 -- Remember IN OUT parameter IN values
603 --
604 --
605 -- Convert constant values to their corresponding boolean value
606 --
607 l_validate :=
608 hr_api.constant_to_boolean
609 (p_constant_value => p_validate);
610 --
611 -- Register Surrogate ID or user key values
612 --
613 --
614 -- Call API
615 --
616 pqh_fr_assignment_api.terminate_affectation
617 (p_validate => l_validate
618 ,p_assignment_id => p_assignment_id
619 ,p_effective_date => p_effective_date
620 ,p_assignment_status_type_id => p_assignment_status_type_id
621 ,p_primary_affectation => p_primary_affectation
622 ,p_group_name => p_group_name
623 ,p_object_version_number => p_object_version_number
624 ,p_effective_start_date => p_effective_start_date
625 ,p_effective_end_date => p_effective_end_date
626 );
627 --
628 -- Convert API warning boolean parameter values to specific
629 -- messages and add them to Multiple Message List
630 --
631 --
632 -- Convert API non-warning boolean parameter values
633 --
634 --
635 -- Derive the API return status value based on whether
636 -- messages of any type exist in the Multiple Message List.
637 -- Also disable Multiple Message Detection.
638 --
639 p_return_status := hr_multi_message.get_return_status_disable;
640 hr_utility.set_location(' Leaving:' || l_proc,20);
641 --
642 exception
643 when hr_multi_message.error_message_exist then
644 --
645 -- Catch the Multiple Message List exception which
646 -- indicates API processing has been aborted because
647 -- at least one message exists in the list.
648 --
649 rollback to terminate_affectation_swi;
650 --
651 -- Reset IN OUT parameters and set OUT parameters
652 --
653 p_group_name := null;
654 p_object_version_number := null;
655 p_effective_start_date := null;
656 p_effective_end_date := null;
657 p_return_status := hr_multi_message.get_return_status_disable;
658 hr_utility.set_location(' Leaving:' || l_proc, 30);
659 when others then
660 --
661 -- When Multiple Message Detection is enabled catch
662 -- any Application specific or other unexpected
663 -- exceptions. Adding appropriate details to the
664 -- Multiple Message List. Otherwise re-raise the
665 -- error.
666 --
667 rollback to terminate_affectation_swi;
668 if hr_multi_message.unexpected_error_add(l_proc) then
669 hr_utility.set_location(' Leaving:' || l_proc,40);
670 raise;
671 end if;
672 --
673 -- Reset IN OUT and set OUT parameters
674 --
675
676 p_group_name := null;
677 p_object_version_number := null;
678 p_effective_start_date := null;
679 p_effective_end_date := null;
680 p_return_status := hr_multi_message.get_return_status_disable;
681 hr_utility.set_location(' Leaving:' || l_proc,50);
682
683 end terminate_affectation;
684
685 PROCEDURE suspend_affectation
686 (p_validate in number default hr_api.g_false_num
687 ,p_assignment_id in number
688 ,p_effective_date in date
689 ,p_assignment_status_type_id in number
690 ,p_object_version_number in out nocopy number
691 ,p_effective_start_date out nocopy date
692 ,p_effective_end_date out nocopy date
693 ,p_return_status out nocopy varchar2
694 ) is
695 --
696 -- Variables for API Boolean parameters
697 l_validate boolean;
698 --
699 -- Variables for IN/OUT parameters
700 --
701 -- Other variables
702 l_proc varchar2(72) := g_package ||'suspend_affectation';
703 Begin
704 hr_utility.set_location(' Entering:' || l_proc,10);
705 --
706 -- Issue a savepoint
707 --
708 savepoint suspend_affectation_swi;
709 --
710 -- Initialise Multiple Message Detection
711 --
712 hr_multi_message.enable_message_list;
713 --
714 -- Remember IN OUT parameter IN values
715 --
716 --
717 -- Convert constant values to their corresponding boolean value
718 --
719 l_validate :=
720 hr_api.constant_to_boolean
721 (p_constant_value => p_validate);
722 --
723 -- Register Surrogate ID or user key values
724 --
725 --
726 -- Call API
727 --
728 pqh_fr_assignment_api.suspend_affectation
729 (p_validate => l_validate
730 ,p_assignment_id => p_assignment_id
731 ,p_effective_date => p_effective_date
732 ,p_assignment_status_type_id => p_assignment_status_type_id
733 ,p_object_version_number => p_object_version_number
734 ,p_effective_start_date => p_effective_start_date
735 ,p_effective_end_date => p_effective_end_date
736 );
737 --
738 -- Convert API warning boolean parameter values to specific
739 -- messages and add them to Multiple Message List
740 --
741 --
742 -- Convert API non-warning boolean parameter values
743 --
744 --
745 -- Derive the API return status value based on whether
746 -- messages of any type exist in the Multiple Message List.
747 -- Also disable Multiple Message Detection.
748 --
749 p_return_status := hr_multi_message.get_return_status_disable;
750 hr_utility.set_location(' Leaving:' || l_proc,20);
751 --
752 exception
753 when hr_multi_message.error_message_exist then
754 --
755 -- Catch the Multiple Message List exception which
756 -- indicates API processing has been aborted because
757 -- at least one message exists in the list.
758 --
759 rollback to suspend_affectation_swi;
760 --
761 -- Reset IN OUT parameters and set OUT parameters
762 --
763 p_object_version_number := null;
764 p_effective_start_date := null;
765 p_effective_end_date := null;
766 p_return_status := hr_multi_message.get_return_status_disable;
767 hr_utility.set_location(' Leaving:' || l_proc, 30);
768 when others then
769 --
770 -- When Multiple Message Detection is enabled catch
771 -- any Application specific or other unexpected
772 -- exceptions. Adding appropriate details to the
773 -- Multiple Message List. Otherwise re-raise the
774 -- error.
775 --
776 rollback to suspend_affectation_swi;
777 if hr_multi_message.unexpected_error_add(l_proc) then
778 hr_utility.set_location(' Leaving:' || l_proc,40);
779 raise;
780 end if;
781 --
782 -- Reset IN OUT and set OUT parameters
783 --
784
785
786 p_object_version_number := null;
787 p_effective_start_date := null;
788 p_effective_end_date := null;
789 p_return_status := hr_multi_message.get_return_status_disable;
790 hr_utility.set_location(' Leaving:' || l_proc,50);
791
792 end suspend_affectation;
793
794 PROCEDURE activate_affectation
795 (p_validate in number default hr_api.g_false_num
796 ,p_assignment_id in number
797 ,p_effective_date in date
798 ,p_assignment_status_type_id in number
799 ,p_object_version_number in out nocopy number
800 ,p_effective_start_date out nocopy date
801 ,p_effective_end_date out nocopy date
802 ,p_return_status out nocopy varchar2
803 ) is
804 --
805 -- Variables for API Boolean parameters
806 l_validate boolean;
807 --
808 -- Variables for IN/OUT parameters
809 --
810 -- Other variables
811 l_proc varchar2(72) := g_package ||'suspend_affectation';
812 Begin
813 hr_utility.set_location(' Entering:' || l_proc,10);
814 --
815 -- Issue a savepoint
816 --
817 savepoint activate_affectation_swi;
818 --
819 -- Initialise Multiple Message Detection
820 --
821 hr_multi_message.enable_message_list;
822 --
823 -- Remember IN OUT parameter IN values
824 --
825 --
826 -- Convert constant values to their corresponding boolean value
827 --
828 l_validate :=
829 hr_api.constant_to_boolean
830 (p_constant_value => p_validate);
831 --
832 -- Register Surrogate ID or user key values
833 --
834 --
835 -- Call API
836 --
837 pqh_fr_assignment_api.activate_affectation
838 (p_validate => l_validate
839 ,p_assignment_id => p_assignment_id
840 ,p_effective_date => p_effective_date
841 ,p_assignment_status_type_id => p_assignment_status_type_id
842 ,p_object_version_number => p_object_version_number
843 ,p_effective_start_date => p_effective_start_date
844 ,p_effective_end_date => p_effective_end_date
845 );
846 --
847 -- Convert API warning boolean parameter values to specific
848 -- messages and add them to Multiple Message List
849 --
850 --
851 -- Convert API non-warning boolean parameter values
852 --
853 --
854 -- Derive the API return status value based on whether
855 -- messages of any type exist in the Multiple Message List.
856 -- Also disable Multiple Message Detection.
857 --
858 p_return_status := hr_multi_message.get_return_status_disable;
859 hr_utility.set_location(' Leaving:' || l_proc,20);
860 --
861 exception
862 when hr_multi_message.error_message_exist then
863 --
864 -- Catch the Multiple Message List exception which
865 -- indicates API processing has been aborted because
866 -- at least one message exists in the list.
867 --
868 rollback to activate_affectation_swi;
869 --
870 -- Reset IN OUT parameters and set OUT parameters
871 --
872 p_object_version_number := null;
873 p_effective_start_date := null;
874 p_effective_end_date := null;
875 p_return_status := hr_multi_message.get_return_status_disable;
876 hr_utility.set_location(' Leaving:' || l_proc, 30);
877 when others then
878 --
879 -- When Multiple Message Detection is enabled catch
880 -- any Application specific or other unexpected
881 -- exceptions. Adding appropriate details to the
882 -- Multiple Message List. Otherwise re-raise the
883 -- error.
884 --
885 rollback to activate_affectation_swi;
886 if hr_multi_message.unexpected_error_add(l_proc) then
887 hr_utility.set_location(' Leaving:' || l_proc,40);
888 raise;
889 end if;
890 --
891 -- Reset IN OUT and set OUT parameters
892 --
893
894
895 p_object_version_number := null;
896 p_effective_start_date := null;
897 p_effective_end_date := null;
898 p_return_status := hr_multi_message.get_return_status_disable;
899 hr_utility.set_location(' Leaving:' || l_proc,50);
900
901 end activate_affectation;
902
903 end pqh_fr_assignment_swi;