58: close csr_disallow_update;
59: --
60: -- p_shadow_element_type_id
61: --
62: if nvl(p_rec.shadow_element_type_id, hr_api.g_number) <>
63: nvl(pay_sfr_shd.g_old_rec.shadow_element_type_id, hr_api.g_number)
64: then
65: hr_utility.set_location(l_proc, 25);
66: l_argument := 'p_shadow_element_type_id';
59: --
60: -- p_shadow_element_type_id
61: --
62: if nvl(p_rec.shadow_element_type_id, hr_api.g_number) <>
63: nvl(pay_sfr_shd.g_old_rec.shadow_element_type_id, hr_api.g_number)
64: then
65: hr_utility.set_location(l_proc, 25);
66: l_argument := 'p_shadow_element_type_id';
67: raise l_error;
69: hr_utility.set_location(' Leaving:'||l_proc, 25);
70: exception
71: when l_error then
72: hr_utility.set_location('Leaving:'||l_proc, 30);
73: hr_api.argument_changed_error
74: (p_api_name => l_proc
75: ,p_argument => l_argument);
76: when others then
77: hr_utility.set_location('Leaving:'||l_proc, 35);
98: hr_utility.set_location('Entering:'||l_proc, 5);
99: --
100: -- Check that the shadow element type is not null.
101: --
102: hr_api.mandatory_arg_error
103: (p_api_name => l_proc
104: ,p_argument => 'p_shadow_element_type_id'
105: ,p_argument_value => p_shadow_element_type_id
106: );
137: (p_formula_result_rule_id => p_formula_result_rule_id
138: ,p_object_version_number => p_object_version_number
139: );
140: if (l_api_updating and
141: nvl(p_result_rule_type, hr_api.g_varchar2) <>
142: nvl(pay_sfr_shd.g_old_rec.result_rule_type, hr_api.g_varchar2))
143: or not l_api_updating
144: then
145: --
138: ,p_object_version_number => p_object_version_number
139: );
140: if (l_api_updating and
141: nvl(p_result_rule_type, hr_api.g_varchar2) <>
142: nvl(pay_sfr_shd.g_old_rec.result_rule_type, hr_api.g_varchar2))
143: or not l_api_updating
144: then
145: --
146: -- Result rule type is mandatory.
144: then
145: --
146: -- Result rule type is mandatory.
147: --
148: hr_api.mandatory_arg_error
149: (p_api_name => l_proc
150: ,p_argument => 'p_result_rule_type'
151: ,p_argument_value => p_result_rule_type
152: );
152: );
153: --
154: -- Validate against hr_lookups.
155: --
156: if hr_api.not_exists_in_hr_lookups
157: (p_effective_date => p_effective_date
158: ,p_lookup_type => 'RESULT_RULE_TYPE'
159: ,p_lookup_code => p_result_rule_type
160: )
200: l_api_updating := pay_sfr_shd.api_updating
201: (p_formula_result_rule_id => p_formula_result_rule_id
202: ,p_object_version_number => p_object_version_number
203: );
204: if (l_api_updating and nvl(p_element_type_id, hr_api.g_number) <>
205: nvl(pay_sfr_shd.g_old_rec.element_type_id, hr_api.g_number)) or
206: not l_api_updating
207: then
208: if p_element_type_id is not null then
201: (p_formula_result_rule_id => p_formula_result_rule_id
202: ,p_object_version_number => p_object_version_number
203: );
204: if (l_api_updating and nvl(p_element_type_id, hr_api.g_number) <>
205: nvl(pay_sfr_shd.g_old_rec.element_type_id, hr_api.g_number)) or
206: not l_api_updating
207: then
208: if p_element_type_id is not null then
209: --
264: l_api_updating := pay_sfr_shd.api_updating
265: (p_formula_result_rule_id => p_formula_result_rule_id
266: ,p_object_version_number => p_object_version_number
267: );
268: if (l_api_updating and nvl(p_input_value_id, hr_api.g_number) <>
269: nvl(pay_sfr_shd.g_old_rec.input_value_id, hr_api.g_number)) or
270: not l_api_updating
271: then
272: if p_input_value_id is not null then
265: (p_formula_result_rule_id => p_formula_result_rule_id
266: ,p_object_version_number => p_object_version_number
267: );
268: if (l_api_updating and nvl(p_input_value_id, hr_api.g_number) <>
269: nvl(pay_sfr_shd.g_old_rec.input_value_id, hr_api.g_number)) or
270: not l_api_updating
271: then
272: if p_input_value_id is not null then
273: --
308: l_api_updating := pay_sfr_shd.api_updating
309: (p_formula_result_rule_id => p_formula_result_rule_id
310: ,p_object_version_number => p_object_version_number
311: );
312: if (l_api_updating and nvl(p_result_name, hr_api.g_varchar2) <>
313: nvl(pay_sfr_shd.g_old_rec.result_name, hr_api.g_varchar2)) or
314: not l_api_updating
315: then
316: --
309: (p_formula_result_rule_id => p_formula_result_rule_id
310: ,p_object_version_number => p_object_version_number
311: );
312: if (l_api_updating and nvl(p_result_name, hr_api.g_varchar2) <>
313: nvl(pay_sfr_shd.g_old_rec.result_name, hr_api.g_varchar2)) or
314: not l_api_updating
315: then
316: --
317: -- Check that the name format is correct (not null database item name).
351: (p_formula_result_rule_id => p_formula_result_rule_id
352: ,p_object_version_number => p_object_version_number
353: );
354: l_result_rule_changed :=
355: l_api_updating and nvl(p_result_rule_type, hr_api.g_varchar2) <>
356: nvl(pay_sfr_shd.g_old_rec.result_rule_type, hr_api.g_varchar2);
357: --
358: if (l_api_updating and
359: nvl(p_severity_level, hr_api.g_varchar2) <>
352: ,p_object_version_number => p_object_version_number
353: );
354: l_result_rule_changed :=
355: l_api_updating and nvl(p_result_rule_type, hr_api.g_varchar2) <>
356: nvl(pay_sfr_shd.g_old_rec.result_rule_type, hr_api.g_varchar2);
357: --
358: if (l_api_updating and
359: nvl(p_severity_level, hr_api.g_varchar2) <>
360: nvl(pay_sfr_shd.g_old_rec.severity_level, hr_api.g_varchar2))
355: l_api_updating and nvl(p_result_rule_type, hr_api.g_varchar2) <>
356: nvl(pay_sfr_shd.g_old_rec.result_rule_type, hr_api.g_varchar2);
357: --
358: if (l_api_updating and
359: nvl(p_severity_level, hr_api.g_varchar2) <>
360: nvl(pay_sfr_shd.g_old_rec.severity_level, hr_api.g_varchar2))
361: or not l_api_updating or l_result_rule_changed
362: then
363: --
356: nvl(pay_sfr_shd.g_old_rec.result_rule_type, hr_api.g_varchar2);
357: --
358: if (l_api_updating and
359: nvl(p_severity_level, hr_api.g_varchar2) <>
360: nvl(pay_sfr_shd.g_old_rec.severity_level, hr_api.g_varchar2))
361: or not l_api_updating or l_result_rule_changed
362: then
363: --
364: -- Severity level is mandatory if result rule type is 'M'.
363: --
364: -- Severity level is mandatory if result rule type is 'M'.
365: --
366: if p_result_rule_type = 'M' then
367: hr_api.mandatory_arg_error
368: (p_api_name => l_proc
369: ,p_argument => 'p_severity_level'
370: ,p_argument_value => p_severity_level
371: );
371: );
372: --
373: -- Validate against hr_lookups.
374: --
375: if hr_api.not_exists_in_hr_lookups
376: (p_effective_date => p_effective_date
377: ,p_lookup_type => 'MESSAGE_LEVEL'
378: ,p_lookup_code => p_severity_level
379: )
425: l_api_updating := pay_sfr_shd.api_updating
426: (p_formula_result_rule_id => p_formula_result_rule_id
427: ,p_object_version_number => p_object_version_number
428: );
429: if (l_api_updating and nvl(p_exclusion_rule_id, hr_api.g_number) <>
430: nvl(pay_sfr_shd.g_old_rec.exclusion_rule_id, hr_api.g_number)) or
431: not l_api_updating
432: then
433: if p_exclusion_rule_id is not null then
426: (p_formula_result_rule_id => p_formula_result_rule_id
427: ,p_object_version_number => p_object_version_number
428: );
429: if (l_api_updating and nvl(p_exclusion_rule_id, hr_api.g_number) <>
430: nvl(pay_sfr_shd.g_old_rec.exclusion_rule_id, hr_api.g_number)) or
431: not l_api_updating
432: then
433: if p_exclusion_rule_id is not null then
434: open csr_exclusion_rule_id_valid;