104: hr_utility.set_location('Entering:'|| l_proc, 5);
105: --
106: -- Check mandatory parameters have been set
107: --
108: hr_api.mandatory_arg_error
109: (p_api_name => l_proc
110: ,p_argument => 'target_payroll_action_id'
111: ,p_argument_value => p_target_payroll_action_id
112: );
109: (p_api_name => l_proc
110: ,p_argument => 'target_payroll_action_id'
111: ,p_argument_value => p_target_payroll_action_id
112: );
113: hr_api.mandatory_arg_error
114: (p_api_name => l_proc
115: ,p_argument => 'business_group_id'
116: ,p_argument_value => p_business_group_id
117: );
114: (p_api_name => l_proc
115: ,p_argument => 'business_group_id'
116: ,p_argument_value => p_business_group_id
117: );
118: hr_api.mandatory_arg_error
119: (p_api_name => l_proc
120: ,p_argument => 'effective_date'
121: ,p_argument_value => p_effective_date
122: );
445: hr_utility.set_location('Entering:'|| l_proc, 5);
446: --
447: -- Check mandatory arguments have been set
448: --
449: hr_api.mandatory_arg_error
450: (p_api_name => l_proc
451: ,p_argument => 'assignment_action_id'
452: ,p_argument_value => p_assignment_action_id
453: );
503: --
504: Begin
505: hr_utility.set_location('Entering:'||l_proc, 5);
506: --
507: if nvl(p_rec.business_group_id, hr_api.g_number) <>
508: nvl(g_old_rec.business_group_id, hr_api.g_number) then
509: hr_api.argument_changed_error
510: (p_api_name => l_proc
511: ,p_argument => 'business_group_id'
504: Begin
505: hr_utility.set_location('Entering:'||l_proc, 5);
506: --
507: if nvl(p_rec.business_group_id, hr_api.g_number) <>
508: nvl(g_old_rec.business_group_id, hr_api.g_number) then
509: hr_api.argument_changed_error
510: (p_api_name => l_proc
511: ,p_argument => 'business_group_id'
512: );
505: hr_utility.set_location('Entering:'||l_proc, 5);
506: --
507: if nvl(p_rec.business_group_id, hr_api.g_number) <>
508: nvl(g_old_rec.business_group_id, hr_api.g_number) then
509: hr_api.argument_changed_error
510: (p_api_name => l_proc
511: ,p_argument => 'business_group_id'
512: );
513: end if;
512: );
513: end if;
514: hr_utility.set_location(l_proc, 6);
515: --
516: if nvl(p_rec.org_payment_method_id, hr_api.g_number) <>
517: nvl(g_old_rec.org_payment_method_id, hr_api.g_number) then
518: hr_api.argument_changed_error
519: (p_api_name => l_proc
520: ,p_argument => 'org_payment_method_id'
513: end if;
514: hr_utility.set_location(l_proc, 6);
515: --
516: if nvl(p_rec.org_payment_method_id, hr_api.g_number) <>
517: nvl(g_old_rec.org_payment_method_id, hr_api.g_number) then
518: hr_api.argument_changed_error
519: (p_api_name => l_proc
520: ,p_argument => 'org_payment_method_id'
521: );
514: hr_utility.set_location(l_proc, 6);
515: --
516: if nvl(p_rec.org_payment_method_id, hr_api.g_number) <>
517: nvl(g_old_rec.org_payment_method_id, hr_api.g_number) then
518: hr_api.argument_changed_error
519: (p_api_name => l_proc
520: ,p_argument => 'org_payment_method_id'
521: );
522: end if;
521: );
522: end if;
523: hr_utility.set_location(l_proc, 7);
524: --
525: if nvl(p_rec.target_payroll_action_id, hr_api.g_number) <>
526: nvl(g_old_rec.target_payroll_action_id, hr_api.g_number) then
527: hr_api.argument_changed_error
528: (p_api_name => l_proc
529: ,p_argument => 'target_payroll_action_id'
522: end if;
523: hr_utility.set_location(l_proc, 7);
524: --
525: if nvl(p_rec.target_payroll_action_id, hr_api.g_number) <>
526: nvl(g_old_rec.target_payroll_action_id, hr_api.g_number) then
527: hr_api.argument_changed_error
528: (p_api_name => l_proc
529: ,p_argument => 'target_payroll_action_id'
530: );
523: hr_utility.set_location(l_proc, 7);
524: --
525: if nvl(p_rec.target_payroll_action_id, hr_api.g_number) <>
526: nvl(g_old_rec.target_payroll_action_id, hr_api.g_number) then
527: hr_api.argument_changed_error
528: (p_api_name => l_proc
529: ,p_argument => 'target_payroll_action_id'
530: );
531: end if;
530: );
531: end if;
532: hr_utility.set_location(l_proc, 8);
533: --
534: if nvl(p_rec.effective_date, hr_api.g_date) <>
535: nvl(g_old_rec.effective_date, hr_api.g_date) then
536: hr_api.argument_changed_error
537: (p_api_name => l_proc
538: ,p_argument => 'effective_date'
531: end if;
532: hr_utility.set_location(l_proc, 8);
533: --
534: if nvl(p_rec.effective_date, hr_api.g_date) <>
535: nvl(g_old_rec.effective_date, hr_api.g_date) then
536: hr_api.argument_changed_error
537: (p_api_name => l_proc
538: ,p_argument => 'effective_date'
539: );
532: hr_utility.set_location(l_proc, 8);
533: --
534: if nvl(p_rec.effective_date, hr_api.g_date) <>
535: nvl(g_old_rec.effective_date, hr_api.g_date) then
536: hr_api.argument_changed_error
537: (p_api_name => l_proc
538: ,p_argument => 'effective_date'
539: );
540: end if;
564: -- {Start Of Comments}
565: --
566: -- Description:
567: -- This procedure is called when a constraint has been violated (i.e.
568: -- The exception hr_api.check_integrity_violated,
569: -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
570: -- hr_api.unique_integrity_violated has been raised).
571: -- The exceptions can only be raised as follows:
572: -- 1) A check constraint can only be violated during an INSERT or UPDATE
565: --
566: -- Description:
567: -- This procedure is called when a constraint has been violated (i.e.
568: -- The exception hr_api.check_integrity_violated,
569: -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
570: -- hr_api.unique_integrity_violated has been raised).
571: -- The exceptions can only be raised as follows:
572: -- 1) A check constraint can only be violated during an INSERT or UPDATE
573: -- dml operation.
566: -- Description:
567: -- This procedure is called when a constraint has been violated (i.e.
568: -- The exception hr_api.check_integrity_violated,
569: -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
570: -- hr_api.unique_integrity_violated has been raised).
571: -- The exceptions can only be raised as follows:
572: -- 1) A check constraint can only be violated during an INSERT or UPDATE
573: -- dml operation.
574: -- 2) A parent integrity constraint can only be violated during an
578: -- 4) A unique integrity constraint can only be violated during INSERT or
579: -- UPDATE dml operation.
580: --
581: -- Pre Conditions:
582: -- 1) Either hr_api.check_integrity_violated,
583: -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
584: -- hr_api.unique_integrity_violated has been raised with the subsequent
585: -- stripping of the constraint name from the generated error message
586: -- text.
579: -- UPDATE dml operation.
580: --
581: -- Pre Conditions:
582: -- 1) Either hr_api.check_integrity_violated,
583: -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
584: -- hr_api.unique_integrity_violated has been raised with the subsequent
585: -- stripping of the constraint name from the generated error message
586: -- text.
587: -- 2) Standalone validation test which correspond with a constraint error.
580: --
581: -- Pre Conditions:
582: -- 1) Either hr_api.check_integrity_violated,
583: -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
584: -- hr_api.unique_integrity_violated has been raised with the subsequent
585: -- stripping of the constraint name from the generated error message
586: -- text.
587: -- 2) Standalone validation test which correspond with a constraint error.
588: --
783: g_api_dml := false;
784: --
785: hr_utility.set_location(' Leaving:'||l_proc, 10);
786: Exception
787: When hr_api.check_integrity_violated Then
788: -- A check constraint has been violated
789: g_api_dml := false; -- Unset the api dml status
790: constraint_error
791: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
787: When hr_api.check_integrity_violated Then
788: -- A check constraint has been violated
789: g_api_dml := false; -- Unset the api dml status
790: constraint_error
791: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
792: When hr_api.parent_integrity_violated then
793: -- Parent integrity has been violated
794: g_api_dml := false; -- Unset the api dml status
795: constraint_error
788: -- A check constraint has been violated
789: g_api_dml := false; -- Unset the api dml status
790: constraint_error
791: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
792: When hr_api.parent_integrity_violated then
793: -- Parent integrity has been violated
794: g_api_dml := false; -- Unset the api dml status
795: constraint_error
796: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
792: When hr_api.parent_integrity_violated then
793: -- Parent integrity has been violated
794: g_api_dml := false; -- Unset the api dml status
795: constraint_error
796: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
797: When hr_api.unique_integrity_violated Then
798: -- Unique integrity has been violated
799: g_api_dml := false; -- Unset the api dml status
800: constraint_error
793: -- Parent integrity has been violated
794: g_api_dml := false; -- Unset the api dml status
795: constraint_error
796: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
797: When hr_api.unique_integrity_violated Then
798: -- Unique integrity has been violated
799: g_api_dml := false; -- Unset the api dml status
800: constraint_error
801: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
797: When hr_api.unique_integrity_violated Then
798: -- Unique integrity has been violated
799: g_api_dml := false; -- Unset the api dml status
800: constraint_error
801: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
802: When Others Then
803: g_api_dml := false; -- Unset the api dml status
804: Raise;
805: End insert_dml;
871: --
872: hr_utility.set_location(' Leaving:'||l_proc, 10);
873: --
874: Exception
875: When hr_api.check_integrity_violated Then
876: -- A check constraint has been violated
877: g_api_dml := false; -- Unset the api dml status
878: constraint_error
879: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
875: When hr_api.check_integrity_violated Then
876: -- A check constraint has been violated
877: g_api_dml := false; -- Unset the api dml status
878: constraint_error
879: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
880: When hr_api.parent_integrity_violated then
881: -- Parent integrity has been violated
882: g_api_dml := false; -- Unset the api dml status
883: constraint_error
876: -- A check constraint has been violated
877: g_api_dml := false; -- Unset the api dml status
878: constraint_error
879: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
880: When hr_api.parent_integrity_violated then
881: -- Parent integrity has been violated
882: g_api_dml := false; -- Unset the api dml status
883: constraint_error
884: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
880: When hr_api.parent_integrity_violated then
881: -- Parent integrity has been violated
882: g_api_dml := false; -- Unset the api dml status
883: constraint_error
884: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
885: When hr_api.unique_integrity_violated Then
886: -- Unique integrity has been violated
887: g_api_dml := false; -- Unset the api dml status
888: constraint_error
881: -- Parent integrity has been violated
882: g_api_dml := false; -- Unset the api dml status
883: constraint_error
884: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
885: When hr_api.unique_integrity_violated Then
886: -- Unique integrity has been violated
887: g_api_dml := false; -- Unset the api dml status
888: constraint_error
889: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
885: When hr_api.unique_integrity_violated Then
886: -- Unique integrity has been violated
887: g_api_dml := false; -- Unset the api dml status
888: constraint_error
889: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
890: When Others Then
891: g_api_dml := false; -- Unset the api dml status
892: Raise;
893: End update_dml;
960: --
961: hr_utility.set_location(' Leaving:'||l_proc, 10);
962: --
963: Exception
964: When hr_api.child_integrity_violated then
965: -- Child integrity has been violated
966: g_api_dml := false; -- Unset the api dml status
967: constraint_error
968: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
964: When hr_api.child_integrity_violated then
965: -- Child integrity has been violated
966: g_api_dml := false; -- Unset the api dml status
967: constraint_error
968: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
969: When Others Then
970: g_api_dml := false; -- Unset the api dml status
971: Raise;
972: End delete_dml;
1319: hr_utility.set_location('Entering:'||l_proc, 5);
1320: --
1321: -- Check the mandatory args have been set
1322: --
1323: hr_api.mandatory_arg_error
1324: (p_api_name => l_proc
1325: ,p_argument => 'payroll_action_id'
1326: ,p_argument_value => p_payroll_action_id
1327: );
1324: (p_api_name => l_proc
1325: ,p_argument => 'payroll_action_id'
1326: ,p_argument_value => p_payroll_action_id
1327: );
1328: hr_api.mandatory_arg_error
1329: (p_api_name => l_proc
1330: ,p_argument => 'p_object_version_number'
1331: ,p_argument_value => p_p_object_version_number
1332: );
1329: (p_api_name => l_proc
1330: ,p_argument => 'p_object_version_number'
1331: ,p_argument_value => p_p_object_version_number
1332: );
1333: hr_api.mandatory_arg_error
1334: (p_api_name => l_proc
1335: ,p_argument => 'a_object_version_number'
1336: ,p_argument_value => p_a_object_version_number
1337: );
1373: --
1374: -- We need to trap the ORA LOCK exception
1375: --
1376: Exception
1377: When HR_Api.Object_Locked then
1378: --
1379: -- The object is locked therefore we need to supply a meaningful
1380: -- error message.
1381: --
1500: -- p_rec plsql record structure
1501: -- to see if a system default is being used. If a system default
1502: -- is being used then we must set to the 'current' argument value.
1503: --
1504: If (p_rec.business_group_id = hr_api.g_number) then
1505: p_rec.business_group_id := g_old_rec.business_group_id;
1506: End If;
1507: If (p_rec.org_payment_method_id = hr_api.g_number) then
1508: p_rec.org_payment_method_id := g_old_rec.org_payment_method_id;
1503: --
1504: If (p_rec.business_group_id = hr_api.g_number) then
1505: p_rec.business_group_id := g_old_rec.business_group_id;
1506: End If;
1507: If (p_rec.org_payment_method_id = hr_api.g_number) then
1508: p_rec.org_payment_method_id := g_old_rec.org_payment_method_id;
1509: End If;
1510: If (p_rec.action_status = hr_api.g_varchar2) then
1511: p_rec.action_status := g_old_rec.action_status;
1506: End If;
1507: If (p_rec.org_payment_method_id = hr_api.g_number) then
1508: p_rec.org_payment_method_id := g_old_rec.org_payment_method_id;
1509: End If;
1510: If (p_rec.action_status = hr_api.g_varchar2) then
1511: p_rec.action_status := g_old_rec.action_status;
1512: End If;
1513: If (p_rec.effective_date = hr_api.g_date) then
1514: p_rec.effective_date := g_old_rec.effective_date;
1509: End If;
1510: If (p_rec.action_status = hr_api.g_varchar2) then
1511: p_rec.action_status := g_old_rec.action_status;
1512: End If;
1513: If (p_rec.effective_date = hr_api.g_date) then
1514: p_rec.effective_date := g_old_rec.effective_date;
1515: End If;
1516: If (p_rec.target_payroll_action_id = hr_api.g_number) then
1517: p_rec.target_payroll_action_id := g_old_rec.target_payroll_action_id;
1512: End If;
1513: If (p_rec.effective_date = hr_api.g_date) then
1514: p_rec.effective_date := g_old_rec.effective_date;
1515: End If;
1516: If (p_rec.target_payroll_action_id = hr_api.g_number) then
1517: p_rec.target_payroll_action_id := g_old_rec.target_payroll_action_id;
1518: End If;
1519: --
1520: -- Return the plsql record structure.
1774: --
1775: -- If we are validating then raise the Validate_Enabled exception
1776: --
1777: If p_validate then
1778: Raise HR_Api.Validate_Enabled;
1779: End If;
1780: --
1781: hr_utility.set_location(' Leaving:'||l_proc, 10);
1782: Exception
1779: End If;
1780: --
1781: hr_utility.set_location(' Leaving:'||l_proc, 10);
1782: Exception
1783: When HR_Api.Validate_Enabled Then
1784: --
1785: -- As the Validate_Enabled exception has been raised
1786: -- we must rollback to the savepoint
1787: --
1900: --
1901: -- If we are validating then raise the Validate_Enabled exception
1902: --
1903: If p_validate then
1904: Raise HR_Api.Validate_Enabled;
1905: End If;
1906: --
1907: hr_utility.set_location(' Leaving:'||l_proc, 10);
1908: Exception
1905: End If;
1906: --
1907: hr_utility.set_location(' Leaving:'||l_proc, 10);
1908: Exception
1909: When HR_Api.Validate_Enabled Then
1910: --
1911: -- As the Validate_Enabled exception has been raised
1912: -- we must rollback to the savepoint
1913: --
1920: --
1921: procedure upd
1922: (p_payroll_action_id in number
1923: ,p_assignment_action_id in number
1924: ,p_action_status in varchar2 default hr_api.g_varchar2
1925: ,p_p_object_version_number in out nocopy number
1926: ,p_a_object_version_number in number
1927: ,p_validate in boolean default false
1928: ) is
1938: --
1939: l_rec :=
1940: convert_args
1941: (p_payroll_action_id
1942: ,hr_api.g_number
1943: ,hr_api.g_number
1944: ,p_action_status
1945: ,hr_api.g_date
1946: ,hr_api.g_number
1939: l_rec :=
1940: convert_args
1941: (p_payroll_action_id
1942: ,hr_api.g_number
1943: ,hr_api.g_number
1944: ,p_action_status
1945: ,hr_api.g_date
1946: ,hr_api.g_number
1947: ,p_p_object_version_number
1941: (p_payroll_action_id
1942: ,hr_api.g_number
1943: ,hr_api.g_number
1944: ,p_action_status
1945: ,hr_api.g_date
1946: ,hr_api.g_number
1947: ,p_p_object_version_number
1948: );
1949: --
1942: ,hr_api.g_number
1943: ,hr_api.g_number
1944: ,p_action_status
1945: ,hr_api.g_date
1946: ,hr_api.g_number
1947: ,p_p_object_version_number
1948: );
1949: --
1950: -- Having converted the arguments into the
2012: --
2013: -- If we are validating then raise the Validate_Enabled exception
2014: --
2015: If p_validate then
2016: Raise HR_Api.Validate_Enabled;
2017: End If;
2018: --
2019: hr_utility.set_location(' Leaving:'||l_proc, 10);
2020: Exception
2017: End If;
2018: --
2019: hr_utility.set_location(' Leaving:'||l_proc, 10);
2020: Exception
2021: When HR_Api.Validate_Enabled Then
2022: --
2023: -- As the Validate_Enabled exception has been raised
2024: -- we must rollback to the savepoint
2025: --
2084: hr_utility.set_location('Entering:'|| l_proc, 5);
2085: --
2086: -- Check mandatory parameters have been set
2087: --
2088: hr_api.mandatory_arg_error
2089: (p_api_name => l_proc
2090: ,p_argument => 'payroll_action_id'
2091: ,p_argument_value => p_payroll_action_id
2092: );