1: Package Body ame_acu_shd as
2: /* $Header: amacurhi.pkb 120.4 2005/11/22 03:13 santosin noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ame_acu_shd.'; -- Global package name
9: --
10: -- ----------------------------------------------------------------------------
11: -- |---------------------------< constraint_error >---------------------------|
12: -- ----------------------------------------------------------------------------
74: --
75: l_fct_ret := false;
76: Else
77: If (p_action_id =
78: ame_acu_shd.g_old_rec.action_id and
79: p_rule_id =
80: ame_acu_shd.g_old_rec.rule_id and
81: p_object_version_number =
82: ame_acu_shd.g_old_rec.object_version_number) Then
76: Else
77: If (p_action_id =
78: ame_acu_shd.g_old_rec.action_id and
79: p_rule_id =
80: ame_acu_shd.g_old_rec.rule_id and
81: p_object_version_number =
82: ame_acu_shd.g_old_rec.object_version_number) Then
83: --
84: -- The g_old_rec is current therefore we must
78: ame_acu_shd.g_old_rec.action_id and
79: p_rule_id =
80: ame_acu_shd.g_old_rec.rule_id and
81: p_object_version_number =
82: ame_acu_shd.g_old_rec.object_version_number) Then
83: --
84: -- The g_old_rec is current therefore we must
85: -- set the returning function to true
86: --
89: --
90: -- Select the current row
91: --
92: Open C_Sel1;
93: Fetch C_Sel1 Into ame_acu_shd.g_old_rec;
94: If C_Sel1%notfound Then
95: Close C_Sel1;
96: --
97: -- The primary key is invalid therefore we must error
100: fnd_message.raise_error;
101: End If;
102: Close C_Sel1;
103: If (p_object_version_number
104: <> ame_acu_shd.g_old_rec.object_version_number) Then
105: fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
106: fnd_message.raise_error;
107: End If;
108: l_fct_ret := true;
135: -- Because we are updating a row we must get the next object
136: -- version number.
137: --
138: l_object_version_number :=
139: ame_acu_shd.get_object_version_number
140: (p_action_id => p_action_id
141: ,p_rule_id => p_rule_id
142: );
143: --
239: --
240: -- We must select and lock the current row.
241: --
242: Open C_Sel1;
243: Fetch C_Sel1 Into ame_acu_shd.g_old_rec;
244: If C_Sel1%notfound then
245: Close C_Sel1;
246: --
247: -- The primary key is invalid therefore we must error
250: fnd_message.raise_error;
251: End If;
252: Close C_Sel1;
253: If (p_object_version_number
254: <> ame_acu_shd.g_old_rec.object_version_number) Then
255: fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
256: fnd_message.raise_error;
257: End If;
258: --
273: -- Set the validation start and end date OUT arguments
274: --
275: if (p_datetrack_mode = hr_api.g_update) then
276: p_validation_start_date := p_effective_date;
277: p_validation_end_date := ame_acu_shd.g_old_rec.end_date;
278: elsif (p_datetrack_mode = hr_api.g_delete) then
279: p_validation_start_date := p_effective_date;
280: p_validation_end_date := p_effective_date;
281: end if;
380: --
381: End get_object_version_number;
382: --
383: --
384: end ame_acu_shd;