54: --
55: -- {End Of Comments}
56: -- ----------------------------------------------------------------------------
57: Procedure dt_update_dml
58: (p_rec in out nocopy pay_ppd_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
116: Exception
117: When hr_api.check_integrity_violated Then
118: -- A check constraint has been violated
119: --
120: pay_ppd_shd.constraint_error
121: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122: When hr_api.unique_integrity_violated Then
123: -- Unique integrity has been violated
124: --
121: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
122: When hr_api.unique_integrity_violated Then
123: -- Unique integrity has been violated
124: --
125: pay_ppd_shd.constraint_error
126: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
127: When Others Then
128: --
129: Raise;
160: --
161: -- {End Of Comments}
162: -- ----------------------------------------------------------------------------
163: Procedure update_dml
164: (p_rec in out nocopy pay_ppd_shd.g_rec_type
165: ,p_effective_date in date
166: ,p_datetrack_mode in varchar2
167: ,p_validation_start_date in date
168: ,p_validation_end_date in date
227: --
228: -- {End Of Comments}
229: -- ----------------------------------------------------------------------------
230: Procedure dt_pre_update
231: (p_rec in out nocopy pay_ppd_shd.g_rec_type
232: ,p_effective_date in date
233: ,p_datetrack_mode in varchar2
234: ,p_validation_start_date in date
235: ,p_validation_end_date in date
243: If (p_datetrack_mode <> hr_api.g_correction) then
244: --
245: -- Update the current effective end date
246: --
247: pay_ppd_shd.upd_effective_end_date
248: (p_effective_date => p_effective_date
249: ,p_base_key_value => p_rec.paye_details_id
250: ,p_new_effective_end_date => (p_validation_start_date - 1)
251: ,p_validation_start_date => p_validation_start_date
312: --
313: -- {End Of Comments}
314: -- ----------------------------------------------------------------------------
315: Procedure pre_update
316: (p_rec in out nocopy pay_ppd_shd.g_rec_type
317: ,p_effective_date in date
318: ,p_datetrack_mode in varchar2
319: ,p_validation_start_date in date
320: ,p_validation_end_date in date
370: --
371: -- {End Of Comments}
372: -- ----------------------------------------------------------------------------
373: Procedure post_update
374: (p_rec in pay_ppd_shd.g_rec_type
375: ,p_effective_date in date
376: ,p_datetrack_mode in varchar2
377: ,p_validation_start_date in date
378: ,p_validation_end_date in date
425: => p_rec.program_application_id
426: ,p_request_id
427: => p_rec.request_id
428: ,p_effective_start_date_o
429: => pay_ppd_shd.g_old_rec.effective_start_date
430: ,p_effective_end_date_o
431: => pay_ppd_shd.g_old_rec.effective_end_date
432: ,p_per_or_asg_id_o
433: => pay_ppd_shd.g_old_rec.per_or_asg_id
427: => p_rec.request_id
428: ,p_effective_start_date_o
429: => pay_ppd_shd.g_old_rec.effective_start_date
430: ,p_effective_end_date_o
431: => pay_ppd_shd.g_old_rec.effective_end_date
432: ,p_per_or_asg_id_o
433: => pay_ppd_shd.g_old_rec.per_or_asg_id
434: ,p_business_group_id_o
435: => pay_ppd_shd.g_old_rec.business_group_id
429: => pay_ppd_shd.g_old_rec.effective_start_date
430: ,p_effective_end_date_o
431: => pay_ppd_shd.g_old_rec.effective_end_date
432: ,p_per_or_asg_id_o
433: => pay_ppd_shd.g_old_rec.per_or_asg_id
434: ,p_business_group_id_o
435: => pay_ppd_shd.g_old_rec.business_group_id
436: ,p_contract_category_o
437: => pay_ppd_shd.g_old_rec.contract_category
431: => pay_ppd_shd.g_old_rec.effective_end_date
432: ,p_per_or_asg_id_o
433: => pay_ppd_shd.g_old_rec.per_or_asg_id
434: ,p_business_group_id_o
435: => pay_ppd_shd.g_old_rec.business_group_id
436: ,p_contract_category_o
437: => pay_ppd_shd.g_old_rec.contract_category
438: ,p_object_version_number_o
439: => pay_ppd_shd.g_old_rec.object_version_number
433: => pay_ppd_shd.g_old_rec.per_or_asg_id
434: ,p_business_group_id_o
435: => pay_ppd_shd.g_old_rec.business_group_id
436: ,p_contract_category_o
437: => pay_ppd_shd.g_old_rec.contract_category
438: ,p_object_version_number_o
439: => pay_ppd_shd.g_old_rec.object_version_number
440: ,p_tax_reduction_o
441: => pay_ppd_shd.g_old_rec.tax_reduction
435: => pay_ppd_shd.g_old_rec.business_group_id
436: ,p_contract_category_o
437: => pay_ppd_shd.g_old_rec.contract_category
438: ,p_object_version_number_o
439: => pay_ppd_shd.g_old_rec.object_version_number
440: ,p_tax_reduction_o
441: => pay_ppd_shd.g_old_rec.tax_reduction
442: ,p_tax_calc_with_spouse_child_o
443: => pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child
437: => pay_ppd_shd.g_old_rec.contract_category
438: ,p_object_version_number_o
439: => pay_ppd_shd.g_old_rec.object_version_number
440: ,p_tax_reduction_o
441: => pay_ppd_shd.g_old_rec.tax_reduction
442: ,p_tax_calc_with_spouse_child_o
443: => pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child
444: ,p_income_reduction_o
445: => pay_ppd_shd.g_old_rec.income_reduction
439: => pay_ppd_shd.g_old_rec.object_version_number
440: ,p_tax_reduction_o
441: => pay_ppd_shd.g_old_rec.tax_reduction
442: ,p_tax_calc_with_spouse_child_o
443: => pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child
444: ,p_income_reduction_o
445: => pay_ppd_shd.g_old_rec.income_reduction
446: ,p_income_reduction_amount_o
447: => pay_ppd_shd.g_old_rec.income_reduction_amount
441: => pay_ppd_shd.g_old_rec.tax_reduction
442: ,p_tax_calc_with_spouse_child_o
443: => pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child
444: ,p_income_reduction_o
445: => pay_ppd_shd.g_old_rec.income_reduction
446: ,p_income_reduction_amount_o
447: => pay_ppd_shd.g_old_rec.income_reduction_amount
448: ,p_rate_of_tax_o
449: => pay_ppd_shd.g_old_rec.rate_of_tax
443: => pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child
444: ,p_income_reduction_o
445: => pay_ppd_shd.g_old_rec.income_reduction
446: ,p_income_reduction_amount_o
447: => pay_ppd_shd.g_old_rec.income_reduction_amount
448: ,p_rate_of_tax_o
449: => pay_ppd_shd.g_old_rec.rate_of_tax
450: ,p_program_id_o
451: => pay_ppd_shd.g_old_rec.program_id
445: => pay_ppd_shd.g_old_rec.income_reduction
446: ,p_income_reduction_amount_o
447: => pay_ppd_shd.g_old_rec.income_reduction_amount
448: ,p_rate_of_tax_o
449: => pay_ppd_shd.g_old_rec.rate_of_tax
450: ,p_program_id_o
451: => pay_ppd_shd.g_old_rec.program_id
452: ,p_program_login_id_o
453: => pay_ppd_shd.g_old_rec.program_login_id
447: => pay_ppd_shd.g_old_rec.income_reduction_amount
448: ,p_rate_of_tax_o
449: => pay_ppd_shd.g_old_rec.rate_of_tax
450: ,p_program_id_o
451: => pay_ppd_shd.g_old_rec.program_id
452: ,p_program_login_id_o
453: => pay_ppd_shd.g_old_rec.program_login_id
454: ,p_program_application_id_o
455: => pay_ppd_shd.g_old_rec.program_application_id
449: => pay_ppd_shd.g_old_rec.rate_of_tax
450: ,p_program_id_o
451: => pay_ppd_shd.g_old_rec.program_id
452: ,p_program_login_id_o
453: => pay_ppd_shd.g_old_rec.program_login_id
454: ,p_program_application_id_o
455: => pay_ppd_shd.g_old_rec.program_application_id
456: ,p_request_id_o
457: => pay_ppd_shd.g_old_rec.request_id
451: => pay_ppd_shd.g_old_rec.program_id
452: ,p_program_login_id_o
453: => pay_ppd_shd.g_old_rec.program_login_id
454: ,p_program_application_id_o
455: => pay_ppd_shd.g_old_rec.program_application_id
456: ,p_request_id_o
457: => pay_ppd_shd.g_old_rec.request_id
458: );
459: --
453: => pay_ppd_shd.g_old_rec.program_login_id
454: ,p_program_application_id_o
455: => pay_ppd_shd.g_old_rec.program_application_id
456: ,p_request_id_o
457: => pay_ppd_shd.g_old_rec.request_id
458: );
459: --
460: exception
461: --
513: --
514: -- {End Of Comments}
515: -- ----------------------------------------------------------------------------
516: Procedure convert_defs
517: (p_rec in out nocopy pay_ppd_shd.g_rec_type
518: ) is
519: --
520: Begin
521: --
525: -- is being used then we must set to the 'current' argument value.
526: --
527: If (p_rec.per_or_asg_id = hr_api.g_number) then
528: p_rec.per_or_asg_id :=
529: pay_ppd_shd.g_old_rec.per_or_asg_id;
530: End If;
531: If (p_rec.business_group_id = hr_api.g_number) then
532: p_rec.business_group_id :=
533: pay_ppd_shd.g_old_rec.business_group_id;
529: pay_ppd_shd.g_old_rec.per_or_asg_id;
530: End If;
531: If (p_rec.business_group_id = hr_api.g_number) then
532: p_rec.business_group_id :=
533: pay_ppd_shd.g_old_rec.business_group_id;
534: End If;
535: If (p_rec.contract_category = hr_api.g_varchar2) then
536: p_rec.contract_category :=
537: pay_ppd_shd.g_old_rec.contract_category;
533: pay_ppd_shd.g_old_rec.business_group_id;
534: End If;
535: If (p_rec.contract_category = hr_api.g_varchar2) then
536: p_rec.contract_category :=
537: pay_ppd_shd.g_old_rec.contract_category;
538: End If;
539: If (p_rec.tax_reduction = hr_api.g_varchar2) then
540: p_rec.tax_reduction :=
541: pay_ppd_shd.g_old_rec.tax_reduction;
537: pay_ppd_shd.g_old_rec.contract_category;
538: End If;
539: If (p_rec.tax_reduction = hr_api.g_varchar2) then
540: p_rec.tax_reduction :=
541: pay_ppd_shd.g_old_rec.tax_reduction;
542: End If;
543: If (p_rec.tax_calc_with_spouse_child = hr_api.g_varchar2) then
544: p_rec.tax_calc_with_spouse_child :=
545: pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child;
541: pay_ppd_shd.g_old_rec.tax_reduction;
542: End If;
543: If (p_rec.tax_calc_with_spouse_child = hr_api.g_varchar2) then
544: p_rec.tax_calc_with_spouse_child :=
545: pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child;
546: End If;
547: If (p_rec.income_reduction = hr_api.g_varchar2) then
548: p_rec.income_reduction :=
549: pay_ppd_shd.g_old_rec.income_reduction;
545: pay_ppd_shd.g_old_rec.tax_calc_with_spouse_child;
546: End If;
547: If (p_rec.income_reduction = hr_api.g_varchar2) then
548: p_rec.income_reduction :=
549: pay_ppd_shd.g_old_rec.income_reduction;
550: End If;
551: If (p_rec.income_reduction_amount = hr_api.g_number) then
552: p_rec.income_reduction_amount :=
553: pay_ppd_shd.g_old_rec.income_reduction_amount;
549: pay_ppd_shd.g_old_rec.income_reduction;
550: End If;
551: If (p_rec.income_reduction_amount = hr_api.g_number) then
552: p_rec.income_reduction_amount :=
553: pay_ppd_shd.g_old_rec.income_reduction_amount;
554: End If;
555: If (p_rec.rate_of_tax = hr_api.g_varchar2) then
556: p_rec.rate_of_tax :=
557: pay_ppd_shd.g_old_rec.rate_of_tax;
553: pay_ppd_shd.g_old_rec.income_reduction_amount;
554: End If;
555: If (p_rec.rate_of_tax = hr_api.g_varchar2) then
556: p_rec.rate_of_tax :=
557: pay_ppd_shd.g_old_rec.rate_of_tax;
558: End If;
559: If (p_rec.program_id = hr_api.g_number) then
560: p_rec.program_id :=
561: pay_ppd_shd.g_old_rec.program_id;
557: pay_ppd_shd.g_old_rec.rate_of_tax;
558: End If;
559: If (p_rec.program_id = hr_api.g_number) then
560: p_rec.program_id :=
561: pay_ppd_shd.g_old_rec.program_id;
562: End If;
563: If (p_rec.program_login_id = hr_api.g_number) then
564: p_rec.program_login_id :=
565: pay_ppd_shd.g_old_rec.program_login_id;
561: pay_ppd_shd.g_old_rec.program_id;
562: End If;
563: If (p_rec.program_login_id = hr_api.g_number) then
564: p_rec.program_login_id :=
565: pay_ppd_shd.g_old_rec.program_login_id;
566: End If;
567: If (p_rec.program_application_id = hr_api.g_number) then
568: p_rec.program_application_id :=
569: pay_ppd_shd.g_old_rec.program_application_id;
565: pay_ppd_shd.g_old_rec.program_login_id;
566: End If;
567: If (p_rec.program_application_id = hr_api.g_number) then
568: p_rec.program_application_id :=
569: pay_ppd_shd.g_old_rec.program_application_id;
570: End If;
571: If (p_rec.request_id = hr_api.g_number) then
572: p_rec.request_id :=
573: pay_ppd_shd.g_old_rec.request_id;
569: pay_ppd_shd.g_old_rec.program_application_id;
570: End If;
571: If (p_rec.request_id = hr_api.g_number) then
572: p_rec.request_id :=
573: pay_ppd_shd.g_old_rec.request_id;
574: End If;
575: --
576: End convert_defs;
577: --
580: -- ----------------------------------------------------------------------------
581: Procedure upd
582: (p_effective_date in date
583: ,p_datetrack_mode in varchar2
584: ,p_rec in out nocopy pay_ppd_shd.g_rec_type
585: ) is
586: --
587: l_proc varchar2(72) := g_package||'upd';
588: l_validation_start_date date;
596: dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
597: --
598: -- We must lock the row which we need to update.
599: --
600: pay_ppd_shd.lck
601: (p_effective_date => p_effective_date
602: ,p_datetrack_mode => p_datetrack_mode
603: ,p_paye_details_id => p_rec.paye_details_id
604: ,p_object_version_number => p_rec.object_version_number
679: ,p_effective_start_date out nocopy date
680: ,p_effective_end_date out nocopy date
681: ) is
682: --
683: l_rec pay_ppd_shd.g_rec_type;
684: l_proc varchar2(72) := g_package||'upd';
685: --
686: Begin
687: hr_utility.set_location('Entering:'||l_proc, 5);
689: -- Call conversion function to turn arguments into the
690: -- l_rec structure.
691: --
692: l_rec :=
693: pay_ppd_shd.convert_args
694: (p_paye_details_id
695: ,null
696: ,null
697: ,hr_api.g_number