DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_FR_GLOBAL_PAYSCALE_SWI

Source


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