[Home] [Help]
PACKAGE BODY: APPS.PQP_SHP_API
Source
1 Package Body pqp_shp_api as
2 /* $Header: pqshpapi.pkb 115.4 2003/01/22 00:56:53 tmehra noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' pqp_shp_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |---------------------< create_service_history_period >--------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 -- Default all null columns for FF
13 --
14 procedure create_service_history_period
15 (p_validate in boolean default false
16 ,p_business_group_id in number
17 ,p_assignment_id in number
18 ,p_start_date in date default null
19 ,p_end_date in date default null
20 ,p_employer_name in varchar2 default null
21 ,p_employer_address in varchar2 default null
22 ,p_employer_type in varchar2 default null
23 ,p_employer_subtype in varchar2 default null
24 ,p_description in varchar2 default null
25 ,p_continuous_service in varchar2 default null
26 ,p_all_assignments in varchar2 default null
27 ,p_period_years in number default null
28 ,p_period_days in number default null
29 ,p_shp_attribute_category in varchar2 default null
30 ,p_shp_attribute1 in varchar2 default null
31 ,p_shp_attribute2 in varchar2 default null
32 ,p_shp_attribute3 in varchar2 default null
33 ,p_shp_attribute4 in varchar2 default null
34 ,p_shp_attribute5 in varchar2 default null
35 ,p_shp_attribute6 in varchar2 default null
36 ,p_shp_attribute7 in varchar2 default null
37 ,p_shp_attribute8 in varchar2 default null
38 ,p_shp_attribute9 in varchar2 default null
39 ,p_shp_attribute10 in varchar2 default null
40 ,p_shp_attribute11 in varchar2 default null
41 ,p_shp_attribute12 in varchar2 default null
42 ,p_shp_attribute13 in varchar2 default null
43 ,p_shp_attribute14 in varchar2 default null
44 ,p_shp_attribute15 in varchar2 default null
45 ,p_shp_attribute16 in varchar2 default null
46 ,p_shp_attribute17 in varchar2 default null
47 ,p_shp_attribute18 in varchar2 default null
48 ,p_shp_attribute19 in varchar2 default null
49 ,p_shp_attribute20 in varchar2 default null
50 ,p_shp_information_category in varchar2 default null
51 ,p_shp_information1 in varchar2 default null
52 ,p_shp_information2 in varchar2 default null
53 ,p_shp_information3 in varchar2 default null
54 ,p_shp_information4 in varchar2 default null
55 ,p_shp_information5 in varchar2 default null
56 ,p_shp_information6 in varchar2 default null
57 ,p_shp_information7 in varchar2 default null
58 ,p_shp_information8 in varchar2 default null
59 ,p_shp_information9 in varchar2 default null
60 ,p_shp_information10 in varchar2 default null
61 ,p_shp_information11 in varchar2 default null
62 ,p_shp_information12 in varchar2 default null
63 ,p_shp_information13 in varchar2 default null
64 ,p_shp_information14 in varchar2 default null
65 ,p_shp_information15 in varchar2 default null
66 ,p_shp_information16 in varchar2 default null
67 ,p_shp_information17 in varchar2 default null
68 ,p_shp_information18 in varchar2 default null
69 ,p_shp_information19 in varchar2 default null
70 ,p_shp_information20 in varchar2 default null
71 ,p_service_history_period_id out nocopy number
72 ,p_object_version_number out nocopy number
73 ) is
74
75 --
76 -- Declare cursors and local variables
77 --
78
79 l_proc varchar2(72) := g_package||'create_service_history_period';
80 l_service_history_period_id number;
81 l_object_version_number number;
82 l_start_date date;
83 l_end_date date;
84
85 begin
86 hr_utility.set_location('Entering:'|| l_proc, 10);
87 --
88 -- Issue a savepoint
89 --
90 savepoint create_service_history_period;
91 --
92 -- Truncate the time portion from all IN date parameters
93 --
94 l_start_date := trunc(p_start_date);
95 l_end_date := trunc(p_end_date);
96 hr_utility.set_location(l_proc, 20);
97 --
98 -- Call Before Process User Hook
99 --
100 begin
101 pqp_service_history_period_bk1.create_pqp_service_hist_pd_b
102 (p_business_group_id => p_business_group_id
103 ,p_assignment_id => p_assignment_id
104 ,p_start_date => l_start_date
105 ,p_end_date => l_end_date
106 ,p_employer_name => p_employer_name
107 ,p_employer_address => p_employer_address
108 ,p_employer_type => p_employer_type
109 ,p_employer_subtype => p_employer_subtype
110 ,p_description => p_description
111 ,p_continuous_service => p_continuous_service
112 ,p_all_assignments => p_all_assignments
113 ,p_period_years => p_period_years
114 ,p_period_days => p_period_days
115 ,p_shp_attribute_category => p_shp_attribute_category
116 ,p_shp_attribute1 => p_shp_attribute1
117 ,p_shp_attribute2 => p_shp_attribute2
118 ,p_shp_attribute3 => p_shp_attribute3
119 ,p_shp_attribute4 => p_shp_attribute4
120 ,p_shp_attribute5 => p_shp_attribute5
121 ,p_shp_attribute6 => p_shp_attribute6
122 ,p_shp_attribute7 => p_shp_attribute7
123 ,p_shp_attribute8 => p_shp_attribute8
124 ,p_shp_attribute9 => p_shp_attribute9
125 ,p_shp_attribute10 => p_shp_attribute10
126 ,p_shp_attribute11 => p_shp_attribute11
127 ,p_shp_attribute12 => p_shp_attribute12
128 ,p_shp_attribute13 => p_shp_attribute13
129 ,p_shp_attribute14 => p_shp_attribute14
130 ,p_shp_attribute15 => p_shp_attribute15
131 ,p_shp_attribute16 => p_shp_attribute16
132 ,p_shp_attribute17 => p_shp_attribute17
133 ,p_shp_attribute18 => p_shp_attribute18
134 ,p_shp_attribute19 => p_shp_attribute19
135 ,p_shp_attribute20 => p_shp_attribute20
136 ,p_shp_information_category => p_shp_information_category
137 ,p_shp_information1 => p_shp_information1
138 ,p_shp_information2 => p_shp_information2
139 ,p_shp_information3 => p_shp_information3
140 ,p_shp_information4 => p_shp_information4
141 ,p_shp_information5 => p_shp_information5
142 ,p_shp_information6 => p_shp_information6
143 ,p_shp_information7 => p_shp_information7
144 ,p_shp_information8 => p_shp_information8
145 ,p_shp_information9 => p_shp_information9
146 ,p_shp_information10 => p_shp_information10
147 ,p_shp_information11 => p_shp_information11
148 ,p_shp_information12 => p_shp_information12
149 ,p_shp_information13 => p_shp_information13
150 ,p_shp_information14 => p_shp_information14
151 ,p_shp_information15 => p_shp_information15
152 ,p_shp_information16 => p_shp_information16
153 ,p_shp_information17 => p_shp_information17
154 ,p_shp_information18 => p_shp_information18
155 ,p_shp_information19 => p_shp_information19
156 ,p_shp_information20 => p_shp_information20
157 );
158 exception
159 when hr_api.cannot_find_prog_unit then
160 hr_api.cannot_find_prog_unit_error
161 (p_module_name => 'create_service_history_period'
162 ,p_hook_type => 'BP'
163 );
164 end;
165 hr_utility.set_location(l_proc, 30);
166 --
167 -- Validation in addition to Row Handlers
168 --
169
170
171
172 hr_utility.set_location(l_proc, 40);
173 --
174 -- Process Logic
175 --
176
177
178 pqp_shp_ins.ins (
179 p_business_group_id => p_business_group_id
180 ,p_assignment_id => p_assignment_id
181 ,p_start_date => l_start_date
182 ,p_end_date => l_end_date
183 ,p_employer_name => p_employer_name
184 ,p_employer_address => p_employer_address
185 ,p_employer_type => p_employer_type
186 ,p_employer_subtype => p_employer_subtype
187 ,p_description => p_description
188 ,p_continuous_service => p_continuous_service
189 ,p_all_assignments => p_all_assignments
190 ,p_period_years => p_period_years
191 ,p_period_days => p_period_days
192 ,p_service_history_period_id => l_service_history_period_id
193 ,p_object_version_number => l_object_version_number
194 ,p_shp_attribute_category => p_shp_attribute_category
195 ,p_shp_attribute1 => p_shp_attribute1
196 ,p_shp_attribute2 => p_shp_attribute2
197 ,p_shp_attribute3 => p_shp_attribute3
198 ,p_shp_attribute4 => p_shp_attribute4
199 ,p_shp_attribute5 => p_shp_attribute5
200 ,p_shp_attribute6 => p_shp_attribute6
201 ,p_shp_attribute7 => p_shp_attribute7
202 ,p_shp_attribute8 => p_shp_attribute8
203 ,p_shp_attribute9 => p_shp_attribute9
204 ,p_shp_attribute10 => p_shp_attribute10
205 ,p_shp_attribute11 => p_shp_attribute11
206 ,p_shp_attribute12 => p_shp_attribute12
207 ,p_shp_attribute13 => p_shp_attribute13
208 ,p_shp_attribute14 => p_shp_attribute14
209 ,p_shp_attribute15 => p_shp_attribute15
210 ,p_shp_attribute16 => p_shp_attribute16
211 ,p_shp_attribute17 => p_shp_attribute17
212 ,p_shp_attribute18 => p_shp_attribute18
213 ,p_shp_attribute19 => p_shp_attribute19
214 ,p_shp_attribute20 => p_shp_attribute20
215 ,p_shp_information_category => p_shp_information_category
216 ,p_shp_information1 => p_shp_information1
217 ,p_shp_information2 => p_shp_information2
218 ,p_shp_information3 => p_shp_information3
219 ,p_shp_information4 => p_shp_information4
220 ,p_shp_information5 => p_shp_information5
221 ,p_shp_information6 => p_shp_information6
222 ,p_shp_information7 => p_shp_information7
223 ,p_shp_information8 => p_shp_information8
224 ,p_shp_information9 => p_shp_information9
225 ,p_shp_information10 => p_shp_information10
226 ,p_shp_information11 => p_shp_information11
227 ,p_shp_information12 => p_shp_information12
228 ,p_shp_information13 => p_shp_information13
229 ,p_shp_information14 => p_shp_information14
230 ,p_shp_information15 => p_shp_information15
231 ,p_shp_information16 => p_shp_information16
232 ,p_shp_information17 => p_shp_information17
233 ,p_shp_information18 => p_shp_information18
234 ,p_shp_information19 => p_shp_information19
235 ,p_shp_information20 => p_shp_information20
236 );
237
238 hr_utility.set_location(l_proc, 50);
239 --
240 -- Call After Process User Hook
241 --
242 begin
243 pqp_service_history_period_bk1.create_pqp_service_hist_pd_a
244 (p_business_group_id => p_business_group_id
245 ,p_assignment_id => p_assignment_id
246 ,p_start_date => l_start_date
247 ,p_end_date => l_end_date
248 ,p_employer_name => p_employer_name
249 ,p_employer_address => p_employer_address
250 ,p_employer_type => p_employer_type
251 ,p_employer_subtype => p_employer_subtype
252 ,p_description => p_description
253 ,p_continuous_service => p_continuous_service
254 ,p_all_assignments => p_all_assignments
255 ,p_period_years => p_period_years
256 ,p_period_days => p_period_days
257 ,p_service_history_period_id => l_service_history_period_id
258 ,p_object_version_number => l_object_version_number
259 ,p_shp_attribute_category => p_shp_attribute_category
260 ,p_shp_attribute1 => p_shp_attribute1
261 ,p_shp_attribute2 => p_shp_attribute2
262 ,p_shp_attribute3 => p_shp_attribute3
263 ,p_shp_attribute4 => p_shp_attribute4
264 ,p_shp_attribute5 => p_shp_attribute5
265 ,p_shp_attribute6 => p_shp_attribute6
266 ,p_shp_attribute7 => p_shp_attribute7
267 ,p_shp_attribute8 => p_shp_attribute8
268 ,p_shp_attribute9 => p_shp_attribute9
269 ,p_shp_attribute10 => p_shp_attribute10
270 ,p_shp_attribute11 => p_shp_attribute11
271 ,p_shp_attribute12 => p_shp_attribute12
272 ,p_shp_attribute13 => p_shp_attribute13
273 ,p_shp_attribute14 => p_shp_attribute14
274 ,p_shp_attribute15 => p_shp_attribute15
275 ,p_shp_attribute16 => p_shp_attribute16
276 ,p_shp_attribute17 => p_shp_attribute17
277 ,p_shp_attribute18 => p_shp_attribute18
278 ,p_shp_attribute19 => p_shp_attribute19
279 ,p_shp_attribute20 => p_shp_attribute20
280 ,p_shp_information_category => p_shp_information_category
281 ,p_shp_information1 => p_shp_information1
282 ,p_shp_information2 => p_shp_information2
283 ,p_shp_information3 => p_shp_information3
284 ,p_shp_information4 => p_shp_information4
285 ,p_shp_information5 => p_shp_information5
286 ,p_shp_information6 => p_shp_information6
287 ,p_shp_information7 => p_shp_information7
288 ,p_shp_information8 => p_shp_information8
289 ,p_shp_information9 => p_shp_information9
290 ,p_shp_information10 => p_shp_information10
291 ,p_shp_information11 => p_shp_information11
292 ,p_shp_information12 => p_shp_information12
293 ,p_shp_information13 => p_shp_information13
294 ,p_shp_information14 => p_shp_information14
295 ,p_shp_information15 => p_shp_information15
296 ,p_shp_information16 => p_shp_information16
297 ,p_shp_information17 => p_shp_information17
298 ,p_shp_information18 => p_shp_information18
299 ,p_shp_information19 => p_shp_information19
300 ,p_shp_information20 => p_shp_information20
301 );
302 exception
303 when hr_api.cannot_find_prog_unit then
304 hr_api.cannot_find_prog_unit_error
305 (p_module_name => 'create_service_history_period'
306 ,p_hook_type => 'AP'
307 );
308 end;
309 hr_utility.set_location(l_proc, 60);
310 --
311 -- When in validation only mode raise the Validate_Enabled exception
312 --
313 if p_validate then
314 raise hr_api.validate_enabled;
315 end if;
316 --
317 -- Set all output arguments
318 --
319 p_service_history_period_id := l_service_history_period_id;
320 p_object_version_number := l_object_version_number;
321 --
322 hr_utility.set_location(' Leaving:'||l_proc, 70);
323 exception
324 when hr_api.validate_enabled then
325 --
326 -- As the Validate_Enabled exception has been raised
327 -- we must rollback to the savepoint
328 --
329 rollback to create_service_history_period;
330 --
331 -- Only set output warning arguments
332 -- (Any key or derived arguments must be set to null
333 -- when validation only mode is being used.)
334 --
335 p_service_history_period_id := null;
336 p_object_version_number := null;
337 hr_utility.set_location(' Leaving:'||l_proc, 80);
338 when others then
339 --
340 -- A validation or unexpected error has occured
341 --
342 rollback to create_service_history_period;
343 p_service_history_period_id := null;
344 p_object_version_number := null;
345 hr_utility.set_location(' Leaving:'||l_proc, 90);
346 raise;
347 end create_service_history_period;
348 --
349 -- ----------------------------------------------------------------------------
350 -- |---------------------< update_service_history_period >--------------------|
351 -- ----------------------------------------------------------------------------
352 --
353 procedure update_service_history_period
354 (p_validate in boolean default false
355 ,p_service_history_period_id in number
356 ,p_assignment_id in number default hr_api.g_number
357 ,p_start_date in date default hr_api.g_date
358 ,p_end_date in date default hr_api.g_date
359 ,p_employer_name in varchar2 default hr_api.g_varchar2
360 ,p_employer_address in varchar2 default hr_api.g_varchar2
361 ,p_employer_type in varchar2 default hr_api.g_varchar2
362 ,p_employer_subtype in varchar2 default hr_api.g_varchar2
363 ,p_description in varchar2 default hr_api.g_varchar2
364 ,p_continuous_service in varchar2 default hr_api.g_varchar2
365 ,p_all_assignments in varchar2 default hr_api.g_varchar2
366 ,p_period_years in number default hr_api.g_number
367 ,p_period_days in number default hr_api.g_number
368 ,p_shp_attribute_category in varchar2 default hr_api.g_varchar2
369 ,p_shp_attribute1 in varchar2 default hr_api.g_varchar2
370 ,p_shp_attribute2 in varchar2 default hr_api.g_varchar2
371 ,p_shp_attribute3 in varchar2 default hr_api.g_varchar2
372 ,p_shp_attribute4 in varchar2 default hr_api.g_varchar2
373 ,p_shp_attribute5 in varchar2 default hr_api.g_varchar2
374 ,p_shp_attribute6 in varchar2 default hr_api.g_varchar2
375 ,p_shp_attribute7 in varchar2 default hr_api.g_varchar2
376 ,p_shp_attribute8 in varchar2 default hr_api.g_varchar2
377 ,p_shp_attribute9 in varchar2 default hr_api.g_varchar2
378 ,p_shp_attribute10 in varchar2 default hr_api.g_varchar2
379 ,p_shp_attribute11 in varchar2 default hr_api.g_varchar2
380 ,p_shp_attribute12 in varchar2 default hr_api.g_varchar2
381 ,p_shp_attribute13 in varchar2 default hr_api.g_varchar2
382 ,p_shp_attribute14 in varchar2 default hr_api.g_varchar2
383 ,p_shp_attribute15 in varchar2 default hr_api.g_varchar2
384 ,p_shp_attribute16 in varchar2 default hr_api.g_varchar2
385 ,p_shp_attribute17 in varchar2 default hr_api.g_varchar2
386 ,p_shp_attribute18 in varchar2 default hr_api.g_varchar2
387 ,p_shp_attribute19 in varchar2 default hr_api.g_varchar2
388 ,p_shp_attribute20 in varchar2 default hr_api.g_varchar2
389 ,p_shp_information_category in varchar2 default hr_api.g_varchar2
390 ,p_shp_information1 in varchar2 default hr_api.g_varchar2
391 ,p_shp_information2 in varchar2 default hr_api.g_varchar2
392 ,p_shp_information3 in varchar2 default hr_api.g_varchar2
393 ,p_shp_information4 in varchar2 default hr_api.g_varchar2
394 ,p_shp_information5 in varchar2 default hr_api.g_varchar2
395 ,p_shp_information6 in varchar2 default hr_api.g_varchar2
396 ,p_shp_information7 in varchar2 default hr_api.g_varchar2
397 ,p_shp_information8 in varchar2 default hr_api.g_varchar2
398 ,p_shp_information9 in varchar2 default hr_api.g_varchar2
399 ,p_shp_information10 in varchar2 default hr_api.g_varchar2
400 ,p_shp_information11 in varchar2 default hr_api.g_varchar2
401 ,p_shp_information12 in varchar2 default hr_api.g_varchar2
402 ,p_shp_information13 in varchar2 default hr_api.g_varchar2
403 ,p_shp_information14 in varchar2 default hr_api.g_varchar2
404 ,p_shp_information15 in varchar2 default hr_api.g_varchar2
405 ,p_shp_information16 in varchar2 default hr_api.g_varchar2
406 ,p_shp_information17 in varchar2 default hr_api.g_varchar2
407 ,p_shp_information18 in varchar2 default hr_api.g_varchar2
408 ,p_shp_information19 in varchar2 default hr_api.g_varchar2
409 ,p_shp_information20 in varchar2 default hr_api.g_varchar2
410 ,p_object_version_number in out nocopy number
411 ) is
412
413 --
414 -- Declare cursors and local variables
415 --
416
417 l_proc varchar2(72) := g_package||'update_service_history_period';
418 l_object_version_number number;
419 l_start_date date;
420 l_end_date date;
421
422 begin
423 hr_utility.set_location('Entering:'|| l_proc, 10);
424 --
425 -- Issue a savepoint
426 --
427 savepoint update_service_history_period;
428 --
429 -- Truncate the time portion from all IN date parameters
430 --
431 l_start_date := trunc(p_start_date);
432 l_end_date := trunc(p_end_date);
433 hr_utility.set_location(l_proc, 20);
434 --
435 -- Call Before Process User Hook
436 --
437 begin
438 pqp_service_history_period_bk2.update_pqp_service_hist_pd_b
439 (p_service_history_period_id => p_service_history_period_id
440 ,p_assignment_id => p_assignment_id
441 ,p_start_date => l_start_date
442 ,p_end_date => l_end_date
443 ,p_employer_name => p_employer_name
444 ,p_employer_address => p_employer_address
445 ,p_employer_type => p_employer_type
446 ,p_employer_subtype => p_employer_subtype
447 ,p_description => p_description
448 ,p_continuous_service => p_continuous_service
449 ,p_all_assignments => p_all_assignments
450 ,p_period_years => p_period_years
451 ,p_period_days => p_period_days
452 ,p_object_version_number => p_object_version_number
453 ,p_shp_attribute_category => p_shp_attribute_category
454 ,p_shp_attribute1 => p_shp_attribute1
455 ,p_shp_attribute2 => p_shp_attribute2
456 ,p_shp_attribute3 => p_shp_attribute3
457 ,p_shp_attribute4 => p_shp_attribute4
458 ,p_shp_attribute5 => p_shp_attribute5
459 ,p_shp_attribute6 => p_shp_attribute6
460 ,p_shp_attribute7 => p_shp_attribute7
461 ,p_shp_attribute8 => p_shp_attribute8
462 ,p_shp_attribute9 => p_shp_attribute9
463 ,p_shp_attribute10 => p_shp_attribute10
464 ,p_shp_attribute11 => p_shp_attribute11
465 ,p_shp_attribute12 => p_shp_attribute12
466 ,p_shp_attribute13 => p_shp_attribute13
467 ,p_shp_attribute14 => p_shp_attribute14
468 ,p_shp_attribute15 => p_shp_attribute15
469 ,p_shp_attribute16 => p_shp_attribute16
470 ,p_shp_attribute17 => p_shp_attribute17
471 ,p_shp_attribute18 => p_shp_attribute18
472 ,p_shp_attribute19 => p_shp_attribute19
473 ,p_shp_attribute20 => p_shp_attribute20
474 ,p_shp_information_category => p_shp_information_category
475 ,p_shp_information1 => p_shp_information1
476 ,p_shp_information2 => p_shp_information2
477 ,p_shp_information3 => p_shp_information3
478 ,p_shp_information4 => p_shp_information4
479 ,p_shp_information5 => p_shp_information5
480 ,p_shp_information6 => p_shp_information6
481 ,p_shp_information7 => p_shp_information7
482 ,p_shp_information8 => p_shp_information8
483 ,p_shp_information9 => p_shp_information9
484 ,p_shp_information10 => p_shp_information10
485 ,p_shp_information11 => p_shp_information11
486 ,p_shp_information12 => p_shp_information12
487 ,p_shp_information13 => p_shp_information13
488 ,p_shp_information14 => p_shp_information14
489 ,p_shp_information15 => p_shp_information15
490 ,p_shp_information16 => p_shp_information16
491 ,p_shp_information17 => p_shp_information17
492 ,p_shp_information18 => p_shp_information18
493 ,p_shp_information19 => p_shp_information19
494 ,p_shp_information20 => p_shp_information20
495 );
496 exception
497 when hr_api.cannot_find_prog_unit then
498 hr_api.cannot_find_prog_unit_error
499 (p_module_name => 'update_service_history_period'
500 ,p_hook_type => 'BP'
501 );
502 end;
503 hr_utility.set_location(l_proc, 30);
504 --
505 -- Validation in addition to Row Handlers
506 --
507
508
509
510 hr_utility.set_location(l_proc, 40);
511 --
512 -- Process Logic
513 --
514 l_object_version_number := p_object_version_number;
515
516
517 pqp_shp_upd.upd (
518 p_service_history_period_id => p_service_history_period_id
519 ,p_object_version_number => l_object_version_number
520 ,p_assignment_id => p_assignment_id
521 ,p_start_date => l_start_date
522 ,p_end_date => l_end_date
523 ,p_employer_name => p_employer_name
524 ,p_employer_address => p_employer_address
525 ,p_employer_type => p_employer_type
526 ,p_employer_subtype => p_employer_subtype
527 ,p_description => p_description
528 ,p_continuous_service => p_continuous_service
529 ,p_all_assignments => p_all_assignments
530 ,p_period_years => p_period_years
531 ,p_period_days => p_period_days
532 ,p_shp_attribute_category => p_shp_attribute_category
533 ,p_shp_attribute1 => p_shp_attribute1
534 ,p_shp_attribute2 => p_shp_attribute2
535 ,p_shp_attribute3 => p_shp_attribute3
536 ,p_shp_attribute4 => p_shp_attribute4
537 ,p_shp_attribute5 => p_shp_attribute5
538 ,p_shp_attribute6 => p_shp_attribute6
539 ,p_shp_attribute7 => p_shp_attribute7
540 ,p_shp_attribute8 => p_shp_attribute8
541 ,p_shp_attribute9 => p_shp_attribute9
542 ,p_shp_attribute10 => p_shp_attribute10
543 ,p_shp_attribute11 => p_shp_attribute11
544 ,p_shp_attribute12 => p_shp_attribute12
545 ,p_shp_attribute13 => p_shp_attribute13
546 ,p_shp_attribute14 => p_shp_attribute14
547 ,p_shp_attribute15 => p_shp_attribute15
548 ,p_shp_attribute16 => p_shp_attribute16
549 ,p_shp_attribute17 => p_shp_attribute17
550 ,p_shp_attribute18 => p_shp_attribute18
551 ,p_shp_attribute19 => p_shp_attribute19
552 ,p_shp_attribute20 => p_shp_attribute20
553 ,p_shp_information_category => p_shp_information_category
554 ,p_shp_information1 => p_shp_information1
555 ,p_shp_information2 => p_shp_information2
556 ,p_shp_information3 => p_shp_information3
557 ,p_shp_information4 => p_shp_information4
558 ,p_shp_information5 => p_shp_information5
559 ,p_shp_information6 => p_shp_information6
560 ,p_shp_information7 => p_shp_information7
561 ,p_shp_information8 => p_shp_information8
562 ,p_shp_information9 => p_shp_information9
563 ,p_shp_information10 => p_shp_information10
564 ,p_shp_information11 => p_shp_information11
565 ,p_shp_information12 => p_shp_information12
566 ,p_shp_information13 => p_shp_information13
567 ,p_shp_information14 => p_shp_information14
568 ,p_shp_information15 => p_shp_information15
569 ,p_shp_information16 => p_shp_information16
570 ,p_shp_information17 => p_shp_information17
571 ,p_shp_information18 => p_shp_information18
572 ,p_shp_information19 => p_shp_information19
573 ,p_shp_information20 => p_shp_information20
574 );
575
576 hr_utility.set_location(l_proc, 50);
577 --
578 -- Call After Process User Hook
579 --
580 begin
581 pqp_service_history_period_bk2.update_pqp_service_hist_pd_a
582 (p_service_history_period_id => p_service_history_period_id
583 ,p_object_version_number => l_object_version_number
584 ,p_assignment_id => p_assignment_id
585 ,p_start_date => l_start_date
586 ,p_end_date => l_end_date
587 ,p_employer_name => p_employer_name
588 ,p_employer_address => p_employer_address
589 ,p_employer_type => p_employer_type
590 ,p_employer_subtype => p_employer_subtype
591 ,p_description => p_description
592 ,p_continuous_service => p_continuous_service
593 ,p_all_assignments => p_all_assignments
594 ,p_period_years => p_period_years
595 ,p_period_days => p_period_days
596 ,p_shp_attribute_category => p_shp_attribute_category
597 ,p_shp_attribute1 => p_shp_attribute1
598 ,p_shp_attribute2 => p_shp_attribute2
599 ,p_shp_attribute3 => p_shp_attribute3
600 ,p_shp_attribute4 => p_shp_attribute4
601 ,p_shp_attribute5 => p_shp_attribute5
602 ,p_shp_attribute6 => p_shp_attribute6
603 ,p_shp_attribute7 => p_shp_attribute7
604 ,p_shp_attribute8 => p_shp_attribute8
605 ,p_shp_attribute9 => p_shp_attribute9
606 ,p_shp_attribute10 => p_shp_attribute10
607 ,p_shp_attribute11 => p_shp_attribute11
608 ,p_shp_attribute12 => p_shp_attribute12
609 ,p_shp_attribute13 => p_shp_attribute13
610 ,p_shp_attribute14 => p_shp_attribute14
611 ,p_shp_attribute15 => p_shp_attribute15
612 ,p_shp_attribute16 => p_shp_attribute16
613 ,p_shp_attribute17 => p_shp_attribute17
614 ,p_shp_attribute18 => p_shp_attribute18
615 ,p_shp_attribute19 => p_shp_attribute19
616 ,p_shp_attribute20 => p_shp_attribute20
617 ,p_shp_information_category => p_shp_information_category
618 ,p_shp_information1 => p_shp_information1
619 ,p_shp_information2 => p_shp_information2
620 ,p_shp_information3 => p_shp_information3
621 ,p_shp_information4 => p_shp_information4
622 ,p_shp_information5 => p_shp_information5
623 ,p_shp_information6 => p_shp_information6
624 ,p_shp_information7 => p_shp_information7
625 ,p_shp_information8 => p_shp_information8
626 ,p_shp_information9 => p_shp_information9
627 ,p_shp_information10 => p_shp_information10
628 ,p_shp_information11 => p_shp_information11
629 ,p_shp_information12 => p_shp_information12
630 ,p_shp_information13 => p_shp_information13
631 ,p_shp_information14 => p_shp_information14
632 ,p_shp_information15 => p_shp_information15
633 ,p_shp_information16 => p_shp_information16
634 ,p_shp_information17 => p_shp_information17
635 ,p_shp_information18 => p_shp_information18
636 ,p_shp_information19 => p_shp_information19
637 ,p_shp_information20 => p_shp_information20
638 );
639 exception
640 when hr_api.cannot_find_prog_unit then
641 hr_api.cannot_find_prog_unit_error
642 (p_module_name => 'update_service_history_period'
643 ,p_hook_type => 'AP'
644 );
645 end;
646 hr_utility.set_location(l_proc, 60);
647 --
648 -- When in validation only mode raise the Validate_Enabled exception
649 --
650 if p_validate then
651 raise hr_api.validate_enabled;
652 end if;
653 --
654 -- Set all output arguments
655 --
656 p_object_version_number := l_object_version_number;
657 --
658 hr_utility.set_location(' Leaving:'||l_proc, 70);
659 exception
660 when hr_api.validate_enabled then
661 --
662 -- As the Validate_Enabled exception has been raised
663 -- we must rollback to the savepoint
664 --
665 rollback to update_service_history_period;
666 --
667 -- Only set output warning arguments
668 -- (Any key or derived arguments must be set to null
669 -- when validation only mode is being used.)
670 --
671 p_object_version_number := null;
672 hr_utility.set_location(' Leaving:'||l_proc, 80);
673 when others then
674 --
675 -- A validation or unexpected error has occured
676 --
677 rollback to update_service_history_period;
678 p_object_version_number := l_object_version_number;
679 hr_utility.set_location(' Leaving:'||l_proc, 90);
680 raise;
681 end update_service_history_period;
682 --
683 -- ----------------------------------------------------------------------------
684 -- |---------------------< delete_service_history_period >--------------------|
685 -- ----------------------------------------------------------------------------
686 --
687 procedure delete_service_history_period
688 (p_validate in boolean default false
689 ,p_service_history_period_id in number
690 ,p_object_version_number in number
691 ) is
692
693 --
694 -- Declare cursors and local variables
695 --
696
697 l_proc varchar2(72) := g_package||'delete_service_history_period';
698
699 begin
700 hr_utility.set_location('Entering:'|| l_proc, 10);
701 --
702 -- Issue a savepoint
703 --
704 savepoint delete_service_history_period;
705 --
706 hr_utility.set_location(l_proc, 20);
707 --
708 -- Call Before Process User Hook
709 --
710 begin
711 pqp_service_history_period_bk3.delete_pqp_service_hist_pd_b
712 (p_service_history_period_id => p_service_history_period_id
713 ,p_object_version_number => p_object_version_number
714 );
715 exception
716 when hr_api.cannot_find_prog_unit then
717 hr_api.cannot_find_prog_unit_error
718 (p_module_name => 'delete_service_history_period'
719 ,p_hook_type => 'BP'
720 );
721 end;
722 hr_utility.set_location(l_proc, 30);
723 --
724 -- Validation in addition to Row Handlers
725 --
726
727
728
729 hr_utility.set_location(l_proc, 40);
730 --
731 -- Process Logic
732 --
733
734
735 pqp_shp_del.del (
736 p_service_history_period_id => p_service_history_period_id
737 ,p_object_version_number => p_object_version_number
738 );
739
740 hr_utility.set_location(l_proc, 50);
741 --
742 -- Call After Process User Hook
743 --
744 begin
745 pqp_service_history_period_bk3.delete_pqp_service_hist_pd_a
746 (p_service_history_period_id => p_service_history_period_id
747 ,p_object_version_number => p_object_version_number
748 );
749 exception
750 when hr_api.cannot_find_prog_unit then
751 hr_api.cannot_find_prog_unit_error
752 (p_module_name => 'delete_service_history_period'
753 ,p_hook_type => 'AP'
754 );
755 end;
756 hr_utility.set_location(l_proc, 60);
757 --
758 -- When in validation only mode raise the Validate_Enabled exception
759 --
760 if p_validate then
761 raise hr_api.validate_enabled;
762 end if;
763 --
764 -- Set all output arguments
765 --
766 --
767 hr_utility.set_location(' Leaving:'||l_proc, 70);
768 exception
769 when hr_api.validate_enabled then
770 --
771 -- As the Validate_Enabled exception has been raised
772 -- we must rollback to the savepoint
773 --
774 rollback to delete_service_history_period;
775 --
776 -- Only set output warning arguments
777 -- (Any key or derived arguments must be set to null
778 -- when validation only mode is being used.)
779 --
780 hr_utility.set_location(' Leaving:'||l_proc, 80);
781 when others then
782 --
783 -- A validation or unexpected error has occured
784 --
785 rollback to delete_service_history_period;
786 hr_utility.set_location(' Leaving:'||l_proc, 90);
787 raise;
788 end delete_service_history_period;
789 --
790 end pqp_shp_api;