[Home] [Help]
PACKAGE BODY: APPS.HR_PDT_UPD
Source
1 Package Body hr_pdt_upd as
2 /* $Header: hrpdtrhi.pkb 120.4.12010000.2 2008/08/06 08:46:56 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hr_pdt_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 hr_pdt_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 --
67 --
68 -- Update the hr_person_deployments Row
69 --
70 update hr_person_deployments
71 set
72 person_deployment_id = p_rec.person_deployment_id
73 ,object_version_number = p_rec.object_version_number
74 ,from_business_group_id = p_rec.from_business_group_id
75 ,to_business_group_id = p_rec.to_business_group_id
76 ,from_person_id = p_rec.from_person_id
77 ,to_person_id = p_rec.to_person_id
78 ,person_type_id = p_rec.person_type_id
79 ,start_date = p_rec.start_date
80 ,end_date = p_rec.end_date
81 ,deployment_reason = p_rec.deployment_reason
82 ,employee_number = p_rec.employee_number
83 ,leaving_reason = p_rec.leaving_reason
84 ,leaving_person_type_id = p_rec.leaving_person_type_id
85 ,permanent = p_rec.permanent
86 ,status = p_rec.status
87 ,status_change_reason = p_rec.status_change_reason
88 ,status_change_date = p_rec.status_change_date
89 ,deplymt_policy_id = p_rec.deplymt_policy_id
90 ,organization_id = p_rec.organization_id
91 ,location_id = p_rec.location_id
92 ,job_id = p_rec.job_id
93 ,position_id = p_rec.position_id
94 ,grade_id = p_rec.grade_id
95 ,supervisor_id = p_rec.supervisor_id
96 ,supervisor_assignment_id = p_rec.supervisor_assignment_id
97 ,retain_direct_reports = p_rec.retain_direct_reports
98 ,payroll_id = p_rec.payroll_id
99 ,pay_basis_id = p_rec.pay_basis_id
100 ,proposed_salary = p_rec.proposed_salary
101 ,people_group_id = p_rec.people_group_id
102 ,soft_coding_keyflex_id = p_rec.soft_coding_keyflex_id
103 ,assignment_status_type_id = p_rec.assignment_status_type_id
104 ,ass_status_change_reason = p_rec.ass_status_change_reason
105 ,assignment_category = p_rec.assignment_category
106 ,per_information_category = p_rec.per_information_category
107 ,per_information1 = p_rec.per_information1
108 ,per_information2 = p_rec.per_information2
109 ,per_information3 = p_rec.per_information3
110 ,per_information4 = p_rec.per_information4
111 ,per_information5 = p_rec.per_information5
112 ,per_information6 = p_rec.per_information6
113 ,per_information7 = p_rec.per_information7
114 ,per_information8 = p_rec.per_information8
115 ,per_information9 = p_rec.per_information9
116 ,per_information10 = p_rec.per_information10
117 ,per_information11 = p_rec.per_information11
118 ,per_information12 = p_rec.per_information12
119 ,per_information13 = p_rec.per_information13
120 ,per_information14 = p_rec.per_information14
121 ,per_information15 = p_rec.per_information15
122 ,per_information16 = p_rec.per_information16
123 ,per_information17 = p_rec.per_information17
124 ,per_information18 = p_rec.per_information18
125 ,per_information19 = p_rec.per_information19
126 ,per_information20 = p_rec.per_information20
127 ,per_information21 = p_rec.per_information21
128 ,per_information22 = p_rec.per_information22
129 ,per_information23 = p_rec.per_information23
130 ,per_information24 = p_rec.per_information24
131 ,per_information25 = p_rec.per_information25
132 ,per_information26 = p_rec.per_information26
133 ,per_information27 = p_rec.per_information27
134 ,per_information28 = p_rec.per_information28
135 ,per_information29 = p_rec.per_information29
136 ,per_information30 = p_rec.per_information30
137 where person_deployment_id = p_rec.person_deployment_id;
138 --
139 --
140 --
141 hr_utility.set_location(' Leaving:'||l_proc, 10);
142 --
143 Exception
144 When hr_api.check_integrity_violated Then
145 -- A check constraint has been violated
146 --
147 hr_pdt_shd.constraint_error
148 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
149 When hr_api.parent_integrity_violated Then
150 -- Parent integrity has been violated
151 --
152 hr_pdt_shd.constraint_error
153 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
154 When hr_api.unique_integrity_violated Then
155 -- Unique integrity has been violated
156 --
157 hr_pdt_shd.constraint_error
158 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
159 When Others Then
160 --
161 Raise;
162 End update_dml;
163 --
164 -- ----------------------------------------------------------------------------
165 -- |------------------------------< pre_update >------------------------------|
166 -- ----------------------------------------------------------------------------
167 -- {Start Of Comments}
168 --
169 -- Description:
170 -- This private procedure contains any processing which is required before
171 -- the update dml.
172 --
173 -- Prerequisites:
174 -- This is an internal procedure which is called from the upd procedure.
175 --
176 -- In Parameters:
177 -- A Pl/Sql record structure.
178 --
179 -- Post Success:
180 -- Processing continues.
181 --
182 -- Post Failure:
183 -- If an error has occurred, an error message and exception wil be raised
184 -- but not handled.
185 --
186 -- Developer Implementation Notes:
187 -- Any pre-processing required before the update dml is issued should be
188 -- coded within this procedure. It is important to note that any 3rd party
189 -- maintenance should be reviewed before placing in this procedure.
190 --
191 -- Access Status:
192 -- Internal Row Handler Use Only.
193 --
194 -- {End Of Comments}
195 -- ----------------------------------------------------------------------------
196 Procedure pre_update
197 (p_rec in hr_pdt_shd.g_rec_type
198 ) is
199 --
200 l_proc varchar2(72) := g_package||'pre_update';
201 --
202 Begin
203 hr_utility.set_location('Entering:'||l_proc, 5);
204 --
205 hr_utility.set_location(' Leaving:'||l_proc, 10);
206 End pre_update;
207 --
208 -- ----------------------------------------------------------------------------
209 -- |-----------------------------< post_update >------------------------------|
210 -- ----------------------------------------------------------------------------
211 -- {Start Of Comments}
212 --
213 -- Description:
214 -- This private procedure contains any processing which is required after
215 -- the update dml.
216 --
217 -- Prerequisites:
218 -- This is an internal procedure which is called from the upd procedure.
219 --
220 -- In Parameters:
221 -- A Pl/Sql record structure.
222 --
223 -- Post Success:
224 -- Processing continues.
225 --
226 -- Post Failure:
227 -- If an error has occurred, an error message and exception will be raised
228 -- but not handled.
229 --
230 -- Developer Implementation Notes:
231 -- Any post-processing required after the update dml is issued should be
232 -- coded within this procedure. It is important to note that any 3rd party
233 -- maintenance should be reviewed before placing in this procedure.
234 --
235 -- Access Status:
236 -- Internal Row Handler Use Only.
237 --
238 -- {End Of Comments}
239 -- ----------------------------------------------------------------------------
240 Procedure post_update
241 (p_rec in hr_pdt_shd.g_rec_type
242 ) is
243 --
244 l_proc varchar2(72) := g_package||'post_update';
245 --
246 Begin
247 hr_utility.set_location('Entering:'||l_proc, 5);
248 begin
249 --
250 hr_pdt_rku.after_update
251 (p_person_deployment_id
252 => p_rec.person_deployment_id
253 ,p_object_version_number
254 => p_rec.object_version_number
255 ,p_from_business_group_id
256 => p_rec.from_business_group_id
257 ,p_to_business_group_id
258 => p_rec.to_business_group_id
259 ,p_from_person_id
260 => p_rec.from_person_id
261 ,p_to_person_id
262 => p_rec.to_person_id
263 ,p_person_type_id
264 => p_rec.person_type_id
265 ,p_start_date
266 => p_rec.start_date
267 ,p_end_date
268 => p_rec.end_date
269 ,p_deployment_reason
270 => p_rec.deployment_reason
271 ,p_employee_number
272 => p_rec.employee_number
273 ,p_leaving_reason
274 => p_rec.leaving_reason
275 ,p_leaving_person_type_id
276 => p_rec.leaving_person_type_id
277 ,p_permanent
278 => p_rec.permanent
279 ,p_status
280 => p_rec.status
281 ,p_status_change_reason
282 => p_rec.status_change_reason
283 ,p_status_change_date
284 => p_rec.status_change_date
285 ,p_deplymt_policy_id
286 => p_rec.deplymt_policy_id
287 ,p_organization_id
288 => p_rec.organization_id
289 ,p_location_id
290 => p_rec.location_id
291 ,p_job_id
292 => p_rec.job_id
293 ,p_position_id
294 => p_rec.position_id
295 ,p_grade_id
296 => p_rec.grade_id
297 ,p_supervisor_id
298 => p_rec.supervisor_id
299 ,p_supervisor_assignment_id
300 => p_rec.supervisor_assignment_id
301 ,p_retain_direct_reports
302 => p_rec.retain_direct_reports
303 ,p_payroll_id
304 => p_rec.payroll_id
305 ,p_pay_basis_id
306 => p_rec.pay_basis_id
307 ,p_proposed_salary
308 => p_rec.proposed_salary
309 ,p_people_group_id
310 => p_rec.people_group_id
311 ,p_soft_coding_keyflex_id
312 => p_rec.soft_coding_keyflex_id
313 ,p_assignment_status_type_id
314 => p_rec.assignment_status_type_id
315 ,p_ass_status_change_reason
316 => p_rec.ass_status_change_reason
317 ,p_assignment_category
318 => p_rec.assignment_category
319 ,p_per_information_category
320 => p_rec.per_information_category
321 ,p_per_information1
322 => p_rec.per_information1
323 ,p_per_information2
324 => p_rec.per_information2
325 ,p_per_information3
326 => p_rec.per_information3
327 ,p_per_information4
328 => p_rec.per_information4
329 ,p_per_information5
330 => p_rec.per_information5
331 ,p_per_information6
332 => p_rec.per_information6
333 ,p_per_information7
334 => p_rec.per_information7
335 ,p_per_information8
336 => p_rec.per_information8
337 ,p_per_information9
338 => p_rec.per_information9
339 ,p_per_information10
340 => p_rec.per_information10
341 ,p_per_information11
342 => p_rec.per_information11
343 ,p_per_information12
344 => p_rec.per_information12
345 ,p_per_information13
346 => p_rec.per_information13
347 ,p_per_information14
348 => p_rec.per_information14
349 ,p_per_information15
350 => p_rec.per_information15
351 ,p_per_information16
352 => p_rec.per_information16
353 ,p_per_information17
354 => p_rec.per_information17
355 ,p_per_information18
356 => p_rec.per_information18
357 ,p_per_information19
358 => p_rec.per_information19
359 ,p_per_information20
360 => p_rec.per_information20
361 ,p_per_information21
362 => p_rec.per_information21
363 ,p_per_information22
364 => p_rec.per_information22
365 ,p_per_information23
366 => p_rec.per_information23
367 ,p_per_information24
368 => p_rec.per_information24
369 ,p_per_information25
370 => p_rec.per_information25
371 ,p_per_information26
372 => p_rec.per_information26
373 ,p_per_information27
374 => p_rec.per_information27
375 ,p_per_information28
376 => p_rec.per_information28
377 ,p_per_information29
378 => p_rec.per_information29
379 ,p_per_information30
380 => p_rec.per_information30
381 ,p_object_version_number_o
382 => hr_pdt_shd.g_old_rec.object_version_number
383 ,p_from_business_group_id_o
384 => hr_pdt_shd.g_old_rec.from_business_group_id
385 ,p_to_business_group_id_o
386 => hr_pdt_shd.g_old_rec.to_business_group_id
387 ,p_from_person_id_o
388 => hr_pdt_shd.g_old_rec.from_person_id
389 ,p_to_person_id_o
390 => hr_pdt_shd.g_old_rec.to_person_id
391 ,p_person_type_id_o
392 => hr_pdt_shd.g_old_rec.person_type_id
393 ,p_start_date_o
394 => hr_pdt_shd.g_old_rec.start_date
395 ,p_end_date_o
396 => hr_pdt_shd.g_old_rec.end_date
397 ,p_deployment_reason_o
398 => hr_pdt_shd.g_old_rec.deployment_reason
399 ,p_employee_number_o
400 => hr_pdt_shd.g_old_rec.employee_number
401 ,p_leaving_reason_o
402 => hr_pdt_shd.g_old_rec.leaving_reason
403 ,p_leaving_person_type_id_o
404 => hr_pdt_shd.g_old_rec.leaving_person_type_id
405 ,p_permanent_o
406 => hr_pdt_shd.g_old_rec.permanent
407 ,p_status_o
408 => hr_pdt_shd.g_old_rec.status
409 ,p_status_change_reason_o
410 => hr_pdt_shd.g_old_rec.status_change_reason
411 ,p_status_change_date_o
412 => hr_pdt_shd.g_old_rec.status_change_date
413 ,p_deplymt_policy_id_o
414 => hr_pdt_shd.g_old_rec.deplymt_policy_id
415 ,p_organization_id_o
416 => hr_pdt_shd.g_old_rec.organization_id
417 ,p_location_id_o
418 => hr_pdt_shd.g_old_rec.location_id
419 ,p_job_id_o
420 => hr_pdt_shd.g_old_rec.job_id
421 ,p_position_id_o
422 => hr_pdt_shd.g_old_rec.position_id
423 ,p_grade_id_o
424 => hr_pdt_shd.g_old_rec.grade_id
425 ,p_supervisor_id_o
426 => hr_pdt_shd.g_old_rec.supervisor_id
427 ,p_supervisor_assignment_id_o
428 => hr_pdt_shd.g_old_rec.supervisor_assignment_id
429 ,p_retain_direct_reports_o
430 => hr_pdt_shd.g_old_rec.retain_direct_reports
431 ,p_payroll_id_o
432 => hr_pdt_shd.g_old_rec.payroll_id
433 ,p_pay_basis_id_o
434 => hr_pdt_shd.g_old_rec.pay_basis_id
435 ,p_proposed_salary_o
436 => hr_pdt_shd.g_old_rec.proposed_salary
437 ,p_people_group_id_o
438 => hr_pdt_shd.g_old_rec.people_group_id
439 ,p_soft_coding_keyflex_id_o
440 => hr_pdt_shd.g_old_rec.soft_coding_keyflex_id
441 ,p_assignment_status_type_id_o
442 => hr_pdt_shd.g_old_rec.assignment_status_type_id
443 ,p_ass_status_change_reason_o
444 => hr_pdt_shd.g_old_rec.ass_status_change_reason
445 ,p_assignment_category_o
446 => hr_pdt_shd.g_old_rec.assignment_category
447 ,p_per_information_category_o
448 => hr_pdt_shd.g_old_rec.per_information_category
449 ,p_per_information1_o
450 => hr_pdt_shd.g_old_rec.per_information1
451 ,p_per_information2_o
452 => hr_pdt_shd.g_old_rec.per_information2
453 ,p_per_information3_o
454 => hr_pdt_shd.g_old_rec.per_information3
455 ,p_per_information4_o
456 => hr_pdt_shd.g_old_rec.per_information4
457 ,p_per_information5_o
458 => hr_pdt_shd.g_old_rec.per_information5
459 ,p_per_information6_o
460 => hr_pdt_shd.g_old_rec.per_information6
461 ,p_per_information7_o
462 => hr_pdt_shd.g_old_rec.per_information7
463 ,p_per_information8_o
464 => hr_pdt_shd.g_old_rec.per_information8
465 ,p_per_information9_o
466 => hr_pdt_shd.g_old_rec.per_information9
467 ,p_per_information10_o
468 => hr_pdt_shd.g_old_rec.per_information10
469 ,p_per_information11_o
470 => hr_pdt_shd.g_old_rec.per_information11
471 ,p_per_information12_o
472 => hr_pdt_shd.g_old_rec.per_information12
473 ,p_per_information13_o
474 => hr_pdt_shd.g_old_rec.per_information13
475 ,p_per_information14_o
476 => hr_pdt_shd.g_old_rec.per_information14
477 ,p_per_information15_o
478 => hr_pdt_shd.g_old_rec.per_information15
479 ,p_per_information16_o
480 => hr_pdt_shd.g_old_rec.per_information16
481 ,p_per_information17_o
482 => hr_pdt_shd.g_old_rec.per_information17
483 ,p_per_information18_o
484 => hr_pdt_shd.g_old_rec.per_information18
485 ,p_per_information19_o
486 => hr_pdt_shd.g_old_rec.per_information19
487 ,p_per_information20_o
488 => hr_pdt_shd.g_old_rec.per_information20
489 ,p_per_information21_o
490 => hr_pdt_shd.g_old_rec.per_information21
491 ,p_per_information22_o
492 => hr_pdt_shd.g_old_rec.per_information22
493 ,p_per_information23_o
494 => hr_pdt_shd.g_old_rec.per_information23
495 ,p_per_information24_o
496 => hr_pdt_shd.g_old_rec.per_information24
497 ,p_per_information25_o
498 => hr_pdt_shd.g_old_rec.per_information25
499 ,p_per_information26_o
500 => hr_pdt_shd.g_old_rec.per_information26
501 ,p_per_information27_o
502 => hr_pdt_shd.g_old_rec.per_information27
503 ,p_per_information28_o
504 => hr_pdt_shd.g_old_rec.per_information28
505 ,p_per_information29_o
506 => hr_pdt_shd.g_old_rec.per_information29
507 ,p_per_information30_o
508 => hr_pdt_shd.g_old_rec.per_information30
509 );
510 --
511 exception
512 --
513 when hr_api.cannot_find_prog_unit then
514 --
515 hr_api.cannot_find_prog_unit_error
516 (p_module_name => 'HR_PERSON_DEPLOYMENTS'
517 ,p_hook_type => 'AU');
518 --
519 end;
520 --
521 hr_utility.set_location(' Leaving:'||l_proc, 10);
522 End post_update;
523 --
524 -- ----------------------------------------------------------------------------
525 -- |-----------------------------< convert_defs >-----------------------------|
526 -- ----------------------------------------------------------------------------
527 -- {Start Of Comments}
528 --
529 -- Description:
530 -- The Convert_Defs procedure has one very important function:
531 -- It must return the record structure for the row with all system defaulted
532 -- values converted into its corresponding parameter value for update. When
533 -- we attempt to update a row through the Upd process , certain
534 -- parameters can be defaulted which enables flexibility in the calling of
535 -- the upd process (e.g. only attributes which need to be updated need to be
536 -- specified). For the upd process to determine which attributes
537 -- have NOT been specified we need to check if the parameter has a reserved
538 -- system default value. Therefore, for all parameters which have a
539 -- corresponding reserved system default mechanism specified we need to
540 -- check if a system default is being used. If a system default is being
541 -- used then we convert the defaulted value into its corresponding attribute
542 -- value held in the g_old_rec data structure.
543 --
544 -- Prerequisites:
545 -- This private function can only be called from the upd process.
546 --
547 -- In Parameters:
548 -- A Pl/Sql record structure.
549 --
550 -- Post Success:
551 -- The record structure will be returned with all system defaulted parameter
552 -- values converted into its current row attribute value.
553 --
554 -- Post Failure:
555 -- No direct error handling is required within this function. Any possible
556 -- errors within this procedure will be a PL/SQL value error due to
557 -- conversion of datatypes or data lengths.
558 --
559 -- Developer Implementation Notes:
560 -- None.
561 --
562 -- Access Status:
563 -- Internal Row Handler Use Only.
564 --
565 -- {End Of Comments}
566 -- ----------------------------------------------------------------------------
567 Procedure convert_defs
568 (p_rec in out nocopy hr_pdt_shd.g_rec_type
569 ) is
570 --
571 Begin
572 --
573 -- We must now examine each argument value in the
574 -- p_rec plsql record structure
575 -- to see if a system default is being used. If a system default
576 -- is being used then we must set to the 'current' argument value.
577 --
578 If (p_rec.from_business_group_id = hr_api.g_number) then
579 p_rec.from_business_group_id :=
580 hr_pdt_shd.g_old_rec.from_business_group_id;
581 End If;
582 If (p_rec.to_business_group_id = hr_api.g_number) then
583 p_rec.to_business_group_id :=
584 hr_pdt_shd.g_old_rec.to_business_group_id;
585 End If;
586 If (p_rec.from_person_id = hr_api.g_number) then
587 p_rec.from_person_id :=
588 hr_pdt_shd.g_old_rec.from_person_id;
589 End If;
590 If (p_rec.to_person_id = hr_api.g_number) then
591 p_rec.to_person_id :=
592 hr_pdt_shd.g_old_rec.to_person_id;
593 End If;
594 If (p_rec.person_type_id = hr_api.g_number) then
595 p_rec.person_type_id :=
596 hr_pdt_shd.g_old_rec.person_type_id;
597 End If;
598 If (p_rec.start_date = hr_api.g_date) then
599 p_rec.start_date :=
600 hr_pdt_shd.g_old_rec.start_date;
601 End If;
602 If (p_rec.end_date = hr_api.g_date) then
603 p_rec.end_date :=
604 hr_pdt_shd.g_old_rec.end_date;
605 End If;
606 If (p_rec.deployment_reason = hr_api.g_varchar2) then
607 p_rec.deployment_reason :=
608 hr_pdt_shd.g_old_rec.deployment_reason;
609 End If;
610 If (p_rec.employee_number = hr_api.g_varchar2) then
611 p_rec.employee_number :=
612 hr_pdt_shd.g_old_rec.employee_number;
613 End If;
614 If (p_rec.leaving_reason = hr_api.g_varchar2) then
615 p_rec.leaving_reason :=
616 hr_pdt_shd.g_old_rec.leaving_reason;
617 End If;
618 If (p_rec.leaving_person_type_id = hr_api.g_number) then
619 p_rec.leaving_person_type_id :=
620 hr_pdt_shd.g_old_rec.leaving_person_type_id;
621 End If;
622 If (p_rec.permanent = hr_api.g_varchar2) then
623 p_rec.permanent :=
624 hr_pdt_shd.g_old_rec.permanent;
625 End If;
626 If (p_rec.status = hr_api.g_varchar2) then
627 p_rec.status :=
628 hr_pdt_shd.g_old_rec.status;
629 End If;
630 If (p_rec.status_change_reason = hr_api.g_varchar2) then
631 p_rec.status_change_reason :=
632 hr_pdt_shd.g_old_rec.status_change_reason;
633 End If;
634 If (p_rec.status_change_date = hr_api.g_date) then
635 p_rec.status_change_date :=
636 hr_pdt_shd.g_old_rec.status_change_date;
637 End If;
638 If (p_rec.deplymt_policy_id = hr_api.g_number) then
639 p_rec.deplymt_policy_id :=
640 hr_pdt_shd.g_old_rec.deplymt_policy_id;
641 End If;
642 If (p_rec.organization_id = hr_api.g_number) then
643 p_rec.organization_id :=
644 hr_pdt_shd.g_old_rec.organization_id;
645 End If;
646 If (p_rec.location_id = hr_api.g_number) then
647 p_rec.location_id :=
648 hr_pdt_shd.g_old_rec.location_id;
649 End If;
650 If (p_rec.job_id = hr_api.g_number) then
651 p_rec.job_id :=
652 hr_pdt_shd.g_old_rec.job_id;
653 End If;
654 If (p_rec.position_id = hr_api.g_number) then
655 p_rec.position_id :=
656 hr_pdt_shd.g_old_rec.position_id;
657 End If;
658 If (p_rec.grade_id = hr_api.g_number) then
659 p_rec.grade_id :=
660 hr_pdt_shd.g_old_rec.grade_id;
661 End If;
662 If (p_rec.supervisor_id = hr_api.g_number) then
663 p_rec.supervisor_id :=
664 hr_pdt_shd.g_old_rec.supervisor_id;
665 End If;
666 If (p_rec.supervisor_assignment_id = hr_api.g_number) then
667 p_rec.supervisor_assignment_id :=
668 hr_pdt_shd.g_old_rec.supervisor_assignment_id;
669 End If;
670 If (p_rec.retain_direct_reports = hr_api.g_varchar2) then
671 p_rec.retain_direct_reports :=
672 hr_pdt_shd.g_old_rec.retain_direct_reports;
673 End If;
674 If (p_rec.payroll_id = hr_api.g_number) then
675 p_rec.payroll_id :=
676 hr_pdt_shd.g_old_rec.payroll_id;
677 End If;
678 If (p_rec.pay_basis_id = hr_api.g_number) then
679 p_rec.pay_basis_id :=
680 hr_pdt_shd.g_old_rec.pay_basis_id;
681 End If;
682 If (p_rec.proposed_salary = hr_api.g_varchar2) then
683 p_rec.proposed_salary :=
684 hr_pdt_shd.g_old_rec.proposed_salary;
685 End If;
686 If (p_rec.people_group_id = hr_api.g_number) then
687 p_rec.people_group_id :=
688 hr_pdt_shd.g_old_rec.people_group_id;
689 End If;
690 If (p_rec.soft_coding_keyflex_id = hr_api.g_number) then
691 p_rec.soft_coding_keyflex_id :=
692 hr_pdt_shd.g_old_rec.soft_coding_keyflex_id;
693 End If;
694 If (p_rec.assignment_status_type_id = hr_api.g_number) then
695 p_rec.assignment_status_type_id :=
696 hr_pdt_shd.g_old_rec.assignment_status_type_id;
697 End If;
698 If (p_rec.ass_status_change_reason = hr_api.g_varchar2) then
699 p_rec.ass_status_change_reason :=
700 hr_pdt_shd.g_old_rec.ass_status_change_reason;
701 End If;
702 If (p_rec.assignment_category = hr_api.g_varchar2) then
703 p_rec.assignment_category :=
704 hr_pdt_shd.g_old_rec.assignment_category;
705 End If;
706 If (p_rec.per_information_category = hr_api.g_varchar2) then
707 p_rec.per_information_category :=
708 hr_pdt_shd.g_old_rec.per_information_category;
709 End If;
710 If (p_rec.per_information1 = hr_api.g_varchar2) then
711 p_rec.per_information1 :=
712 hr_pdt_shd.g_old_rec.per_information1;
713 End If;
714 If (p_rec.per_information2 = hr_api.g_varchar2) then
715 p_rec.per_information2 :=
716 hr_pdt_shd.g_old_rec.per_information2;
717 End If;
718 If (p_rec.per_information3 = hr_api.g_varchar2) then
719 p_rec.per_information3 :=
720 hr_pdt_shd.g_old_rec.per_information3;
721 End If;
722 If (p_rec.per_information4 = hr_api.g_varchar2) then
723 p_rec.per_information4 :=
724 hr_pdt_shd.g_old_rec.per_information4;
725 End If;
726 If (p_rec.per_information5 = hr_api.g_varchar2) then
727 p_rec.per_information5 :=
728 hr_pdt_shd.g_old_rec.per_information5;
729 End If;
730 If (p_rec.per_information6 = hr_api.g_varchar2) then
731 p_rec.per_information6 :=
732 hr_pdt_shd.g_old_rec.per_information6;
733 End If;
734 If (p_rec.per_information7 = hr_api.g_varchar2) then
735 p_rec.per_information7 :=
736 hr_pdt_shd.g_old_rec.per_information7;
737 End If;
738 If (p_rec.per_information8 = hr_api.g_varchar2) then
739 p_rec.per_information8 :=
740 hr_pdt_shd.g_old_rec.per_information8;
741 End If;
742 If (p_rec.per_information9 = hr_api.g_varchar2) then
743 p_rec.per_information9 :=
744 hr_pdt_shd.g_old_rec.per_information9;
745 End If;
746 If (p_rec.per_information10 = hr_api.g_varchar2) then
747 p_rec.per_information10 :=
748 hr_pdt_shd.g_old_rec.per_information10;
749 End If;
750 If (p_rec.per_information11 = hr_api.g_varchar2) then
751 p_rec.per_information11 :=
752 hr_pdt_shd.g_old_rec.per_information11;
753 End If;
754 If (p_rec.per_information12 = hr_api.g_varchar2) then
755 p_rec.per_information12 :=
756 hr_pdt_shd.g_old_rec.per_information12;
757 End If;
758 If (p_rec.per_information13 = hr_api.g_varchar2) then
759 p_rec.per_information13 :=
760 hr_pdt_shd.g_old_rec.per_information13;
761 End If;
762 If (p_rec.per_information14 = hr_api.g_varchar2) then
763 p_rec.per_information14 :=
764 hr_pdt_shd.g_old_rec.per_information14;
765 End If;
766 If (p_rec.per_information15 = hr_api.g_varchar2) then
767 p_rec.per_information15 :=
768 hr_pdt_shd.g_old_rec.per_information15;
769 End If;
770 If (p_rec.per_information16 = hr_api.g_varchar2) then
771 p_rec.per_information16 :=
772 hr_pdt_shd.g_old_rec.per_information16;
773 End If;
774 If (p_rec.per_information17 = hr_api.g_varchar2) then
775 p_rec.per_information17 :=
776 hr_pdt_shd.g_old_rec.per_information17;
777 End If;
778 If (p_rec.per_information18 = hr_api.g_varchar2) then
779 p_rec.per_information18 :=
780 hr_pdt_shd.g_old_rec.per_information18;
781 End If;
782 If (p_rec.per_information19 = hr_api.g_varchar2) then
783 p_rec.per_information19 :=
784 hr_pdt_shd.g_old_rec.per_information19;
785 End If;
786 If (p_rec.per_information20 = hr_api.g_varchar2) then
787 p_rec.per_information20 :=
788 hr_pdt_shd.g_old_rec.per_information20;
789 End If;
790 If (p_rec.per_information21 = hr_api.g_varchar2) then
791 p_rec.per_information21 :=
792 hr_pdt_shd.g_old_rec.per_information21;
793 End If;
794 If (p_rec.per_information22 = hr_api.g_varchar2) then
795 p_rec.per_information22 :=
796 hr_pdt_shd.g_old_rec.per_information22;
797 End If;
798 If (p_rec.per_information23 = hr_api.g_varchar2) then
799 p_rec.per_information23 :=
800 hr_pdt_shd.g_old_rec.per_information23;
801 End If;
802 If (p_rec.per_information24 = hr_api.g_varchar2) then
803 p_rec.per_information24 :=
804 hr_pdt_shd.g_old_rec.per_information24;
805 End If;
806 If (p_rec.per_information25 = hr_api.g_varchar2) then
807 p_rec.per_information25 :=
808 hr_pdt_shd.g_old_rec.per_information25;
809 End If;
810 If (p_rec.per_information26 = hr_api.g_varchar2) then
811 p_rec.per_information26 :=
812 hr_pdt_shd.g_old_rec.per_information26;
813 End If;
814 If (p_rec.per_information27 = hr_api.g_varchar2) then
815 p_rec.per_information27 :=
816 hr_pdt_shd.g_old_rec.per_information27;
817 End If;
818 If (p_rec.per_information28 = hr_api.g_varchar2) then
819 p_rec.per_information28 :=
820 hr_pdt_shd.g_old_rec.per_information28;
821 End If;
822 If (p_rec.per_information29 = hr_api.g_varchar2) then
823 p_rec.per_information29 :=
824 hr_pdt_shd.g_old_rec.per_information29;
825 End If;
826 If (p_rec.per_information30 = hr_api.g_varchar2) then
827 p_rec.per_information30 :=
828 hr_pdt_shd.g_old_rec.per_information30;
829 End If;
830 --
831 End convert_defs;
832 --
833 -- ----------------------------------------------------------------------------
834 -- |---------------------------------< upd >----------------------------------|
835 -- ----------------------------------------------------------------------------
836 Procedure upd
837 (p_rec in out nocopy hr_pdt_shd.g_rec_type
838 ) is
839 --
840 l_proc varchar2(72) := g_package||'upd';
841 --
842 Begin
843 hr_utility.set_location('Entering:'||l_proc, 5);
844 --
845 -- We must lock the row which we need to update.
846 --
847 hr_pdt_shd.lck
848 (p_rec.person_deployment_id
849 ,p_rec.object_version_number
850 );
851 --
852 -- 1. During an update system defaults are used to determine if
853 -- arguments have been defaulted or not. We must therefore
854 -- derive the full record structure values to be updated.
855 --
856 -- 2. Call the supporting update validate operations.
857 --
858 convert_defs(p_rec);
859 hr_pdt_bus.update_validate
860 (p_rec
861 );
862 --
863 -- Call to raise any errors on multi-message list
864 hr_multi_message.end_validation_set;
865 --
866 -- Set the status change date if the status has changed
867 --
868 if p_rec.status <> hr_pdt_shd.g_old_rec.status then
869 p_rec.status_change_date := trunc(sysdate);
870 else
871 p_rec.status_change_date := hr_pdt_shd.g_old_rec.status_change_date;
872 end if;
873 --
874 -- Call the supporting pre-update operation
875 --
876 hr_pdt_upd.pre_update(p_rec);
877 --
878 -- Update the row.
879 --
880 hr_pdt_upd.update_dml(p_rec);
881 --
882 -- Call the supporting post-update operation
883 --
884 hr_pdt_upd.post_update
885 (p_rec
886 );
887 --
888 -- Call to raise any errors on multi-message list
889 hr_multi_message.end_validation_set;
890 End upd;
891 --
892 -- ----------------------------------------------------------------------------
893 -- |---------------------------------< upd >----------------------------------|
894 -- ----------------------------------------------------------------------------
895 Procedure upd
896 (p_person_deployment_id in number
897 ,p_object_version_number in out nocopy number
898 ,p_from_business_group_id in number default hr_api.g_number
899 ,p_to_business_group_id in number default hr_api.g_number
900 ,p_from_person_id in number default hr_api.g_number
901 ,p_person_type_id in number default hr_api.g_number
902 ,p_start_date in date default hr_api.g_date
903 ,p_status in varchar2 default hr_api.g_varchar2
904 ,p_to_person_id in number default hr_api.g_number
905 ,p_end_date in date default hr_api.g_date
906 ,p_deployment_reason in varchar2 default hr_api.g_varchar2
907 ,p_employee_number in varchar2 default hr_api.g_varchar2
908 ,p_leaving_reason in varchar2 default hr_api.g_varchar2
909 ,p_leaving_person_type_id in number default hr_api.g_number
910 ,p_permanent in varchar2 default hr_api.g_varchar2
911 ,p_status_change_reason in varchar2 default hr_api.g_varchar2
912 ,p_deplymt_policy_id in number default hr_api.g_number
913 ,p_organization_id in number default hr_api.g_number
914 ,p_location_id in number default hr_api.g_number
915 ,p_job_id in number default hr_api.g_number
916 ,p_position_id in number default hr_api.g_number
917 ,p_grade_id in number default hr_api.g_number
918 ,p_supervisor_id in number default hr_api.g_number
919 ,p_supervisor_assignment_id in number default hr_api.g_number
920 ,p_retain_direct_reports in varchar2 default hr_api.g_varchar2
921 ,p_payroll_id in number default hr_api.g_number
922 ,p_pay_basis_id in number default hr_api.g_number
923 ,p_proposed_salary in varchar2 default hr_api.g_varchar2
924 ,p_people_group_id in number default hr_api.g_number
925 ,p_soft_coding_keyflex_id in number default hr_api.g_number
926 ,p_assignment_status_type_id in number default hr_api.g_number
927 ,p_ass_status_change_reason in varchar2 default hr_api.g_varchar2
928 ,p_assignment_category in varchar2 default hr_api.g_varchar2
929 ,p_per_information_category in varchar2 default hr_api.g_varchar2
930 ,p_per_information1 in varchar2 default hr_api.g_varchar2
931 ,p_per_information2 in varchar2 default hr_api.g_varchar2
932 ,p_per_information3 in varchar2 default hr_api.g_varchar2
933 ,p_per_information4 in varchar2 default hr_api.g_varchar2
934 ,p_per_information5 in varchar2 default hr_api.g_varchar2
935 ,p_per_information6 in varchar2 default hr_api.g_varchar2
936 ,p_per_information7 in varchar2 default hr_api.g_varchar2
937 ,p_per_information8 in varchar2 default hr_api.g_varchar2
938 ,p_per_information9 in varchar2 default hr_api.g_varchar2
939 ,p_per_information10 in varchar2 default hr_api.g_varchar2
940 ,p_per_information11 in varchar2 default hr_api.g_varchar2
941 ,p_per_information12 in varchar2 default hr_api.g_varchar2
942 ,p_per_information13 in varchar2 default hr_api.g_varchar2
943 ,p_per_information14 in varchar2 default hr_api.g_varchar2
944 ,p_per_information15 in varchar2 default hr_api.g_varchar2
945 ,p_per_information16 in varchar2 default hr_api.g_varchar2
946 ,p_per_information17 in varchar2 default hr_api.g_varchar2
947 ,p_per_information18 in varchar2 default hr_api.g_varchar2
948 ,p_per_information19 in varchar2 default hr_api.g_varchar2
949 ,p_per_information20 in varchar2 default hr_api.g_varchar2
950 ,p_per_information21 in varchar2 default hr_api.g_varchar2
951 ,p_per_information22 in varchar2 default hr_api.g_varchar2
952 ,p_per_information23 in varchar2 default hr_api.g_varchar2
953 ,p_per_information24 in varchar2 default hr_api.g_varchar2
954 ,p_per_information25 in varchar2 default hr_api.g_varchar2
955 ,p_per_information26 in varchar2 default hr_api.g_varchar2
956 ,p_per_information27 in varchar2 default hr_api.g_varchar2
957 ,p_per_information28 in varchar2 default hr_api.g_varchar2
958 ,p_per_information29 in varchar2 default hr_api.g_varchar2
959 ,p_per_information30 in varchar2 default hr_api.g_varchar2
960 ) is
961 --
962 l_rec hr_pdt_shd.g_rec_type;
963 l_proc varchar2(72) := g_package||'upd';
964 --
965 Begin
966 hr_utility.set_location('Entering:'||l_proc, 5);
967 --
968 -- Call conversion function to turn arguments into the
969 -- l_rec structure.
970 --
971 l_rec :=
972 hr_pdt_shd.convert_args
973 (p_person_deployment_id
974 ,p_object_version_number
975 ,p_from_business_group_id
976 ,p_to_business_group_id
977 ,p_from_person_id
978 ,p_to_person_id
979 ,p_person_type_id
980 ,p_start_date
981 ,p_end_date
982 ,p_deployment_reason
983 ,p_employee_number
984 ,p_leaving_reason
985 ,p_leaving_person_type_id
986 ,p_permanent
987 ,p_status
988 ,p_status_change_reason
989 ,null
990 ,p_deplymt_policy_id
991 ,p_organization_id
992 ,p_location_id
993 ,p_job_id
994 ,p_position_id
995 ,p_grade_id
996 ,p_supervisor_id
997 ,p_supervisor_assignment_id
998 ,p_retain_direct_reports
999 ,p_payroll_id
1000 ,p_pay_basis_id
1001 ,p_proposed_salary
1002 ,p_people_group_id
1003 ,p_soft_coding_keyflex_id
1004 ,p_assignment_status_type_id
1005 ,p_ass_status_change_reason
1006 ,p_assignment_category
1007 ,p_per_information_category
1008 ,p_per_information1
1009 ,p_per_information2
1010 ,p_per_information3
1011 ,p_per_information4
1012 ,p_per_information5
1013 ,p_per_information6
1014 ,p_per_information7
1015 ,p_per_information8
1016 ,p_per_information9
1017 ,p_per_information10
1018 ,p_per_information11
1019 ,p_per_information12
1020 ,p_per_information13
1021 ,p_per_information14
1022 ,p_per_information15
1023 ,p_per_information16
1024 ,p_per_information17
1025 ,p_per_information18
1026 ,p_per_information19
1027 ,p_per_information20
1028 ,p_per_information21
1029 ,p_per_information22
1030 ,p_per_information23
1031 ,p_per_information24
1032 ,p_per_information25
1033 ,p_per_information26
1034 ,p_per_information27
1035 ,p_per_information28
1036 ,p_per_information29
1037 ,p_per_information30
1038 );
1039 --
1040 -- Having converted the arguments into the
1041 -- plsql record structure we call the corresponding record
1042 -- business process.
1043 --
1044 hr_pdt_upd.upd
1045 (l_rec
1046 );
1047 p_object_version_number := l_rec.object_version_number;
1048 --
1049 hr_utility.set_location(' Leaving:'||l_proc, 10);
1050 End upd;
1051 --
1052 end hr_pdt_upd;