[Home] [Help]
PACKAGE BODY: APPS.PQP_SHP_UPD
Source
1 Package Body pqp_shp_upd as
2 /* $Header: pqshprhi.pkb 115.8 2003/02/17 22:14:48 tmehra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqp_shp_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml
55 (p_rec in out nocopy pqp_shp_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61 hr_utility.set_location('Entering:'||l_proc, 5);
62 --
63 -- Increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 pqp_shp_shd.g_api_dml := true; -- Set the api dml status
67 --
68 -- Update the pqp_service_history_periods Row
69 --
70 update pqp_service_history_periods
71 set
72 service_history_period_id = p_rec.service_history_period_id
73 ,business_group_id = p_rec.business_group_id
74 ,assignment_id = p_rec.assignment_id
75 ,start_date = p_rec.start_date
76 ,end_date = p_rec.end_date
77 ,employer_name = p_rec.employer_name
78 ,employer_address = p_rec.employer_address
79 ,employer_type = p_rec.employer_type
80 ,employer_subtype = p_rec.employer_subtype
81 ,period_years = p_rec.period_years
82 ,period_days = p_rec.period_days
83 ,description = p_rec.description
84 ,continuous_service = p_rec.continuous_service
85 ,all_assignments = p_rec.all_assignments
86 ,object_version_number = p_rec.object_version_number
87 ,shp_attribute_category = p_rec.shp_attribute_category
88 ,shp_attribute1 = p_rec.shp_attribute1
89 ,shp_attribute2 = p_rec.shp_attribute2
90 ,shp_attribute3 = p_rec.shp_attribute3
91 ,shp_attribute4 = p_rec.shp_attribute4
92 ,shp_attribute5 = p_rec.shp_attribute5
93 ,shp_attribute6 = p_rec.shp_attribute6
94 ,shp_attribute7 = p_rec.shp_attribute7
95 ,shp_attribute8 = p_rec.shp_attribute8
96 ,shp_attribute9 = p_rec.shp_attribute9
97 ,shp_attribute10 = p_rec.shp_attribute10
98 ,shp_attribute11 = p_rec.shp_attribute11
99 ,shp_attribute12 = p_rec.shp_attribute12
100 ,shp_attribute13 = p_rec.shp_attribute13
101 ,shp_attribute14 = p_rec.shp_attribute14
102 ,shp_attribute15 = p_rec.shp_attribute15
103 ,shp_attribute16 = p_rec.shp_attribute16
104 ,shp_attribute17 = p_rec.shp_attribute17
105 ,shp_attribute18 = p_rec.shp_attribute18
106 ,shp_attribute19 = p_rec.shp_attribute19
107 ,shp_attribute20 = p_rec.shp_attribute20
108 ,shp_information_category = p_rec.shp_information_category
109 ,shp_information1 = p_rec.shp_information1
110 ,shp_information2 = p_rec.shp_information2
111 ,shp_information3 = p_rec.shp_information3
112 ,shp_information4 = p_rec.shp_information4
113 ,shp_information5 = p_rec.shp_information5
114 ,shp_information6 = p_rec.shp_information6
115 ,shp_information7 = p_rec.shp_information7
116 ,shp_information8 = p_rec.shp_information8
117 ,shp_information9 = p_rec.shp_information9
118 ,shp_information10 = p_rec.shp_information10
119 ,shp_information11 = p_rec.shp_information11
120 ,shp_information12 = p_rec.shp_information12
121 ,shp_information13 = p_rec.shp_information13
122 ,shp_information14 = p_rec.shp_information14
123 ,shp_information15 = p_rec.shp_information15
124 ,shp_information16 = p_rec.shp_information16
125 ,shp_information17 = p_rec.shp_information17
126 ,shp_information18 = p_rec.shp_information18
127 ,shp_information19 = p_rec.shp_information19
128 ,shp_information20 = p_rec.shp_information20
129 where service_history_period_id = p_rec.service_history_period_id;
130 --
131 pqp_shp_shd.g_api_dml := false; -- Unset the api dml status
132 --
133 hr_utility.set_location(' Leaving:'||l_proc, 10);
134 --
135 Exception
136 When hr_api.check_integrity_violated Then
137 -- A check constraint has been violated
138 pqp_shp_shd.g_api_dml := false; -- Unset the api dml status
139 pqp_shp_shd.constraint_error
140 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141 When hr_api.parent_integrity_violated Then
142 -- Parent integrity has been violated
143 pqp_shp_shd.g_api_dml := false; -- Unset the api dml status
144 pqp_shp_shd.constraint_error
145 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
146 When hr_api.unique_integrity_violated Then
147 -- Unique integrity has been violated
148 pqp_shp_shd.g_api_dml := false; -- Unset the api dml status
149 pqp_shp_shd.constraint_error
150 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
151 When Others Then
152 pqp_shp_shd.g_api_dml := false; -- Unset the api dml status
153 Raise;
154 End update_dml;
155 --
156 -- ----------------------------------------------------------------------------
157 -- |------------------------------< pre_update >------------------------------|
158 -- ----------------------------------------------------------------------------
159 -- {Start Of Comments}
160 --
161 -- Description:
162 -- This private procedure contains any processing which is required before
163 -- the update dml.
164 --
165 -- Prerequisites:
166 -- This is an internal procedure which is called from the upd procedure.
167 --
168 -- In Parameters:
169 -- A Pl/Sql record structure.
170 --
171 -- Post Success:
172 -- Processing continues.
173 --
174 -- Post Failure:
175 -- If an error has occurred, an error message and exception wil be raised
176 -- but not handled.
177 --
178 -- Developer Implementation Notes:
179 -- Any pre-processing required before the update dml is issued should be
180 -- coded within this procedure. It is important to note that any 3rd party
181 -- maintenance should be reviewed before placing in this procedure.
182 --
183 -- Access Status:
184 -- Internal Row Handler Use Only.
185 --
186 -- {End Of Comments}
187 -- ----------------------------------------------------------------------------
188 Procedure pre_update
189 (p_rec in pqp_shp_shd.g_rec_type
190 ) is
191 --
192 l_proc varchar2(72) := g_package||'pre_update';
193 --
194 Begin
195 hr_utility.set_location('Entering:'||l_proc, 5);
196 --
197 hr_utility.set_location(' Leaving:'||l_proc, 10);
198 End pre_update;
199 --
200 -- ----------------------------------------------------------------------------
201 -- |-----------------------------< post_update >------------------------------|
202 -- ----------------------------------------------------------------------------
203 -- {Start Of Comments}
204 --
205 -- Description:
206 -- This private procedure contains any processing which is required after the
207 -- update dml.
208 --
209 -- Prerequisites:
210 -- This is an internal procedure which is called from the upd procedure.
211 --
212 -- In Parameters:
213 -- A Pl/Sql record structure.
214 --
215 -- Post Success:
216 -- Processing continues.
217 --
218 -- Post Failure:
219 -- If an error has occurred, an error message and exception will be raised
220 -- but not handled.
221 --
222 -- Developer Implementation Notes:
223 -- Any post-processing required after the update dml is issued should be
224 -- coded within this procedure. It is important to note that any 3rd party
225 -- maintenance should be reviewed before placing in this procedure.
226 --
227 -- Access Status:
228 -- Internal Row Handler Use Only.
229 --
230 -- {End Of Comments}
231 -- ----------------------------------------------------------------------------
232 Procedure post_update
233 (
234 p_rec in pqp_shp_shd.g_rec_type
235 ) is
236 --
237 l_proc varchar2(72) := g_package||'post_update';
238 --
239 Begin
240 hr_utility.set_location('Entering:'||l_proc, 5);
241 begin
242 --
243 pqp_shp_rku.after_update
244 (p_service_history_period_id
245 => p_rec.service_history_period_id
246 ,p_business_group_id
247 => p_rec.business_group_id
248 ,p_assignment_id
249 => p_rec.assignment_id
250 ,p_start_date
251 => p_rec.start_date
252 ,p_end_date
253 => p_rec.end_date
254 ,p_employer_name
255 => p_rec.employer_name
256 ,p_employer_address
257 => p_rec.employer_address
258 ,p_employer_type
259 => p_rec.employer_type
260 ,p_employer_subtype
261 => p_rec.employer_subtype
262 ,p_period_years
263 => p_rec.period_years
264 ,p_period_days
265 => p_rec.period_days
266 ,p_description
267 => p_rec.description
268 ,p_continuous_service
269 => p_rec.continuous_service
270 ,p_all_assignments
271 => p_rec.all_assignments
272 ,p_object_version_number
273 => p_rec.object_version_number
274 ,p_shp_attribute_category
275 => p_rec.shp_attribute_category
276 ,p_shp_attribute1
277 => p_rec.shp_attribute1
278 ,p_shp_attribute2
279 => p_rec.shp_attribute2
280 ,p_shp_attribute3
281 => p_rec.shp_attribute3
282 ,p_shp_attribute4
283 => p_rec.shp_attribute4
284 ,p_shp_attribute5
285 => p_rec.shp_attribute5
286 ,p_shp_attribute6
287 => p_rec.shp_attribute6
288 ,p_shp_attribute7
289 => p_rec.shp_attribute7
290 ,p_shp_attribute8
291 => p_rec.shp_attribute8
292 ,p_shp_attribute9
293 => p_rec.shp_attribute9
294 ,p_shp_attribute10
295 => p_rec.shp_attribute10
296 ,p_shp_attribute11
297 => p_rec.shp_attribute11
298 ,p_shp_attribute12
299 => p_rec.shp_attribute12
300 ,p_shp_attribute13
301 => p_rec.shp_attribute13
302 ,p_shp_attribute14
303 => p_rec.shp_attribute14
304 ,p_shp_attribute15
305 => p_rec.shp_attribute15
306 ,p_shp_attribute16
307 => p_rec.shp_attribute16
308 ,p_shp_attribute17
309 => p_rec.shp_attribute17
310 ,p_shp_attribute18
311 => p_rec.shp_attribute18
312 ,p_shp_attribute19
313 => p_rec.shp_attribute19
314 ,p_shp_attribute20
315 => p_rec.shp_attribute20
316 ,p_shp_information_category
317 => p_rec.shp_information_category
318 ,p_shp_information1
319 => p_rec.shp_information1
320 ,p_shp_information2
321 => p_rec.shp_information2
322 ,p_shp_information3
323 => p_rec.shp_information3
324 ,p_shp_information4
325 => p_rec.shp_information4
326 ,p_shp_information5
327 => p_rec.shp_information5
328 ,p_shp_information6
329 => p_rec.shp_information6
330 ,p_shp_information7
331 => p_rec.shp_information7
332 ,p_shp_information8
333 => p_rec.shp_information8
334 ,p_shp_information9
335 => p_rec.shp_information9
336 ,p_shp_information10
337 => p_rec.shp_information10
338 ,p_shp_information11
339 => p_rec.shp_information11
340 ,p_shp_information12
341 => p_rec.shp_information12
342 ,p_shp_information13
343 => p_rec.shp_information13
344 ,p_shp_information14
345 => p_rec.shp_information14
346 ,p_shp_information15
347 => p_rec.shp_information15
348 ,p_shp_information16
349 => p_rec.shp_information16
350 ,p_shp_information17
351 => p_rec.shp_information17
352 ,p_shp_information18
353 => p_rec.shp_information18
354 ,p_shp_information19
355 => p_rec.shp_information19
356 ,p_shp_information20
357 => p_rec.shp_information20
358 ,p_business_group_id_o
359 => pqp_shp_shd.g_old_rec.business_group_id
360 ,p_assignment_id_o
361 => pqp_shp_shd.g_old_rec.assignment_id
362 ,p_start_date_o
363 => pqp_shp_shd.g_old_rec.start_date
364 ,p_end_date_o
365 => pqp_shp_shd.g_old_rec.end_date
366 ,p_employer_name_o
367 => pqp_shp_shd.g_old_rec.employer_name
368 ,p_employer_address_o
369 => pqp_shp_shd.g_old_rec.employer_address
370 ,p_employer_type_o
371 => pqp_shp_shd.g_old_rec.employer_type
372 ,p_employer_subtype_o
373 => pqp_shp_shd.g_old_rec.employer_subtype
374 ,p_period_years_o
375 => pqp_shp_shd.g_old_rec.period_years
376 ,p_period_days_o
377 => pqp_shp_shd.g_old_rec.period_days
378 ,p_description_o
379 => pqp_shp_shd.g_old_rec.description
380 ,p_continuous_service_o
381 => pqp_shp_shd.g_old_rec.continuous_service
382 ,p_all_assignments_o
383 => pqp_shp_shd.g_old_rec.all_assignments
384 ,p_object_version_number_o
385 => pqp_shp_shd.g_old_rec.object_version_number
386 ,p_shp_attribute_category_o
387 => pqp_shp_shd.g_old_rec.shp_attribute_category
388 ,p_shp_attribute1_o
389 => pqp_shp_shd.g_old_rec.shp_attribute1
390 ,p_shp_attribute2_o
391 => pqp_shp_shd.g_old_rec.shp_attribute2
392 ,p_shp_attribute3_o
393 => pqp_shp_shd.g_old_rec.shp_attribute3
394 ,p_shp_attribute4_o
395 => pqp_shp_shd.g_old_rec.shp_attribute4
396 ,p_shp_attribute5_o
397 => pqp_shp_shd.g_old_rec.shp_attribute5
398 ,p_shp_attribute6_o
399 => pqp_shp_shd.g_old_rec.shp_attribute6
400 ,p_shp_attribute7_o
401 => pqp_shp_shd.g_old_rec.shp_attribute7
402 ,p_shp_attribute8_o
403 => pqp_shp_shd.g_old_rec.shp_attribute8
404 ,p_shp_attribute9_o
405 => pqp_shp_shd.g_old_rec.shp_attribute9
406 ,p_shp_attribute10_o
407 => pqp_shp_shd.g_old_rec.shp_attribute10
408 ,p_shp_attribute11_o
409 => pqp_shp_shd.g_old_rec.shp_attribute11
410 ,p_shp_attribute12_o
411 => pqp_shp_shd.g_old_rec.shp_attribute12
412 ,p_shp_attribute13_o
413 => pqp_shp_shd.g_old_rec.shp_attribute13
414 ,p_shp_attribute14_o
415 => pqp_shp_shd.g_old_rec.shp_attribute14
416 ,p_shp_attribute15_o
417 => pqp_shp_shd.g_old_rec.shp_attribute15
418 ,p_shp_attribute16_o
419 => pqp_shp_shd.g_old_rec.shp_attribute16
420 ,p_shp_attribute17_o
421 => pqp_shp_shd.g_old_rec.shp_attribute17
422 ,p_shp_attribute18_o
423 => pqp_shp_shd.g_old_rec.shp_attribute18
424 ,p_shp_attribute19_o
425 => pqp_shp_shd.g_old_rec.shp_attribute19
426 ,p_shp_attribute20_o
427 => pqp_shp_shd.g_old_rec.shp_attribute20
428 ,p_shp_information_category_o
429 => pqp_shp_shd.g_old_rec.shp_information_category
430 ,p_shp_information1_o
431 => pqp_shp_shd.g_old_rec.shp_information1
432 ,p_shp_information2_o
433 => pqp_shp_shd.g_old_rec.shp_information2
434 ,p_shp_information3_o
435 => pqp_shp_shd.g_old_rec.shp_information3
436 ,p_shp_information4_o
437 => pqp_shp_shd.g_old_rec.shp_information4
438 ,p_shp_information5_o
439 => pqp_shp_shd.g_old_rec.shp_information5
440 ,p_shp_information6_o
441 => pqp_shp_shd.g_old_rec.shp_information6
442 ,p_shp_information7_o
443 => pqp_shp_shd.g_old_rec.shp_information7
444 ,p_shp_information8_o
445 => pqp_shp_shd.g_old_rec.shp_information8
446 ,p_shp_information9_o
447 => pqp_shp_shd.g_old_rec.shp_information9
448 ,p_shp_information10_o
449 => pqp_shp_shd.g_old_rec.shp_information10
450 ,p_shp_information11_o
451 => pqp_shp_shd.g_old_rec.shp_information11
452 ,p_shp_information12_o
453 => pqp_shp_shd.g_old_rec.shp_information12
454 ,p_shp_information13_o
455 => pqp_shp_shd.g_old_rec.shp_information13
456 ,p_shp_information14_o
457 => pqp_shp_shd.g_old_rec.shp_information14
458 ,p_shp_information15_o
459 => pqp_shp_shd.g_old_rec.shp_information15
460 ,p_shp_information16_o
461 => pqp_shp_shd.g_old_rec.shp_information16
462 ,p_shp_information17_o
463 => pqp_shp_shd.g_old_rec.shp_information17
464 ,p_shp_information18_o
465 => pqp_shp_shd.g_old_rec.shp_information18
466 ,p_shp_information19_o
467 => pqp_shp_shd.g_old_rec.shp_information19
468 ,p_shp_information20_o
469 => pqp_shp_shd.g_old_rec.shp_information20
470 );
471 --
472 exception
473 --
474 when hr_api.cannot_find_prog_unit then
475 --
476 hr_api.cannot_find_prog_unit_error
477 (p_module_name => 'PQP_SERVICE_HISTORY_PERIODS'
478 ,p_hook_type => 'AU');
479 --
480 end;
481 --
482 hr_utility.set_location(' Leaving:'||l_proc, 10);
483 End post_update;
484 --
485 -- ----------------------------------------------------------------------------
486 -- |-----------------------------< convert_defs >-----------------------------|
487 -- ----------------------------------------------------------------------------
488 -- {Start Of Comments}
489 --
490 -- Description:
491 -- The Convert_Defs procedure has one very important function:
492 -- It must return the record structure for the row with all system defaulted
493 -- values converted into its corresponding parameter value for update. When
494 -- we attempt to update a row through the Upd process , certain
495 -- parameters can be defaulted which enables flexibility in the calling of
496 -- the upd process (e.g. only attributes which need to be updated need to be
497 -- specified). For the upd process to determine which attributes
498 -- have NOT been specified we need to check if the parameter has a reserved
499 -- system default value. Therefore, for all parameters which have a
500 -- corresponding reserved system default mechanism specified we need to
501 -- check if a system default is being used. If a system default is being
502 -- used then we convert the defaulted value into its corresponding attribute
503 -- value held in the g_old_rec data structure.
504 --
505 -- Prerequisites:
506 -- This private function can only be called from the upd process.
507 --
508 -- In Parameters:
509 -- A Pl/Sql record structure.
510 --
511 -- Post Success:
512 -- The record structure will be returned with all system defaulted parameter
513 -- values converted into its current row attribute value.
514 --
515 -- Post Failure:
516 -- No direct error handling is required within this function. Any possible
517 -- errors within this procedure will be a PL/SQL value error due to
518 -- conversion of datatypes or data lengths.
519 --
520 -- Developer Implementation Notes:
521 -- None.
522 --
523 -- Access Status:
524 -- Internal Row Handler Use Only.
525 --
526 -- {End Of Comments}
527 -- ----------------------------------------------------------------------------
528 Procedure convert_defs
529 (p_rec in out nocopy pqp_shp_shd.g_rec_type
530 ) is
531 --
532 Begin
533 --
534 -- We must now examine each argument value in the
535 -- p_rec plsql record structure
536 -- to see if a system default is being used. If a system default
537 -- is being used then we must set to the 'current' argument value.
538 --
539 If (p_rec.business_group_id = hr_api.g_number) then
540 p_rec.business_group_id :=
541 pqp_shp_shd.g_old_rec.business_group_id;
542 End If;
543 If (p_rec.assignment_id = hr_api.g_number) then
544 p_rec.assignment_id :=
545 pqp_shp_shd.g_old_rec.assignment_id;
546 End If;
547 If (p_rec.start_date = hr_api.g_date) then
548 p_rec.start_date :=
549 pqp_shp_shd.g_old_rec.start_date;
550 End If;
551 If (p_rec.end_date = hr_api.g_date) then
552 p_rec.end_date :=
553 pqp_shp_shd.g_old_rec.end_date;
554 End If;
555 If (p_rec.employer_name = hr_api.g_varchar2) then
556 p_rec.employer_name :=
557 pqp_shp_shd.g_old_rec.employer_name;
558 End If;
559 If (p_rec.employer_address = hr_api.g_varchar2) then
560 p_rec.employer_address :=
561 pqp_shp_shd.g_old_rec.employer_address;
562 End If;
563 If (p_rec.employer_type = hr_api.g_varchar2) then
564 p_rec.employer_type :=
565 pqp_shp_shd.g_old_rec.employer_type;
566 End If;
567 If (p_rec.employer_subtype = hr_api.g_varchar2) then
568 p_rec.employer_subtype :=
569 pqp_shp_shd.g_old_rec.employer_subtype;
570 End If;
571 If (p_rec.period_years = hr_api.g_number) then
572 p_rec.period_years :=
573 pqp_shp_shd.g_old_rec.period_years;
574 End If;
575 If (p_rec.period_days = hr_api.g_number) then
576 p_rec.period_days :=
577 pqp_shp_shd.g_old_rec.period_days;
578 End If;
579 If (p_rec.description = hr_api.g_varchar2) then
580 p_rec.description :=
581 pqp_shp_shd.g_old_rec.description;
582 End If;
583 If (p_rec.continuous_service = hr_api.g_varchar2) then
584 p_rec.continuous_service :=
585 pqp_shp_shd.g_old_rec.continuous_service;
586 End If;
587 If (p_rec.all_assignments = hr_api.g_varchar2) then
588 p_rec.all_assignments :=
589 pqp_shp_shd.g_old_rec.all_assignments;
590 End If;
591 If (p_rec.shp_attribute_category = hr_api.g_varchar2) then
592 p_rec.shp_attribute_category :=
593 pqp_shp_shd.g_old_rec.shp_attribute_category;
594 End If;
595 If (p_rec.shp_attribute1 = hr_api.g_varchar2) then
596 p_rec.shp_attribute1 :=
597 pqp_shp_shd.g_old_rec.shp_attribute1;
598 End If;
599 If (p_rec.shp_attribute2 = hr_api.g_varchar2) then
600 p_rec.shp_attribute2 :=
601 pqp_shp_shd.g_old_rec.shp_attribute2;
602 End If;
603 If (p_rec.shp_attribute3 = hr_api.g_varchar2) then
604 p_rec.shp_attribute3 :=
605 pqp_shp_shd.g_old_rec.shp_attribute3;
606 End If;
607 If (p_rec.shp_attribute4 = hr_api.g_varchar2) then
608 p_rec.shp_attribute4 :=
609 pqp_shp_shd.g_old_rec.shp_attribute4;
610 End If;
611 If (p_rec.shp_attribute5 = hr_api.g_varchar2) then
612 p_rec.shp_attribute5 :=
613 pqp_shp_shd.g_old_rec.shp_attribute5;
614 End If;
615 If (p_rec.shp_attribute6 = hr_api.g_varchar2) then
616 p_rec.shp_attribute6 :=
617 pqp_shp_shd.g_old_rec.shp_attribute6;
618 End If;
619 If (p_rec.shp_attribute7 = hr_api.g_varchar2) then
620 p_rec.shp_attribute7 :=
621 pqp_shp_shd.g_old_rec.shp_attribute7;
622 End If;
623 If (p_rec.shp_attribute8 = hr_api.g_varchar2) then
624 p_rec.shp_attribute8 :=
625 pqp_shp_shd.g_old_rec.shp_attribute8;
626 End If;
627 If (p_rec.shp_attribute9 = hr_api.g_varchar2) then
628 p_rec.shp_attribute9 :=
629 pqp_shp_shd.g_old_rec.shp_attribute9;
630 End If;
631 If (p_rec.shp_attribute10 = hr_api.g_varchar2) then
632 p_rec.shp_attribute10 :=
633 pqp_shp_shd.g_old_rec.shp_attribute10;
634 End If;
635 If (p_rec.shp_attribute11 = hr_api.g_varchar2) then
636 p_rec.shp_attribute11 :=
637 pqp_shp_shd.g_old_rec.shp_attribute11;
638 End If;
639 If (p_rec.shp_attribute12 = hr_api.g_varchar2) then
640 p_rec.shp_attribute12 :=
641 pqp_shp_shd.g_old_rec.shp_attribute12;
642 End If;
643 If (p_rec.shp_attribute13 = hr_api.g_varchar2) then
644 p_rec.shp_attribute13 :=
645 pqp_shp_shd.g_old_rec.shp_attribute13;
646 End If;
647 If (p_rec.shp_attribute14 = hr_api.g_varchar2) then
648 p_rec.shp_attribute14 :=
649 pqp_shp_shd.g_old_rec.shp_attribute14;
650 End If;
651 If (p_rec.shp_attribute15 = hr_api.g_varchar2) then
652 p_rec.shp_attribute15 :=
653 pqp_shp_shd.g_old_rec.shp_attribute15;
654 End If;
655 If (p_rec.shp_attribute16 = hr_api.g_varchar2) then
656 p_rec.shp_attribute16 :=
657 pqp_shp_shd.g_old_rec.shp_attribute16;
658 End If;
659 If (p_rec.shp_attribute17 = hr_api.g_varchar2) then
660 p_rec.shp_attribute17 :=
661 pqp_shp_shd.g_old_rec.shp_attribute17;
662 End If;
663 If (p_rec.shp_attribute18 = hr_api.g_varchar2) then
664 p_rec.shp_attribute18 :=
665 pqp_shp_shd.g_old_rec.shp_attribute18;
666 End If;
667 If (p_rec.shp_attribute19 = hr_api.g_varchar2) then
668 p_rec.shp_attribute19 :=
669 pqp_shp_shd.g_old_rec.shp_attribute19;
670 End If;
671 If (p_rec.shp_attribute20 = hr_api.g_varchar2) then
672 p_rec.shp_attribute20 :=
673 pqp_shp_shd.g_old_rec.shp_attribute20;
674 End If;
675 If (p_rec.shp_information_category = hr_api.g_varchar2) then
676 p_rec.shp_information_category :=
677 pqp_shp_shd.g_old_rec.shp_information_category;
678 End If;
679 If (p_rec.shp_information1 = hr_api.g_varchar2) then
680 p_rec.shp_information1 :=
681 pqp_shp_shd.g_old_rec.shp_information1;
682 End If;
683 If (p_rec.shp_information2 = hr_api.g_varchar2) then
684 p_rec.shp_information2 :=
685 pqp_shp_shd.g_old_rec.shp_information2;
686 End If;
687 If (p_rec.shp_information3 = hr_api.g_varchar2) then
688 p_rec.shp_information3 :=
689 pqp_shp_shd.g_old_rec.shp_information3;
690 End If;
691 If (p_rec.shp_information4 = hr_api.g_varchar2) then
692 p_rec.shp_information4 :=
693 pqp_shp_shd.g_old_rec.shp_information4;
694 End If;
695 If (p_rec.shp_information5 = hr_api.g_varchar2) then
696 p_rec.shp_information5 :=
697 pqp_shp_shd.g_old_rec.shp_information5;
698 End If;
699 If (p_rec.shp_information6 = hr_api.g_varchar2) then
700 p_rec.shp_information6 :=
701 pqp_shp_shd.g_old_rec.shp_information6;
702 End If;
703 If (p_rec.shp_information7 = hr_api.g_varchar2) then
704 p_rec.shp_information7 :=
705 pqp_shp_shd.g_old_rec.shp_information7;
706 End If;
707 If (p_rec.shp_information8 = hr_api.g_varchar2) then
708 p_rec.shp_information8 :=
709 pqp_shp_shd.g_old_rec.shp_information8;
710 End If;
711 If (p_rec.shp_information9 = hr_api.g_varchar2) then
712 p_rec.shp_information9 :=
713 pqp_shp_shd.g_old_rec.shp_information9;
714 End If;
715 If (p_rec.shp_information10 = hr_api.g_varchar2) then
716 p_rec.shp_information10 :=
717 pqp_shp_shd.g_old_rec.shp_information10;
718 End If;
719 If (p_rec.shp_information11 = hr_api.g_varchar2) then
720 p_rec.shp_information11 :=
721 pqp_shp_shd.g_old_rec.shp_information11;
722 End If;
723 If (p_rec.shp_information12 = hr_api.g_varchar2) then
724 p_rec.shp_information12 :=
725 pqp_shp_shd.g_old_rec.shp_information12;
726 End If;
727 If (p_rec.shp_information13 = hr_api.g_varchar2) then
728 p_rec.shp_information13 :=
729 pqp_shp_shd.g_old_rec.shp_information13;
730 End If;
731 If (p_rec.shp_information14 = hr_api.g_varchar2) then
732 p_rec.shp_information14 :=
733 pqp_shp_shd.g_old_rec.shp_information14;
734 End If;
735 If (p_rec.shp_information15 = hr_api.g_varchar2) then
736 p_rec.shp_information15 :=
737 pqp_shp_shd.g_old_rec.shp_information15;
738 End If;
739 If (p_rec.shp_information16 = hr_api.g_varchar2) then
740 p_rec.shp_information16 :=
741 pqp_shp_shd.g_old_rec.shp_information16;
742 End If;
743 If (p_rec.shp_information17 = hr_api.g_varchar2) then
744 p_rec.shp_information17 :=
745 pqp_shp_shd.g_old_rec.shp_information17;
746 End If;
747 If (p_rec.shp_information18 = hr_api.g_varchar2) then
748 p_rec.shp_information18 :=
749 pqp_shp_shd.g_old_rec.shp_information18;
750 End If;
751 If (p_rec.shp_information19 = hr_api.g_varchar2) then
752 p_rec.shp_information19 :=
753 pqp_shp_shd.g_old_rec.shp_information19;
754 End If;
755 If (p_rec.shp_information20 = hr_api.g_varchar2) then
756 p_rec.shp_information20 :=
757 pqp_shp_shd.g_old_rec.shp_information20;
758 End If;
759 --
760 End convert_defs;
761 --
762 -- ----------------------------------------------------------------------------
763 -- |---------------------------------< upd >----------------------------------|
764 -- ----------------------------------------------------------------------------
765 Procedure upd
766 (
767 p_rec in out nocopy pqp_shp_shd.g_rec_type
768 ) is
769 --
770 l_proc varchar2(72) := g_package||'upd';
771 --
772 Begin
773 hr_utility.set_location('Entering:'||l_proc, 5);
774 --
775 -- We must lock the row which we need to update.
776 --
777 pqp_shp_shd.lck
778 (p_rec.service_history_period_id
779 ,p_rec.object_version_number
780 );
781 --
782 -- 1. During an update system defaults are used to determine if
783 -- arguments have been defaulted or not. We must therefore
784 -- derive the full record structure values to be updated.
785 --
786 -- 2. Call the supporting update validate operations.
787 --
788 convert_defs(p_rec);
789 pqp_shp_bus.update_validate
790 (
791 p_rec
792 );
793 --
794 -- Call the supporting pre-update operation
795 --
796 pqp_shp_upd.pre_update(p_rec);
797 --
798 -- Update the row.
799 --
800 pqp_shp_upd.update_dml(p_rec);
801 --
802 -- Call the supporting post-update operation
803 --
804 pqp_shp_upd.post_update
805 (
806 p_rec
807 );
808 End upd;
809 --
810 -- ----------------------------------------------------------------------------
811 -- |---------------------------------< upd >----------------------------------|
812 -- ----------------------------------------------------------------------------
813 Procedure upd
814 (p_service_history_period_id in number
815 ,p_object_version_number in out nocopy number
816 ,p_business_group_id in number default hr_api.g_number
817 ,p_assignment_id in number default hr_api.g_number
818 ,p_start_date in date default hr_api.g_date
819 ,p_end_date in date default hr_api.g_date
820 ,p_employer_name in varchar2 default hr_api.g_varchar2
821 ,p_employer_address in varchar2 default hr_api.g_varchar2
822 ,p_employer_type in varchar2 default hr_api.g_varchar2
823 ,p_employer_subtype in varchar2 default hr_api.g_varchar2
824 ,p_period_years in number default hr_api.g_number
825 ,p_period_days in number default hr_api.g_number
826 ,p_description in varchar2 default hr_api.g_varchar2
827 ,p_continuous_service in varchar2 default hr_api.g_varchar2
828 ,p_all_assignments in varchar2 default hr_api.g_varchar2
829 ,p_shp_attribute_category in varchar2 default hr_api.g_varchar2
830 ,p_shp_attribute1 in varchar2 default hr_api.g_varchar2
831 ,p_shp_attribute2 in varchar2 default hr_api.g_varchar2
832 ,p_shp_attribute3 in varchar2 default hr_api.g_varchar2
833 ,p_shp_attribute4 in varchar2 default hr_api.g_varchar2
834 ,p_shp_attribute5 in varchar2 default hr_api.g_varchar2
835 ,p_shp_attribute6 in varchar2 default hr_api.g_varchar2
836 ,p_shp_attribute7 in varchar2 default hr_api.g_varchar2
837 ,p_shp_attribute8 in varchar2 default hr_api.g_varchar2
838 ,p_shp_attribute9 in varchar2 default hr_api.g_varchar2
839 ,p_shp_attribute10 in varchar2 default hr_api.g_varchar2
840 ,p_shp_attribute11 in varchar2 default hr_api.g_varchar2
841 ,p_shp_attribute12 in varchar2 default hr_api.g_varchar2
842 ,p_shp_attribute13 in varchar2 default hr_api.g_varchar2
843 ,p_shp_attribute14 in varchar2 default hr_api.g_varchar2
844 ,p_shp_attribute15 in varchar2 default hr_api.g_varchar2
845 ,p_shp_attribute16 in varchar2 default hr_api.g_varchar2
846 ,p_shp_attribute17 in varchar2 default hr_api.g_varchar2
847 ,p_shp_attribute18 in varchar2 default hr_api.g_varchar2
848 ,p_shp_attribute19 in varchar2 default hr_api.g_varchar2
849 ,p_shp_attribute20 in varchar2 default hr_api.g_varchar2
850 ,p_shp_information_category in varchar2 default hr_api.g_varchar2
851 ,p_shp_information1 in varchar2 default hr_api.g_varchar2
852 ,p_shp_information2 in varchar2 default hr_api.g_varchar2
853 ,p_shp_information3 in varchar2 default hr_api.g_varchar2
854 ,p_shp_information4 in varchar2 default hr_api.g_varchar2
855 ,p_shp_information5 in varchar2 default hr_api.g_varchar2
856 ,p_shp_information6 in varchar2 default hr_api.g_varchar2
857 ,p_shp_information7 in varchar2 default hr_api.g_varchar2
858 ,p_shp_information8 in varchar2 default hr_api.g_varchar2
859 ,p_shp_information9 in varchar2 default hr_api.g_varchar2
860 ,p_shp_information10 in varchar2 default hr_api.g_varchar2
861 ,p_shp_information11 in varchar2 default hr_api.g_varchar2
862 ,p_shp_information12 in varchar2 default hr_api.g_varchar2
863 ,p_shp_information13 in varchar2 default hr_api.g_varchar2
864 ,p_shp_information14 in varchar2 default hr_api.g_varchar2
865 ,p_shp_information15 in varchar2 default hr_api.g_varchar2
866 ,p_shp_information16 in varchar2 default hr_api.g_varchar2
867 ,p_shp_information17 in varchar2 default hr_api.g_varchar2
868 ,p_shp_information18 in varchar2 default hr_api.g_varchar2
869 ,p_shp_information19 in varchar2 default hr_api.g_varchar2
870 ,p_shp_information20 in varchar2 default hr_api.g_varchar2
871 ) is
872 --
873 l_rec pqp_shp_shd.g_rec_type;
874 l_proc varchar2(72) := g_package||'upd';
875 --
876 Begin
877 hr_utility.set_location('Entering:'||l_proc, 5);
878 --
879 -- Call conversion function to turn arguments into the
880 -- l_rec structure.
881 --
882 l_rec :=
883 pqp_shp_shd.convert_args
884 (p_service_history_period_id
885 ,p_business_group_id
886 ,p_assignment_id
887 ,p_start_date
888 ,p_end_date
889 ,p_employer_name
890 ,p_employer_address
891 ,p_employer_type
892 ,p_employer_subtype
893 ,p_period_years
894 ,p_period_days
895 ,p_description
896 ,p_continuous_service
897 ,p_all_assignments
898 ,p_object_version_number
899 ,p_shp_attribute_category
900 ,p_shp_attribute1
901 ,p_shp_attribute2
902 ,p_shp_attribute3
903 ,p_shp_attribute4
904 ,p_shp_attribute5
905 ,p_shp_attribute6
906 ,p_shp_attribute7
907 ,p_shp_attribute8
908 ,p_shp_attribute9
909 ,p_shp_attribute10
910 ,p_shp_attribute11
911 ,p_shp_attribute12
912 ,p_shp_attribute13
913 ,p_shp_attribute14
914 ,p_shp_attribute15
915 ,p_shp_attribute16
916 ,p_shp_attribute17
917 ,p_shp_attribute18
918 ,p_shp_attribute19
919 ,p_shp_attribute20
920 ,p_shp_information_category
921 ,p_shp_information1
922 ,p_shp_information2
923 ,p_shp_information3
924 ,p_shp_information4
925 ,p_shp_information5
926 ,p_shp_information6
927 ,p_shp_information7
928 ,p_shp_information8
929 ,p_shp_information9
930 ,p_shp_information10
931 ,p_shp_information11
932 ,p_shp_information12
933 ,p_shp_information13
934 ,p_shp_information14
935 ,p_shp_information15
936 ,p_shp_information16
937 ,p_shp_information17
938 ,p_shp_information18
939 ,p_shp_information19
940 ,p_shp_information20
941 );
942 --
943 -- Having converted the arguments into the
944 -- plsql record structure we call the corresponding record
945 -- business process.
946 --
947 pqp_shp_upd.upd
948 (
949 l_rec
950 );
951 p_object_version_number := l_rec.object_version_number;
952 --
953 hr_utility.set_location(' Leaving:'||l_proc, 10);
954 End upd;
955 --
956 end pqp_shp_upd;