[Home] [Help]
PACKAGE BODY: APPS.PQP_AAT_UPD
Source
1 Package Body pqp_aat_upd as
2 /* $Header: pqaatrhi.pkb 120.2.12010000.3 2009/07/01 10:58:37 dchindar ship $ */
3 --
4 -- ---------------------------------------------------------------------------+
5 -- | Private Global Definitions |
6 -- ---------------------------------------------------------------------------+
7 --
8 g_package varchar2(33) := ' pqp_aat_upd.'; -- Global package name
9 --
10 -- ---------------------------------------------------------------------------+
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ---------------------------------------------------------------------------+
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the execution of dml from the datetrack mode
17 -- of CORRECTION only. It is important to note that the object version
18 -- number is only increment by 1 because the datetrack correction is
19 -- soley for one datetracked row.
20 -- This procedure controls the actual dml update logic. The functions of this
21 -- procedure are as follows:
22 -- 1) Get the next object_version_number.
23 -- 2) To set and unset the g_api_dml status as required (as we are about to
24 -- perform dml).
25 -- 3) To update the specified row in the schema using the primary key in
26 -- the predicates.
27 -- 4) To trap any constraint violations that may have occurred.
28 -- 5) To raise any other errors.
29 --
30 -- Prerequisites:
31 -- This is an internal private procedure which must be called from the
32 -- update_dml procedure.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structure.
36 --
37 -- Post Success:
38 -- The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 -- On the update dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- The update 'set' arguments list should be modified if any of your
50 -- attributes are not updateable.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ---------------------------------------------------------------------------+
57 Procedure dt_update_dml
58 (p_rec in out nocopy pqp_aat_shd.g_rec_type
59 ,p_effective_date in date
60 ,p_datetrack_mode in varchar2
61 ,p_validation_start_date in date
62 ,p_validation_end_date in date
63 ) is
64 --
65 l_proc varchar2(72) := g_package||'dt_update_dml';
66 --
67 Begin
68 hr_utility.set_location('Entering:'||l_proc, 5);
69 --
70 If (p_datetrack_mode = hr_api.g_correction) then
71 hr_utility.set_location(l_proc, 10);
72 --
73 -- Because we are updating a row we must get the next object
74 -- version number.
75 --
76 p_rec.object_version_number :=
77 dt_api.get_object_version_number
78 (p_base_table_name => 'pqp_assignment_attributes_f'
79 ,p_base_key_column => 'assignment_attribute_id'
80 ,p_base_key_value => p_rec.assignment_attribute_id
81 );
82 --
83 pqp_aat_shd.g_api_dml := true; -- Set the api dml status
84 --
85 -- Update the pqp_assignment_attributes_f Row
86 --
87 update pqp_assignment_attributes_f
88 set
89 assignment_attribute_id = p_rec.assignment_attribute_id
90 ,business_group_id = p_rec.business_group_id
91 ,assignment_id = p_rec.assignment_id
92 ,contract_type = p_rec.contract_type
93 ,work_pattern = p_rec.work_pattern
94 ,start_day = p_rec.start_day
95 ,object_version_number = p_rec.object_version_number
96 ,primary_company_car = p_rec.primary_company_car
97 ,primary_car_fuel_benefit = p_rec.primary_car_fuel_benefit
98 ,primary_class_1a = p_rec.primary_class_1a
99 ,primary_capital_contribution = p_rec.primary_capital_contribution
100 ,primary_private_contribution = p_rec.primary_private_contribution
101 ,secondary_company_car = p_rec.secondary_company_car
102 ,secondary_car_fuel_benefit = p_rec.secondary_car_fuel_benefit
103 ,secondary_class_1a = p_rec.secondary_class_1a
104 ,secondary_capital_contribution = p_rec.secondary_capital_contribution
105 ,secondary_private_contribution = p_rec.secondary_private_contribution
106 ,company_car_calc_method = p_rec.company_car_calc_method
107 ,company_car_rates_table_id = p_rec.company_car_rates_table_id
108 ,company_car_secondary_table_id = p_rec.company_car_secondary_table_id
109 ,private_car = p_rec.private_car
110 ,private_car_calc_method = p_rec.private_car_calc_method
111 ,private_car_rates_table_id = p_rec.private_car_rates_table_id
112 ,private_car_essential_table_id = p_rec.private_car_essential_table_id
113 ,tp_is_teacher = p_rec.tp_is_teacher
114 ,tp_headteacher_grp_code = p_rec.tp_headteacher_grp_code --added for head Teacher seconded location for salary scale calculation
115 ,tp_safeguarded_grade = p_rec.tp_safeguarded_grade
116 ,tp_safeguarded_grade_id = p_rec.tp_safeguarded_grade_id
117 ,tp_safeguarded_rate_type = p_rec.tp_safeguarded_rate_type
118 ,tp_safeguarded_rate_id = p_rec.tp_safeguarded_rate_id
119 ,tp_safeguarded_spinal_point_id = p_rec.tp_safeguarded_spinal_point_id
120 ,tp_elected_pension = p_rec.tp_elected_pension
121 ,tp_fast_track = p_rec.tp_fast_track
122 ,aat_attribute_category = p_rec.aat_attribute_category
123 ,aat_attribute1 = p_rec.aat_attribute1
124 ,aat_attribute2 = p_rec.aat_attribute2
125 ,aat_attribute3 = p_rec.aat_attribute3
126 ,aat_attribute4 = p_rec.aat_attribute4
127 ,aat_attribute5 = p_rec.aat_attribute5
128 ,aat_attribute6 = p_rec.aat_attribute6
129 ,aat_attribute7 = p_rec.aat_attribute7
130 ,aat_attribute8 = p_rec.aat_attribute8
131 ,aat_attribute9 = p_rec.aat_attribute9
132 ,aat_attribute10 = p_rec.aat_attribute10
133 ,aat_attribute11 = p_rec.aat_attribute11
134 ,aat_attribute12 = p_rec.aat_attribute12
135 ,aat_attribute13 = p_rec.aat_attribute13
136 ,aat_attribute14 = p_rec.aat_attribute14
137 ,aat_attribute15 = p_rec.aat_attribute15
138 ,aat_attribute16 = p_rec.aat_attribute16
139 ,aat_attribute17 = p_rec.aat_attribute17
140 ,aat_attribute18 = p_rec.aat_attribute18
141 ,aat_attribute19 = p_rec.aat_attribute19
142 ,aat_attribute20 = p_rec.aat_attribute20
143 ,aat_information_category = p_rec.aat_information_category
144 ,aat_information1 = p_rec.aat_information1
145 ,aat_information2 = p_rec.aat_information2
146 ,aat_information3 = p_rec.aat_information3
147 ,aat_information4 = p_rec.aat_information4
148 ,aat_information5 = p_rec.aat_information5
149 ,aat_information6 = p_rec.aat_information6
150 ,aat_information7 = p_rec.aat_information7
151 ,aat_information8 = p_rec.aat_information8
152 ,aat_information9 = p_rec.aat_information9
153 ,aat_information10 = p_rec.aat_information10
154 ,aat_information11 = p_rec.aat_information11
155 ,aat_information12 = p_rec.aat_information12
156 ,aat_information13 = p_rec.aat_information13
157 ,aat_information14 = p_rec.aat_information14
158 ,aat_information15 = p_rec.aat_information15
159 ,aat_information16 = p_rec.aat_information16
160 ,aat_information17 = p_rec.aat_information17
161 ,aat_information18 = p_rec.aat_information18
162 ,aat_information19 = p_rec.aat_information19
163 ,aat_information20 = p_rec.aat_information20
164 ,lgps_process_flag = p_rec.lgps_process_flag
165 ,lgps_exclusion_type = p_rec.lgps_exclusion_type
166 ,lgps_pensionable_pay = p_rec.lgps_pensionable_pay
167 ,lgps_trans_arrang_flag = p_rec.lgps_trans_arrang_flag
168 ,lgps_membership_number = p_rec.lgps_membership_number
169 where assignment_attribute_id = p_rec.assignment_attribute_id
170 and effective_start_date = p_validation_start_date
171 and effective_end_date = p_validation_end_date;
172 --
173 pqp_aat_shd.g_api_dml := false; -- Unset the api dml status
174 --
175 -- Set the effective start and end dates
176 --
177 p_rec.effective_start_date := p_validation_start_date;
178 p_rec.effective_end_date := p_validation_end_date;
179 End If;
180 --
181 hr_utility.set_location(' Leaving:'||l_proc, 15);
182 Exception
183 When hr_api.check_integrity_violated Then
184 -- A check constraint has been violated
185 pqp_aat_shd.g_api_dml := false; -- Unset the api dml status
186 pqp_aat_shd.constraint_error
187 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
188 When hr_api.unique_integrity_violated Then
189 -- Unique integrity has been violated
190 pqp_aat_shd.g_api_dml := false; -- Unset the api dml status
191 pqp_aat_shd.constraint_error
192 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
193 When Others Then
194 pqp_aat_shd.g_api_dml := false; -- Unset the api dml status
195 Raise;
196 End dt_update_dml;
197 --
198 -- ---------------------------------------------------------------------------+
199 -- |------------------------------< update_dml >------------------------------|
200 -- ---------------------------------------------------------------------------+
201 -- {Start Of Comments}
202 --
203 -- Description:
204 -- This procedure calls the dt_update_dml control logic which handles
205 -- the actual datetrack dml.
206 --
207 -- Prerequisites:
208 -- This is an internal private procedure which must be called from the upd
209 -- procedure.
210 --
211 -- In Parameters:
212 -- A Pl/Sql record structre.
213 --
214 -- Post Success:
215 -- Processing contines.
216 --
217 -- Post Failure:
218 -- No specific error handling is required within this procedure.
219 --
220 -- Developer Implementation Notes:
221 -- The update 'set' arguments list should be modified if any of your
222 -- attributes are not updateable.
223 --
224 -- Access Status:
225 -- Internal Row Handler Use Only.
226 --
227 -- {End Of Comments}
228 -- ---------------------------------------------------------------------------+
229 Procedure update_dml
230 (p_rec in out nocopy pqp_aat_shd.g_rec_type
231 ,p_effective_date in date
232 ,p_datetrack_mode in varchar2
233 ,p_validation_start_date in date
234 ,p_validation_end_date in date
235 ) is
236 --
237 l_proc varchar2(72) := g_package||'update_dml';
238 --
239 Begin
240 hr_utility.set_location('Entering:'||l_proc, 5);
241 --
242 pqp_aat_upd.dt_update_dml
243 (p_rec => p_rec
244 ,p_effective_date => p_effective_date
245 ,p_datetrack_mode => p_datetrack_mode
246 ,p_validation_start_date => p_validation_start_date
247 ,p_validation_end_date => p_validation_end_date
248 );
249 --
250 hr_utility.set_location(' Leaving:'||l_proc, 10);
251 End update_dml;
252 --
253 -- ---------------------------------------------------------------------------+
254 -- |----------------------------< dt_pre_update >-----------------------------|
255 -- ---------------------------------------------------------------------------+
256 -- {Start Of Comments}
257 --
258 -- Description:
259 -- The dt_pre_update procedure controls the execution
260 -- of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
261 -- and UPDATE_CHANGE_INSERT only. The execution required is as
262 -- follows:
263 --
264 -- 1) Providing the datetrack update mode is not 'CORRECTION'
265 -- then set the effective end date of the current row (this
266 -- will be the validation_start_date - 1).
267 -- 2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
268 -- corresponding delete_dml process to delete any future rows
269 -- where the effective_start_date is greater than or equal to
270 -- the validation_start_date.
271 -- 3) Call the insert_dml process to insert the new updated row
272 -- details.
273 --
274 -- Prerequisites:
275 -- This is an internal procedure which is called from the
276 -- pre_update procedure.
277 --
278 -- In Parameters:
279 --
280 -- Post Success:
281 -- Processing continues.
282 --
283 -- Post Failure:
284 -- If an error has occurred, an error message and exception will be raised
285 -- but not handled.
286 --
287 -- Developer Implementation Notes:
288 -- This is an internal procedure which is required by Datetrack. Don't
289 -- remove or modify.
290 --
291 -- Access Status:
292 -- Internal Row Handler Use Only.
293 --
294 -- {End Of Comments}
295 -- ---------------------------------------------------------------------------+
296 Procedure dt_pre_update
297 (p_rec in out nocopy pqp_aat_shd.g_rec_type
298 ,p_effective_date in date
299 ,p_datetrack_mode in varchar2
300 ,p_validation_start_date in date
301 ,p_validation_end_date in date
302 ) is
303 --
304 l_proc varchar2(72) := g_package||'dt_pre_update';
305 l_dummy_version_number number;
306 --
307 Begin
308 hr_utility.set_location('Entering:'||l_proc, 5);
309 If (p_datetrack_mode <> hr_api.g_correction) then
310 --
311 -- Update the current effective end date
312 --
313 pqp_aat_shd.upd_effective_end_date
314 (p_effective_date => p_effective_date
315 ,p_base_key_value => p_rec.assignment_attribute_id
316 ,p_new_effective_end_date => (p_validation_start_date - 1)
317 ,p_validation_start_date => p_validation_start_date
318 ,p_validation_end_date => p_validation_end_date
319 ,p_object_version_number => l_dummy_version_number
320 );
321 --
322 If (p_datetrack_mode = hr_api.g_update_override) then
323 --
324 -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
325 -- delete any future rows
326 --
327 pqp_aat_del.delete_dml
328 (p_rec => p_rec
329 ,p_effective_date => p_effective_date
330 ,p_datetrack_mode => p_datetrack_mode
331 ,p_validation_start_date => p_validation_start_date
332 ,p_validation_end_date => p_validation_end_date
333 );
334 End If;
335 --
336 -- We must now insert the updated row
337 --
338 pqp_aat_ins.insert_dml
339 (p_rec => p_rec
340 ,p_effective_date => p_effective_date
341 ,p_datetrack_mode => p_datetrack_mode
342 ,p_validation_start_date => p_validation_start_date
343 ,p_validation_end_date => p_validation_end_date
344 );
345 End If;
346 hr_utility.set_location(' Leaving:'||l_proc, 20);
347 End dt_pre_update;
348 --
349 -- ---------------------------------------------------------------------------+
350 -- |------------------------------< pre_update >------------------------------|
351 -- ---------------------------------------------------------------------------+
352 -- {Start Of Comments}
353 --
354 -- Description:
355 -- This private procedure contains any processing which is required before
356 -- the update dml.
357 --
358 -- Prerequisites:
359 -- This is an internal procedure which is called from the upd procedure.
360 --
361 -- In Parameters:
362 -- A Pl/Sql record structure.
363 --
364 -- Post Success:
365 -- Processing continues.
366 --
367 -- Post Failure:
368 -- If an error has occurred, an error message and exception will be raised
369 -- but not handled.
370 --
371 -- Developer Implementation Notes:
372 -- Any pre-processing required before the update dml is issued should be
373 -- coded within this procedure. It is important to note that any 3rd party
374 -- maintenance should be reviewed before placing in this procedure. The call
375 -- to the dt_update_dml procedure should NOT be removed.
376 --
377 -- Access Status:
378 -- Internal Row Handler Use Only.
379 --
380 -- {End Of Comments}
381 -- ---------------------------------------------------------------------------+
382 Procedure pre_update
383 (p_rec in out nocopy pqp_aat_shd.g_rec_type
384 ,p_effective_date in date
385 ,p_datetrack_mode in varchar2
386 ,p_validation_start_date in date
387 ,p_validation_end_date in date
388 ) is
389 --
390 l_proc varchar2(72) := g_package||'pre_update';
391 --
392 Begin
393 hr_utility.set_location('Entering:'||l_proc, 5);
394 --
395 --
396 --
397 dt_pre_update
398 (p_rec => p_rec
399 ,p_effective_date => p_effective_date
400 ,p_datetrack_mode => p_datetrack_mode
401 ,p_validation_start_date => p_validation_start_date
402 ,p_validation_end_date => p_validation_end_date
403 );
404 --
405 hr_utility.set_location(' Leaving:'||l_proc, 10);
406 End pre_update;
407 --
408 -- ---------------------------------------------------------------------------+
409 -- |----------------------------< post_update >-------------------------------|
410 -- ---------------------------------------------------------------------------+
411 -- {Start Of Comments}
412 --
413 -- Description:
414 -- This private procedure contains any processing which is required after the
415 -- update dml.
416 --
417 -- Prerequisites:
418 -- This is an internal procedure which is called from the upd procedure.
419 --
420 -- In Parameters:
421 -- A Pl/Sql record structure.
422 --
423 -- Post Success:
424 -- Processing continues.
425 --
426 -- Post Failure:
427 -- If an error has occurred, an error message and exception will be raised
428 -- but not handled.
429 --
430 -- Developer Implementation Notes:
431 -- Any post-processing required after the update dml is issued should be
432 -- coded within this procedure. It is important to note that any 3rd party
433 -- maintenance should be reviewed before placing in this procedure.
434 --
435 -- Access Status:
436 -- Internal Row Handler Use Only.
437 --
438 -- {End Of Comments}
439 -- ---------------------------------------------------------------------------+
440 Procedure post_update
441 (p_rec in pqp_aat_shd.g_rec_type
442 ,p_effective_date in date
443 ,p_datetrack_mode in varchar2
444 ,p_validation_start_date in date
445 ,p_validation_end_date in date
446 ) is
447 --
448 l_proc varchar2(72) := g_package||'post_update';
449 --
450 Begin
451 hr_utility.set_location('Entering:'||l_proc, 5);
452 begin
453 --
454 pqp_aat_rku.after_update
455 (p_effective_date
456 => p_effective_date
457 ,p_datetrack_mode
458 => p_datetrack_mode
459 ,p_validation_start_date
460 => p_validation_start_date
461 ,p_validation_end_date
462 => p_validation_end_date
463 ,p_assignment_attribute_id
464 => p_rec.assignment_attribute_id
465 ,p_effective_start_date
466 => p_rec.effective_start_date
467 ,p_effective_end_date
468 => p_rec.effective_end_date
469 ,p_business_group_id
470 => p_rec.business_group_id
471 ,p_assignment_id
472 => p_rec.assignment_id
473 ,p_contract_type
474 => p_rec.contract_type
475 ,p_work_pattern
476 => p_rec.work_pattern
477 ,p_start_day
478 => p_rec.start_day
479 ,p_object_version_number
480 => p_rec.object_version_number
481 ,p_primary_company_car
482 => p_rec.primary_company_car
483 ,p_primary_car_fuel_benefit
484 => p_rec.primary_car_fuel_benefit
485 ,p_primary_class_1a
486 => p_rec.primary_class_1a
487 ,p_primary_capital_contribution
488 => p_rec.primary_capital_contribution
489 ,p_primary_private_contribution
490 => p_rec.primary_private_contribution
491 ,p_secondary_company_car
492 => p_rec.secondary_company_car
493 ,p_secondary_car_fuel_benefit
494 => p_rec.secondary_car_fuel_benefit
495 ,p_secondary_class_1a
496 => p_rec.secondary_class_1a
497 ,p_secondary_capital_contributi
498 => p_rec.secondary_capital_contribution
499 ,p_secondary_private_contributi
500 => p_rec.secondary_private_contribution
501 ,p_company_car_calc_method
502 => p_rec.company_car_calc_method
503 ,p_company_car_rates_table_id
504 => p_rec.company_car_rates_table_id
505 ,p_company_car_secondary_table
506 => p_rec.company_car_secondary_table_id
507 ,p_private_car
508 => p_rec.private_car
509 ,p_private_car_calc_method
510 => p_rec.private_car_calc_method
511 ,p_private_car_rates_table_id
512 => p_rec.private_car_rates_table_id
513 ,p_private_car_essential_table
514 => p_rec.private_car_essential_table_id
515 ,p_tp_is_teacher
516 => p_rec.tp_is_teacher
517 ,p_tp_headteacher_grp_code --added for head Teacher seconded location for salary scale calculation
518 =>p_rec.tp_headteacher_grp_code
519 ,p_tp_safeguarded_grade
520 => p_rec.tp_safeguarded_grade
521 ,p_tp_safeguarded_grade_id
522 => p_rec.tp_safeguarded_grade_id
523 ,p_tp_safeguarded_rate_type
524 => p_rec.tp_safeguarded_rate_type
525 ,p_tp_safeguarded_rate_id
526 => p_rec.tp_safeguarded_rate_id
527 ,p_tp_spinal_point_id
528 => p_rec.tp_safeguarded_spinal_point_id
529 ,p_tp_elected_pension
530 => p_rec.tp_elected_pension
531 ,p_tp_fast_track
532 => p_rec.tp_fast_track
533 ,p_aat_attribute_category
534 => p_rec.aat_attribute_category
535 ,p_aat_attribute1
536 => p_rec.aat_attribute1
537 ,p_aat_attribute2
538 => p_rec.aat_attribute2
539 ,p_aat_attribute3
540 => p_rec.aat_attribute3
541 ,p_aat_attribute4
542 => p_rec.aat_attribute4
543 ,p_aat_attribute5
544 => p_rec.aat_attribute5
545 ,p_aat_attribute6
546 => p_rec.aat_attribute6
547 ,p_aat_attribute7
548 => p_rec.aat_attribute7
549 ,p_aat_attribute8
550 => p_rec.aat_attribute8
551 ,p_aat_attribute9
552 => p_rec.aat_attribute9
553 ,p_aat_attribute10
554 => p_rec.aat_attribute10
555 ,p_aat_attribute11
556 => p_rec.aat_attribute11
557 ,p_aat_attribute12
558 => p_rec.aat_attribute12
559 ,p_aat_attribute13
560 => p_rec.aat_attribute13
561 ,p_aat_attribute14
562 => p_rec.aat_attribute14
563 ,p_aat_attribute15
564 => p_rec.aat_attribute15
565 ,p_aat_attribute16
566 => p_rec.aat_attribute16
567 ,p_aat_attribute17
568 => p_rec.aat_attribute17
569 ,p_aat_attribute18
570 => p_rec.aat_attribute18
571 ,p_aat_attribute19
572 => p_rec.aat_attribute19
573 ,p_aat_attribute20
574 => p_rec.aat_attribute20
575 ,p_aat_information_category
576 => p_rec.aat_information_category
577 ,p_aat_information1
578 => p_rec.aat_information1
579 ,p_aat_information2
580 => p_rec.aat_information2
581 ,p_aat_information3
582 => p_rec.aat_information3
583 ,p_aat_information4
584 => p_rec.aat_information4
585 ,p_aat_information5
586 => p_rec.aat_information5
587 ,p_aat_information6
588 => p_rec.aat_information6
589 ,p_aat_information7
590 => p_rec.aat_information7
591 ,p_aat_information8
592 => p_rec.aat_information8
593 ,p_aat_information9
594 => p_rec.aat_information9
595 ,p_aat_information10
596 => p_rec.aat_information10
597 ,p_aat_information11
598 => p_rec.aat_information11
599 ,p_aat_information12
600 => p_rec.aat_information12
601 ,p_aat_information13
602 => p_rec.aat_information13
603 ,p_aat_information14
604 => p_rec.aat_information14
605 ,p_aat_information15
606 => p_rec.aat_information15
607 ,p_aat_information16
608 => p_rec.aat_information16
609 ,p_aat_information17
610 => p_rec.aat_information17
611 ,p_aat_information18
612 => p_rec.aat_information18
613 ,p_aat_information19
614 => p_rec.aat_information19
615 ,p_aat_information20
616 => p_rec.aat_information20
617 ,p_lgps_process_flag
618 => p_rec.lgps_process_flag
619 ,p_lgps_exclusion_type
620 => p_rec.lgps_exclusion_type
621 ,p_lgps_pensionable_pay
622 => p_rec.lgps_pensionable_pay
623 ,p_lgps_trans_arrang_flag
624 => p_rec.lgps_trans_arrang_flag
625 ,p_lgps_membership_number
626 => p_rec.lgps_membership_number
627 ,p_effective_start_date_o
628 => pqp_aat_shd.g_old_rec.effective_start_date
629 ,p_effective_end_date_o
630 => pqp_aat_shd.g_old_rec.effective_end_date
631 ,p_business_group_id_o
632 => pqp_aat_shd.g_old_rec.business_group_id
633 ,p_assignment_id_o
634 => pqp_aat_shd.g_old_rec.assignment_id
635 ,p_contract_type_o
636 => pqp_aat_shd.g_old_rec.contract_type
637 ,p_work_pattern_o
638 => pqp_aat_shd.g_old_rec.work_pattern
639 ,p_start_day_o
640 => pqp_aat_shd.g_old_rec.start_day
641 ,p_object_version_number_o
642 => pqp_aat_shd.g_old_rec.object_version_number
643 ,p_primary_company_car_o
644 => pqp_aat_shd.g_old_rec.primary_company_car
645 ,p_primary_car_fuel_benefit_o
646 => pqp_aat_shd.g_old_rec.primary_car_fuel_benefit
647 ,p_primary_class_1a_o
648 => pqp_aat_shd.g_old_rec.primary_class_1a
649 ,p_primary_capital_contributi_o
650 => pqp_aat_shd.g_old_rec.primary_capital_contribution
651 ,p_primary_private_contributi_o
652 => pqp_aat_shd.g_old_rec.primary_private_contribution
653 ,p_secondary_company_car_o
654 => pqp_aat_shd.g_old_rec.secondary_company_car
655 ,p_secondary_car_fuel_benefit_o
656 => pqp_aat_shd.g_old_rec.secondary_car_fuel_benefit
657 ,p_secondary_class_1a_o
658 => pqp_aat_shd.g_old_rec.secondary_class_1a
659 ,p_secondary_capital_contribu_o
660 => pqp_aat_shd.g_old_rec.secondary_capital_contribution
661 ,p_secondary_private_contribu_o
662 => pqp_aat_shd.g_old_rec.secondary_private_contribution
663 ,p_company_car_calc_method_o
664 => pqp_aat_shd.g_old_rec.company_car_calc_method
665 ,p_company_car_rates_table_id_o
666 => pqp_aat_shd.g_old_rec.company_car_rates_table_id
667 ,p_company_car_secondary_tabl_o
668 => pqp_aat_shd.g_old_rec.company_car_secondary_table_id
669 ,p_private_car_o
670 => pqp_aat_shd.g_old_rec.private_car
671 ,p_private_car_calc_method_o
672 => pqp_aat_shd.g_old_rec.private_car_calc_method
673 ,p_private_car_rates_table_id_o
674 => pqp_aat_shd.g_old_rec.private_car_rates_table_id
675 ,p_private_car_essential_tabl_o
676 => pqp_aat_shd.g_old_rec.private_car_essential_table_id
677 ,p_tp_is_teacher_o
678 => pqp_aat_shd.g_old_rec.tp_is_teacher
679 ,p_tp_headteacher_grp_code_o --added for head Teacher seconded location for salary scale calculation
680 =>pqp_aat_shd.g_old_rec.tp_headteacher_grp_code
681 ,p_tp_safeguarded_grade_o
682 => pqp_aat_shd.g_old_rec.tp_safeguarded_grade
683 ,p_tp_safeguarded_grade_id_o
684 => pqp_aat_shd.g_old_rec.tp_safeguarded_grade_id
685 ,p_tp_safeguarded_rate_type_o
686 => pqp_aat_shd.g_old_rec.tp_safeguarded_rate_type
687 ,p_tp_safeguarded_rate_id_o
688 => pqp_aat_shd.g_old_rec.tp_safeguarded_rate_id
689 ,p_tp_spinal_point_id_o
690 => pqp_aat_shd.g_old_rec.tp_safeguarded_spinal_point_id
691 ,p_tp_elected_pension_o
692 => pqp_aat_shd.g_old_rec.tp_elected_pension
693 ,p_tp_fast_track_o
694 => pqp_aat_shd.g_old_rec.tp_fast_track
695 ,p_aat_attribute_category_o
696 => pqp_aat_shd.g_old_rec.aat_attribute_category
697 ,p_aat_attribute1_o
698 => pqp_aat_shd.g_old_rec.aat_attribute1
699 ,p_aat_attribute2_o
700 => pqp_aat_shd.g_old_rec.aat_attribute2
701 ,p_aat_attribute3_o
702 => pqp_aat_shd.g_old_rec.aat_attribute3
703 ,p_aat_attribute4_o
704 => pqp_aat_shd.g_old_rec.aat_attribute4
705 ,p_aat_attribute5_o
706 => pqp_aat_shd.g_old_rec.aat_attribute5
707 ,p_aat_attribute6_o
708 => pqp_aat_shd.g_old_rec.aat_attribute6
709 ,p_aat_attribute7_o
710 => pqp_aat_shd.g_old_rec.aat_attribute7
711 ,p_aat_attribute8_o
712 => pqp_aat_shd.g_old_rec.aat_attribute8
713 ,p_aat_attribute9_o
714 => pqp_aat_shd.g_old_rec.aat_attribute9
715 ,p_aat_attribute10_o
716 => pqp_aat_shd.g_old_rec.aat_attribute10
717 ,p_aat_attribute11_o
718 => pqp_aat_shd.g_old_rec.aat_attribute11
719 ,p_aat_attribute12_o
720 => pqp_aat_shd.g_old_rec.aat_attribute12
721 ,p_aat_attribute13_o
722 => pqp_aat_shd.g_old_rec.aat_attribute13
723 ,p_aat_attribute14_o
724 => pqp_aat_shd.g_old_rec.aat_attribute14
725 ,p_aat_attribute15_o
726 => pqp_aat_shd.g_old_rec.aat_attribute15
727 ,p_aat_attribute16_o
728 => pqp_aat_shd.g_old_rec.aat_attribute16
729 ,p_aat_attribute17_o
730 => pqp_aat_shd.g_old_rec.aat_attribute17
731 ,p_aat_attribute18_o
732 => pqp_aat_shd.g_old_rec.aat_attribute18
733 ,p_aat_attribute19_o
734 => pqp_aat_shd.g_old_rec.aat_attribute19
735 ,p_aat_attribute20_o
736 => pqp_aat_shd.g_old_rec.aat_attribute20
737 ,p_aat_information_category_o
738 => pqp_aat_shd.g_old_rec.aat_information_category
739 ,p_aat_information1_o
740 => pqp_aat_shd.g_old_rec.aat_information1
741 ,p_aat_information2_o
742 => pqp_aat_shd.g_old_rec.aat_information2
743 ,p_aat_information3_o
744 => pqp_aat_shd.g_old_rec.aat_information3
745 ,p_aat_information4_o
746 => pqp_aat_shd.g_old_rec.aat_information4
747 ,p_aat_information5_o
748 => pqp_aat_shd.g_old_rec.aat_information5
749 ,p_aat_information6_o
750 => pqp_aat_shd.g_old_rec.aat_information6
751 ,p_aat_information7_o
752 => pqp_aat_shd.g_old_rec.aat_information7
753 ,p_aat_information8_o
754 => pqp_aat_shd.g_old_rec.aat_information8
755 ,p_aat_information9_o
756 => pqp_aat_shd.g_old_rec.aat_information9
757 ,p_aat_information10_o
758 => pqp_aat_shd.g_old_rec.aat_information10
759 ,p_aat_information11_o
760 => pqp_aat_shd.g_old_rec.aat_information11
761 ,p_aat_information12_o
762 => pqp_aat_shd.g_old_rec.aat_information12
763 ,p_aat_information13_o
764 => pqp_aat_shd.g_old_rec.aat_information13
765 ,p_aat_information14_o
766 => pqp_aat_shd.g_old_rec.aat_information14
767 ,p_aat_information15_o
768 => pqp_aat_shd.g_old_rec.aat_information15
769 ,p_aat_information16_o
770 => pqp_aat_shd.g_old_rec.aat_information16
771 ,p_aat_information17_o
772 => pqp_aat_shd.g_old_rec.aat_information17
773 ,p_aat_information18_o
774 => pqp_aat_shd.g_old_rec.aat_information18
775 ,p_aat_information19_o
776 => pqp_aat_shd.g_old_rec.aat_information19
777 ,p_aat_information20_o
778 => pqp_aat_shd.g_old_rec.aat_information20
779 ,p_lgps_process_flag_o
780 => pqp_aat_shd.g_old_rec.lgps_process_flag
781 ,p_lgps_exclusion_type_o
782 => pqp_aat_shd.g_old_rec.lgps_exclusion_type
783 ,p_lgps_pensionable_pay_o
784 => pqp_aat_shd.g_old_rec.lgps_pensionable_pay
785 ,p_lgps_trans_arrang_flag_o
786 => pqp_aat_shd.g_old_rec.lgps_trans_arrang_flag
787 ,p_lgps_membership_number_o
788 => pqp_aat_shd.g_old_rec.lgps_membership_number
789 );
790 --
791 exception
792 --
793 when hr_api.cannot_find_prog_unit then
794 --
795 hr_api.cannot_find_prog_unit_error
796 (p_module_name => 'PQP_ASSIGNMENT_ATTRIBUTES_F'
797 ,p_hook_type => 'AU');
798 --
799 end;
800 --
801 hr_utility.set_location(' Leaving:'||l_proc, 10);
802 End post_update;
803 --
804 -- ---------------------------------------------------------------------------+
805 -- |-----------------------------< convert_defs >-----------------------------|
806 -- ---------------------------------------------------------------------------+
807 -- {Start Of Comments}
808 --
809 -- Description:
810 -- The Convert_Defs procedure has one very important function:
811 -- It must return the record structure for the row with all system defaulted
812 -- values converted into its corresponding parameter value for update. When
813 -- we attempt to update a row through the Upd process , certain
814 -- parameters can be defaulted which enables flexibility in the calling of
815 -- the upd process (e.g. only attributes which need to be updated need to be
816 -- specified). For the upd process to determine which attributes
817 -- have NOT been specified we need to check if the parameter has a reserved
818 -- system default value. Therefore, for all parameters which have a
819 -- corresponding reserved system default mechanism specified we need to
820 -- check if a system default is being used. If a system default is being
821 -- used then we convert the defaulted value into its corresponding attribute
822 -- value held in the g_old_rec data structure.
823 --
824 -- Prerequisites:
825 -- This private function can only be called from the upd process.
826 --
827 -- In Parameters:
828 -- A Pl/Sql record structure.
829 --
830 -- Post Success:
831 -- The record structure will be returned with all system defaulted parameter
832 -- values converted into its current row attribute value.
833 --
834 -- Post Failure:
835 -- No direct error handling is required within this function. Any possible
836 -- errors within this procedure will be a PL/SQL value error due to
837 -- conversion of datatypes or data lengths.
838 --
839 -- Developer Implementation Notes:
840 -- None.
841 --
842 -- Access Status:
843 -- Internal Row Handler Use Only.
844 --
845 -- {End Of Comments}
846 -- ---------------------------------------------------------------------------+
847 Procedure convert_defs
848 (p_rec in out nocopy pqp_aat_shd.g_rec_type
849 ) is
850 --
851 Begin
852 --
853 -- We must now examine each argument value in the
854 -- p_rec plsql record structure
855 -- to see if a system default is being used. If a system default
856 -- is being used then we must set to the 'current' argument value.
857 --
858 If (p_rec.business_group_id = hr_api.g_number) then
859 p_rec.business_group_id :=
860 pqp_aat_shd.g_old_rec.business_group_id;
861 End If;
862 If (p_rec.assignment_id = hr_api.g_number) then
863 p_rec.assignment_id :=
864 pqp_aat_shd.g_old_rec.assignment_id;
865 End If;
866 If (p_rec.contract_type = hr_api.g_varchar2) then
867 p_rec.contract_type :=
868 pqp_aat_shd.g_old_rec.contract_type;
869 End If;
870 If (p_rec.work_pattern = hr_api.g_varchar2) then
871 p_rec.work_pattern :=
872 pqp_aat_shd.g_old_rec.work_pattern;
873 End If;
874 If (p_rec.start_day = hr_api.g_varchar2) then
875 p_rec.start_day :=
876 pqp_aat_shd.g_old_rec.start_day;
877 End If;
878 If (p_rec.primary_company_car = hr_api.g_number) then
879 p_rec.primary_company_car :=
880 pqp_aat_shd.g_old_rec.primary_company_car;
881 End If;
882 If (p_rec.primary_car_fuel_benefit = hr_api.g_varchar2) then
883 p_rec.primary_car_fuel_benefit :=
884 pqp_aat_shd.g_old_rec.primary_car_fuel_benefit;
885 End If;
886 If (p_rec.primary_class_1a = hr_api.g_varchar2) then
887 p_rec.primary_class_1a :=
888 pqp_aat_shd.g_old_rec.primary_class_1a;
889 End If;
890 If (p_rec.primary_capital_contribution = hr_api.g_number) then
891 p_rec.primary_capital_contribution :=
892 pqp_aat_shd.g_old_rec.primary_capital_contribution;
893 End If;
894 If (p_rec.primary_private_contribution = hr_api.g_number) then
895 p_rec.primary_private_contribution :=
896 pqp_aat_shd.g_old_rec.primary_private_contribution;
897 End If;
898 If (p_rec.secondary_company_car = hr_api.g_number) then
899 p_rec.secondary_company_car :=
900 pqp_aat_shd.g_old_rec.secondary_company_car;
901 End If;
902 If (p_rec.secondary_car_fuel_benefit = hr_api.g_varchar2) then
903 p_rec.secondary_car_fuel_benefit :=
904 pqp_aat_shd.g_old_rec.secondary_car_fuel_benefit;
905 End If;
906 If (p_rec.secondary_class_1a = hr_api.g_varchar2) then
907 p_rec.secondary_class_1a :=
908 pqp_aat_shd.g_old_rec.secondary_class_1a;
909 End If;
910 If (p_rec.secondary_capital_contribution = hr_api.g_number) then
911 p_rec.secondary_capital_contribution :=
912 pqp_aat_shd.g_old_rec.secondary_capital_contribution;
913 End If;
914 If (p_rec.secondary_private_contribution = hr_api.g_number) then
915 p_rec.secondary_private_contribution :=
916 pqp_aat_shd.g_old_rec.secondary_private_contribution;
917 End If;
918 If (p_rec.company_car_calc_method = hr_api.g_varchar2) then
919 p_rec.company_car_calc_method :=
920 pqp_aat_shd.g_old_rec.company_car_calc_method;
921 End If;
922 If (p_rec.company_car_rates_table_id = hr_api.g_number) then
923 p_rec.company_car_rates_table_id :=
924 pqp_aat_shd.g_old_rec.company_car_rates_table_id;
925 End If;
926 If (p_rec.company_car_secondary_table_id = hr_api.g_number) then
927 p_rec.company_car_secondary_table_id :=
928 pqp_aat_shd.g_old_rec.company_car_secondary_table_id;
929 End If;
930 If (p_rec.private_car = hr_api.g_number) then
931 p_rec.private_car :=
932 pqp_aat_shd.g_old_rec.private_car;
933 End If;
934 If (p_rec.private_car_calc_method = hr_api.g_varchar2) then
935 p_rec.private_car_calc_method :=
936 pqp_aat_shd.g_old_rec.private_car_calc_method;
937 End If;
938 If (p_rec.private_car_rates_table_id = hr_api.g_number) then
939 p_rec.private_car_rates_table_id :=
940 pqp_aat_shd.g_old_rec.private_car_rates_table_id;
941 End If;
942 If (p_rec.private_car_essential_table_id = hr_api.g_number) then
943 p_rec.private_car_essential_table_id :=
944 pqp_aat_shd.g_old_rec.private_car_essential_table_id;
945 End If;
946 If (p_rec.tp_is_teacher = hr_api.g_varchar2) then
947 p_rec.tp_is_teacher :=
948 pqp_aat_shd.g_old_rec.tp_is_teacher;
949 End If;
950 --added for head Teacher seconded location for salary scale calculation
951 If (p_rec.tp_headteacher_grp_code = hr_api.g_number) then
952 p_rec.tp_headteacher_grp_code :=
953 pqp_aat_shd.g_old_rec.tp_headteacher_grp_code;
954 End If;
955 If (p_rec.tp_safeguarded_grade = hr_api.g_varchar2) then
956 p_rec.tp_safeguarded_grade :=
957 pqp_aat_shd.g_old_rec.tp_safeguarded_grade;
958 End If;
959 If (p_rec.tp_safeguarded_grade_id = hr_api.g_number) then
960 p_rec.tp_safeguarded_grade_id :=
961 pqp_aat_shd.g_old_rec.tp_safeguarded_grade_id;
962 End If;
963 If (p_rec.tp_safeguarded_rate_type = hr_api.g_varchar2) then
964 p_rec.tp_safeguarded_rate_type :=
965 pqp_aat_shd.g_old_rec.tp_safeguarded_rate_type;
966 End If;
967 If (p_rec.tp_safeguarded_rate_id = hr_api.g_number) then
968 p_rec.tp_safeguarded_rate_id :=
969 pqp_aat_shd.g_old_rec.tp_safeguarded_rate_id;
970 End If;
971 If (p_rec.tp_safeguarded_spinal_point_id = hr_api.g_number) then
972 p_rec.tp_safeguarded_spinal_point_id :=
973 pqp_aat_shd.g_old_rec.tp_safeguarded_spinal_point_id;
974 End If;
975 If (p_rec.tp_elected_pension = hr_api.g_varchar2) then
976 p_rec.tp_elected_pension :=
977 pqp_aat_shd.g_old_rec.tp_elected_pension;
978 End If;
979 If (p_rec.tp_fast_track = hr_api.g_varchar2) then
980 p_rec.tp_fast_track :=
981 pqp_aat_shd.g_old_rec.tp_fast_track;
982 End If;
983 If (p_rec.aat_attribute_category = hr_api.g_varchar2) then
984 p_rec.aat_attribute_category :=
985 pqp_aat_shd.g_old_rec.aat_attribute_category;
986 End If;
987 If (p_rec.aat_attribute1 = hr_api.g_varchar2) then
988 p_rec.aat_attribute1 :=
989 pqp_aat_shd.g_old_rec.aat_attribute1;
990 End If;
991 If (p_rec.aat_attribute2 = hr_api.g_varchar2) then
992 p_rec.aat_attribute2 :=
993 pqp_aat_shd.g_old_rec.aat_attribute2;
994 End If;
995 If (p_rec.aat_attribute3 = hr_api.g_varchar2) then
996 p_rec.aat_attribute3 :=
997 pqp_aat_shd.g_old_rec.aat_attribute3;
998 End If;
999 If (p_rec.aat_attribute4 = hr_api.g_varchar2) then
1000 p_rec.aat_attribute4 :=
1001 pqp_aat_shd.g_old_rec.aat_attribute4;
1002 End If;
1003 If (p_rec.aat_attribute5 = hr_api.g_varchar2) then
1004 p_rec.aat_attribute5 :=
1005 pqp_aat_shd.g_old_rec.aat_attribute5;
1006 End If;
1007 If (p_rec.aat_attribute6 = hr_api.g_varchar2) then
1008 p_rec.aat_attribute6 :=
1009 pqp_aat_shd.g_old_rec.aat_attribute6;
1010 End If;
1011 If (p_rec.aat_attribute7 = hr_api.g_varchar2) then
1012 p_rec.aat_attribute7 :=
1013 pqp_aat_shd.g_old_rec.aat_attribute7;
1014 End If;
1015 If (p_rec.aat_attribute8 = hr_api.g_varchar2) then
1016 p_rec.aat_attribute8 :=
1017 pqp_aat_shd.g_old_rec.aat_attribute8;
1018 End If;
1019 If (p_rec.aat_attribute9 = hr_api.g_varchar2) then
1020 p_rec.aat_attribute9 :=
1021 pqp_aat_shd.g_old_rec.aat_attribute9;
1022 End If;
1023 If (p_rec.aat_attribute10 = hr_api.g_varchar2) then
1024 p_rec.aat_attribute10 :=
1025 pqp_aat_shd.g_old_rec.aat_attribute10;
1026 End If;
1027 If (p_rec.aat_attribute11 = hr_api.g_varchar2) then
1028 p_rec.aat_attribute11 :=
1029 pqp_aat_shd.g_old_rec.aat_attribute11;
1030 End If;
1031 If (p_rec.aat_attribute12 = hr_api.g_varchar2) then
1032 p_rec.aat_attribute12 :=
1033 pqp_aat_shd.g_old_rec.aat_attribute12;
1034 End If;
1035 If (p_rec.aat_attribute13 = hr_api.g_varchar2) then
1036 p_rec.aat_attribute13 :=
1037 pqp_aat_shd.g_old_rec.aat_attribute13;
1038 End If;
1039 If (p_rec.aat_attribute14 = hr_api.g_varchar2) then
1040 p_rec.aat_attribute14 :=
1041 pqp_aat_shd.g_old_rec.aat_attribute14;
1042 End If;
1043 If (p_rec.aat_attribute15 = hr_api.g_varchar2) then
1044 p_rec.aat_attribute15 :=
1045 pqp_aat_shd.g_old_rec.aat_attribute15;
1046 End If;
1047 If (p_rec.aat_attribute16 = hr_api.g_varchar2) then
1048 p_rec.aat_attribute16 :=
1049 pqp_aat_shd.g_old_rec.aat_attribute16;
1050 End If;
1051 If (p_rec.aat_attribute17 = hr_api.g_varchar2) then
1052 p_rec.aat_attribute17 :=
1053 pqp_aat_shd.g_old_rec.aat_attribute17;
1054 End If;
1055 If (p_rec.aat_attribute18 = hr_api.g_varchar2) then
1056 p_rec.aat_attribute18 :=
1057 pqp_aat_shd.g_old_rec.aat_attribute18;
1058 End If;
1059 If (p_rec.aat_attribute19 = hr_api.g_varchar2) then
1060 p_rec.aat_attribute19 :=
1061 pqp_aat_shd.g_old_rec.aat_attribute19;
1062 End If;
1063 If (p_rec.aat_attribute20 = hr_api.g_varchar2) then
1064 p_rec.aat_attribute20 :=
1065 pqp_aat_shd.g_old_rec.aat_attribute20;
1066 End If;
1067 If (p_rec.aat_information_category = hr_api.g_varchar2) then
1068 p_rec.aat_information_category :=
1069 pqp_aat_shd.g_old_rec.aat_information_category;
1070 End If;
1071 If (p_rec.aat_information1 = hr_api.g_varchar2) then
1072 p_rec.aat_information1 :=
1073 pqp_aat_shd.g_old_rec.aat_information1;
1074 End If;
1075 If (p_rec.aat_information2 = hr_api.g_varchar2) then
1076 p_rec.aat_information2 :=
1077 pqp_aat_shd.g_old_rec.aat_information2;
1078 End If;
1079 If (p_rec.aat_information3 = hr_api.g_varchar2) then
1080 p_rec.aat_information3 :=
1081 pqp_aat_shd.g_old_rec.aat_information3;
1082 End If;
1083 If (p_rec.aat_information4 = hr_api.g_varchar2) then
1084 p_rec.aat_information4 :=
1085 pqp_aat_shd.g_old_rec.aat_information4;
1086 End If;
1087 If (p_rec.aat_information5 = hr_api.g_varchar2) then
1088 p_rec.aat_information5 :=
1089 pqp_aat_shd.g_old_rec.aat_information5;
1090 End If;
1091 If (p_rec.aat_information6 = hr_api.g_varchar2) then
1092 p_rec.aat_information6 :=
1093 pqp_aat_shd.g_old_rec.aat_information6;
1094 End If;
1095 If (p_rec.aat_information7 = hr_api.g_varchar2) then
1096 p_rec.aat_information7 :=
1097 pqp_aat_shd.g_old_rec.aat_information7;
1098 End If;
1099 If (p_rec.aat_information8 = hr_api.g_varchar2) then
1100 p_rec.aat_information8 :=
1101 pqp_aat_shd.g_old_rec.aat_information8;
1102 End If;
1103 If (p_rec.aat_information9 = hr_api.g_varchar2) then
1104 p_rec.aat_information9 :=
1105 pqp_aat_shd.g_old_rec.aat_information9;
1106 End If;
1107 If (p_rec.aat_information10 = hr_api.g_varchar2) then
1108 p_rec.aat_information10 :=
1109 pqp_aat_shd.g_old_rec.aat_information10;
1110 End If;
1111 If (p_rec.aat_information11 = hr_api.g_varchar2) then
1112 p_rec.aat_information11 :=
1113 pqp_aat_shd.g_old_rec.aat_information11;
1114 End If;
1115 If (p_rec.aat_information12 = hr_api.g_varchar2) then
1116 p_rec.aat_information12 :=
1117 pqp_aat_shd.g_old_rec.aat_information12;
1118 End If;
1119 If (p_rec.aat_information13 = hr_api.g_varchar2) then
1120 p_rec.aat_information13 :=
1121 pqp_aat_shd.g_old_rec.aat_information13;
1122 End If;
1123 If (p_rec.aat_information14 = hr_api.g_varchar2) then
1124 p_rec.aat_information14 :=
1125 pqp_aat_shd.g_old_rec.aat_information14;
1126 End If;
1127 If (p_rec.aat_information15 = hr_api.g_varchar2) then
1128 p_rec.aat_information15 :=
1129 pqp_aat_shd.g_old_rec.aat_information15;
1130 End If;
1131 If (p_rec.aat_information16 = hr_api.g_varchar2) then
1132 p_rec.aat_information16 :=
1133 pqp_aat_shd.g_old_rec.aat_information16;
1134 End If;
1135 If (p_rec.aat_information17 = hr_api.g_varchar2) then
1136 p_rec.aat_information17 :=
1137 pqp_aat_shd.g_old_rec.aat_information17;
1138 End If;
1139 If (p_rec.aat_information18 = hr_api.g_varchar2) then
1140 p_rec.aat_information18 :=
1141 pqp_aat_shd.g_old_rec.aat_information18;
1142 End If;
1143 If (p_rec.aat_information19 = hr_api.g_varchar2) then
1144 p_rec.aat_information19 :=
1145 pqp_aat_shd.g_old_rec.aat_information19;
1146 End If;
1147 If (p_rec.aat_information20 = hr_api.g_varchar2) then
1148 p_rec.aat_information20 :=
1149 pqp_aat_shd.g_old_rec.aat_information20;
1150 End If;
1151 If (p_rec.lgps_process_flag = hr_api.g_varchar2) then
1152 p_rec.lgps_process_flag :=
1153 pqp_aat_shd.g_old_rec.lgps_process_flag;
1154 End If;
1155 If (p_rec.lgps_exclusion_type = hr_api.g_varchar2) then
1156 p_rec.lgps_exclusion_type :=
1157 pqp_aat_shd.g_old_rec.lgps_exclusion_type;
1158 End If;
1159 If (p_rec.lgps_pensionable_pay = hr_api.g_varchar2) then
1160 p_rec.lgps_pensionable_pay :=
1161 pqp_aat_shd.g_old_rec.lgps_pensionable_pay;
1162 End If;
1163 If (p_rec.lgps_trans_arrang_flag = hr_api.g_varchar2) then
1164 p_rec.lgps_trans_arrang_flag :=
1165 pqp_aat_shd.g_old_rec.lgps_trans_arrang_flag;
1166 End If;
1167 If (p_rec.lgps_membership_number = hr_api.g_varchar2) then
1168 p_rec.lgps_membership_number :=
1169 pqp_aat_shd.g_old_rec.lgps_membership_number;
1170 End If;
1171
1172 --
1173 End convert_defs;
1174 --
1175 -- ---------------------------------------------------------------------------+
1176 -- |---------------------------------< upd >----------------------------------|
1177 -- ---------------------------------------------------------------------------+
1178 Procedure upd
1179 (p_effective_date in date
1180 ,p_datetrack_mode in varchar2
1181 ,p_rec in out nocopy pqp_aat_shd.g_rec_type
1182 ) is
1183 --
1184 l_proc varchar2(72) := g_package||'upd';
1185 l_validation_start_date date;
1186 l_validation_end_date date;
1187 --
1188 Begin
1189 hr_utility.set_location('Entering:'||l_proc, 5);
1190 --
1191 -- Ensure that the DateTrack update mode is valid
1192 --
1193 dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
1194 --
1195 -- We must lock the row which we need to update.
1196 --
1197 pqp_aat_shd.lck
1198 (p_effective_date => p_effective_date
1199 ,p_datetrack_mode => p_datetrack_mode
1200 ,p_assignment_attribute_id => p_rec.assignment_attribute_id
1201 ,p_object_version_number => p_rec.object_version_number
1202 ,p_validation_start_date => l_validation_start_date
1203 ,p_validation_end_date => l_validation_end_date
1204 );
1205 --
1206 -- 1. During an update system defaults are used to determine if
1207 -- arguments have been defaulted or not. We must therefore
1208 -- derive the full record structure values to be updated.
1209 --
1210 -- 2. Call the supporting update validate operations.
1211 --
1212 pqp_aat_upd.convert_defs(p_rec);
1213 --
1214 pqp_aat_bus.update_validate
1215 (p_rec => p_rec
1216 ,p_effective_date => p_effective_date
1217 ,p_datetrack_mode => p_datetrack_mode
1218 ,p_validation_start_date => l_validation_start_date
1219 ,p_validation_end_date => l_validation_end_date
1220 );
1221 --
1222 -- Call the supporting pre-update operation
1223 --
1224 pre_update
1225 (p_rec => p_rec
1226 ,p_effective_date => p_effective_date
1227 ,p_datetrack_mode => p_datetrack_mode
1228 ,p_validation_start_date => l_validation_start_date
1229 ,p_validation_end_date => l_validation_end_date
1230 );
1231 --
1232 -- Update the row.
1233 --
1234 update_dml
1235 (p_rec => p_rec
1236 ,p_effective_date => p_effective_date
1237 ,p_datetrack_mode => p_datetrack_mode
1238 ,p_validation_start_date => l_validation_start_date
1239 ,p_validation_end_date => l_validation_end_date
1240 );
1241 --
1242 -- Call the supporting post-update operation
1243 --
1244 post_update
1245 (p_rec => p_rec
1246 ,p_effective_date => p_effective_date
1247 ,p_datetrack_mode => p_datetrack_mode
1248 ,p_validation_start_date => l_validation_start_date
1249 ,p_validation_end_date => l_validation_end_date
1250 );
1251 End upd;
1252 --
1253 -- ---------------------------------------------------------------------------+
1254 -- |------------------------------< upd >-------------------------------------|
1255 -- ---------------------------------------------------------------------------+
1256 Procedure upd
1257 (p_effective_date in date
1258 ,p_datetrack_mode in varchar2
1259 ,p_assignment_attribute_id in number
1260 ,p_object_version_number in out nocopy number
1261 ,p_business_group_id in number default hr_api.g_number
1262 ,p_assignment_id in number default hr_api.g_number
1263 ,p_contract_type in varchar2 default hr_api.g_varchar2
1264 ,p_work_pattern in varchar2 default hr_api.g_varchar2
1265 ,p_start_day in varchar2 default hr_api.g_varchar2
1266 ,p_primary_company_car in number default hr_api.g_number
1267 ,p_primary_car_fuel_benefit in varchar2 default hr_api.g_varchar2
1268 ,p_primary_class_1a in varchar2 default hr_api.g_varchar2
1269 ,p_primary_capital_contribution in number default hr_api.g_number
1270 ,p_primary_private_contribution in number default hr_api.g_number
1271 ,p_secondary_company_car in number default hr_api.g_number
1272 ,p_secondary_car_fuel_benefit in varchar2 default hr_api.g_varchar2
1273 ,p_secondary_class_1a in varchar2 default hr_api.g_varchar2
1274 ,p_secondary_capital_contributi in number default hr_api.g_number
1275 ,p_secondary_private_contributi in number default hr_api.g_number
1276 ,p_company_car_calc_method in varchar2 default hr_api.g_varchar2
1277 ,p_company_car_rates_table_id in number default hr_api.g_number
1278 ,p_company_car_secondary_table in number default hr_api.g_number
1279 ,p_private_car in number default hr_api.g_number
1280 ,p_private_car_calc_method in varchar2 default hr_api.g_varchar2
1281 ,p_private_car_rates_table_id in number default hr_api.g_number
1282 ,p_private_car_essential_table in number default hr_api.g_number
1283 ,p_tp_is_teacher in varchar2 default hr_api.g_varchar2
1284 ,p_tp_headteacher_grp_code in number default hr_api.g_number --added for head Teacher seconded location for salary scale calculation
1285 ,p_tp_safeguarded_grade in varchar2 default hr_api.g_varchar2
1286 ,p_tp_safeguarded_grade_id in number default hr_api.g_number
1287 ,p_tp_safeguarded_rate_type in varchar2 default hr_api.g_varchar2
1288 ,p_tp_safeguarded_rate_id in number default hr_api.g_number
1289 ,p_tp_spinal_point_id in number default hr_api.g_number
1290 ,p_tp_elected_pension in varchar2 default hr_api.g_varchar2
1291 ,p_tp_fast_track in varchar2 default hr_api.g_varchar2
1292 ,p_aat_attribute_category in varchar2 default hr_api.g_varchar2
1293 ,p_aat_attribute1 in varchar2 default hr_api.g_varchar2
1294 ,p_aat_attribute2 in varchar2 default hr_api.g_varchar2
1295 ,p_aat_attribute3 in varchar2 default hr_api.g_varchar2
1296 ,p_aat_attribute4 in varchar2 default hr_api.g_varchar2
1297 ,p_aat_attribute5 in varchar2 default hr_api.g_varchar2
1298 ,p_aat_attribute6 in varchar2 default hr_api.g_varchar2
1299 ,p_aat_attribute7 in varchar2 default hr_api.g_varchar2
1300 ,p_aat_attribute8 in varchar2 default hr_api.g_varchar2
1301 ,p_aat_attribute9 in varchar2 default hr_api.g_varchar2
1302 ,p_aat_attribute10 in varchar2 default hr_api.g_varchar2
1303 ,p_aat_attribute11 in varchar2 default hr_api.g_varchar2
1304 ,p_aat_attribute12 in varchar2 default hr_api.g_varchar2
1305 ,p_aat_attribute13 in varchar2 default hr_api.g_varchar2
1306 ,p_aat_attribute14 in varchar2 default hr_api.g_varchar2
1307 ,p_aat_attribute15 in varchar2 default hr_api.g_varchar2
1308 ,p_aat_attribute16 in varchar2 default hr_api.g_varchar2
1309 ,p_aat_attribute17 in varchar2 default hr_api.g_varchar2
1310 ,p_aat_attribute18 in varchar2 default hr_api.g_varchar2
1311 ,p_aat_attribute19 in varchar2 default hr_api.g_varchar2
1312 ,p_aat_attribute20 in varchar2 default hr_api.g_varchar2
1313 ,p_aat_information_category in varchar2 default hr_api.g_varchar2
1314 ,p_aat_information1 in varchar2 default hr_api.g_varchar2
1315 ,p_aat_information2 in varchar2 default hr_api.g_varchar2
1316 ,p_aat_information3 in varchar2 default hr_api.g_varchar2
1317 ,p_aat_information4 in varchar2 default hr_api.g_varchar2
1318 ,p_aat_information5 in varchar2 default hr_api.g_varchar2
1319 ,p_aat_information6 in varchar2 default hr_api.g_varchar2
1320 ,p_aat_information7 in varchar2 default hr_api.g_varchar2
1321 ,p_aat_information8 in varchar2 default hr_api.g_varchar2
1322 ,p_aat_information9 in varchar2 default hr_api.g_varchar2
1323 ,p_aat_information10 in varchar2 default hr_api.g_varchar2
1324 ,p_aat_information11 in varchar2 default hr_api.g_varchar2
1325 ,p_aat_information12 in varchar2 default hr_api.g_varchar2
1326 ,p_aat_information13 in varchar2 default hr_api.g_varchar2
1327 ,p_aat_information14 in varchar2 default hr_api.g_varchar2
1328 ,p_aat_information15 in varchar2 default hr_api.g_varchar2
1329 ,p_aat_information16 in varchar2 default hr_api.g_varchar2
1330 ,p_aat_information17 in varchar2 default hr_api.g_varchar2
1331 ,p_aat_information18 in varchar2 default hr_api.g_varchar2
1332 ,p_aat_information19 in varchar2 default hr_api.g_varchar2
1333 ,p_aat_information20 in varchar2 default hr_api.g_varchar2
1334 ,p_lgps_process_flag in varchar2 default hr_api.g_varchar2
1335 ,p_lgps_exclusion_type in varchar2 default hr_api.g_varchar2
1336 ,p_lgps_pensionable_pay in varchar2 default hr_api.g_varchar2
1337 ,p_lgps_trans_arrang_flag in varchar2 default hr_api.g_varchar2
1338 ,p_lgps_membership_number in varchar2 default hr_api.g_varchar2
1339 ,p_effective_start_date out nocopy date
1340 ,p_effective_end_date out nocopy date
1341 ) is
1342 --
1343 l_rec pqp_aat_shd.g_rec_type;
1344 l_proc varchar2(72) := g_package||'upd';
1345 --
1346 Begin
1347 hr_utility.set_location('Entering:'||l_proc, 5);
1348 --
1349 -- Call conversion function to turn arguments into the
1350 -- l_rec structure.
1351 --
1352 l_rec :=
1353 pqp_aat_shd.convert_args
1354 (p_assignment_attribute_id
1355 ,null
1356 ,null
1357 ,p_business_group_id
1358 ,p_assignment_id
1359 ,p_contract_type
1360 ,p_work_pattern
1361 ,p_start_day
1362 ,p_object_version_number
1363 ,p_primary_company_car
1364 ,p_primary_car_fuel_benefit
1365 ,p_primary_class_1a
1366 ,p_primary_capital_contribution
1367 ,p_primary_private_contribution
1368 ,p_secondary_company_car
1369 ,p_secondary_car_fuel_benefit
1370 ,p_secondary_class_1a
1371 ,p_secondary_capital_contributi
1372 ,p_secondary_private_contributi
1373 ,p_company_car_calc_method
1374 ,p_company_car_rates_table_id
1375 ,p_company_car_secondary_table
1376 ,p_private_car
1377 ,p_private_car_calc_method
1378 ,p_private_car_rates_table_id
1379 ,p_private_car_essential_table
1380 ,p_tp_is_teacher
1381 ,p_tp_headteacher_grp_code --added for head Teacher seconded location for salary scale calculation
1382 ,p_tp_safeguarded_grade
1383 ,p_tp_safeguarded_grade_id
1384 ,p_tp_safeguarded_rate_type
1385 ,p_tp_safeguarded_rate_id
1386 ,p_tp_spinal_point_id
1387 ,p_tp_elected_pension
1388 ,p_tp_fast_track
1389 ,p_aat_attribute_category
1390 ,p_aat_attribute1
1391 ,p_aat_attribute2
1392 ,p_aat_attribute3
1393 ,p_aat_attribute4
1394 ,p_aat_attribute5
1395 ,p_aat_attribute6
1396 ,p_aat_attribute7
1397 ,p_aat_attribute8
1398 ,p_aat_attribute9
1399 ,p_aat_attribute10
1400 ,p_aat_attribute11
1401 ,p_aat_attribute12
1402 ,p_aat_attribute13
1403 ,p_aat_attribute14
1404 ,p_aat_attribute15
1405 ,p_aat_attribute16
1406 ,p_aat_attribute17
1407 ,p_aat_attribute18
1408 ,p_aat_attribute19
1409 ,p_aat_attribute20
1410 ,p_aat_information_category
1411 ,p_aat_information1
1412 ,p_aat_information2
1413 ,p_aat_information3
1414 ,p_aat_information4
1415 ,p_aat_information5
1416 ,p_aat_information6
1417 ,p_aat_information7
1418 ,p_aat_information8
1419 ,p_aat_information9
1420 ,p_aat_information10
1421 ,p_aat_information11
1422 ,p_aat_information12
1423 ,p_aat_information13
1424 ,p_aat_information14
1425 ,p_aat_information15
1426 ,p_aat_information16
1427 ,p_aat_information17
1428 ,p_aat_information18
1429 ,p_aat_information19
1430 ,p_aat_information20
1431 ,p_lgps_process_flag
1432 ,p_lgps_exclusion_type
1433 ,p_lgps_pensionable_pay
1434 ,p_lgps_trans_arrang_flag
1435 ,p_lgps_membership_number
1436 );
1437 --
1438 -- Having converted the arguments into the
1439 -- plsql record structure we call the corresponding record
1440 -- business process.
1441 --
1442 pqp_aat_upd.upd
1443 (p_effective_date
1444 ,p_datetrack_mode
1445 ,l_rec
1446 );
1447 --
1448 -- Set the out parameters
1449 --
1450 p_object_version_number := l_rec.object_version_number;
1451 p_effective_start_date := l_rec.effective_start_date;
1452 p_effective_end_date := l_rec.effective_end_date;
1453 --
1454 --
1455 hr_utility.set_location(' Leaving:'||l_proc, 10);
1456 End upd;
1457 --
1458 end pqp_aat_upd;