DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_FR_EMP_STAT_SITUATION_SWI

Source


1 Package Body pqh_fr_emp_stat_situation_swi As
2 /* $Header: pqpsuswi.pkb 120.0 2005/05/29 02:20 appldev noship $ */
3 --
4 -- Package variables
5 --
6 g_package  varchar2(33) := 'pqh_fr_emp_stat_situation_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |-----------------------< create_emp_stat_situation >----------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_emp_stat_situation
12   (p_validate                     in     number    default hr_api.g_false_num
13   ,p_effective_date               in     date
14   ,p_statutory_situation_id       in     number
15   ,p_person_id                    in     number
16   ,p_provisional_start_date       in     date
17   ,p_provisional_end_date         in     date
18   ,p_actual_start_date            in     date      default null
19   ,p_actual_end_date              in     date      default null
20   ,p_approval_flag                in     varchar2  default null
21   ,p_comments                     in     varchar2  default null
22   ,p_contact_person_id            in     number    default null
23   ,p_contact_relationship         in     varchar2  default null
24   ,p_external_organization_id     in     number    default null
25   ,p_renewal_flag                 in     varchar2  default null
26   ,p_renew_stat_situation_id      in     number    default null
27   ,p_seconded_career_id           in     number    default null
28   ,p_attribute_category           in     varchar2  default null
29   ,p_attribute1                   in     varchar2  default null
30   ,p_attribute2                   in     varchar2  default null
31   ,p_attribute3                   in     varchar2  default null
32   ,p_attribute4                   in     varchar2  default null
33   ,p_attribute5                   in     varchar2  default null
34   ,p_attribute6                   in     varchar2  default null
35   ,p_attribute7                   in     varchar2  default null
36   ,p_attribute8                   in     varchar2  default null
37   ,p_attribute9                   in     varchar2  default null
38   ,p_attribute10                  in     varchar2  default null
39   ,p_attribute11                  in     varchar2  default null
40   ,p_attribute12                  in     varchar2  default null
41   ,p_attribute13                  in     varchar2  default null
42   ,p_attribute14                  in     varchar2  default null
43   ,p_attribute15                  in     varchar2  default null
44   ,p_attribute16                  in     varchar2  default null
45   ,p_attribute17                  in     varchar2  default null
46   ,p_attribute18                  in     varchar2  default null
47   ,p_attribute19                  in     varchar2  default null
48   ,p_attribute20                  in     varchar2  default null
49   ,p_attribute21                  in     varchar2  default null
50   ,p_attribute22                  in     varchar2  default null
51   ,p_attribute23                  in     varchar2  default null
52   ,p_attribute24                  in     varchar2  default null
53   ,p_attribute25                  in     varchar2  default null
54   ,p_attribute26                  in     varchar2  default null
55   ,p_attribute27                  in     varchar2  default null
56   ,p_attribute28                  in     varchar2  default null
57   ,p_attribute29                  in     varchar2  default null
58   ,p_attribute30                  in     varchar2  default null
59   ,p_emp_stat_situation_id           out nocopy number
60   ,p_object_version_number           out nocopy number
61   ,p_return_status                   out nocopy varchar2
62   ) is
63   --
64   -- Variables for API Boolean parameters
65   l_validate                      boolean;
66   --
67   -- Variables for IN/OUT parameters
68   --
69   -- Other variables
70   l_proc    varchar2(72) := g_package ||'create_emp_stat_situation';
71 Begin
72   hr_utility.set_location(' Entering:' || l_proc,10);
73   --
74   -- Issue a savepoint
75   --
76   savepoint create_emp_stat_situation_swi;
77   --
78   -- Initialise Multiple Message Detection
79   --
80   hr_multi_message.enable_message_list;
81   --
82   -- Remember IN OUT parameter IN values
83   --
84   --
85   -- Convert constant values to their corresponding boolean value
86   --
87   l_validate :=
88     hr_api.constant_to_boolean
89       (p_constant_value => p_validate);
90   --
91   -- Register Surrogate ID or user key values
92   --
93   --
94     pqh_psu_ins.set_base_key_value(p_emp_stat_situation_id=> p_emp_stat_situation_id);
95   -- Call API
96   --
97   pqh_fr_emp_stat_situation_api.create_emp_stat_situation
98     (p_validate                     => l_validate
99     ,p_effective_date               => p_effective_date
100     ,p_statutory_situation_id       => p_statutory_situation_id
101     ,p_person_id                    => p_person_id
102     ,p_provisional_start_date       => p_provisional_start_date
103     ,p_provisional_end_date         => p_provisional_end_date
104     ,p_actual_start_date            => p_actual_start_date
105     ,p_actual_end_date              => p_actual_end_date
106     ,p_approval_flag                => p_approval_flag
107     ,p_comments                     => p_comments
108     ,p_contact_person_id            => p_contact_person_id
109     ,p_contact_relationship         => p_contact_relationship
110     ,p_external_organization_id     => p_external_organization_id
111     ,p_renewal_flag                 => p_renewal_flag
112     ,p_renew_stat_situation_id      => p_renew_stat_situation_id
113     ,p_seconded_career_id           => p_seconded_career_id
114     ,p_attribute_category           => p_attribute_category
115     ,p_attribute1                   => p_attribute1
116     ,p_attribute2                   => p_attribute2
117     ,p_attribute3                   => p_attribute3
118     ,p_attribute4                   => p_attribute4
119     ,p_attribute5                   => p_attribute5
120     ,p_attribute6                   => p_attribute6
121     ,p_attribute7                   => p_attribute7
122     ,p_attribute8                   => p_attribute8
123     ,p_attribute9                   => p_attribute9
124     ,p_attribute10                  => p_attribute10
125     ,p_attribute11                  => p_attribute11
126     ,p_attribute12                  => p_attribute12
127     ,p_attribute13                  => p_attribute13
128     ,p_attribute14                  => p_attribute14
129     ,p_attribute15                  => p_attribute15
130     ,p_attribute16                  => p_attribute16
131     ,p_attribute17                  => p_attribute17
132     ,p_attribute18                  => p_attribute18
133     ,p_attribute19                  => p_attribute19
134     ,p_attribute20                  => p_attribute20
135     ,p_attribute21                  => p_attribute21
136     ,p_attribute22                  => p_attribute22
137     ,p_attribute23                  => p_attribute23
138     ,p_attribute24                  => p_attribute24
139     ,p_attribute25                  => p_attribute25
140     ,p_attribute26                  => p_attribute26
141     ,p_attribute27                  => p_attribute27
142     ,p_attribute28                  => p_attribute28
143     ,p_attribute29                  => p_attribute29
144     ,p_attribute30                  => p_attribute30
145     ,p_emp_stat_situation_id        => p_emp_stat_situation_id
146     ,p_object_version_number        => p_object_version_number
147     );
148   --
149   -- Convert API warning boolean parameter values to specific
150   -- messages and add them to Multiple Message List
151   --
152   --
153   -- Convert API non-warning boolean parameter values
154   --
155   --
156   -- Derive the API return status value based on whether
157   -- messages of any type exist in the Multiple Message List.
158   -- Also disable Multiple Message Detection.
159   --
160   p_return_status := hr_multi_message.get_return_status_disable;
161   hr_utility.set_location(' Leaving:' || l_proc,20);
162   --
163 exception
164   when hr_multi_message.error_message_exist then
165     --
166     -- Catch the Multiple Message List exception which
167     -- indicates API processing has been aborted because
168     -- at least one message exists in the list.
169     --
170     rollback to create_emp_stat_situation_swi;
171     --
172     -- Reset IN OUT parameters and set OUT parameters
173     --
174     p_emp_stat_situation_id        := null;
175     p_object_version_number        := null;
176     p_return_status := hr_multi_message.get_return_status_disable;
177     hr_utility.set_location(' Leaving:' || l_proc, 30);
178   when others then
179     --
180     -- When Multiple Message Detection is enabled catch
181     -- any Application specific or other unexpected
182     -- exceptions.  Adding appropriate details to the
183     -- Multiple Message List.  Otherwise re-raise the
184     -- error.
185     --
186     rollback to create_emp_stat_situation_swi;
187     if hr_multi_message.unexpected_error_add(l_proc) then
188        hr_utility.set_location(' Leaving:' || l_proc,40);
189        raise;
190     end if;
191     --
192     -- Reset IN OUT and set OUT parameters
193     --
194     p_emp_stat_situation_id        := null;
195     p_object_version_number        := null;
196     p_return_status := hr_multi_message.get_return_status_disable;
197     hr_utility.set_location(' Leaving:' || l_proc,50);
198 end create_emp_stat_situation;
199 -- ----------------------------------------------------------------------------
200 -- |-----------------------< update_emp_stat_situation >----------------------|
201 -- ----------------------------------------------------------------------------
202 PROCEDURE update_emp_stat_situation
203   (p_validate                     in     number    default hr_api.g_false_num
204   ,p_effective_date               in     date
205   ,p_emp_stat_situation_id        in     number
206   ,p_statutory_situation_id       in     number    default hr_api.g_number
207   ,p_person_id                    in     number    default hr_api.g_number
208   ,p_provisional_start_date       in     date      default hr_api.g_date
209   ,p_provisional_end_date         in     date      default hr_api.g_date
210   ,p_actual_start_date            in     date      default hr_api.g_date
211   ,p_actual_end_date              in     date      default hr_api.g_date
212   ,p_approval_flag                in     varchar2  default hr_api.g_varchar2
213   ,p_comments                     in     varchar2  default hr_api.g_varchar2
214   ,p_contact_person_id            in     number    default hr_api.g_number
215   ,p_contact_relationship         in     varchar2  default hr_api.g_varchar2
216   ,p_external_organization_id     in     number    default hr_api.g_number
217   ,p_renewal_flag                 in     varchar2  default hr_api.g_varchar2
218   ,p_renew_stat_situation_id      in     number    default hr_api.g_number
219   ,p_seconded_career_id           in     number    default hr_api.g_number
220   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
221   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
222   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
223   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
224   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
225   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
226   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
227   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
228   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
229   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
230   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
231   ,p_attribute11                  in     varchar2  default hr_api.g_varchar2
232   ,p_attribute12                  in     varchar2  default hr_api.g_varchar2
233   ,p_attribute13                  in     varchar2  default hr_api.g_varchar2
234   ,p_attribute14                  in     varchar2  default hr_api.g_varchar2
235   ,p_attribute15                  in     varchar2  default hr_api.g_varchar2
236   ,p_attribute16                  in     varchar2  default hr_api.g_varchar2
237   ,p_attribute17                  in     varchar2  default hr_api.g_varchar2
238   ,p_attribute18                  in     varchar2  default hr_api.g_varchar2
239   ,p_attribute19                  in     varchar2  default hr_api.g_varchar2
240   ,p_attribute20                  in     varchar2  default hr_api.g_varchar2
241   ,p_attribute21                  in     varchar2  default hr_api.g_varchar2
242   ,p_attribute22                  in     varchar2  default hr_api.g_varchar2
243   ,p_attribute23                  in     varchar2  default hr_api.g_varchar2
244   ,p_attribute24                  in     varchar2  default hr_api.g_varchar2
245   ,p_attribute25                  in     varchar2  default hr_api.g_varchar2
246   ,p_attribute26                  in     varchar2  default hr_api.g_varchar2
247   ,p_attribute27                  in     varchar2  default hr_api.g_varchar2
248   ,p_attribute28                  in     varchar2  default hr_api.g_varchar2
249   ,p_attribute29                  in     varchar2  default hr_api.g_varchar2
250   ,p_attribute30                  in     varchar2  default hr_api.g_varchar2
251   ,p_object_version_number        in out nocopy number
252   ,p_return_status                   out nocopy varchar2
253   ) is
254   --
255   -- Variables for API Boolean parameters
256   l_validate                      boolean;
257   --
258   -- Variables for IN/OUT parameters
259   l_object_version_number         number;
260   --
261   -- Other variables
262   l_proc    varchar2(72) := g_package ||'update_emp_stat_situation';
263 Begin
264   hr_utility.set_location(' Entering:' || l_proc,10);
265   --
266   -- Issue a savepoint
267   --
268   savepoint update_emp_stat_situation_swi;
269   --
270   -- Initialise Multiple Message Detection
271   --
272   hr_multi_message.enable_message_list;
273   --
274   -- Remember IN OUT parameter IN values
275   --
276   l_object_version_number         := p_object_version_number;
277   --
278   -- Convert constant values to their corresponding boolean value
279   --
280   l_validate :=
281     hr_api.constant_to_boolean
282       (p_constant_value => p_validate);
283   --
284   -- Register Surrogate ID or user key values
285   --
286   --
287   -- Call API
288   --
289   pqh_fr_emp_stat_situation_api.update_emp_stat_situation
290     (p_validate                     => l_validate
291     ,p_effective_date               => p_effective_date
292     ,p_emp_stat_situation_id        => p_emp_stat_situation_id
293     ,p_statutory_situation_id       => p_statutory_situation_id
294     ,p_person_id                    => p_person_id
295     ,p_provisional_start_date       => p_provisional_start_date
296     ,p_provisional_end_date         => p_provisional_end_date
297     ,p_actual_start_date            => p_actual_start_date
298     ,p_actual_end_date              => p_actual_end_date
299     ,p_approval_flag                => p_approval_flag
300     ,p_comments                     => p_comments
301     ,p_contact_person_id            => p_contact_person_id
302     ,p_contact_relationship         => p_contact_relationship
303     ,p_external_organization_id     => p_external_organization_id
304     ,p_renewal_flag                 => p_renewal_flag
305     ,p_renew_stat_situation_id      => p_renew_stat_situation_id
306     ,p_seconded_career_id           => p_seconded_career_id
307     ,p_attribute_category           => p_attribute_category
308     ,p_attribute1                   => p_attribute1
309     ,p_attribute2                   => p_attribute2
310     ,p_attribute3                   => p_attribute3
311     ,p_attribute4                   => p_attribute4
312     ,p_attribute5                   => p_attribute5
313     ,p_attribute6                   => p_attribute6
314     ,p_attribute7                   => p_attribute7
315     ,p_attribute8                   => p_attribute8
316     ,p_attribute9                   => p_attribute9
317     ,p_attribute10                  => p_attribute10
318     ,p_attribute11                  => p_attribute11
319     ,p_attribute12                  => p_attribute12
320     ,p_attribute13                  => p_attribute13
321     ,p_attribute14                  => p_attribute14
322     ,p_attribute15                  => p_attribute15
323     ,p_attribute16                  => p_attribute16
324     ,p_attribute17                  => p_attribute17
325     ,p_attribute18                  => p_attribute18
326     ,p_attribute19                  => p_attribute19
327     ,p_attribute20                  => p_attribute20
328     ,p_attribute21                  => p_attribute21
329     ,p_attribute22                  => p_attribute22
330     ,p_attribute23                  => p_attribute23
331     ,p_attribute24                  => p_attribute24
332     ,p_attribute25                  => p_attribute25
333     ,p_attribute26                  => p_attribute26
334     ,p_attribute27                  => p_attribute27
335     ,p_attribute28                  => p_attribute28
336     ,p_attribute29                  => p_attribute29
337     ,p_attribute30                  => p_attribute30
338     ,p_object_version_number        => p_object_version_number
339     );
340   --
341   -- Convert API warning boolean parameter values to specific
342   -- messages and add them to Multiple Message List
343   --
344   --
345   -- Convert API non-warning boolean parameter values
346   --
347   --
348   -- Derive the API return status value based on whether
349   -- messages of any type exist in the Multiple Message List.
350   -- Also disable Multiple Message Detection.
351   --
352   p_return_status := hr_multi_message.get_return_status_disable;
353   hr_utility.set_location(' Leaving:' || l_proc,20);
354   --
355 exception
356   when hr_multi_message.error_message_exist then
357     --
358     -- Catch the Multiple Message List exception which
359     -- indicates API processing has been aborted because
360     -- at least one message exists in the list.
361     --
362     rollback to update_emp_stat_situation_swi;
363     --
364     -- Reset IN OUT parameters and set OUT parameters
365     --
366     p_object_version_number        := l_object_version_number;
367     p_return_status := hr_multi_message.get_return_status_disable;
368     hr_utility.set_location(' Leaving:' || l_proc, 30);
369   when others then
370     --
371     -- When Multiple Message Detection is enabled catch
372     -- any Application specific or other unexpected
373     -- exceptions.  Adding appropriate details to the
374     -- Multiple Message List.  Otherwise re-raise the
375     -- error.
376     --
377     rollback to update_emp_stat_situation_swi;
378     if hr_multi_message.unexpected_error_add(l_proc) then
379        hr_utility.set_location(' Leaving:' || l_proc,40);
380        raise;
381     end if;
382     --
383     -- Reset IN OUT and set OUT parameters
384     --
385     p_object_version_number        := l_object_version_number;
386     p_return_status := hr_multi_message.get_return_status_disable;
387     hr_utility.set_location(' Leaving:' || l_proc,50);
388 end update_emp_stat_situation;
389 -- ----------------------------------------------------------------------------
390 -- |-----------------------< delete_emp_stat_situation >----------------------|
391 -- ----------------------------------------------------------------------------
392 PROCEDURE delete_emp_stat_situation
393   (p_validate                     in     number    default hr_api.g_false_num
394   ,p_emp_stat_situation_id        in     number
395   ,p_object_version_number        in     number
396   ,p_return_status                   out nocopy varchar2
397   ) is
398   --
399   -- Variables for API Boolean parameters
400   l_validate                      boolean;
401   --
402   -- Variables for IN/OUT parameters
403   --
404   -- Other variables
405   l_proc    varchar2(72) := g_package ||'delete_emp_stat_situation';
406 Begin
407   hr_utility.set_location(' Entering:' || l_proc,10);
408   --
409   -- Issue a savepoint
410   --
411   savepoint delete_emp_stat_situation_swi;
412   --
413   -- Initialise Multiple Message Detection
414   --
415   hr_multi_message.enable_message_list;
416   --
417   -- Remember IN OUT parameter IN values
418   --
419   --
420   -- Convert constant values to their corresponding boolean value
421   --
422   l_validate :=
423     hr_api.constant_to_boolean
424       (p_constant_value => p_validate);
425   --
426   -- Register Surrogate ID or user key values
427   --
428   --
429   -- Call API
430   --
431   pqh_fr_emp_stat_situation_api.delete_emp_stat_situation
432     (p_validate                     => l_validate
433     ,p_emp_stat_situation_id        => p_emp_stat_situation_id
434     ,p_object_version_number        => p_object_version_number
435     );
436   --
437   -- Convert API warning boolean parameter values to specific
438   -- messages and add them to Multiple Message List
439   --
440   --
441   -- Convert API non-warning boolean parameter values
442   --
443   --
444   -- Derive the API return status value based on whether
445   -- messages of any type exist in the Multiple Message List.
446   -- Also disable Multiple Message Detection.
447   --
448   p_return_status := hr_multi_message.get_return_status_disable;
449   hr_utility.set_location(' Leaving:' || l_proc,20);
450   --
451 exception
452   when hr_multi_message.error_message_exist then
453     --
454     -- Catch the Multiple Message List exception which
455     -- indicates API processing has been aborted because
456     -- at least one message exists in the list.
457     --
458     rollback to delete_emp_stat_situation_swi;
459     --
460     -- Reset IN OUT parameters and set OUT parameters
461     --
462     p_return_status := hr_multi_message.get_return_status_disable;
463     hr_utility.set_location(' Leaving:' || l_proc, 30);
464   when others then
465     --
466     -- When Multiple Message Detection is enabled catch
467     -- any Application specific or other unexpected
468     -- exceptions.  Adding appropriate details to the
469     -- Multiple Message List.  Otherwise re-raise the
470     -- error.
471     --
472     rollback to delete_emp_stat_situation_swi;
473     if hr_multi_message.unexpected_error_add(l_proc) then
474        hr_utility.set_location(' Leaving:' || l_proc,40);
475        raise;
476     end if;
477     --
478     -- Reset IN OUT and set OUT parameters
479     --
480     p_return_status := hr_multi_message.get_return_status_disable;
481     hr_utility.set_location(' Leaving:' || l_proc,50);
482 end delete_emp_stat_situation;
483 -- ----------------------------------------------------------------------------
484 -- |-----------------------< renew_emp_stat_situation >-----------------------|
485 -- ----------------------------------------------------------------------------
486 PROCEDURE renew_emp_stat_situation
487   (p_validate                     in     number    default hr_api.g_false_num
488   ,p_emp_stat_situation_id        in out nocopy number
489   ,p_renew_stat_situation_id      in     number
490   ,p_renewal_duration             in     number
491   ,p_duration_units               in     varchar2
492   ,p_approval_flag                in     varchar2
493   ,p_comments                     in     varchar2
494   ,p_object_version_number        in out nocopy number
495   ,p_return_status                   out nocopy varchar2
496   ) is
497   --
498   -- Variables for API Boolean parameters
499   l_validate                      boolean;
500   --
501   -- Variables for IN/OUT parameters
502   l_emp_stat_situation_id         number;
503   l_object_version_number         number;
504   --
505   -- Other variables
506   l_proc    varchar2(72) := g_package ||'renew_emp_stat_situation';
507 Begin
508   hr_utility.set_location(' Entering:' || l_proc,10);
509   --
510   -- Issue a savepoint
511   --
512   savepoint renew_emp_stat_situation_swi;
513   --
514   -- Initialise Multiple Message Detection
515   --
516   hr_multi_message.enable_message_list;
517   --
518   -- Remember IN OUT parameter IN values
519   --
520   l_emp_stat_situation_id         := p_emp_stat_situation_id;
521   l_object_version_number         := p_object_version_number;
522   --
523   -- Convert constant values to their corresponding boolean value
524   --
525   l_validate :=
526     hr_api.constant_to_boolean
527       (p_constant_value => p_validate);
528   --
529   -- Register Surrogate ID or user key values
530   --
531   --
532   -- Call API
533   --
534   pqh_fr_emp_stat_situation_api.renew_emp_stat_situation
535     (p_validate                     => l_validate
536     ,p_emp_stat_situation_id        => p_emp_stat_situation_id
537     ,p_renew_stat_situation_id      => p_renew_stat_situation_id
538     ,p_renewal_duration             => p_renewal_duration
539     ,p_duration_units               => p_duration_units
540     ,p_approval_flag                => p_approval_flag
541     ,p_comments                     => p_comments
542     ,p_object_version_number        => p_object_version_number
543     );
544   --
545   -- Convert API warning boolean parameter values to specific
546   -- messages and add them to Multiple Message List
547   --
548   --
549   -- Convert API non-warning boolean parameter values
550   --
551   --
552   -- Derive the API return status value based on whether
553   -- messages of any type exist in the Multiple Message List.
554   -- Also disable Multiple Message Detection.
555   --
556   p_return_status := hr_multi_message.get_return_status_disable;
557   hr_utility.set_location(' Leaving:' || l_proc,20);
558   --
559 exception
560   when hr_multi_message.error_message_exist then
561     --
562     -- Catch the Multiple Message List exception which
563     -- indicates API processing has been aborted because
564     -- at least one message exists in the list.
565     --
566     rollback to renew_emp_stat_situation_swi;
567     --
568     -- Reset IN OUT parameters and set OUT parameters
569     --
570     p_emp_stat_situation_id        := l_emp_stat_situation_id;
571     p_object_version_number        := l_object_version_number;
572     p_return_status := hr_multi_message.get_return_status_disable;
573     hr_utility.set_location(' Leaving:' || l_proc, 30);
574   when others then
575     --
576     -- When Multiple Message Detection is enabled catch
577     -- any Application specific or other unexpected
578     -- exceptions.  Adding appropriate details to the
579     -- Multiple Message List.  Otherwise re-raise the
580     -- error.
581     --
582     rollback to renew_emp_stat_situation_swi;
583     if hr_multi_message.unexpected_error_add(l_proc) then
584        hr_utility.set_location(' Leaving:' || l_proc,40);
585        raise;
586     end if;
587     --
588     -- Reset IN OUT and set OUT parameters
589     --
590     p_emp_stat_situation_id        := l_emp_stat_situation_id;
591     p_object_version_number        := l_object_version_number;
592     p_return_status := hr_multi_message.get_return_status_disable;
593     hr_utility.set_location(' Leaving:' || l_proc,50);
594 end renew_emp_stat_situation;
595 -- ----------------------------------------------------------------------------
596 -- |---------------------< reinstate_emp_stat_situation >---------------------|
597 -- ----------------------------------------------------------------------------
598 PROCEDURE reinstate_emp_stat_situation
599   (p_validate                     in     number    default hr_api.g_false_num
600   ,p_person_id                    in     number
601   ,p_emp_stat_situation_id        in     number
602   ,p_reinstate_date               in     date
603   ,p_comments                     in     varchar2
604   ,p_new_emp_stat_situation_id       out nocopy number
605   ,p_return_status                   out nocopy varchar2
606   ) is
607   --
608   -- Variables for API Boolean parameters
609   l_validate                      boolean;
610   --
611   -- Variables for IN/OUT parameters
612   --
613   -- Other variables
614   l_proc    varchar2(72) := g_package ||'reinstate_emp_stat_situation';
615 Begin
616   hr_utility.set_location(' Entering:' || l_proc,10);
617   --
618   -- Issue a savepoint
619   --
620   savepoint reinstate_emp_stat_situation;
621   --
622   -- Initialise Multiple Message Detection
623   --
624   hr_multi_message.enable_message_list;
625   --
626   -- Remember IN OUT parameter IN values
627   --
628   --
629   -- Convert constant values to their corresponding boolean value
630   --
631   l_validate :=
632     hr_api.constant_to_boolean
633       (p_constant_value => p_validate);
634   --
635   -- Register Surrogate ID or user key values
636   --
637   --
638   -- Call API
639   --
640   pqh_fr_emp_stat_situation_api.reinstate_emp_stat_situation
641     (p_validate                     => l_validate
642     ,p_person_id                    => p_person_id
643     ,p_emp_stat_situation_id        => p_emp_stat_situation_id
644     ,p_reinstate_date               => p_reinstate_date
645     ,p_comments                     => p_comments
646     ,p_new_emp_stat_situation_id    => p_new_emp_stat_situation_id
647     );
648   --
649   -- Convert API warning boolean parameter values to specific
650   -- messages and add them to Multiple Message List
651   --
652   --
653   -- Convert API non-warning boolean parameter values
654   --
655   --
656   -- Derive the API return status value based on whether
657   -- messages of any type exist in the Multiple Message List.
658   -- Also disable Multiple Message Detection.
659   --
660   p_return_status := hr_multi_message.get_return_status_disable;
661   hr_utility.set_location(' Leaving:' || l_proc,20);
662   --
663 exception
664   when hr_multi_message.error_message_exist then
665     --
666     -- Catch the Multiple Message List exception which
667     -- indicates API processing has been aborted because
668     -- at least one message exists in the list.
669     --
670     rollback to reinstate_emp_stat_situation;
671     --
672     -- Reset IN OUT parameters and set OUT parameters
673     --
674     p_new_emp_stat_situation_id    := null;
675     p_return_status := hr_multi_message.get_return_status_disable;
676     hr_utility.set_location(' Leaving:' || l_proc, 30);
677   when others then
678     --
679     -- When Multiple Message Detection is enabled catch
680     -- any Application specific or other unexpected
681     -- exceptions.  Adding appropriate details to the
682     -- Multiple Message List.  Otherwise re-raise the
683     -- error.
684     --
685     rollback to reinstate_emp_stat_situation;
686     if hr_multi_message.unexpected_error_add(l_proc) then
687        hr_utility.set_location(' Leaving:' || l_proc,40);
688        raise;
689     end if;
690     --
691     -- Reset IN OUT and set OUT parameters
692     --
693     p_new_emp_stat_situation_id    := null;
694     p_return_status := hr_multi_message.get_return_status_disable;
695     hr_utility.set_location(' Leaving:' || l_proc,50);
696 end reinstate_emp_stat_situation;
697 end pqh_fr_emp_stat_situation_swi;