[Home] [Help]
PACKAGE BODY: APPS.PAY_PAY_UPD
Source
1 Package Body pay_pay_upd as
2 /* $Header: pypayrhi.pkb 120.0.12000000.3 2007/03/08 09:23:27 mshingan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_pay_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
21 -- this 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 pay_pay_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 l_status_of_dml boolean;
67 --
68 Begin
69 hr_utility.set_location('Entering:'||l_proc, 5);
70 --
71 If (p_datetrack_mode = hr_api.g_correction) then
72 --
73 hr_utility.set_location(l_proc, 10);
74 hr_utility.trace('In CORRECTION , p_effective_date : '||to_char(p_effective_date));
75 --
76 -- Because we are updating a row we must get the next object
77 -- version number.
78 --
79 p_rec.object_version_number :=
80 dt_api.get_object_version_number
81 (p_base_table_name => 'pay_all_payrolls_f'
82 ,p_base_key_column => 'payroll_id'
83 ,p_base_key_value => p_rec.payroll_id
84 );
85 --
86 pay_pay_shd.g_api_dml := true; -- Set the api dml status
87 --
88 -- Update the pay_all_payrolls_f Row
89 --
90 update pay_all_payrolls_f
91 set
92 payroll_id = p_rec.payroll_id
93 ,default_payment_method_id = p_rec.default_payment_method_id
94 ,business_group_id = p_rec.business_group_id
95 ,consolidation_set_id = p_rec.consolidation_set_id
96 ,cost_allocation_keyflex_id = p_rec.cost_allocation_keyflex_id
97 ,suspense_account_keyflex_id = p_rec.suspense_account_keyflex_id
98 ,gl_set_of_books_id = p_rec.gl_set_of_books_id
99 ,soft_coding_keyflex_id = p_rec.soft_coding_keyflex_id
100 ,period_type = p_rec.period_type
101 ,organization_id = p_rec.organization_id
102 ,cut_off_date_offset = p_rec.cut_off_date_offset
103 ,direct_deposit_date_offset = p_rec.direct_deposit_date_offset
104 ,first_period_end_date = p_rec.first_period_end_date
105 ,negative_pay_allowed_flag = p_rec.negative_pay_allowed_flag
106 ,number_of_years = p_rec.number_of_years
107 ,pay_advice_date_offset = p_rec.pay_advice_date_offset
108 ,pay_date_offset = p_rec.pay_date_offset
109 ,payroll_name = p_rec.payroll_name
110 ,workload_shifting_level = p_rec.workload_shifting_level
111 ,comment_id = p_rec.comment_id
112 ,midpoint_offset = p_rec.midpoint_offset
113 ,attribute_category = p_rec.attribute_category
114 ,attribute1 = p_rec.attribute1
115 ,attribute2 = p_rec.attribute2
116 ,attribute3 = p_rec.attribute3
117 ,attribute4 = p_rec.attribute4
118 ,attribute5 = p_rec.attribute5
119 ,attribute6 = p_rec.attribute6
120 ,attribute7 = p_rec.attribute7
121 ,attribute8 = p_rec.attribute8
122 ,attribute9 = p_rec.attribute9
123 ,attribute10 = p_rec.attribute10
124 ,attribute11 = p_rec.attribute11
125 ,attribute12 = p_rec.attribute12
126 ,attribute13 = p_rec.attribute13
127 ,attribute14 = p_rec.attribute14
128 ,attribute15 = p_rec.attribute15
129 ,attribute16 = p_rec.attribute16
130 ,attribute17 = p_rec.attribute17
131 ,attribute18 = p_rec.attribute18
132 ,attribute19 = p_rec.attribute19
133 ,attribute20 = p_rec.attribute20
134 ,arrears_flag = p_rec.arrears_flag
135 ,payroll_type = p_rec.payroll_type
136 ,prl_information_category = p_rec.prl_information_category
137 ,prl_information1 = p_rec.prl_information1
138 ,prl_information2 = p_rec.prl_information2
139 ,prl_information3 = p_rec.prl_information3
140 ,prl_information4 = p_rec.prl_information4
141 ,prl_information5 = p_rec.prl_information5
142 ,prl_information6 = p_rec.prl_information6
143 ,prl_information7 = p_rec.prl_information7
144 ,prl_information8 = p_rec.prl_information8
145 ,prl_information9 = p_rec.prl_information9
146 ,prl_information10 = p_rec.prl_information10
147 ,prl_information11 = p_rec.prl_information11
148 ,prl_information12 = p_rec.prl_information12
149 ,prl_information13 = p_rec.prl_information13
150 ,prl_information14 = p_rec.prl_information14
151 ,prl_information15 = p_rec.prl_information15
152 ,prl_information16 = p_rec.prl_information16
153 ,prl_information17 = p_rec.prl_information17
154 ,prl_information18 = p_rec.prl_information18
155 ,prl_information19 = p_rec.prl_information19
156 ,prl_information20 = p_rec.prl_information20
157 ,prl_information21 = p_rec.prl_information21
158 ,prl_information22 = p_rec.prl_information22
159 ,prl_information23 = p_rec.prl_information23
160 ,prl_information24 = p_rec.prl_information24
161 ,prl_information25 = p_rec.prl_information25
162 ,prl_information26 = p_rec.prl_information26
163 ,prl_information27 = p_rec.prl_information27
164 ,prl_information28 = p_rec.prl_information28
165 ,prl_information29 = p_rec.prl_information29
166 ,prl_information30 = p_rec.prl_information30
167 ,multi_assignments_flag = p_rec.multi_assignments_flag
168 ,period_reset_years = p_rec.period_reset_years
169 ,object_version_number = p_rec.object_version_number
170 ,payslip_view_date_offset = p_rec.payslip_view_date_offset
171 where payroll_id = p_rec.payroll_id
172 and effective_start_date = p_validation_start_date
173 and effective_end_date = p_validation_end_date;
174 --
175 --Storing the status of the above dml operation.
176 l_status_of_dml := SQL%NOTFOUND;
177 pay_pay_shd.g_api_dml := false; -- Unset the api dml status
178 --
179 -- Set the effective start and end dates
180 --
181 p_rec.effective_start_date := p_validation_start_date;
182 p_rec.effective_end_date := p_validation_end_date;
183 --
184 if (l_status_of_dml) then
185 --
186 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
187 hr_utility.set_message_token('PROCEDURE',
188 'pay_payrolls_f_pkg.update_row');
189 hr_utility.set_message_token('STEP','1');
190 hr_utility.raise_error;
191 --
192 End if;
193 --
194 End If;
195 --
196 hr_utility.set_location(' Leaving:'||l_proc, 15);
197 Exception
198 When hr_api.check_integrity_violated Then
199 -- A check constraint has been violated
200 pay_pay_shd.g_api_dml := false; -- Unset the api dml status
201 pay_pay_shd.constraint_error
202 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
203 When hr_api.unique_integrity_violated Then
204 -- Unique integrity has been violated
205 pay_pay_shd.g_api_dml := false; -- Unset the api dml status
206 pay_pay_shd.constraint_error
207 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
208 When Others Then
209 pay_pay_shd.g_api_dml := false; -- Unset the api dml status
210 Raise;
211 End dt_update_dml;
212 --
213 -- ----------------------------------------------------------------------------
214 -- |------------------------------< update_dml >------------------------------|
215 -- ----------------------------------------------------------------------------
216 -- {Start Of Comments}
217 --
218 -- Description:
219 -- This procedure calls the dt_update_dml control logic which handles
220 -- the actual datetrack dml.
221 --
222 -- Prerequisites:
223 -- This is an internal private procedure which must be called from the upd
224 -- procedure.
225 --
226 -- In Parameters:
227 -- A Pl/Sql record structre.
228 --
229 -- Post Success:
230 -- Processing contines.
231 --
232 -- Post Failure:
233 -- No specific error handling is required within this procedure.
234 --
235 -- Developer Implementation Notes:
236 -- The update 'set' arguments list should be modified if any of your
237 -- attributes are not updateable.
238 --
239 -- Access Status:
240 -- Internal Row Handler Use Only.
241 --
242 -- {End Of Comments}
243 -- ----------------------------------------------------------------------------
244 Procedure update_dml
245 (p_rec in out nocopy pay_pay_shd.g_rec_type
246 ,p_effective_date in date
247 ,p_datetrack_mode in varchar2
248 ,p_validation_start_date in date
249 ,p_validation_end_date in date
250 ) is
251 --
252 l_proc varchar2(72) := g_package||'update_dml';
253 --
254 Begin
255 hr_utility.set_location('Entering:'||l_proc, 5);
256 --
257 pay_pay_upd.dt_update_dml
258 (p_rec => p_rec
259 ,p_effective_date => p_effective_date
260 ,p_datetrack_mode => p_datetrack_mode
261 ,p_validation_start_date => p_validation_start_date
262 ,p_validation_end_date => p_validation_end_date
263 );
264 --
265 hr_utility.set_location(' Leaving:'||l_proc, 10);
266 End update_dml;
267 --
268 -- ----------------------------------------------------------------------------
269 -- |----------------------------< dt_pre_update >-----------------------------|
270 -- ----------------------------------------------------------------------------
271 -- {Start Of Comments}
272 --
273 -- Description:
274 -- The dt_pre_update procedure controls the execution
275 -- of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
276 -- and UPDATE_CHANGE_INSERT only. The execution required is as
277 -- follows:
278 --
279 -- 1) Providing the datetrack update mode is not 'CORRECTION'
280 -- then set the effective end date of the current row (this
281 -- will be the validation_start_date - 1).
282 -- 2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
283 -- corresponding delete_dml process to delete any future rows
284 -- where the effective_start_date is greater than or equal to
285 -- the validation_start_date.
286 -- 3) Call the insert_dml process to insert the new updated row
287 -- details.
288 --
289 -- Prerequisites:
290 -- This is an internal procedure which is called from the
291 -- pre_update procedure.
292 --
293 -- In Parameters:
294 --
295 -- Post Success:
296 -- Processing continues.
297 --
298 -- Post Failure:
299 -- If an error has occurred, an error message and exception will be raised
300 -- but not handled.
301 --
302 -- Developer Implementation Notes:
303 -- This is an internal procedure which is required by Datetrack. Don't
304 -- remove or modify.
305 --
306 -- Access Status:
307 -- Internal Row Handler Use Only.
308 --
309 -- {End Of Comments}
310 -- ----------------------------------------------------------------------------
311 Procedure dt_pre_update
312 (p_rec in out nocopy pay_pay_shd.g_rec_type
313 ,p_effective_date in date
314 ,p_datetrack_mode in varchar2
315 ,p_validation_start_date in date
316 ,p_validation_end_date in date
317 ) is
318 --
319 l_proc varchar2(72) := g_package||'dt_pre_update';
320 l_dummy_version_number number;
321 --
322 Begin
323 hr_utility.set_location('Entering:'||l_proc, 5);
324 If (p_datetrack_mode <> hr_api.g_correction) then
325 --
326 -- Update the current effective end date
327 --
328 pay_pay_shd.upd_effective_end_date
329 (p_effective_date => p_effective_date
330 ,p_base_key_value => p_rec.payroll_id
331 ,p_new_effective_end_date => (p_validation_start_date - 1)
332 ,p_validation_start_date => p_validation_start_date
333 ,p_validation_end_date => p_validation_end_date
334 ,p_object_version_number => l_dummy_version_number
335 );
336 --
337 If (p_datetrack_mode = hr_api.g_update_override) then
338 --
339 -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
340 -- delete any future rows
341 --
342 pay_pay_del.delete_dml
343 (p_rec => p_rec
344 ,p_effective_date => p_effective_date
345 ,p_datetrack_mode => p_datetrack_mode
346 ,p_validation_start_date => p_validation_start_date
347 ,p_validation_end_date => p_validation_end_date
348 );
349 --
350 End If;
351 --
352 -- We must now insert the updated row
353 --
354 pay_pay_ins.insert_dml
355 (p_rec => p_rec
356 ,p_effective_date => p_effective_date
357 ,p_datetrack_mode => p_datetrack_mode
358 ,p_validation_start_date => p_validation_start_date
359 ,p_validation_end_date => p_validation_end_date
360 );
361 End If;
362 hr_utility.set_location(' Leaving:'||l_proc, 20);
363
364 Exception
365 When Others Then
366 pay_pay_shd.g_api_dml := false; -- Unset the api dml status
367 Raise;
368 --
369 End dt_pre_update;
370 --
371 -- ----------------------------------------------------------------------------
372 -- |------------------------------< pre_update >------------------------------|
373 -- ----------------------------------------------------------------------------
374 -- {Start Of Comments}
375 --
376 -- Description:
377 -- This private procedure contains any processing which is required before
378 -- the update dml.
379 --
380 -- Prerequisites:
381 -- This is an internal procedure which is called from the upd procedure.
382 --
383 -- In Parameters:
384 -- A Pl/Sql record structure.
385 --
386 -- Post Success:
387 -- Processing continues.
388 --
389 -- Post Failure:
390 -- If an error has occurred, an error message and exception will be raised
391 -- but not handled.
392 -- Developer Implementation Notes:
393 -- Any pre-processing required before the update dml is issued should be
394 -- coded within this procedure. It is important to note that any 3rd party
395 -- maintenance should be reviewed before placing in this procedure. The call
396 -- to the dt_update_dml procedure should NOT be removed.
397 --
398 -- Access Status:
399 -- Internal Row Handler Use Only.
400 --
401 -- {End Of Comments}
402 -- ----------------------------------------------------------------------------
403 Procedure pre_update
404 (p_rec in out nocopy pay_pay_shd.g_rec_type
405 ,p_effective_date in date
406 ,p_datetrack_mode in varchar2
407 ,p_validation_start_date in date
408 ,p_validation_end_date in date
409 ) is
410 --
411 l_proc varchar2(72) := g_package||'pre_update';
412 --
413 Begin
414 hr_utility.set_location('Entering:'||l_proc, 5);
415 --
416 --
417 -- Insert the comment text if comments exist
418 --
419 If (p_rec.comments is not null and p_rec.comment_id is null) then
420 --
421 hr_comm_api.ins(p_comment_id => p_rec.comment_id
422 ,p_source_table_name => 'PAY_ALL_PAYROLLS_F'
423 ,p_comment_text => p_rec.comments
424 );
425 -- Update the comments if they have changed
426 ElsIf (p_rec.comment_id is not null and p_rec.comments <>
427 pay_pay_shd.g_old_rec.comments) then
428 --
429
430 hr_comm_api.upd(p_comment_id => p_rec.comment_id
431 ,p_source_table_name => 'PAY_ALL_PAYROLLS_F'
432 ,p_comment_text => p_rec.comments
433 );
434
435 /*
436 -- a conflict between payroll form and API
437 -- form generating a new comment_id when the comments being changed
438 -- but API is only updating the new comment_text and not generating
439 -- a new comment_id
440 -- need to be reviewed
441
442 -- old code commented, bcz upd procedure not generating a new comment_id
443 -- when the comment_text is changed
444 -- so, whenever the comment_text is changed then we call this ins proc
445 -- to generate a new comment_id.
446 -- 5144323 / 5609830 starts
447 hr_comm_api.ins(p_comment_id => p_rec.comment_id
448 ,p_source_table_name => 'PAY_ALL_PAYROLLS_F'
449 ,p_comment_text => p_rec.comments
450 );
451 --5144323 / 5609830 ends
452 */ --
453 End If;
454 --
455 dt_pre_update
456 (p_rec => p_rec
457 ,p_effective_date => p_effective_date
458 ,p_datetrack_mode => p_datetrack_mode
459 ,p_validation_start_date => p_validation_start_date
460 ,p_validation_end_date => p_validation_end_date
461 );
462 --
463 hr_utility.set_location(' Leaving:'||l_proc, 10);
464 End pre_update;
465 --
466 -- ----------------------------------------------------------------------------
467 -- |----------------------------< post_update >-------------------------------|
468 -- ----------------------------------------------------------------------------
469 -- {Start Of Comments}
470 --
471 -- Description:
472 -- This private procedure contains any processing which is required after
473 -- the update dml.
474 --
475 -- Prerequisites:
476 -- This is an internal procedure which is called from the upd procedure.
477 --
478 -- In Parameters:
479 -- A Pl/Sql record structure.
480 --
481 -- Post Success:
482 -- Processing continues.
483 --
484 -- Post Failure:
485 -- If an error has occurred, an error message and exception will be raised
486 -- but not handled.
487 --
488 -- Developer Implementation Notes:
489 -- Any post-processing required after the update dml is issued should be
490 -- coded within this procedure. It is important to note that any 3rd party
491 -- maintenance should be reviewed before placing in this procedure.
492 --
493 -- Access Status:
494 -- Internal Row Handler Use Only.
495 --
496 -- {End Of Comments}
497 -- ----------------------------------------------------------------------------
498 Procedure post_update
499 (p_rec in pay_pay_shd.g_rec_type
500 ,p_effective_date in date
501 ,p_datetrack_mode in varchar2
502 ,p_validation_start_date in date
503 ,p_validation_end_date in date
504 ) is
505 --
506 l_proc varchar2(72) := g_package||'post_update';
507 --
508 Begin
509 hr_utility.set_location('Entering:'||l_proc, 5);
510 begin
511 --
512
513
514 -- Copy new payroll_name to all rows for the payroll ie,. this should not be
515 -- datetracked.
516 if p_rec.payroll_name <> pay_pay_shd.g_old_rec.payroll_name then
517 --
518 pay_pay_shd.g_api_dml := true;
519 pay_payrolls_f_pkg.propagate_changes
520 (p_rec.payroll_id,
521 p_rec.payroll_name,
522 null); -- number of years
523 pay_pay_shd.g_api_dml := false;
524 --
525 end if;
526 --
527 -- Extend the number of payroll time periods if the number of years has been
528 -- increased.
529 if p_rec.number_of_years > pay_pay_shd.g_old_rec.number_of_years then
530 --
531 -- copy new number_of_years to all rows for the payroll ie,. this should
532 -- not be datetracked.
533 pay_pay_shd.g_api_dml := true;
534 pay_payrolls_f_pkg.propagate_changes
535 (p_rec.payroll_id,
536 null, -- payroll name
537 p_rec.number_of_years);
538 pay_pay_shd.g_api_dml := false;
539 --
540 /*hr_payrolls.create_payroll_proc_periods
541 (p_rec.payroll_id,
542 null, -- last_update_date
543 null, -- last_updated_by
544 null, -- last_update_login
545 null, -- created_by
546 null, -- creation_date
547 p_effective_date -- effective_date
548 );*/
549 --
550 end if;
551 --
552 -- If default payment method for the payroll has changed then create
553 -- opmu to represent it.
554 if p_rec.default_payment_method_id <> nvl(pay_pay_shd.g_old_rec.default_payment_method_id, 0)
555 and p_rec.default_payment_method_id is not null then
556 --
557 pay_payrolls_f_pkg.maintain_dflt_payment_method
558 (p_rec.payroll_id,
559 p_rec.default_payment_method_id,
560 p_validation_start_date,
561 p_validation_end_date);
562 --
563 end if;
564
565 pay_pay_rku.after_update
566 (p_effective_date => p_effective_date
567 ,p_datetrack_mode => p_datetrack_mode
568 ,p_validation_start_date => p_validation_start_date
569 ,p_validation_end_date => p_validation_end_date
570 ,p_payroll_id => p_rec.payroll_id
571 ,p_effective_start_date => p_rec.effective_start_date
572 ,p_effective_end_date => p_rec.effective_end_date
573 ,p_default_payment_method_id => p_rec.default_payment_method_id
574 ,p_consolidation_set_id => p_rec.consolidation_set_id
575 ,p_cost_allocation_keyflex_id => p_rec.cost_allocation_keyflex_id
576 ,p_suspense_account_keyflex_id => p_rec.suspense_account_keyflex_id
577 ,p_soft_coding_keyflex_id => p_rec.soft_coding_keyflex_id
578 ,p_negative_pay_allowed_flag => p_rec.negative_pay_allowed_flag
579 ,p_number_of_years => p_rec.number_of_years
580 ,p_payroll_name => p_rec.payroll_name
581 ,p_workload_shifting_level => p_rec.workload_shifting_level
582 ,p_comment_id => p_rec.comment_id
583 ,p_comments => p_rec.comments
584 ,p_attribute_category => p_rec.attribute_category
585 ,p_attribute1 => p_rec.attribute1
586 ,p_attribute2 => p_rec.attribute2
587 ,p_attribute3 => p_rec.attribute3
588 ,p_attribute4 => p_rec.attribute4
589 ,p_attribute5 => p_rec.attribute5
590 ,p_attribute6 => p_rec.attribute6
591 ,p_attribute7 => p_rec.attribute7
592 ,p_attribute8 => p_rec.attribute8
593 ,p_attribute9 => p_rec.attribute9
594 ,p_attribute10 => p_rec.attribute10
595 ,p_attribute11 => p_rec.attribute11
596 ,p_attribute12 => p_rec.attribute12
597 ,p_attribute13 => p_rec.attribute13
598 ,p_attribute14 => p_rec.attribute14
599 ,p_attribute15 => p_rec.attribute15
600 ,p_attribute16 => p_rec.attribute16
601 ,p_attribute17 => p_rec.attribute17
602 ,p_attribute18 => p_rec.attribute18
603 ,p_attribute19 => p_rec.attribute19
604 ,p_attribute20 => p_rec.attribute20
605 ,p_arrears_flag => p_rec.arrears_flag
606 ,p_prl_information_category => p_rec.prl_information_category
607 ,p_prl_information1 => p_rec.prl_information1
608 ,p_prl_information2 => p_rec.prl_information2
609 ,p_prl_information3 => p_rec.prl_information3
610 ,p_prl_information4 => p_rec.prl_information4
611 ,p_prl_information5 => p_rec.prl_information5
612 ,p_prl_information6 => p_rec.prl_information6
613 ,p_prl_information7 => p_rec.prl_information7
614 ,p_prl_information8 => p_rec.prl_information8
615 ,p_prl_information9 => p_rec.prl_information9
616 ,p_prl_information10 => p_rec.prl_information10
617 ,p_prl_information11 => p_rec.prl_information11
618 ,p_prl_information12 => p_rec.prl_information12
619 ,p_prl_information13 => p_rec.prl_information13
620 ,p_prl_information14 => p_rec.prl_information14
621 ,p_prl_information15 => p_rec.prl_information15
622 ,p_prl_information16 => p_rec.prl_information16
623 ,p_prl_information17 => p_rec.prl_information17
624 ,p_prl_information18 => p_rec.prl_information18
625 ,p_prl_information19 => p_rec.prl_information19
626 ,p_prl_information20 => p_rec.prl_information20
627 ,p_prl_information21 => p_rec.prl_information21
628 ,p_prl_information22 => p_rec.prl_information22
629 ,p_prl_information23 => p_rec.prl_information23
630 ,p_prl_information24 => p_rec.prl_information24
631 ,p_prl_information25 => p_rec.prl_information25
632 ,p_prl_information26 => p_rec.prl_information26
633 ,p_prl_information27 => p_rec.prl_information27
634 ,p_prl_information28 => p_rec.prl_information28
635 ,p_prl_information29 => p_rec.prl_information29
636 ,p_prl_information30 => p_rec.prl_information30
637 ,p_multi_assignments_flag => p_rec.multi_assignments_flag
638 ,p_object_version_number => p_rec.object_version_number
639 ,p_payslip_view_date_offset => p_rec.payslip_view_date_offset
640 ,p_effective_start_date_o => pay_pay_shd.g_old_rec.effective_start_date
641 ,p_effective_end_date_o => pay_pay_shd.g_old_rec.effective_end_date
642 ,p_default_payment_method_id_o => pay_pay_shd.g_old_rec.default_payment_method_id
643 ,p_business_group_id_o => pay_pay_shd.g_old_rec.business_group_id
644 ,p_consolidation_set_id_o => pay_pay_shd.g_old_rec.consolidation_set_id
645 ,p_cost_allocation_keyflex_id_o => pay_pay_shd.g_old_rec.cost_allocation_keyflex_id
646 ,p_suspense_account_keyflex_i_o => pay_pay_shd.g_old_rec.suspense_account_keyflex_id
647 ,p_gl_set_of_books_id_o => pay_pay_shd.g_old_rec.gl_set_of_books_id
648 ,p_soft_coding_keyflex_id_o => pay_pay_shd.g_old_rec.soft_coding_keyflex_id
649 ,p_period_type_o => pay_pay_shd.g_old_rec.period_type
650 ,p_organization_id_o => pay_pay_shd.g_old_rec.organization_id
651 ,p_cut_off_date_offset_o => pay_pay_shd.g_old_rec.cut_off_date_offset
652 ,p_direct_deposit_date_offset_o => pay_pay_shd.g_old_rec.direct_deposit_date_offset
653 ,p_first_period_end_date_o => pay_pay_shd.g_old_rec.first_period_end_date
654 ,p_negative_pay_allowed_flag_o => pay_pay_shd.g_old_rec.negative_pay_allowed_flag
655 ,p_number_of_years_o => pay_pay_shd.g_old_rec.number_of_years
656 ,p_pay_advice_date_offset_o => pay_pay_shd.g_old_rec.pay_advice_date_offset
657 ,p_pay_date_offset_o => pay_pay_shd.g_old_rec.pay_date_offset
658 ,p_payroll_name_o => pay_pay_shd.g_old_rec.payroll_name
659 ,p_workload_shifting_level_o => pay_pay_shd.g_old_rec.workload_shifting_level
660 ,p_comment_id_o => pay_pay_shd.g_old_rec.comment_id
661 ,p_comments_o => pay_pay_shd.g_old_rec.comments
662 ,p_midpoint_offset_o => pay_pay_shd.g_old_rec.midpoint_offset
663 ,p_attribute_category_o => pay_pay_shd.g_old_rec.attribute_category
664 ,p_attribute1_o => pay_pay_shd.g_old_rec.attribute1
665 ,p_attribute2_o => pay_pay_shd.g_old_rec.attribute2
666 ,p_attribute3_o => pay_pay_shd.g_old_rec.attribute3
667 ,p_attribute4_o => pay_pay_shd.g_old_rec.attribute4
668 ,p_attribute5_o => pay_pay_shd.g_old_rec.attribute5
669 ,p_attribute6_o => pay_pay_shd.g_old_rec.attribute6
670 ,p_attribute7_o => pay_pay_shd.g_old_rec.attribute7
671 ,p_attribute8_o => pay_pay_shd.g_old_rec.attribute8
672 ,p_attribute9_o => pay_pay_shd.g_old_rec.attribute9
673 ,p_attribute10_o => pay_pay_shd.g_old_rec.attribute10
674 ,p_attribute11_o => pay_pay_shd.g_old_rec.attribute11
675 ,p_attribute12_o => pay_pay_shd.g_old_rec.attribute12
676 ,p_attribute13_o => pay_pay_shd.g_old_rec.attribute13
677 ,p_attribute14_o => pay_pay_shd.g_old_rec.attribute14
678 ,p_attribute15_o => pay_pay_shd.g_old_rec.attribute15
679 ,p_attribute16_o => pay_pay_shd.g_old_rec.attribute16
680 ,p_attribute17_o => pay_pay_shd.g_old_rec.attribute17
681 ,p_attribute18_o => pay_pay_shd.g_old_rec.attribute18
682 ,p_attribute19_o => pay_pay_shd.g_old_rec.attribute19
683 ,p_attribute20_o => pay_pay_shd.g_old_rec.attribute20
684 ,p_arrears_flag_o => pay_pay_shd.g_old_rec.arrears_flag
685 ,p_payroll_type_o => pay_pay_shd.g_old_rec.payroll_type
686 ,p_prl_information_category_o => pay_pay_shd.g_old_rec.prl_information_category
687 ,p_prl_information1_o => pay_pay_shd.g_old_rec.prl_information1
688 ,p_prl_information2_o => pay_pay_shd.g_old_rec.prl_information2
689 ,p_prl_information3_o => pay_pay_shd.g_old_rec.prl_information3
690 ,p_prl_information4_o => pay_pay_shd.g_old_rec.prl_information4
691 ,p_prl_information5_o => pay_pay_shd.g_old_rec.prl_information5
692 ,p_prl_information6_o => pay_pay_shd.g_old_rec.prl_information6
693 ,p_prl_information7_o => pay_pay_shd.g_old_rec.prl_information7
694 ,p_prl_information8_o => pay_pay_shd.g_old_rec.prl_information8
695 ,p_prl_information9_o => pay_pay_shd.g_old_rec.prl_information9
696 ,p_prl_information10_o => pay_pay_shd.g_old_rec.prl_information10
697 ,p_prl_information11_o => pay_pay_shd.g_old_rec.prl_information11
698 ,p_prl_information12_o => pay_pay_shd.g_old_rec.prl_information12
699 ,p_prl_information13_o => pay_pay_shd.g_old_rec.prl_information13
700 ,p_prl_information14_o => pay_pay_shd.g_old_rec.prl_information14
701 ,p_prl_information15_o => pay_pay_shd.g_old_rec.prl_information15
702 ,p_prl_information16_o => pay_pay_shd.g_old_rec.prl_information16
703 ,p_prl_information17_o => pay_pay_shd.g_old_rec.prl_information17
704 ,p_prl_information18_o => pay_pay_shd.g_old_rec.prl_information18
705 ,p_prl_information19_o => pay_pay_shd.g_old_rec.prl_information19
706 ,p_prl_information20_o => pay_pay_shd.g_old_rec.prl_information20
707 ,p_prl_information21_o => pay_pay_shd.g_old_rec.prl_information21
708 ,p_prl_information22_o => pay_pay_shd.g_old_rec.prl_information22
709 ,p_prl_information23_o => pay_pay_shd.g_old_rec.prl_information23
710 ,p_prl_information24_o => pay_pay_shd.g_old_rec.prl_information24
711 ,p_prl_information25_o => pay_pay_shd.g_old_rec.prl_information25
712 ,p_prl_information26_o => pay_pay_shd.g_old_rec.prl_information26
713 ,p_prl_information27_o => pay_pay_shd.g_old_rec.prl_information27
714 ,p_prl_information28_o => pay_pay_shd.g_old_rec.prl_information28
715 ,p_prl_information29_o => pay_pay_shd.g_old_rec.prl_information29
716 ,p_prl_information30_o => pay_pay_shd.g_old_rec.prl_information30
717 ,p_multi_assignments_flag_o => pay_pay_shd.g_old_rec.multi_assignments_flag
718 ,p_period_reset_years_o => pay_pay_shd.g_old_rec.period_reset_years
719 ,p_object_version_number_o => pay_pay_shd.g_old_rec.object_version_number
720 ,p_payslip_view_date_offset_o => pay_pay_shd.g_old_rec.payslip_view_date_offset
721 );
722 --
723 exception
724 --
725 when hr_api.cannot_find_prog_unit then
726 --
727 hr_api.cannot_find_prog_unit_error
728 (p_module_name => 'PAY_ALL_PAYROLLS_F'
729 ,p_hook_type => 'AU');
730 --
731 end;
732 --
733 hr_utility.set_location(' Leaving:'||l_proc, 10);
734 --
735 End post_update;
736 --
737 -- ----------------------------------------------------------------------------
738 -- |-----------------------------< convert_defs >-----------------------------|
739 -- ----------------------------------------------------------------------------
740 -- {Start Of Comments}
741 --
742 -- Description:
743 -- The Convert_Defs procedure has one very important function:
744 -- It must return the record structure for the row with all system defaulted
745 -- values converted into its corresponding parameter value for update. When
746 -- we attempt to update a row through the Upd process , certain
747 -- parameters can be defaulted which enables flexibility in the calling of
748 -- the upd process (e.g. only attributes which need to be updated need to be
749 -- specified). For the upd process to determine which attributes
750 -- have NOT been specified we need to check if the parameter has a reserved
751 -- system default value. Therefore, for all parameters which have a
752 -- corresponding reserved system default mechanism specified we need to
753 -- check if a system default is being used. If a system default is being
754 -- used then we convert the defaulted value into its corresponding attribute
755 -- value held in the g_old_rec data structure.
756 --
757 -- Prerequisites:
758 -- This private function can only be called from the upd process.
759 --
760 -- In Parameters:
761 -- A Pl/Sql record structure.
762 --
763 -- Post Success:
764 -- The record structure will be returned with all system defaulted parameter
765 -- values converted into its current row attribute value.
766 --
767 -- Post Failure:
768 -- No direct error handling is required within this function. Any possible
769 -- errors within this procedure will be a PL/SQL value error due to
770 -- conversion of datatypes or data lengths.
771 --
772 -- Developer Implementation Notes:
773 -- None.
774 --
775 -- Access Status:
776 -- Internal Row Handler Use Only.
777 --
778 -- {End Of Comments}
779 -- ----------------------------------------------------------------------------
780 Procedure convert_defs
781 (p_rec in out nocopy pay_pay_shd.g_rec_type
782 ) is
783 --
784 Begin
785 --
786 -- We must now examine each argument value in the
787 -- p_rec plsql record structure
788 -- to see if a system default is being used. If a system default
789 -- is being used then we must set to the 'current' argument value.
790 --
791 If (p_rec.default_payment_method_id = hr_api.g_number) then
792 --
793 p_rec.default_payment_method_id :=
794 pay_pay_shd.g_old_rec.default_payment_method_id;
795 --
796 End If;
797 --
798 If (p_rec.business_group_id = hr_api.g_number) then
799 --
800 p_rec.business_group_id := pay_pay_shd.g_old_rec.business_group_id;
801 --
802 End if;
803 --
804 If (p_rec.consolidation_set_id = hr_api.g_number) then
805 --
806 p_rec.consolidation_set_id := pay_pay_shd.g_old_rec.consolidation_set_id;
807 --
808 End If;
809 --
810 If (p_rec.cost_allocation_keyflex_id = hr_api.g_number) then
811 --
812 p_rec.cost_allocation_keyflex_id :=
813 pay_pay_shd.g_old_rec.cost_allocation_keyflex_id;
814 --
815 End If;
816 --
817 If (p_rec.suspense_account_keyflex_id = hr_api.g_number) then
818 --
819 p_rec.suspense_account_keyflex_id :=
820 pay_pay_shd.g_old_rec.suspense_account_keyflex_id;
821 --
822 End If;
823 --
824 If (p_rec.gl_set_of_books_id = hr_api.g_number) then
825 --
826 p_rec.gl_set_of_books_id :=
827 pay_pay_shd.g_old_rec.gl_set_of_books_id;
828 --
829 End If;
830 --
831 If (p_rec.soft_coding_keyflex_id = hr_api.g_number) then
832 --
833 p_rec.soft_coding_keyflex_id :=
834 pay_pay_shd.g_old_rec.soft_coding_keyflex_id;
835 --
836 End If;
837 --
838 If (p_rec.period_type = hr_api.g_varchar2) then
839 --
840 p_rec.period_type :=
841 pay_pay_shd.g_old_rec.period_type;
842 --
843 End If;
844 --
845 If (p_rec.organization_id = hr_api.g_number) then
846 --
847 p_rec.organization_id := pay_pay_shd.g_old_rec.organization_id;
848 --
849 End If;
850 --
851 If (p_rec.cut_off_date_offset = hr_api.g_number) then
852 --
853 p_rec.cut_off_date_offset := pay_pay_shd.g_old_rec.cut_off_date_offset;
854 --
855 End If;
856 --
857 If (p_rec.direct_deposit_date_offset = hr_api.g_number) then
858 --
859 p_rec.direct_deposit_date_offset :=
860 pay_pay_shd.g_old_rec.direct_deposit_date_offset;
861 --
862 End If;
863 --
864 If (p_rec.first_period_end_date = hr_api.g_date) then
865 --
866 p_rec.first_period_end_date :=
867 pay_pay_shd.g_old_rec.first_period_end_date;
868 --
869 End If;
870 If (p_rec.negative_pay_allowed_flag = hr_api.g_varchar2) then
871 --
872 p_rec.negative_pay_allowed_flag :=
873 pay_pay_shd.g_old_rec.negative_pay_allowed_flag;
874 --
875 End If;
876 If (p_rec.number_of_years = hr_api.g_number) then
877 --
878 p_rec.number_of_years := pay_pay_shd.g_old_rec.number_of_years;
879 --
880 End If;
881 --
882 If (p_rec.pay_advice_date_offset = hr_api.g_number) then
883 --
884 p_rec.pay_advice_date_offset :=
885 pay_pay_shd.g_old_rec.pay_advice_date_offset;
886 --
887 End If;
888 --
889 If (p_rec.pay_date_offset = hr_api.g_number) then
890 --
891 p_rec.pay_date_offset := pay_pay_shd.g_old_rec.pay_date_offset;
892 --
893 End If;
894 --
895 If (p_rec.payroll_name = hr_api.g_varchar2) then
896 --
897 p_rec.payroll_name := pay_pay_shd.g_old_rec.payroll_name;
898 --
899 End If;
900 --
901 If (p_rec.workload_shifting_level = hr_api.g_varchar2) then
902 --
903 p_rec.workload_shifting_level :=
904 pay_pay_shd.g_old_rec.workload_shifting_level;
905 --
906 End If;
907 --
908 If (p_rec.comment_id = hr_api.g_number) then
909 --
910 p_rec.comment_id := pay_pay_shd.g_old_rec.comment_id;
911 --
912 End If;
913 --
914 If (p_rec.comments = hr_api.g_varchar2) then
915 --
916 p_rec.comments := pay_pay_shd.g_old_rec.comments;
917 --
918 End If;
919 --
920 If (p_rec.midpoint_offset = hr_api.g_number) then
921 --
922 p_rec.midpoint_offset := pay_pay_shd.g_old_rec.midpoint_offset;
923 --
924 End If;
925 --
926 If (p_rec.attribute_category = hr_api.g_varchar2) then
927 --
928 p_rec.attribute_category := pay_pay_shd.g_old_rec.attribute_category;
929 --
930 End If;
931 --
932 If (p_rec.attribute1 = hr_api.g_varchar2) then
933 --
934 p_rec.attribute1 := pay_pay_shd.g_old_rec.attribute1;
935 --
936 End If;
937 --
938 If (p_rec.attribute2 = hr_api.g_varchar2) then
939 --
940 p_rec.attribute2 := pay_pay_shd.g_old_rec.attribute2;
941 --
942 End If;
943 --
944 If (p_rec.attribute3 = hr_api.g_varchar2) then
945 --
946 p_rec.attribute3 := pay_pay_shd.g_old_rec.attribute3;
947 --
948 End If;
949 --
950 If (p_rec.attribute4 = hr_api.g_varchar2) then
951 --
952 p_rec.attribute4 := pay_pay_shd.g_old_rec.attribute4;
953 --
954 End If;
955 --
956 If (p_rec.attribute5 = hr_api.g_varchar2) then
957 --
958 p_rec.attribute5 := pay_pay_shd.g_old_rec.attribute5;
959 --
960 End If;
961 --
962 If (p_rec.attribute6 = hr_api.g_varchar2) then
963 --
964 p_rec.attribute6 := pay_pay_shd.g_old_rec.attribute6;
965 --
966 End If;
967 --
968 If (p_rec.attribute7 = hr_api.g_varchar2) then
969 --
970 p_rec.attribute7 := pay_pay_shd.g_old_rec.attribute7;
971 --
972 End If;
973 --
974 If (p_rec.attribute8 = hr_api.g_varchar2) then
975 --
976 p_rec.attribute8 := pay_pay_shd.g_old_rec.attribute8;
977 --
978 End If;
979 --
980 If (p_rec.attribute9 = hr_api.g_varchar2) then
981 --
982 p_rec.attribute9 := pay_pay_shd.g_old_rec.attribute9;
983 --
984 End If;
985 --
986 If (p_rec.attribute10 = hr_api.g_varchar2) then
987 --
988 p_rec.attribute10 := pay_pay_shd.g_old_rec.attribute10;
989 --
990 End If;
991 --
992 If (p_rec.attribute11 = hr_api.g_varchar2) then
993 --
994 p_rec.attribute11 := pay_pay_shd.g_old_rec.attribute11;
995 --
996 End If;
997 --
998 If (p_rec.attribute12 = hr_api.g_varchar2) then
999 --
1000 p_rec.attribute12 := pay_pay_shd.g_old_rec.attribute12;
1001 --
1002 End If;
1003 --
1004 If (p_rec.attribute13 = hr_api.g_varchar2) then
1005 --
1006 p_rec.attribute13 := pay_pay_shd.g_old_rec.attribute13;
1007 --
1008 End If;
1009 --
1010 If (p_rec.attribute14 = hr_api.g_varchar2) then
1011 --
1012 p_rec.attribute14 := pay_pay_shd.g_old_rec.attribute14;
1013 --
1014 End If;
1015 --
1016 If (p_rec.attribute15 = hr_api.g_varchar2) then
1017 --
1018 p_rec.attribute15 := pay_pay_shd.g_old_rec.attribute15;
1019 --
1020 End If;
1021 --
1022 If (p_rec.attribute16 = hr_api.g_varchar2) then
1023 --
1024 p_rec.attribute16 := pay_pay_shd.g_old_rec.attribute16;
1025 --
1026 End If;
1027 If (p_rec.attribute17 = hr_api.g_varchar2) then
1028 --
1029 p_rec.attribute17 := pay_pay_shd.g_old_rec.attribute17;
1030 --
1031 End If;
1032 --
1033 If (p_rec.attribute18 = hr_api.g_varchar2) then
1034 --
1035 p_rec.attribute18 := pay_pay_shd.g_old_rec.attribute18;
1036 --
1037 End If;
1038 --
1039 If (p_rec.attribute19 = hr_api.g_varchar2) then
1040 --
1041 p_rec.attribute19 := pay_pay_shd.g_old_rec.attribute19;
1042 --
1043 End If;
1044 --
1045 If (p_rec.attribute20 = hr_api.g_varchar2) then
1046 --
1047 p_rec.attribute20 := pay_pay_shd.g_old_rec.attribute20;
1048 --
1049 End If;
1050 --
1051 If (p_rec.arrears_flag = hr_api.g_varchar2) then
1052 --
1053 p_rec.arrears_flag := pay_pay_shd.g_old_rec.arrears_flag;
1054 --
1055 End If;
1056 --
1057 If (p_rec.payroll_type = hr_api.g_varchar2) then
1058 --
1059 p_rec.payroll_type := pay_pay_shd.g_old_rec.payroll_type;
1060 --
1061 End If;
1062 --
1063 If (p_rec.prl_information_category = hr_api.g_varchar2) then
1064 --
1065 p_rec.prl_information_category :=
1066 pay_pay_shd.g_old_rec.prl_information_category;
1067 --
1068 End If;
1069 --
1070 If (p_rec.prl_information1 = hr_api.g_varchar2) then
1071 --
1072 p_rec.prl_information1 := pay_pay_shd.g_old_rec.prl_information1;
1073 --
1074 End If;
1075 --
1076 If (p_rec.prl_information2 = hr_api.g_varchar2) then
1077 --
1078 p_rec.prl_information2 := pay_pay_shd.g_old_rec.prl_information2;
1079 --
1080 End If;
1081 --
1082 If (p_rec.prl_information3 = hr_api.g_varchar2) then
1083 --
1084 p_rec.prl_information3 := pay_pay_shd.g_old_rec.prl_information3;
1085 --
1086 End If;
1087 --
1088 If (p_rec.prl_information4 = hr_api.g_varchar2) then
1089 --
1090 p_rec.prl_information4 := pay_pay_shd.g_old_rec.prl_information4;
1091 --
1092 End If;
1093 --
1094 If (p_rec.prl_information5 = hr_api.g_varchar2) then
1095 --
1096 p_rec.prl_information5 := pay_pay_shd.g_old_rec.prl_information5;
1097 --
1098 End If;
1099 --
1100 If (p_rec.prl_information6 = hr_api.g_varchar2) then
1101 --
1102 p_rec.prl_information6 := pay_pay_shd.g_old_rec.prl_information6;
1103 --
1104 End If;
1105 --
1106 If (p_rec.prl_information7 = hr_api.g_varchar2) then
1107 --
1108 p_rec.prl_information7 := pay_pay_shd.g_old_rec.prl_information7;
1109 --
1110 End If;
1111 If (p_rec.prl_information8 = hr_api.g_varchar2) then
1112 --
1113 p_rec.prl_information8 := pay_pay_shd.g_old_rec.prl_information8;
1114 --
1115 End If;
1116 --
1117 If (p_rec.prl_information9 = hr_api.g_varchar2) then
1118 --
1119 p_rec.prl_information9 := pay_pay_shd.g_old_rec.prl_information9;
1120 --
1121 End If;
1122 --
1123 If (p_rec.prl_information10 = hr_api.g_varchar2) then
1124 --
1125 p_rec.prl_information10 := pay_pay_shd.g_old_rec.prl_information10;
1126 --
1127 End If;
1128 --
1129 If (p_rec.prl_information11 = hr_api.g_varchar2) then
1130 --
1131 p_rec.prl_information11 := pay_pay_shd.g_old_rec.prl_information11;
1132 --
1133 End If;
1134 --
1135 If (p_rec.prl_information12 = hr_api.g_varchar2) then
1136 --
1137 p_rec.prl_information12 := pay_pay_shd.g_old_rec.prl_information12;
1138 --
1139 End If;
1140 --
1141 If (p_rec.prl_information13 = hr_api.g_varchar2) then
1142 --
1143 p_rec.prl_information13 := pay_pay_shd.g_old_rec.prl_information13;
1144 --
1145 End If;
1146 --
1147 If (p_rec.prl_information14 = hr_api.g_varchar2) then
1148 --
1149 p_rec.prl_information14 := pay_pay_shd.g_old_rec.prl_information14;
1150 --
1151 End If;
1152 --
1153 If (p_rec.prl_information15 = hr_api.g_varchar2) then
1154 --
1155 p_rec.prl_information15 := pay_pay_shd.g_old_rec.prl_information15;
1156 --
1157 End If;
1158 --
1159 If (p_rec.prl_information16 = hr_api.g_varchar2) then
1160 --
1161 p_rec.prl_information16 := pay_pay_shd.g_old_rec.prl_information16;
1162 --
1163 End If;
1164 --
1165 If (p_rec.prl_information17 = hr_api.g_varchar2) then
1166 --
1167 p_rec.prl_information17 := pay_pay_shd.g_old_rec.prl_information17;
1168 --
1169 End If;
1170 --
1171 If (p_rec.prl_information18 = hr_api.g_varchar2) then
1172 --
1173 p_rec.prl_information18 := pay_pay_shd.g_old_rec.prl_information18;
1174 --
1175 End If;
1176 --
1177 If (p_rec.prl_information19 = hr_api.g_varchar2) then
1178 --
1179 p_rec.prl_information19 := pay_pay_shd.g_old_rec.prl_information19;
1180 --
1181 End If;
1182 --
1183 If (p_rec.prl_information20 = hr_api.g_varchar2) then
1184 --
1185 p_rec.prl_information20 := pay_pay_shd.g_old_rec.prl_information20;
1186 --
1187 End If;
1188 --
1189 If (p_rec.prl_information21 = hr_api.g_varchar2) then
1190 --
1191 p_rec.prl_information21 := pay_pay_shd.g_old_rec.prl_information21;
1192 --
1193 End If;
1194 --
1195 If (p_rec.prl_information22 = hr_api.g_varchar2) then
1196 --
1197 p_rec.prl_information22 := pay_pay_shd.g_old_rec.prl_information22;
1198 --
1199 End If;
1200 --
1201 If (p_rec.prl_information23 = hr_api.g_varchar2) then
1202 --
1203 p_rec.prl_information23 := pay_pay_shd.g_old_rec.prl_information23;
1204 --
1205 End If;
1206 --
1207 If (p_rec.prl_information24 = hr_api.g_varchar2) then
1208 --
1209 p_rec.prl_information24 := pay_pay_shd.g_old_rec.prl_information24;
1210 --
1211 End If;
1212 --
1213 If (p_rec.prl_information25 = hr_api.g_varchar2) then
1214 --
1215 p_rec.prl_information25 := pay_pay_shd.g_old_rec.prl_information25;
1216 --
1217 End If;
1218 --
1219 If (p_rec.prl_information26 = hr_api.g_varchar2) then
1220 --
1221 p_rec.prl_information26 := pay_pay_shd.g_old_rec.prl_information26;
1222 --
1223 End If;
1224 --
1225 If (p_rec.prl_information27 = hr_api.g_varchar2) then
1226 --
1227 p_rec.prl_information27 := pay_pay_shd.g_old_rec.prl_information27;
1228 --
1229 End If;
1230 --
1231 If (p_rec.prl_information28 = hr_api.g_varchar2) then
1232 --
1233 p_rec.prl_information28 := pay_pay_shd.g_old_rec.prl_information28;
1234 --
1235 End If;
1236 --
1237 If (p_rec.prl_information29 = hr_api.g_varchar2) then
1238 --
1239 p_rec.prl_information29 := pay_pay_shd.g_old_rec.prl_information29;
1240 --
1241 End If;
1242 --
1243 If (p_rec.prl_information30 = hr_api.g_varchar2) then
1244 --
1245 p_rec.prl_information30 := pay_pay_shd.g_old_rec.prl_information30;
1246 --
1247 End If;
1248 --
1249 If (p_rec.multi_assignments_flag = hr_api.g_varchar2) then
1250 --
1251 p_rec.multi_assignments_flag := pay_pay_shd.g_old_rec.multi_assignments_flag;
1252 --
1253 End If;
1254 --
1255 If (p_rec.period_reset_years = hr_api.g_varchar2) then
1256 --
1257 p_rec.period_reset_years := pay_pay_shd.g_old_rec.period_reset_years;
1258 --
1259 End If;
1260 --
1261 IF (p_rec.payslip_view_date_offset = hr_api.g_number) then
1262 --
1263 p_rec.payslip_view_date_offset := pay_pay_shd.g_old_rec.payslip_view_date_offset;
1264 --
1265 End If;
1266 --
1267 End convert_defs;
1268
1269 -- ----------------------------------------------------------------------------
1270 -- |---------------------------------< upd >----------------------------------|
1271 -- ----------------------------------------------------------------------------
1272 Procedure upd
1273 (p_effective_date in date
1274 ,p_datetrack_mode in varchar2
1275 ,p_rec in out nocopy pay_pay_shd.g_rec_type
1276 ) is
1277 --
1278 l_proc varchar2(72) := g_package||'upd';
1279 l_validation_start_date date;
1280 l_validation_end_date date;
1281 l_rec pay_pay_shd.g_rec_type := p_rec;
1282 --
1283 Begin
1284 hr_utility.set_location('Entering:'||l_proc, 5);
1285 --
1286 -- Ensure that the DateTrack update mode is valid
1287 --
1288 dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
1289 --
1290 -- We must lock the row which we need to update.
1291 --
1292
1293 pay_pay_shd.lck
1294 (p_effective_date => p_effective_date
1295 ,p_datetrack_mode => p_datetrack_mode
1296 ,p_payroll_id => l_rec.payroll_id
1297 ,p_object_version_number => l_rec.object_version_number
1298 ,p_validation_start_date => l_validation_start_date
1299 ,p_validation_end_date => l_validation_end_date
1300 );
1301 --
1302 -- 1. During an update system defaults are used to determine if
1303 -- arguments have been defaulted or not. We must therefore
1304 -- derive the full record structure values to be updated.
1305 --
1306 -- 2. Call the supporting update validate operations.
1307 --
1308 pay_pay_upd.convert_defs(l_rec);
1309 --
1310 pay_pay_bus.update_validate
1311 (p_rec => l_rec
1312 ,p_effective_date => p_effective_date
1313 ,p_datetrack_mode => p_datetrack_mode
1314 ,p_validation_start_date => l_validation_start_date
1315 ,p_validation_end_date => l_validation_end_date
1316 );
1317 --
1318 -- Call to raise any errors on multi-message list
1319 hr_multi_message.end_validation_set;
1320 --
1321 -- Call the supporting pre-update operation
1322 --
1323 pre_update
1324 (p_rec => l_rec
1325 ,p_effective_date => p_effective_date
1326 ,p_datetrack_mode => p_datetrack_mode
1327 ,p_validation_start_date => l_validation_start_date
1328 ,p_validation_end_date => l_validation_end_date
1329 );
1330 --
1331 -- Update the row.
1332 --
1333 update_dml
1334 (p_rec => l_rec
1335 ,p_effective_date => p_effective_date
1336 ,p_datetrack_mode => p_datetrack_mode
1337 ,p_validation_start_date => l_validation_start_date
1338 ,p_validation_end_date => l_validation_end_date
1339 );
1340 --
1341 -- Call the supporting post-update operation
1342 --
1343 post_update
1344 (p_rec => l_rec
1345 ,p_effective_date => p_effective_date
1346 ,p_datetrack_mode => p_datetrack_mode
1347 ,p_validation_start_date => l_validation_start_date
1348 ,p_validation_end_date => l_validation_end_date
1349 );
1350
1351 p_rec.payroll_id := l_rec.payroll_id;
1352 p_rec.object_version_number := l_rec.object_version_number;
1353 p_rec.effective_start_date := l_rec.effective_start_date;
1354 p_rec.effective_end_date := l_rec.effective_end_date;
1355 -- bug 5609830 / 5144323
1356 -- added to return the new comment_id to the called proc
1357 -- a conflict between payroll form and API
1358 -- form generating a new comment_id when the comments being changed
1359 -- but API is only updating the new comment_text and not generating
1360 -- a new comment_id
1361 -- need to be reviewed
1362 --
1363 p_rec.comment_id := l_rec.comment_id;
1364 --
1365 --
1366 -- Call to raise any errors on multi-message list
1367 hr_multi_message.end_validation_set;
1368 End upd;
1369 --
1370 -- ----------------------------------------------------------------------------
1371 -- |------------------------------< upd >-------------------------------------|
1372 -- ----------------------------------------------------------------------------
1373 Procedure upd
1374 (p_effective_date in date
1375 ,p_datetrack_mode in varchar2
1376 ,p_consolidation_set_id in number default hr_api.g_number
1377 ,p_period_type in varchar2 default hr_api.g_varchar2
1378 ,p_cut_off_date_offset in number default hr_api.g_number
1379 ,p_direct_deposit_date_offset in number default hr_api.g_number
1380 ,p_first_period_end_date in date default hr_api.g_date
1381 ,p_negative_pay_allowed_flag in varchar2 default hr_api.g_varchar2
1382 ,p_number_of_years in number default hr_api.g_number
1383 ,p_pay_advice_date_offset in number default hr_api.g_number
1384 ,p_pay_date_offset in number default hr_api.g_number
1385 ,p_payroll_name in varchar2 default hr_api.g_varchar2
1386 ,p_workload_shifting_level in varchar2 default hr_api.g_varchar2
1387 ,p_default_payment_method_id in number default hr_api.g_number
1388 ,p_cost_allocation_keyflex_id in number default hr_api.g_number
1389 ,p_suspense_account_keyflex_id in number default hr_api.g_number
1390 ,p_gl_set_of_books_id in number default hr_api.g_number
1391 ,p_soft_coding_keyflex_id in number default hr_api.g_number
1392 ,p_organization_id in number default hr_api.g_number
1393 ,p_comments in varchar2 default hr_api.g_varchar2
1394 ,p_midpoint_offset in number default hr_api.g_number
1395 ,p_attribute_category in varchar2 default hr_api.g_varchar2
1396 ,p_attribute1 in varchar2 default hr_api.g_varchar2
1397 ,p_attribute2 in varchar2 default hr_api.g_varchar2
1398 ,p_attribute3 in varchar2 default hr_api.g_varchar2
1399 ,p_attribute4 in varchar2 default hr_api.g_varchar2
1400 ,p_attribute5 in varchar2 default hr_api.g_varchar2
1401 ,p_attribute6 in varchar2 default hr_api.g_varchar2
1402 ,p_attribute7 in varchar2 default hr_api.g_varchar2
1403 ,p_attribute8 in varchar2 default hr_api.g_varchar2
1404 ,p_attribute9 in varchar2 default hr_api.g_varchar2
1405 ,p_attribute10 in varchar2 default hr_api.g_varchar2
1406 ,p_attribute11 in varchar2 default hr_api.g_varchar2
1407 ,p_attribute12 in varchar2 default hr_api.g_varchar2
1408 ,p_attribute13 in varchar2 default hr_api.g_varchar2
1409 ,p_attribute14 in varchar2 default hr_api.g_varchar2
1410 ,p_attribute15 in varchar2 default hr_api.g_varchar2
1411 ,p_attribute16 in varchar2 default hr_api.g_varchar2
1412 ,p_attribute17 in varchar2 default hr_api.g_varchar2
1413 ,p_attribute18 in varchar2 default hr_api.g_varchar2
1414 ,p_attribute19 in varchar2 default hr_api.g_varchar2
1415 ,p_attribute20 in varchar2 default hr_api.g_varchar2
1416 ,p_arrears_flag in varchar2 default hr_api.g_varchar2
1417 ,p_payroll_type in varchar2 default hr_api.g_varchar2
1418 ,p_prl_information_category in varchar2 default hr_api.g_varchar2
1419 ,p_prl_information1 in varchar2 default hr_api.g_varchar2
1420 ,p_prl_information2 in varchar2 default hr_api.g_varchar2
1421 ,p_prl_information3 in varchar2 default hr_api.g_varchar2
1422 ,p_prl_information4 in varchar2 default hr_api.g_varchar2
1423 ,p_prl_information5 in varchar2 default hr_api.g_varchar2
1424 ,p_prl_information6 in varchar2 default hr_api.g_varchar2
1425 ,p_prl_information7 in varchar2 default hr_api.g_varchar2
1426 ,p_prl_information8 in varchar2 default hr_api.g_varchar2
1427 ,p_prl_information9 in varchar2 default hr_api.g_varchar2
1428 ,p_prl_information10 in varchar2 default hr_api.g_varchar2
1429 ,p_prl_information11 in varchar2 default hr_api.g_varchar2
1430 ,p_prl_information12 in varchar2 default hr_api.g_varchar2
1431 ,p_prl_information13 in varchar2 default hr_api.g_varchar2
1432 ,p_prl_information14 in varchar2 default hr_api.g_varchar2
1433 ,p_prl_information15 in varchar2 default hr_api.g_varchar2
1434 ,p_prl_information16 in varchar2 default hr_api.g_varchar2
1435 ,p_prl_information17 in varchar2 default hr_api.g_varchar2
1436 ,p_prl_information18 in varchar2 default hr_api.g_varchar2
1437 ,p_prl_information19 in varchar2 default hr_api.g_varchar2
1438 ,p_prl_information20 in varchar2 default hr_api.g_varchar2
1439 ,p_prl_information21 in varchar2 default hr_api.g_varchar2
1440 ,p_prl_information22 in varchar2 default hr_api.g_varchar2
1441 ,p_prl_information23 in varchar2 default hr_api.g_varchar2
1442 ,p_prl_information24 in varchar2 default hr_api.g_varchar2
1443 ,p_prl_information25 in varchar2 default hr_api.g_varchar2
1444 ,p_prl_information26 in varchar2 default hr_api.g_varchar2
1445 ,p_prl_information27 in varchar2 default hr_api.g_varchar2
1446 ,p_prl_information28 in varchar2 default hr_api.g_varchar2
1447 ,p_prl_information29 in varchar2 default hr_api.g_varchar2
1448 ,p_prl_information30 in varchar2 default hr_api.g_varchar2
1449 ,p_multi_assignments_flag in varchar2 default hr_api.g_varchar2
1450 ,p_period_reset_years in varchar2 default hr_api.g_varchar2
1451
1452 ,p_payslip_view_date_offset in number default hr_api.g_number
1453 ,p_payroll_id in out nocopy number -- Added 'out'.
1454 ,p_object_version_number in out nocopy number
1455
1456 ,p_effective_start_date out nocopy date
1457 ,p_effective_end_date out nocopy date
1458 ,p_comment_id out nocopy number
1459 ) is
1460 --
1461 l_rec pay_pay_shd.g_rec_type;
1462 l_proc varchar2(72) := g_package||'upd';
1463 --
1464 Begin
1465 hr_utility.set_location('Entering:'||l_proc, 5);
1466 --
1467 -- Call conversion function to turn arguments into the
1468 -- l_rec structure.
1469 --
1470 l_rec :=
1471 pay_pay_shd.convert_args
1472 (p_payroll_id
1473 ,null
1474 ,null
1475 ,p_default_payment_method_id
1476 ,hr_api.g_number
1477 ,p_consolidation_set_id
1478 ,p_cost_allocation_keyflex_id
1479 ,p_suspense_account_keyflex_id
1480 ,p_gl_set_of_books_id
1481 ,p_soft_coding_keyflex_id
1482 ,p_period_type
1483 ,p_organization_id
1484 ,p_cut_off_date_offset
1485 ,p_direct_deposit_date_offset
1486 ,p_first_period_end_date
1487 ,p_negative_pay_allowed_flag
1488 ,p_number_of_years
1489 ,p_pay_advice_date_offset
1490 ,p_pay_date_offset
1491 ,p_payroll_name
1492 ,p_workload_shifting_level
1493 ,hr_api.g_number
1494 ,p_comments
1495 ,p_midpoint_offset
1496 ,p_attribute_category
1497 ,p_attribute1
1498 ,p_attribute2
1499 ,p_attribute3
1500 ,p_attribute4
1501 ,p_attribute5
1502 ,p_attribute6
1503 ,p_attribute7
1504 ,p_attribute8
1505 ,p_attribute9
1506 ,p_attribute10
1507 ,p_attribute11
1508 ,p_attribute12
1509 ,p_attribute13
1510 ,p_attribute14
1511 ,p_attribute15
1512 ,p_attribute16
1513 ,p_attribute17
1514 ,p_attribute18
1515 ,p_attribute19
1516 ,p_attribute20
1517 ,p_arrears_flag
1518 ,p_payroll_type
1519 ,p_prl_information_category
1520 ,p_prl_information1
1521 ,p_prl_information2
1522 ,p_prl_information3
1523 ,p_prl_information4
1524 ,p_prl_information5
1525 ,p_prl_information6
1526 ,p_prl_information7
1527 ,p_prl_information8
1528 ,p_prl_information9
1529 ,p_prl_information10
1530 ,p_prl_information11
1531 ,p_prl_information12
1532 ,p_prl_information13
1533 ,p_prl_information14
1534 ,p_prl_information15
1535 ,p_prl_information16
1536 ,p_prl_information17
1537 ,p_prl_information18
1538 ,p_prl_information19
1539 ,p_prl_information20
1540 ,p_prl_information21
1541 ,p_prl_information22
1542 ,p_prl_information23
1543 ,p_prl_information24
1544 ,p_prl_information25
1545 ,p_prl_information26
1546 ,p_prl_information27
1547 ,p_prl_information28
1548 ,p_prl_information29
1549 ,p_prl_information30
1550 ,p_multi_assignments_flag
1551 ,p_period_reset_years
1552 ,p_object_version_number
1553 ,p_payslip_view_date_offset
1554 );
1555 --
1556 -- Having converted the arguments into the
1557 -- plsql record structure we call the corresponding record
1558 -- business process.
1559 --
1560 pay_pay_upd.upd
1561 (p_effective_date
1562 ,p_datetrack_mode
1563 ,l_rec
1564 );
1565 --
1566 -- Set the out parameters
1567 --
1568 p_payroll_id := l_rec.payroll_id;
1569 p_object_version_number := l_rec.object_version_number;
1570 p_effective_start_date := l_rec.effective_start_date;
1571 p_effective_end_date := l_rec.effective_end_date;
1572 p_comment_id := l_rec.comment_id;
1573 --
1574 hr_utility.set_location(' Leaving:'||l_proc, 10);
1575 End upd;
1576 --
1577 end pay_pay_upd;