1: Package Body ame_atu_shd as
2: /* $Header: amaturhi.pkb 120.6 2006/02/15 04:04 prasashe noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ame_atu_shd.'; -- Global package name
9: --
10: -- ----------------------------------------------------------------------------
11: -- |---------------------------< constraint_error >---------------------------|
12: -- ----------------------------------------------------------------------------
78: --
79: l_fct_ret := false;
80: Else
81: If (p_attribute_id =
82: ame_atu_shd.g_old_rec.attribute_id and
83: p_application_id =
84: ame_atu_shd.g_old_rec.application_id and
85: p_object_version_number =
86: ame_atu_shd.g_old_rec.object_version_number) Then
80: Else
81: If (p_attribute_id =
82: ame_atu_shd.g_old_rec.attribute_id and
83: p_application_id =
84: ame_atu_shd.g_old_rec.application_id and
85: p_object_version_number =
86: ame_atu_shd.g_old_rec.object_version_number) Then
87: --
88: -- The g_old_rec is current therefore we must
82: ame_atu_shd.g_old_rec.attribute_id and
83: p_application_id =
84: ame_atu_shd.g_old_rec.application_id and
85: p_object_version_number =
86: ame_atu_shd.g_old_rec.object_version_number) Then
87: --
88: -- The g_old_rec is current therefore we must
89: -- set the returning function to true
90: --
93: --
94: -- Select the current row
95: --
96: Open C_Sel1;
97: Fetch C_Sel1 Into ame_atu_shd.g_old_rec;
98: If C_Sel1%notfound Then
99: Close C_Sel1;
100: --
101: -- The primary key is invalid therefore we must error
104: fnd_message.raise_error;
105: End If;
106: Close C_Sel1;
107: If (p_object_version_number
108: <> ame_atu_shd.g_old_rec.object_version_number) Then
109: fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
110: fnd_message.raise_error;
111: End If;
112: l_fct_ret := true;
150: -- Because we are updating a row we must get the next object
151: -- version number.
152: --
153: l_object_version_number :=
154: ame_atu_shd.get_object_version_number
155: (p_attribute_id => p_attribute_id
156: ,p_application_id => p_application_id
157: );
158: --
255: --
256: -- We must select and lock the current row.
257: --
258: Open C_Sel1;
259: Fetch C_Sel1 Into ame_atu_shd.g_old_rec;
260: If C_Sel1%notfound then
261: Close C_Sel1;
262: --
263: -- The primary key is invalid therefore we must error
266: fnd_message.raise_error;
267: End If;
268: Close C_Sel1;
269: If (p_object_version_number
270: <> ame_atu_shd.g_old_rec.object_version_number) Then
271: fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
272: fnd_message.raise_error;
273: End If;
274: --
289: -- Set the validation start and end date OUT arguments
290: --
291: if (p_datetrack_mode = hr_api.g_update) then
292: p_validation_start_date := p_effective_date;
293: p_validation_end_date := ame_atu_shd.g_old_rec.end_date;
294: elsif (p_datetrack_mode = hr_api.g_delete) then
295: p_validation_start_date := p_effective_date;
296: p_validation_end_date := p_effective_date;
297: elsif (p_datetrack_mode = hr_api.g_correction) then
294: elsif (p_datetrack_mode = hr_api.g_delete) then
295: p_validation_start_date := p_effective_date;
296: p_validation_end_date := p_effective_date;
297: elsif (p_datetrack_mode = hr_api.g_correction) then
298: p_validation_start_date := ame_atu_shd.g_old_rec.start_date;
299: p_validation_end_date := ame_atu_shd.g_old_rec.end_date;
300: end if;
301: --
302: hr_utility.set_location(' Leaving:'||l_proc, 30);
295: p_validation_start_date := p_effective_date;
296: p_validation_end_date := p_effective_date;
297: elsif (p_datetrack_mode = hr_api.g_correction) then
298: p_validation_start_date := ame_atu_shd.g_old_rec.start_date;
299: p_validation_end_date := ame_atu_shd.g_old_rec.end_date;
300: end if;
301: --
302: hr_utility.set_location(' Leaving:'||l_proc, 30);
303: begin
394: --
395: End get_object_version_number;
396: --
397: --
398: end ame_atu_shd;