[Home] [Help]
PACKAGE BODY: APPS.OTA_SKILL_PROVISION_API
Source
1 Package Body OTA_SKILL_PROVISION_API as
2 /* $Header: ottspapi.pkb 115.1 2003/12/30 17:50:21 asud noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' OTA_SKILL_PROVISION_API.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< CREATE_SKILL_PROVISION >------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 Procedure create_skill_provision
13 (
14 p_skill_provision_id out nocopy number,
15 p_activity_version_id in number,
16 p_object_version_number out nocopy number,
17 p_type in varchar2,
18 p_comments in varchar2 default null,
19 p_tsp_information_category in varchar2 default null,
20 p_tsp_information1 in varchar2 default null,
21 p_tsp_information2 in varchar2 default null,
22 p_tsp_information3 in varchar2 default null,
23 p_tsp_information4 in varchar2 default null,
24 p_tsp_information5 in varchar2 default null,
25 p_tsp_information6 in varchar2 default null,
26 p_tsp_information7 in varchar2 default null,
27 p_tsp_information8 in varchar2 default null,
28 p_tsp_information9 in varchar2 default null,
29 p_tsp_information10 in varchar2 default null,
30 p_tsp_information11 in varchar2 default null,
31 p_tsp_information12 in varchar2 default null,
32 p_tsp_information13 in varchar2 default null,
33 p_tsp_information14 in varchar2 default null,
34 p_tsp_information15 in varchar2 default null,
35 p_tsp_information16 in varchar2 default null,
36 p_tsp_information17 in varchar2 default null,
37 p_tsp_information18 in varchar2 default null,
38 p_tsp_information19 in varchar2 default null,
39 p_tsp_information20 in varchar2 default null,
40 p_analysis_criteria_id in number,
41 p_validate in boolean default false
42 ) is
43 --
44 -- Declare cursors and local variables
45 --
46 l_proc varchar2(72) := g_package||' Create Skill Provision';
47 l_skill_provision_id number;
48 l_object_version_number number;
49 begin
50 hr_utility.set_location('Entering:'|| l_proc, 10);
51 --
52 -- Issue a savepoint
53 --
54 savepoint CREATE_SKILL_PROVISION;
55
56 --
57
58 begin
59 ota_skill_provision_bk1.create_skill_provision_b
60 ( p_activity_version_id => p_activity_version_id ,
61 p_object_version_number => l_object_version_number ,
62 p_type => p_type ,
63 p_comments => p_comments ,
64 p_tsp_information_category => p_tsp_information_category ,
65 p_tsp_information1 => p_tsp_information1 ,
66 p_tsp_information2 => p_tsp_information2 ,
67 p_tsp_information3 => p_tsp_information3 ,
68 p_tsp_information4 => p_tsp_information4 ,
69 p_tsp_information5 => p_tsp_information5 ,
70 p_tsp_information6 => p_tsp_information6 ,
71 p_tsp_information7 => p_tsp_information7 ,
72 p_tsp_information8 => p_tsp_information8 ,
73 p_tsp_information9 => p_tsp_information9 ,
74 p_tsp_information10 => p_tsp_information10 ,
75 p_tsp_information11 => p_tsp_information11 ,
76 p_tsp_information12 => p_tsp_information12 ,
77 p_tsp_information13 => p_tsp_information13 ,
78 p_tsp_information14 => p_tsp_information14 ,
79 p_tsp_information15 => p_tsp_information15 ,
80 p_tsp_information16 => p_tsp_information16 ,
81 p_tsp_information17 => p_tsp_information17 ,
82 p_tsp_information18 => p_tsp_information18 ,
83 p_tsp_information19 => p_tsp_information19 ,
84 p_tsp_information20 => p_tsp_information20 ,
85 p_analysis_criteria_id => p_analysis_criteria_id );
86 exception
87 when hr_api.cannot_find_prog_unit then
88 hr_api.cannot_find_prog_unit_error
89 (p_module_name => 'CREATE_SKILL_PROVISION'
90 ,p_hook_type => 'BP'
91 );
92 end;
93 -- Process Logic
94 --
95 ota_tsp_ins.ins
96 (
97 p_skill_provision_id => l_skill_provision_id ,
98 p_activity_version_id => p_activity_version_id ,
99 p_object_version_number => l_object_version_number ,
100 p_type => p_type ,
101 p_comments => p_comments ,
102 p_tsp_information_category => p_tsp_information_category ,
103 p_tsp_information1 => p_tsp_information1 ,
104 p_tsp_information2 => p_tsp_information2 ,
105 p_tsp_information3 => p_tsp_information3 ,
106 p_tsp_information4 => p_tsp_information4 ,
107 p_tsp_information5 => p_tsp_information5 ,
108 p_tsp_information6 => p_tsp_information6 ,
109 p_tsp_information7 => p_tsp_information7 ,
110 p_tsp_information8 => p_tsp_information8 ,
111 p_tsp_information9 => p_tsp_information9 ,
112 p_tsp_information10 => p_tsp_information10 ,
113 p_tsp_information11 => p_tsp_information11 ,
114 p_tsp_information12 => p_tsp_information12 ,
115 p_tsp_information13 => p_tsp_information13 ,
116 p_tsp_information14 => p_tsp_information14 ,
117 p_tsp_information15 => p_tsp_information15 ,
118 p_tsp_information16 => p_tsp_information16 ,
119 p_tsp_information17 => p_tsp_information17 ,
120 p_tsp_information18 => p_tsp_information18 ,
121 p_tsp_information19 => p_tsp_information19 ,
122 p_tsp_information20 => p_tsp_information20 ,
123 p_analysis_criteria_id => p_analysis_criteria_id ,
124 p_validate => p_validate
125 );
126
127 begin
128 ota_skill_provision_bk1.create_skill_provision_a
129 (p_skill_provision_id => l_skill_provision_id ,
130 p_activity_version_id => p_activity_version_id ,
131 p_object_version_number => l_object_version_number ,
132 p_type => p_type ,
133 p_comments => p_comments ,
134 p_tsp_information_category => p_tsp_information_category ,
135 p_tsp_information1 => p_tsp_information1 ,
136 p_tsp_information2 => p_tsp_information2 ,
137 p_tsp_information3 => p_tsp_information3 ,
138 p_tsp_information4 => p_tsp_information4 ,
139 p_tsp_information5 => p_tsp_information5 ,
140 p_tsp_information6 => p_tsp_information6 ,
141 p_tsp_information7 => p_tsp_information7 ,
142 p_tsp_information8 => p_tsp_information8 ,
143 p_tsp_information9 => p_tsp_information9 ,
144 p_tsp_information10 => p_tsp_information10 ,
145 p_tsp_information11 => p_tsp_information11 ,
146 p_tsp_information12 => p_tsp_information12 ,
147 p_tsp_information13 => p_tsp_information13 ,
148 p_tsp_information14 => p_tsp_information14 ,
149 p_tsp_information15 => p_tsp_information15 ,
150 p_tsp_information16 => p_tsp_information16 ,
151 p_tsp_information17 => p_tsp_information17 ,
152 p_tsp_information18 => p_tsp_information18 ,
153 p_tsp_information19 => p_tsp_information19 ,
154 p_tsp_information20 => p_tsp_information20 ,
155 p_analysis_criteria_id => p_analysis_criteria_id );
156 exception
157 when hr_api.cannot_find_prog_unit then
158 hr_api.cannot_find_prog_unit_error
159 (p_module_name => 'CREATE_SKILL_PROVISION'
160 ,p_hook_type => 'AP'
161 );
162 end;
163
164
165
166 --
167
168
169 -- When in validation only mode raise the Validate_Enabled exception
170 --
171 if p_validate then
172 raise hr_api.validate_enabled;
173 end if;
174 --
175 -- Set all output arguments
176 --
177 p_skill_provision_id := l_skill_provision_id;
178 p_object_version_number := l_object_version_number;
179 --
180 hr_utility.set_location(' Leaving:'||l_proc, 70);
181 exception
182 when hr_api.validate_enabled then
183 --
184 -- As the Validate_Enabled exception has been raised
185 -- we must rollback to the savepoint
186 --
187 rollback to CREATE_SKILL_PROVISION;
188 --
189 -- Only set output warning arguments
190 -- (Any key or derived arguments must be set to null
191 -- when validation only mode is being used.)
192 --
193 p_skill_provision_id := null;
194 p_object_version_number := null;
195 hr_utility.set_location(' Leaving:'||l_proc, 80);
196 when others then
197 --
198 -- A validation or unexpected error has occured
199 --
200 rollback to CREATE_SKILL_PROVISION;
201 p_skill_provision_id := null;
202 p_object_version_number := null;
203 hr_utility.set_location(' Leaving:'||l_proc, 90);
204 raise;
205 end create_skill_provision;
206 -- ----------------------------------------------------------------------------
207 -- |-------------------------< UPDATE_SKILL_PROVISION >-------------------------|
208 -- ----------------------------------------------------------------------------
209 --
210 procedure update_skill_provision
211 (
212 p_skill_provision_id in number,
213 p_activity_version_id in number default hr_api.g_number,
214 p_object_version_number in out nocopy number,
215 p_type in varchar2 default hr_api.g_varchar2,
216 p_comments in varchar2 default hr_api.g_varchar2,
217 p_tsp_information_category in varchar2 default hr_api.g_varchar2,
218 p_tsp_information1 in varchar2 default hr_api.g_varchar2,
219 p_tsp_information2 in varchar2 default hr_api.g_varchar2,
220 p_tsp_information3 in varchar2 default hr_api.g_varchar2,
221 p_tsp_information4 in varchar2 default hr_api.g_varchar2,
222 p_tsp_information5 in varchar2 default hr_api.g_varchar2,
223 p_tsp_information6 in varchar2 default hr_api.g_varchar2,
224 p_tsp_information7 in varchar2 default hr_api.g_varchar2,
225 p_tsp_information8 in varchar2 default hr_api.g_varchar2,
226 p_tsp_information9 in varchar2 default hr_api.g_varchar2,
227 p_tsp_information10 in varchar2 default hr_api.g_varchar2,
228 p_tsp_information11 in varchar2 default hr_api.g_varchar2,
229 p_tsp_information12 in varchar2 default hr_api.g_varchar2,
230 p_tsp_information13 in varchar2 default hr_api.g_varchar2,
231 p_tsp_information14 in varchar2 default hr_api.g_varchar2,
232 p_tsp_information15 in varchar2 default hr_api.g_varchar2,
233 p_tsp_information16 in varchar2 default hr_api.g_varchar2,
234 p_tsp_information17 in varchar2 default hr_api.g_varchar2,
235 p_tsp_information18 in varchar2 default hr_api.g_varchar2,
236 p_tsp_information19 in varchar2 default hr_api.g_varchar2,
237 p_tsp_information20 in varchar2 default hr_api.g_varchar2,
238 p_analysis_criteria_id in number default hr_api.g_number,
239 p_validate in boolean default false
240 ) is
241 --
242 -- Declare cursors and local variables
243 --
244 l_proc varchar2(72) := g_package||' Update Skill Provision';
245 l_object_version_number number := p_object_version_number;
246 begin
247 hr_utility.set_location('Entering:'|| l_proc, 10);
248 --
249 -- Issue a savepoint
250 --
251 savepoint UPDATE_SKILL_PROVISION;
252 --
253 --
254 begin
255 ota_skill_provision_bk2.update_skill_provision_a
256 (p_skill_provision_id => p_skill_provision_id ,
257 p_activity_version_id => p_activity_version_id ,
258 p_object_version_number => p_object_version_number ,
259 p_type => p_type ,
260 p_comments => p_comments ,
261 p_tsp_information_category => p_tsp_information_category ,
262 p_tsp_information1 => p_tsp_information1 ,
263 p_tsp_information2 => p_tsp_information2 ,
264 p_tsp_information3 => p_tsp_information3 ,
265 p_tsp_information4 => p_tsp_information4 ,
266 p_tsp_information5 => p_tsp_information5 ,
267 p_tsp_information6 => p_tsp_information6 ,
268 p_tsp_information7 => p_tsp_information7 ,
269 p_tsp_information8 => p_tsp_information8 ,
270 p_tsp_information9 => p_tsp_information9 ,
271 p_tsp_information10 => p_tsp_information10 ,
272 p_tsp_information11 => p_tsp_information11 ,
273 p_tsp_information12 => p_tsp_information12 ,
274 p_tsp_information13 => p_tsp_information13 ,
275 p_tsp_information14 => p_tsp_information14 ,
276 p_tsp_information15 => p_tsp_information15 ,
277 p_tsp_information16 => p_tsp_information16 ,
278 p_tsp_information17 => p_tsp_information17 ,
279 p_tsp_information18 => p_tsp_information18 ,
280 p_tsp_information19 => p_tsp_information19 ,
281 p_tsp_information20 => p_tsp_information20 ,
282 p_analysis_criteria_id => p_analysis_criteria_id );
283 exception
284 when hr_api.cannot_find_prog_unit then
285 hr_api.cannot_find_prog_unit_error
286 (p_module_name => 'UPDATE_SKILL_PROVISION'
287 ,p_hook_type => 'BP'
288 );
289 end;
290
291
292
293 -- Process Logic
294 --
295 ota_tsp_upd.upd
296 (
297 p_skill_provision_id => p_skill_provision_id ,
298 p_activity_version_id => p_activity_version_id ,
299 p_object_version_number => l_object_version_number ,
300 p_type => p_type ,
301 p_comments => p_comments ,
302 p_tsp_information_category => p_tsp_information_category ,
303 p_tsp_information1 => p_tsp_information1 ,
304 p_tsp_information2 => p_tsp_information2 ,
305 p_tsp_information3 => p_tsp_information3 ,
306 p_tsp_information4 => p_tsp_information4 ,
307 p_tsp_information5 => p_tsp_information5 ,
308 p_tsp_information6 => p_tsp_information6 ,
309 p_tsp_information7 => p_tsp_information7 ,
310 p_tsp_information8 => p_tsp_information8 ,
311 p_tsp_information9 => p_tsp_information9 ,
312 p_tsp_information10 => p_tsp_information10 ,
313 p_tsp_information11 => p_tsp_information11 ,
314 p_tsp_information12 => p_tsp_information12 ,
315 p_tsp_information13 => p_tsp_information13 ,
316 p_tsp_information14 => p_tsp_information14 ,
317 p_tsp_information15 => p_tsp_information15 ,
318 p_tsp_information16 => p_tsp_information16 ,
319 p_tsp_information17 => p_tsp_information17 ,
320 p_tsp_information18 => p_tsp_information18 ,
321 p_tsp_information19 => p_tsp_information19 ,
322 p_tsp_information20 => p_tsp_information20 ,
323 p_analysis_criteria_id => p_analysis_criteria_id ,
324 p_validate => p_validate
325 );
326
327 --
328 begin
329 ota_skill_provision_bk2.update_skill_provision_a
330 (p_skill_provision_id => p_skill_provision_id ,
331 p_activity_version_id => p_activity_version_id ,
332 p_object_version_number => l_object_version_number ,
333 p_type => p_type ,
334 p_comments => p_comments ,
335 p_tsp_information_category => p_tsp_information_category ,
336 p_tsp_information1 => p_tsp_information1 ,
337 p_tsp_information2 => p_tsp_information2 ,
338 p_tsp_information3 => p_tsp_information3 ,
339 p_tsp_information4 => p_tsp_information4 ,
343 p_tsp_information8 => p_tsp_information8 ,
340 p_tsp_information5 => p_tsp_information5 ,
341 p_tsp_information6 => p_tsp_information6 ,
342 p_tsp_information7 => p_tsp_information7 ,
344 p_tsp_information9 => p_tsp_information9 ,
345 p_tsp_information10 => p_tsp_information10 ,
346 p_tsp_information11 => p_tsp_information11 ,
347 p_tsp_information12 => p_tsp_information12 ,
348 p_tsp_information13 => p_tsp_information13 ,
349 p_tsp_information14 => p_tsp_information14 ,
350 p_tsp_information15 => p_tsp_information15 ,
351 p_tsp_information16 => p_tsp_information16 ,
352 p_tsp_information17 => p_tsp_information17 ,
353 p_tsp_information18 => p_tsp_information18 ,
354 p_tsp_information19 => p_tsp_information19 ,
355 p_tsp_information20 => p_tsp_information20 ,
356 p_analysis_criteria_id => p_analysis_criteria_id );
357 exception
358 when hr_api.cannot_find_prog_unit then
359 hr_api.cannot_find_prog_unit_error
360 (p_module_name => 'UPDATE_SKILL_PROVISION'
361 ,p_hook_type => 'AP'
362 );
363 end;
364 p_object_version_number := l_object_version_number;
365
366 -- When in validation only mode raise the Validate_Enabled exception
367 --
368 if p_validate then
369 raise hr_api.validate_enabled;
370 end if;
371 --
372 -- Set all output arguments
373 --
374 hr_utility.set_location(' Leaving:'||l_proc, 70);
375 exception
376 when hr_api.validate_enabled then
377 --
378 -- As the Validate_Enabled exception has been raised
379 -- we must rollback to the savepoint
380 --
381 rollback to UPDATE_SKILL_PROVISION;
382 --
383 -- Only set output warning arguments
384 -- (Any key or derived arguments must be set to null
385 -- when validation only mode is being used.)
386 --
387 p_object_version_number := null;
388 hr_utility.set_location(' Leaving:'||l_proc, 80);
389 when others then
390 --
391 -- A validation or unexpected error has occured
392 --
393 rollback to UPDATE_SKILL_PROVISION;
394 p_object_version_number := l_object_version_number;
395 hr_utility.set_location(' Leaving:'||l_proc, 90);
396 raise;
397 end update_skill_provision;
398 --
399 -- ----------------------------------------------------------------------------
400 -- |-------------------------< DELETE_SKILL_PROVISION >-------------------|
401 -- ----------------------------------------------------------------------------
402 --
403 procedure delete_skill_provision
404 (
405 p_skill_provision_id in number,
406 p_object_version_number in number,
407 p_validate in boolean
408 ) is
409 --
410 -- Declare cursors and local variables
411 --
412 l_proc varchar2(72) := g_package||' Delete Skill Provision';
413 --
414 --
415 begin
416 hr_utility.set_location('Entering:'|| l_proc, 10);
417 --
418 -- Issue a savepoint
419 --
420 savepoint DELETE_SKILL_PROVISION;
421 --
422 -- Truncate the time portion from all IN date parameters
423 --
424 --
425 begin
426 ota_skill_provision_bk3.delete_skill_provision_b
427 (p_skill_provision_id => p_skill_provision_id ,
428 p_object_version_number => p_object_version_number
429 );
430 exception
431 when hr_api.cannot_find_prog_unit then
432 hr_api.cannot_find_prog_unit_error
433 (p_module_name => 'DELETE_SKILL_PROVISION'
434 ,p_hook_type => 'BP'
435 );
436 end;
437
438
439 --
440 -- Process Logic
441 --
442 ota_tsp_del.del
443 (
444 p_skill_provision_id => p_skill_provision_id ,
445 p_object_version_number => p_object_version_number ,
446 p_validate => p_validate
447 );
448 --
449 -- When in validation only mode raise the Validate_Enabled exception
450 --
451
452
453 begin
454 ota_skill_provision_bk3.delete_skill_provision_b
455 (p_skill_provision_id => p_skill_provision_id ,
456 p_object_version_number => p_object_version_number
457 );
458 exception
459 when hr_api.cannot_find_prog_unit then
460 hr_api.cannot_find_prog_unit_error
461 (p_module_name => 'DELETE_SKILL_PROVISION'
462 ,p_hook_type => 'AP'
463 );
464 end;
465 if p_validate then
466 raise hr_api.validate_enabled;
467 end if;
468 --
469 -- Set all output arguments
470 --
471 --
472 hr_utility.set_location(' Leaving:'||l_proc, 170);
473 exception
474 when hr_api.validate_enabled then
475 --
476 -- As the Validate_Enabled exception has been raised
477 -- we must rollback to the savepoint
478 --
479 rollback to DELETE_SKILL_PROVISION;
480 --
481 -- Only set output warning arguments
482 -- (Any key or derived arguments must be set to null
483 -- when validation only mode is being used.)
484 --
485 hr_utility.set_location(' Leaving:'||l_proc, 180);
486 when others then
487 --
488 -- A validation or unexpected error has occured
489 --
490 rollback to DELETE_SKILL_PROVISION;
491 hr_utility.set_location(' Leaving:'||l_proc, 190);
492 raise;
493 end delete_skill_provision;
494 --
495 end ota_skill_provision_api;