51: --
52: -- {End Of Comments}
53: -- ----------------------------------------------------------------------------
54: Procedure update_dml
55: (p_rec in out nocopy ben_psg_shd.g_rec_type
56: ) is
57: --
58: l_proc varchar2(72) := g_package||'update_dml';
59: --
62: --
63: -- Increment the object version
64: p_rec.object_version_number := p_rec.object_version_number + 1;
65: --
66: ben_psg_shd.g_api_dml := true; -- Set the api dml status
67: --
68: -- Update the ben_pil_assignment Row
69: --
70: update ben_pil_assignment
75: ,offer_assignment_id = p_rec.offer_assignment_id
76: ,object_version_number = p_rec.object_version_number
77: where pil_assignment_id = p_rec.pil_assignment_id;
78: --
79: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
80: --
81: hr_utility.set_location(' Leaving:'||l_proc, 10);
82: --
83: Exception
82: --
83: Exception
84: When hr_api.check_integrity_violated Then
85: -- A check constraint has been violated
86: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
87: ben_psg_shd.constraint_error
88: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
89: When hr_api.parent_integrity_violated Then
90: -- Parent integrity has been violated
83: Exception
84: When hr_api.check_integrity_violated Then
85: -- A check constraint has been violated
86: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
87: ben_psg_shd.constraint_error
88: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
89: When hr_api.parent_integrity_violated Then
90: -- Parent integrity has been violated
91: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
87: ben_psg_shd.constraint_error
88: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
89: When hr_api.parent_integrity_violated Then
90: -- Parent integrity has been violated
91: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
92: ben_psg_shd.constraint_error
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.unique_integrity_violated Then
95: -- Unique integrity has been violated
88: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
89: When hr_api.parent_integrity_violated Then
90: -- Parent integrity has been violated
91: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
92: ben_psg_shd.constraint_error
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.unique_integrity_violated Then
95: -- Unique integrity has been violated
96: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
92: ben_psg_shd.constraint_error
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.unique_integrity_violated Then
95: -- Unique integrity has been violated
96: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
97: ben_psg_shd.constraint_error
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When Others Then
100: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
93: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
94: When hr_api.unique_integrity_violated Then
95: -- Unique integrity has been violated
96: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
97: ben_psg_shd.constraint_error
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When Others Then
100: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
101: Raise;
96: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
97: ben_psg_shd.constraint_error
98: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
99: When Others Then
100: ben_psg_shd.g_api_dml := false; -- Unset the api dml status
101: Raise;
102: End update_dml;
103: --
104: -- ----------------------------------------------------------------------------
133: --
134: -- {End Of Comments}
135: -- ----------------------------------------------------------------------------
136: Procedure pre_update
137: (p_rec in ben_psg_shd.g_rec_type
138: ) is
139: --
140: l_proc varchar2(72) := g_package||'pre_update';
141: --
177: --
178: -- {End Of Comments}
179: -- ----------------------------------------------------------------------------
180: Procedure post_update
181: (p_rec in ben_psg_shd.g_rec_type
182: ) is
183: --
184: l_proc varchar2(72) := g_package||'post_update';
185: --
198: => p_rec.offer_assignment_id
199: ,p_object_version_number
200: => p_rec.object_version_number
201: ,p_per_in_ler_id_o
202: => ben_psg_shd.g_old_rec.per_in_ler_id
203: ,p_applicant_assignment_id_o
204: => ben_psg_shd.g_old_rec.applicant_assignment_id
205: ,p_offer_assignment_id_o
206: => ben_psg_shd.g_old_rec.offer_assignment_id
200: => p_rec.object_version_number
201: ,p_per_in_ler_id_o
202: => ben_psg_shd.g_old_rec.per_in_ler_id
203: ,p_applicant_assignment_id_o
204: => ben_psg_shd.g_old_rec.applicant_assignment_id
205: ,p_offer_assignment_id_o
206: => ben_psg_shd.g_old_rec.offer_assignment_id
207: ,p_object_version_number_o
208: => ben_psg_shd.g_old_rec.object_version_number
202: => ben_psg_shd.g_old_rec.per_in_ler_id
203: ,p_applicant_assignment_id_o
204: => ben_psg_shd.g_old_rec.applicant_assignment_id
205: ,p_offer_assignment_id_o
206: => ben_psg_shd.g_old_rec.offer_assignment_id
207: ,p_object_version_number_o
208: => ben_psg_shd.g_old_rec.object_version_number
209: );
210: --
204: => ben_psg_shd.g_old_rec.applicant_assignment_id
205: ,p_offer_assignment_id_o
206: => ben_psg_shd.g_old_rec.offer_assignment_id
207: ,p_object_version_number_o
208: => ben_psg_shd.g_old_rec.object_version_number
209: );
210: --
211: exception
212: --
264: --
265: -- {End Of Comments}
266: -- ----------------------------------------------------------------------------
267: Procedure convert_defs
268: (p_rec in out nocopy ben_psg_shd.g_rec_type
269: ) is
270: --
271: Begin
272: --
276: -- is being used then we must set to the 'current' argument value.
277: --
278: If (p_rec.per_in_ler_id = hr_api.g_number) then
279: p_rec.per_in_ler_id :=
280: ben_psg_shd.g_old_rec.per_in_ler_id;
281: End If;
282: If (p_rec.applicant_assignment_id = hr_api.g_number) then
283: p_rec.applicant_assignment_id :=
284: ben_psg_shd.g_old_rec.applicant_assignment_id;
280: ben_psg_shd.g_old_rec.per_in_ler_id;
281: End If;
282: If (p_rec.applicant_assignment_id = hr_api.g_number) then
283: p_rec.applicant_assignment_id :=
284: ben_psg_shd.g_old_rec.applicant_assignment_id;
285: End If;
286: If (p_rec.offer_assignment_id = hr_api.g_number) then
287: p_rec.offer_assignment_id :=
288: ben_psg_shd.g_old_rec.offer_assignment_id;
284: ben_psg_shd.g_old_rec.applicant_assignment_id;
285: End If;
286: If (p_rec.offer_assignment_id = hr_api.g_number) then
287: p_rec.offer_assignment_id :=
288: ben_psg_shd.g_old_rec.offer_assignment_id;
289: End If;
290: --
291: End convert_defs;
292: --
293: -- ----------------------------------------------------------------------------
294: -- |---------------------------------< upd >----------------------------------|
295: -- ----------------------------------------------------------------------------
296: Procedure upd
297: (p_rec in out nocopy ben_psg_shd.g_rec_type
298: ) is
299: --
300: l_proc varchar2(72) := g_package||'upd';
301: --
303: hr_utility.set_location('Entering:'||l_proc, 5);
304: --
305: -- We must lock the row which we need to update.
306: --
307: ben_psg_shd.lck
308: (p_rec.pil_assignment_id
309: ,p_rec.object_version_number
310: );
311: --
351: ,p_applicant_assignment_id in number default hr_api.g_number
352: ,p_offer_assignment_id in number default hr_api.g_number
353: ) is
354: --
355: l_rec ben_psg_shd.g_rec_type;
356: l_proc varchar2(72) := g_package||'upd';
357: --
358: Begin
359: hr_utility.set_location('Entering:'||l_proc, 5);
361: -- Call conversion function to turn arguments into the
362: -- l_rec structure.
363: --
364: l_rec :=
365: ben_psg_shd.convert_args
366: (p_pil_assignment_id
367: ,p_per_in_ler_id
368: ,p_applicant_assignment_id
369: ,p_offer_assignment_id