42: , p_base_processing_priority;
43: close csr_get_template_info;
44: if p_business_group_id is not null then
45: p_legislation_code :=
46: hr_api.return_legislation_code(p_business_group_id);
47: end if;
48: hr_utility.set_location(' Leaving:'||l_proc, 15);
49: End get_template_info;
50: -- ----------------------------------------------------------------------------
100: -- Check the otherwise non-updateable arguments.
101: --
102: -- p_template_id
103: --
104: if nvl(p_rec.template_id, hr_api.g_number) <>
105: nvl(pay_set_shd.g_old_rec.template_id, hr_api.g_number)
106: then
107: l_argument := 'p_template_id';
108: raise l_error;
101: --
102: -- p_template_id
103: --
104: if nvl(p_rec.template_id, hr_api.g_number) <>
105: nvl(pay_set_shd.g_old_rec.template_id, hr_api.g_number)
106: then
107: l_argument := 'p_template_id';
108: raise l_error;
109: end if;
110: hr_utility.set_location('Leaving:'||l_proc, 35);
111: exception
112: when l_error then
113: hr_utility.set_location('Leaving:'||l_proc, 40);
114: hr_api.argument_changed_error
115: (p_api_name => l_proc
116: ,p_argument => l_argument);
117: when others then
118: hr_utility.set_location('Leaving:'||l_proc, 45);
139: hr_utility.set_location('Entering:'||l_proc, 5);
140: --
141: -- Check that template_id is not null.
142: --
143: hr_api.mandatory_arg_error
144: (p_api_name => l_proc
145: ,p_argument => 'p_template_id'
146: ,p_argument_value => p_template_id
147: );
176: l_api_updating := pay_set_shd.api_updating
177: (p_element_type_id => p_element_type_id
178: ,p_object_version_number => p_object_version_number
179: );
180: if (l_api_updating and nvl(p_classification_name, hr_api.g_varchar2) <>
181: nvl(pay_set_shd.g_old_rec.classification_name, hr_api.g_varchar2)) or
182: not l_api_updating
183: then
184: --
177: (p_element_type_id => p_element_type_id
178: ,p_object_version_number => p_object_version_number
179: );
180: if (l_api_updating and nvl(p_classification_name, hr_api.g_varchar2) <>
181: nvl(pay_set_shd.g_old_rec.classification_name, hr_api.g_varchar2)) or
182: not l_api_updating
183: then
184: --
185: -- Check that the classification name is not null.
183: then
184: --
185: -- Check that the classification name is not null.
186: --
187: hr_api.mandatory_arg_error
188: (p_api_name => l_proc
189: ,p_argument => 'p_classification_name'
190: ,p_argument_value => p_classification_name
191: );
235: ,p_api_updating in boolean
236: ) is
237: begin
238: if (p_updatable and p_api_updating and
239: nvl(p_lookup_code, hr_api.g_varchar2) <>
240: nvl(p_old_lookup_code, hr_api.g_varchar2)) or not p_api_updating
241: then
242: --
243: -- Check that mandatory argument is not null.
236: ) is
237: begin
238: if (p_updatable and p_api_updating and
239: nvl(p_lookup_code, hr_api.g_varchar2) <>
240: nvl(p_old_lookup_code, hr_api.g_varchar2)) or not p_api_updating
241: then
242: --
243: -- Check that mandatory argument is not null.
244: --
242: --
243: -- Check that mandatory argument is not null.
244: --
245: if p_mandatory then
246: hr_api.mandatory_arg_error
247: (p_api_name => p_caller
248: ,p_argument => p_argument_name
249: ,p_argument_value => p_lookup_code
250: );
257: end if;
258: --
259: -- Do the lookup check.
260: --
261: if hr_api.not_exists_in_hr_lookups
262: (p_effective_date => p_effective_date
263: ,p_lookup_type => p_lookup_type
264: ,p_lookup_code => p_lookup_code
265: )
564: cursor csr_T_element_name_exists is
565: select null
566: from pay_shadow_element_types pset
567: where pset.template_id = p_template_id
568: and upper(nvl(pset.element_name, hr_api.g_varchar2)) =
569: upper(nvl(p_element_name, hr_api.g_varchar2));
570: --
571: -- Cursor to check that the element name is unique for a business group
572: -- (template type = 'U').
565: select null
566: from pay_shadow_element_types pset
567: where pset.template_id = p_template_id
568: and upper(nvl(pset.element_name, hr_api.g_varchar2)) =
569: upper(nvl(p_element_name, hr_api.g_varchar2));
570: --
571: -- Cursor to check that the element name is unique for a business group
572: -- (template type = 'U').
573: --
594: l_api_updating := pay_set_shd.api_updating
595: (p_element_type_id => p_element_type_id
596: ,p_object_version_number => p_object_version_number
597: );
598: if (l_api_updating and nvl(p_element_name, hr_api.g_varchar2) <>
599: nvl(pay_set_shd.g_old_rec.element_name, hr_api.g_varchar2)) or
600: not l_api_updating
601: then
602: --
595: (p_element_type_id => p_element_type_id
596: ,p_object_version_number => p_object_version_number
597: );
598: if (l_api_updating and nvl(p_element_name, hr_api.g_varchar2) <>
599: nvl(pay_set_shd.g_old_rec.element_name, hr_api.g_varchar2)) or
600: not l_api_updating
601: then
602: --
603: -- Name cannot be null if the template type is 'U'.
686: ,p_object_version_number => p_object_version_number
687: );
688: --
689: if (l_api_updating and
690: nvl(pay_set_shd.g_old_rec.relative_processing_priority, hr_api.g_number)
691: <> nvl(p_relative_processing_priority, hr_api.g_number)) or
692: not l_api_updating
693: then
694: --
687: );
688: --
689: if (l_api_updating and
690: nvl(pay_set_shd.g_old_rec.relative_processing_priority, hr_api.g_number)
691: <> nvl(p_relative_processing_priority, hr_api.g_number)) or
692: not l_api_updating
693: then
694: --
695: -- Check that the priority is not null.
693: then
694: --
695: -- Check that the priority is not null.
696: --
697: hr_api.mandatory_arg_error
698: (p_api_name => l_proc
699: ,p_argument => 'p_relative_processing_priority'
700: ,p_argument_value => p_relative_processing_priority
701: );
742: l_api_updating := pay_set_shd.api_updating
743: (p_element_type_id => p_element_type_id
744: ,p_object_version_number => p_object_version_number
745: );
746: if (l_api_updating and nvl(p_input_currency_code, hr_api.g_varchar2) <>
747: nvl(pay_set_shd.g_old_rec.input_currency_code, hr_api.g_varchar2)) or
748: not l_api_updating
749: then
750: if p_input_currency_code is not null then
743: (p_element_type_id => p_element_type_id
744: ,p_object_version_number => p_object_version_number
745: );
746: if (l_api_updating and nvl(p_input_currency_code, hr_api.g_varchar2) <>
747: nvl(pay_set_shd.g_old_rec.input_currency_code, hr_api.g_varchar2)) or
748: not l_api_updating
749: then
750: if p_input_currency_code is not null then
751: open csr_valid_currency_code;
788: l_api_updating := pay_set_shd.api_updating
789: (p_element_type_id => p_element_type_id
790: ,p_object_version_number => p_object_version_number
791: );
792: if (l_api_updating and nvl(p_output_currency_code, hr_api.g_varchar2) <>
793: nvl(pay_set_shd.g_old_rec.output_currency_code, hr_api.g_varchar2)) or
794: not l_api_updating
795: then
796: if p_output_currency_code is not null then
789: (p_element_type_id => p_element_type_id
790: ,p_object_version_number => p_object_version_number
791: );
792: if (l_api_updating and nvl(p_output_currency_code, hr_api.g_varchar2) <>
793: nvl(pay_set_shd.g_old_rec.output_currency_code, hr_api.g_varchar2)) or
794: not l_api_updating
795: then
796: if p_output_currency_code is not null then
797: open csr_valid_currency_code;
861: l_api_updating := pay_set_shd.api_updating
862: (p_element_type_id => p_element_type_id
863: ,p_object_version_number => p_object_version_number
864: );
865: if (l_api_updating and nvl(p_payroll_formula_id, hr_api.g_number) <>
866: nvl(pay_set_shd.g_old_rec.payroll_formula_id, hr_api.g_number)) or
867: not l_api_updating
868: then
869: if p_payroll_formula_id is not null then
862: (p_element_type_id => p_element_type_id
863: ,p_object_version_number => p_object_version_number
864: );
865: if (l_api_updating and nvl(p_payroll_formula_id, hr_api.g_number) <>
866: nvl(pay_set_shd.g_old_rec.payroll_formula_id, hr_api.g_number)) or
867: not l_api_updating
868: then
869: if p_payroll_formula_id is not null then
870: if p_template_type = 'T' then
919: l_api_updating := pay_set_shd.api_updating
920: (p_element_type_id => p_element_type_id
921: ,p_object_version_number => p_object_version_number
922: );
923: if (l_api_updating and nvl(p_exclusion_rule_id, hr_api.g_number) <>
924: nvl(pay_set_shd.g_old_rec.exclusion_rule_id, hr_api.g_number)) or
925: not l_api_updating
926: then
927: if p_exclusion_rule_id is not null then
920: (p_element_type_id => p_element_type_id
921: ,p_object_version_number => p_object_version_number
922: );
923: if (l_api_updating and nvl(p_exclusion_rule_id, hr_api.g_number) <>
924: nvl(pay_set_shd.g_old_rec.exclusion_rule_id, hr_api.g_number)) or
925: not l_api_updating
926: then
927: if p_exclusion_rule_id is not null then
928: open csr_exclusion_rule_id_valid;