DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_USER_COLUMN_INSTANCE_SWI

Source


1 Package Body pay_user_column_instance_swi As
2 /* $Header: pypciswi.pkb 120.0 2005/05/29 07:24 appldev noship $ */
3 --
4 -- Package variables
5 --
6 g_package  varchar2(43) := 'pay_user_column_instance_swi';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |----------------------< create_user_column_instance >---------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_user_column_instance
12   (p_validate                     in     number    default hr_api.g_false_num
13   ,p_effective_date               in     date
14   ,p_user_row_id                  in     number
15   ,p_user_column_id               in     number
16   ,p_value                        in     varchar2  default null
17   ,p_business_group_id            in     number    default null
18   ,p_legislation_code             in     varchar2  default null
19   ,p_user_column_instance_id         out nocopy number
20   ,p_object_version_number           out nocopy number
21   ,p_effective_start_date            out nocopy date
22   ,p_effective_end_date              out nocopy date
23   ,p_return_status                   out nocopy varchar2
24   ) is
25   --
26   -- Variables for API Boolean parameters
27   l_validate                      boolean;
28   --
29   -- Variables for IN/OUT parameters
30   --
31   -- Other variables
32   l_proc    varchar2(72) := g_package ||'create_user_column_instance';
33 Begin
34   hr_utility.set_location(' Entering:' || l_proc,10);
35   --
36   -- Issue a savepoint
37 savepoint create_user_column_instance;
38   --
39   -- Initialise Multiple Message Detection
40   --
41   hr_multi_message.enable_message_list;
42   --
43   -- Remember IN OUT parameter IN values
44   --
45   --
46   -- Convert constant values to their corresponding boolean value
47   --
48   l_validate :=
49     hr_api.constant_to_boolean
50       (p_constant_value => p_validate);
51   --
52   -- Register Surrogate ID or user key values
53   --
54   --
55   -- Call API
56   --
57   pay_user_column_instance_api.create_user_column_instance
58     (p_validate                     => l_validate
59     ,p_effective_date               => p_effective_date
60     ,p_user_row_id                  => p_user_row_id
61     ,p_user_column_id               => p_user_column_id
62     ,p_value                        => p_value
63     ,p_business_group_id            => p_business_group_id
64     ,p_legislation_code             => p_legislation_code
65     ,p_user_column_instance_id      => p_user_column_instance_id
66     ,p_object_version_number        => p_object_version_number
67     ,p_effective_start_date         => p_effective_start_date
68     ,p_effective_end_date           => p_effective_end_date
69     );
70   --
71   -- Convert API warning boolean parameter values to specific
72   -- messages and add them to Multiple Message List
73   --
74   --
75   -- Convert API non-warning boolean parameter values
76   --
77   --
78   -- Derive the API return status value based on whether
79   -- messages of any type exist in the Multiple Message List.
80   -- Also disable Multiple Message Detection.
81   --
82   p_return_status := hr_multi_message.get_return_status_disable;
83   hr_utility.set_location(' Leaving:' || l_proc,20);
84   --
85 exception
86   when hr_multi_message.error_message_exist then
87     --
88     -- Catch the Multiple Message List exception which
89     -- indicates API processing has been aborted because
90     -- at least one message exists in the list.
91     --
92     rollback to create_user_column_instance;
93     --
94     -- Reset IN OUT parameters and set OUT parameters
95     --
96     p_user_column_instance_id      := null;
97     p_object_version_number        := null;
98     p_effective_start_date         := null;
99     p_effective_end_date           := null;
100     p_return_status := hr_multi_message.get_return_status_disable;
101     hr_utility.set_location(' Leaving:' || l_proc, 30);
102   when others then
103     --
104     -- When Multiple Message Detection is enabled catch
105     -- any Application specific or other unexpected
106     -- exceptions.  Adding appropriate details to the
107     -- Multiple Message List.  Otherwise re-raise the
108     -- error.
109     --
110     rollback to create_user_column_instance;
111     if hr_multi_message.unexpected_error_add(l_proc) then
112        hr_utility.set_location(' Leaving:' || l_proc,40);
113        raise;
114     end if;
115     --
116     -- Reset IN OUT and set OUT parameters
117     --
118     p_user_column_instance_id      := null;
119     p_object_version_number        := null;
120     p_effective_start_date         := null;
121     p_effective_end_date           := null;
122     p_return_status := hr_multi_message.get_return_status_disable;
123     hr_utility.set_location(' Leaving:' || l_proc,50);
124 end create_user_column_instance;
125 -- ----------------------------------------------------------------------------
126 -- |----------------------< update_user_column_instance >---------------------|
127 -- ----------------------------------------------------------------------------
128 PROCEDURE update_user_column_instance
129   (p_validate                     in     number    default hr_api.g_false_num
130   ,p_effective_date               in     date
131   ,p_user_column_instance_id      in     number
132   ,p_datetrack_update_mode        in     varchar2
133   ,p_value                        in     varchar2  default hr_api.g_varchar2
134   ,p_object_version_number        in out nocopy number
135   ,p_effective_start_date            out nocopy date
136   ,p_effective_end_date              out nocopy date
137   ,p_return_status                   out nocopy varchar2
138   ) is
139   --
140   -- Variables for API Boolean parameters
141   l_validate                      boolean;
142   --
143   -- Variables for IN/OUT parameters
144   l_object_version_number         number;
145   --
146   -- Other variables
147   l_proc    varchar2(72) := g_package ||'update_user_column_instance';
148 Begin
149   hr_utility.set_location(' Entering:' || l_proc,10);
150   --
151   -- Issue a savepoint
152   --
153   savepoint update_user_column_instance;
154   --
155   -- Initialise Multiple Message Detection
156   --
157   hr_multi_message.enable_message_list;
158   --
159   -- Remember IN OUT parameter IN values
160   --
161   l_object_version_number         := p_object_version_number;
162   --
163   -- Convert constant values to their corresponding boolean value
164   --
165   l_validate :=
166     hr_api.constant_to_boolean
167       (p_constant_value => p_validate);
168   --
169   -- Register Surrogate ID or user key values
170   --
171   --
172   -- Call API
173   --
174   pay_user_column_instance_api.update_user_column_instance
175     (p_validate                     => l_validate
176     ,p_effective_date               => p_effective_date
177     ,p_user_column_instance_id      => p_user_column_instance_id
178     ,p_datetrack_update_mode        => p_datetrack_update_mode
179     ,p_value                        => p_value
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 update_user_column_instance;
207     --
208     -- Reset IN OUT parameters and set OUT parameters
209     --
210     p_object_version_number        := l_object_version_number;
211     p_effective_start_date         := null;
212     p_effective_end_date           := null;
213     p_return_status := hr_multi_message.get_return_status_disable;
214     hr_utility.set_location(' Leaving:' || l_proc, 30);
215   when others then
216     --
217     -- When Multiple Message Detection is enabled catch
218     -- any Application specific or other unexpected
219     -- exceptions.  Adding appropriate details to the
220     -- Multiple Message List.  Otherwise re-raise the
221     -- error.
222     --
223     rollback to update_user_column_instance;
224     if hr_multi_message.unexpected_error_add(l_proc) then
225        hr_utility.set_location(' Leaving:' || l_proc,40);
226        raise;
227     end if;
228     --
229     -- Reset IN OUT and set OUT parameters
230     --
231     p_object_version_number        := l_object_version_number;
232     p_effective_start_date         := null;
233     p_effective_end_date           := null;
234     p_return_status := hr_multi_message.get_return_status_disable;
235     hr_utility.set_location(' Leaving:' || l_proc,50);
236 end update_user_column_instance;
237 -- ----------------------------------------------------------------------------
238 -- |----------------------< delete_user_column_instance >---------------------|
239 -- ----------------------------------------------------------------------------
240 PROCEDURE delete_user_column_instance
241   (p_validate                     in     number    default hr_api.g_false_num
242   ,p_effective_date               in     date
243   ,p_user_column_instance_id      in     number
244   ,p_datetrack_update_mode        in     varchar2
245   ,p_object_version_number        in out nocopy number
246   ,p_effective_start_date            out nocopy date
247   ,p_effective_end_date              out nocopy date
248   ,p_return_status                   out nocopy varchar2
249   ) is
250   --
251   -- Variables for API Boolean parameters
252   l_validate                      boolean;
253   --
254   -- Variables for IN/OUT parameters
255   l_object_version_number         number;
256   --
257   -- Other variables
258   l_proc    varchar2(72) := g_package ||'delete_user_column_instance';
259 Begin
260   hr_utility.set_location(' Entering:' || l_proc,10);
261   --
262   -- Issue a savepoint
263   --
264   savepoint delete_user_column_instance;
265   --
266   -- Initialise Multiple Message Detection
267   --
268   hr_multi_message.enable_message_list;
269   --
270   -- Remember IN OUT parameter IN values
271   --
272   l_object_version_number         := p_object_version_number;
273   --
274   -- Convert constant values to their corresponding boolean value
275   --
276   l_validate :=
277     hr_api.constant_to_boolean
278       (p_constant_value => p_validate);
279   --
280   -- Register Surrogate ID or user key values
281   --
282   --
283   -- Call API
284   --
285   pay_user_column_instance_api.delete_user_column_instance
286     (p_validate                     => l_validate
287     ,p_effective_date               => p_effective_date
288     ,p_user_column_instance_id      => p_user_column_instance_id
289     ,p_datetrack_update_mode        => p_datetrack_update_mode
290     ,p_object_version_number        => p_object_version_number
291     ,p_effective_start_date         => p_effective_start_date
292     ,p_effective_end_date           => p_effective_end_date
293     );
294   --
295   -- Convert API warning boolean parameter values to specific
296   -- messages and add them to Multiple Message List
297   --
298   --
299   -- Convert API non-warning boolean parameter values
300   --
301   --
302   -- Derive the API return status value based on whether
303   -- messages of any type exist in the Multiple Message List.
304   -- Also disable Multiple Message Detection.
305   --
306   p_return_status := hr_multi_message.get_return_status_disable;
307   hr_utility.set_location(' Leaving:' || l_proc,20);
308   --
309 exception
310   when hr_multi_message.error_message_exist then
311     --
312     -- Catch the Multiple Message List exception which
313     -- indicates API processing has been aborted because
314     -- at least one message exists in the list.
315     --
316     rollback to delete_user_column_instance;
317     --
318     -- Reset IN OUT parameters and set OUT parameters
319     --
320     p_object_version_number        := l_object_version_number;
321     p_effective_start_date         := null;
322     p_effective_end_date           := null;
323     p_return_status := hr_multi_message.get_return_status_disable;
324     hr_utility.set_location(' Leaving:' || l_proc, 30);
325   when others then
326     --
327     -- When Multiple Message Detection is enabled catch
328     -- any Application specific or other unexpected
329     -- exceptions.  Adding appropriate details to the
330     -- Multiple Message List.  Otherwise re-raise the
331     -- error.
332     --
333     rollback to delete_user_column_instance;
334     if hr_multi_message.unexpected_error_add(l_proc) then
335        hr_utility.set_location(' Leaving:' || l_proc,40);
336        raise;
337     end if;
338     --
339     -- Reset IN OUT and set OUT parameters
340     --
341     p_object_version_number        := l_object_version_number;
342     p_effective_start_date         := null;
343     p_effective_end_date           := null;
344     p_return_status := hr_multi_message.get_return_status_disable;
345     hr_utility.set_location(' Leaving:' || l_proc,50);
346 end delete_user_column_instance;
347 end pay_user_column_instance_swi;