[Home] [Help]
PACKAGE BODY: APPS.OTA_SKILL_PROVISION_SWI
Source
1 Package Body ota_skill_provision_swi As
2 /* $Header: ottspswi.pkb 115.0 2003/12/31 00:49 arkashya noship $ */
3 --
4 -- Package variables
5 --
6 g_package varchar2(33) := 'ota_skill_provision_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_skill_provision >------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_skill_provision
12 (p_skill_provision_id in number
13 ,p_activity_version_id in number
14 ,p_object_version_number out nocopy number
15 ,p_type in varchar2
16 ,p_comments in varchar2 default null
17 ,p_tsp_information_category in varchar2 default null
18 ,p_tsp_information1 in varchar2 default null
19 ,p_tsp_information2 in varchar2 default null
20 ,p_tsp_information3 in varchar2 default null
21 ,p_tsp_information4 in varchar2 default null
22 ,p_tsp_information5 in varchar2 default null
23 ,p_tsp_information6 in varchar2 default null
24 ,p_tsp_information7 in varchar2 default null
25 ,p_tsp_information8 in varchar2 default null
26 ,p_tsp_information9 in varchar2 default null
27 ,p_tsp_information10 in varchar2 default null
28 ,p_tsp_information11 in varchar2 default null
29 ,p_tsp_information12 in varchar2 default null
30 ,p_tsp_information13 in varchar2 default null
31 ,p_tsp_information14 in varchar2 default null
32 ,p_tsp_information15 in varchar2 default null
33 ,p_tsp_information16 in varchar2 default null
34 ,p_tsp_information17 in varchar2 default null
35 ,p_tsp_information18 in varchar2 default null
36 ,p_tsp_information19 in varchar2 default null
37 ,p_tsp_information20 in varchar2 default null
38 ,p_analysis_criteria_id in number
39 ,p_validate in number default hr_api.g_false_num
40 ,p_return_status out nocopy varchar2
41 ) is
42 --
43 -- Variables for API Boolean parameters
44 l_validate boolean;
45 --
46 -- Variables for IN/OUT parameters
47 --
48 -- Other variables
49 l_skill_provision_id number;
50 l_proc varchar2(72) := g_package ||'create_skill_provision';
51 Begin
52 hr_utility.set_location(' Entering:' || l_proc,10);
53 --
54 -- Issue a savepoint
55 --
56 savepoint create_skill_provision_swi;
57 --
58 -- Initialise Multiple Message Detection
59 --
60 hr_multi_message.enable_message_list;
61 --
62 -- Remember IN OUT parameter IN values
63 --
64 --
65 -- Convert constant values to their corresponding boolean value
66 --
67 l_validate :=
68 hr_api.constant_to_boolean
69 (p_constant_value => p_validate);
70 --
71 -- Register Surrogate ID or user key values
72 --
73 ota_tsp_ins.set_base_key_value
74 (p_skill_provision_id => p_skill_provision_id
75 );
76 --
77 -- Call API
78 --
79 ota_skill_provision_api.create_skill_provision
80 (p_skill_provision_id => l_skill_provision_id
81 ,p_activity_version_id => p_activity_version_id
82 ,p_object_version_number => p_object_version_number
83 ,p_type => p_type
84 ,p_comments => p_comments
85 ,p_tsp_information_category => p_tsp_information_category
86 ,p_tsp_information1 => p_tsp_information1
87 ,p_tsp_information2 => p_tsp_information2
88 ,p_tsp_information3 => p_tsp_information3
89 ,p_tsp_information4 => p_tsp_information4
90 ,p_tsp_information5 => p_tsp_information5
91 ,p_tsp_information6 => p_tsp_information6
92 ,p_tsp_information7 => p_tsp_information7
93 ,p_tsp_information8 => p_tsp_information8
94 ,p_tsp_information9 => p_tsp_information9
95 ,p_tsp_information10 => p_tsp_information10
96 ,p_tsp_information11 => p_tsp_information11
97 ,p_tsp_information12 => p_tsp_information12
98 ,p_tsp_information13 => p_tsp_information13
99 ,p_tsp_information14 => p_tsp_information14
100 ,p_tsp_information15 => p_tsp_information15
101 ,p_tsp_information16 => p_tsp_information16
102 ,p_tsp_information17 => p_tsp_information17
103 ,p_tsp_information18 => p_tsp_information18
104 ,p_tsp_information19 => p_tsp_information19
105 ,p_tsp_information20 => p_tsp_information20
106 ,p_analysis_criteria_id => p_analysis_criteria_id
107 ,p_validate => l_validate
108 );
109 --
110 -- Convert API warning boolean parameter values to specific
111 -- messages and add them to Multiple Message List
112 --
113 --
114 -- Convert API non-warning boolean parameter values
115 --
116 --
117 -- Derive the API return status value based on whether
118 -- messages of any type exist in the Multiple Message List.
119 -- Also disable Multiple Message Detection.
120 --
121 p_return_status := hr_multi_message.get_return_status_disable;
122 hr_utility.set_location(' Leaving:' || l_proc,20);
123 --
124 exception
125 when hr_multi_message.error_message_exist then
126 --
127 -- Catch the Multiple Message List exception which
128 -- indicates API processing has been aborted because
129 -- at least one message exists in the list.
130 --
131 rollback to create_skill_provision_swi;
132 --
133 -- Reset IN OUT parameters and set OUT parameters
134 --
135 p_object_version_number := null;
136 p_return_status := hr_multi_message.get_return_status_disable;
137 hr_utility.set_location(' Leaving:' || l_proc, 30);
138 when others then
139 --
140 -- When Multiple Message Detection is enabled catch
141 -- any Application specific or other unexpected
142 -- exceptions. Adding appropriate details to the
143 -- Multiple Message List. Otherwise re-raise the
144 -- error.
145 --
146 rollback to create_skill_provision_swi;
147 if hr_multi_message.unexpected_error_add(l_proc) then
148 hr_utility.set_location(' Leaving:' || l_proc,40);
149 raise;
150 end if;
151 --
152 -- Reset IN OUT and set OUT parameters
153 --
154 p_object_version_number := null;
155 p_return_status := hr_multi_message.get_return_status_disable;
156 hr_utility.set_location(' Leaving:' || l_proc,50);
157 end create_skill_provision;
158 -- ----------------------------------------------------------------------------
159 -- |------------------------< delete_skill_provision >------------------------|
160 -- ----------------------------------------------------------------------------
161 PROCEDURE delete_skill_provision
162 (p_skill_provision_id in number
163 ,p_object_version_number in number
164 ,p_validate in number default hr_api.g_false_num
165 ,p_return_status out nocopy varchar2
166 ) is
167 --
168 -- Variables for API Boolean parameters
169 l_validate boolean;
170 --
171 -- Variables for IN/OUT parameters
172 --
173 -- Other variables
174 l_proc varchar2(72) := g_package ||'delete_skill_provision';
175 Begin
176 hr_utility.set_location(' Entering:' || l_proc,10);
177 --
178 -- Issue a savepoint
179 --
180 savepoint delete_skill_provision_swi;
181 --
182 -- Initialise Multiple Message Detection
183 --
184 hr_multi_message.enable_message_list;
185 --
186 -- Remember IN OUT parameter IN values
187 --
188 --
189 -- Convert constant values to their corresponding boolean value
190 --
191 l_validate :=
192 hr_api.constant_to_boolean
193 (p_constant_value => p_validate);
194 --
195 -- Register Surrogate ID or user key values
196 --
197 --
198 -- Call API
199 --
200 ota_skill_provision_api.delete_skill_provision
201 (p_skill_provision_id => p_skill_provision_id
202 ,p_object_version_number => p_object_version_number
203 ,p_validate => l_validate
204 );
205 --
206 -- Convert API warning boolean parameter values to specific
207 -- messages and add them to Multiple Message List
208 --
209 --
210 -- Convert API non-warning boolean parameter values
211 --
212 --
213 -- Derive the API return status value based on whether
214 -- messages of any type exist in the Multiple Message List.
215 -- Also disable Multiple Message Detection.
216 --
217 p_return_status := hr_multi_message.get_return_status_disable;
218 hr_utility.set_location(' Leaving:' || l_proc,20);
219 --
220 exception
221 when hr_multi_message.error_message_exist then
222 --
223 -- Catch the Multiple Message List exception which
224 -- indicates API processing has been aborted because
225 -- at least one message exists in the list.
226 --
227 rollback to delete_skill_provision_swi;
228 --
229 -- Reset IN OUT parameters and set OUT parameters
230 --
231 p_return_status := hr_multi_message.get_return_status_disable;
232 hr_utility.set_location(' Leaving:' || l_proc, 30);
233 when others then
234 --
235 -- When Multiple Message Detection is enabled catch
236 -- any Application specific or other unexpected
237 -- exceptions. Adding appropriate details to the
238 -- Multiple Message List. Otherwise re-raise the
239 -- error.
240 --
241 rollback to delete_skill_provision_swi;
242 if hr_multi_message.unexpected_error_add(l_proc) then
243 hr_utility.set_location(' Leaving:' || l_proc,40);
244 raise;
245 end if;
246 --
247 -- Reset IN OUT and set OUT parameters
248 --
249 p_return_status := hr_multi_message.get_return_status_disable;
250 hr_utility.set_location(' Leaving:' || l_proc,50);
251 end delete_skill_provision;
252 -- ----------------------------------------------------------------------------
253 -- |------------------------< update_skill_provision >------------------------|
254 -- ----------------------------------------------------------------------------
255 PROCEDURE update_skill_provision
256 (p_skill_provision_id in number
257 ,p_activity_version_id in number default hr_api.g_number
258 ,p_object_version_number in out nocopy number
259 ,p_type in varchar2 default hr_api.g_varchar2
260 ,p_comments in varchar2 default hr_api.g_varchar2
261 ,p_tsp_information_category in varchar2 default hr_api.g_varchar2
262 ,p_tsp_information1 in varchar2 default hr_api.g_varchar2
263 ,p_tsp_information2 in varchar2 default hr_api.g_varchar2
264 ,p_tsp_information3 in varchar2 default hr_api.g_varchar2
265 ,p_tsp_information4 in varchar2 default hr_api.g_varchar2
266 ,p_tsp_information5 in varchar2 default hr_api.g_varchar2
267 ,p_tsp_information6 in varchar2 default hr_api.g_varchar2
268 ,p_tsp_information7 in varchar2 default hr_api.g_varchar2
269 ,p_tsp_information8 in varchar2 default hr_api.g_varchar2
270 ,p_tsp_information9 in varchar2 default hr_api.g_varchar2
271 ,p_tsp_information10 in varchar2 default hr_api.g_varchar2
272 ,p_tsp_information11 in varchar2 default hr_api.g_varchar2
273 ,p_tsp_information12 in varchar2 default hr_api.g_varchar2
274 ,p_tsp_information13 in varchar2 default hr_api.g_varchar2
275 ,p_tsp_information14 in varchar2 default hr_api.g_varchar2
276 ,p_tsp_information15 in varchar2 default hr_api.g_varchar2
277 ,p_tsp_information16 in varchar2 default hr_api.g_varchar2
278 ,p_tsp_information17 in varchar2 default hr_api.g_varchar2
279 ,p_tsp_information18 in varchar2 default hr_api.g_varchar2
280 ,p_tsp_information19 in varchar2 default hr_api.g_varchar2
281 ,p_tsp_information20 in varchar2 default hr_api.g_varchar2
282 ,p_analysis_criteria_id in number default hr_api.g_number
283 ,p_validate in number default hr_api.g_false_num
284 ,p_return_status out nocopy varchar2
285 ) is
286 --
287 -- Variables for API Boolean parameters
288 l_validate boolean;
289 --
290 -- Variables for IN/OUT parameters
291 l_object_version_number number;
292 --
293 -- Other variables
294 l_proc varchar2(72) := g_package ||'update_skill_provision';
295 Begin
296 hr_utility.set_location(' Entering:' || l_proc,10);
297 --
298 -- Issue a savepoint
299 --
300 savepoint update_skill_provision_swi;
301 --
302 -- Initialise Multiple Message Detection
303 --
304 hr_multi_message.enable_message_list;
305 --
306 -- Remember IN OUT parameter IN values
307 --
308 l_object_version_number := p_object_version_number;
309 --
310 -- Convert constant values to their corresponding boolean value
311 --
312 l_validate :=
313 hr_api.constant_to_boolean
314 (p_constant_value => p_validate);
315 --
316 -- Register Surrogate ID or user key values
317 --
318 --
319 -- Call API
320 --
321 ota_skill_provision_api.update_skill_provision
322 (p_skill_provision_id => p_skill_provision_id
323 ,p_activity_version_id => p_activity_version_id
324 ,p_object_version_number => p_object_version_number
325 ,p_type => p_type
326 ,p_comments => p_comments
327 ,p_tsp_information_category => p_tsp_information_category
328 ,p_tsp_information1 => p_tsp_information1
329 ,p_tsp_information2 => p_tsp_information2
330 ,p_tsp_information3 => p_tsp_information3
331 ,p_tsp_information4 => p_tsp_information4
332 ,p_tsp_information5 => p_tsp_information5
333 ,p_tsp_information6 => p_tsp_information6
334 ,p_tsp_information7 => p_tsp_information7
335 ,p_tsp_information8 => p_tsp_information8
336 ,p_tsp_information9 => p_tsp_information9
337 ,p_tsp_information10 => p_tsp_information10
338 ,p_tsp_information11 => p_tsp_information11
339 ,p_tsp_information12 => p_tsp_information12
340 ,p_tsp_information13 => p_tsp_information13
341 ,p_tsp_information14 => p_tsp_information14
342 ,p_tsp_information15 => p_tsp_information15
343 ,p_tsp_information16 => p_tsp_information16
344 ,p_tsp_information17 => p_tsp_information17
345 ,p_tsp_information18 => p_tsp_information18
346 ,p_tsp_information19 => p_tsp_information19
347 ,p_tsp_information20 => p_tsp_information20
348 ,p_analysis_criteria_id => p_analysis_criteria_id
349 ,p_validate => l_validate
350 );
351 --
352 -- Convert API warning boolean parameter values to specific
353 -- messages and add them to Multiple Message List
354 --
355 --
356 -- Convert API non-warning boolean parameter values
357 --
358 --
359 -- Derive the API return status value based on whether
360 -- messages of any type exist in the Multiple Message List.
361 -- Also disable Multiple Message Detection.
362 --
363 p_return_status := hr_multi_message.get_return_status_disable;
364 hr_utility.set_location(' Leaving:' || l_proc,20);
365 --
366 exception
367 when hr_multi_message.error_message_exist then
368 --
369 -- Catch the Multiple Message List exception which
370 -- indicates API processing has been aborted because
371 -- at least one message exists in the list.
372 --
373 rollback to update_skill_provision_swi;
374 --
375 -- Reset IN OUT parameters and set OUT parameters
376 --
377 p_object_version_number := l_object_version_number;
378 p_return_status := hr_multi_message.get_return_status_disable;
379 hr_utility.set_location(' Leaving:' || l_proc, 30);
380 when others then
381 --
382 -- When Multiple Message Detection is enabled catch
383 -- any Application specific or other unexpected
384 -- exceptions. Adding appropriate details to the
385 -- Multiple Message List. Otherwise re-raise the
386 -- error.
387 --
388 rollback to update_skill_provision_swi;
389 if hr_multi_message.unexpected_error_add(l_proc) then
390 hr_utility.set_location(' Leaving:' || l_proc,40);
391 raise;
392 end if;
393 --
394 -- Reset IN OUT and set OUT parameters
395 --
396 p_object_version_number := l_object_version_number;
397 p_return_status := hr_multi_message.get_return_status_disable;
398 hr_utility.set_location(' Leaving:' || l_proc,50);
399 end update_skill_provision;
400 end ota_skill_provision_swi;