17: l_proc varchar2(72) := g_package||'constraint_error';
18: --
19: Begin
20: --
21: If (p_constraint_name = 'AME_ATTRIBUTE_USAGES_PK') Then
22: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
23: fnd_message.set_token('PROCEDURE', l_proc);
24: fnd_message.set_token('STEP','5');
25: fnd_message.raise_error;
56: ,end_date
57: ,security_group_id
58: ,value_set_id
59: ,object_version_number
60: from ame_attribute_usages
61: where attribute_id = p_attribute_id
62: and application_id = p_application_id
63: and p_effective_date
64: between start_date
161: --
162: -- Update the specified datetrack row setting the effective
163: -- end date to the specified new effective end date.
164: --
165: update ame_attribute_usages t
166: set t.end_date = p_new_end_date
167: ,t.last_updated_by = l_current_user_id
168: ,t.last_update_date = p_new_end_date
169: ,t.last_update_login = l_current_user_id
214: ,end_date
215: ,security_group_id
216: ,value_set_id
217: ,object_version_number
218: from ame_attribute_usages
219: where attribute_id = p_attribute_id
220: and application_id = p_application_id
221: and p_effective_date
222: between start_date and nvl(end_date - ame_util.oneSecond, p_effective_date)
320: -- The object is locked therefore we need to supply a meaningful
321: -- error message.
322: --
323: fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
324: fnd_message.set_token('TABLE_NAME', 'ame_attribute_usages');
325: fnd_message.raise_error;
326: End lck;
327: --
328: -- ----------------------------------------------------------------------------
383: -- get the next ovn
384: --
385: select nvl(max(t.object_version_number),0) + 1
386: into l_ovn
387: from ame_attribute_usages t
388: where t.attribute_id = p_attribute_id
389: and t.application_id = p_application_id;
390: --
391: -- Return the new object_version_number.