72: --
73: -- {End Of Comments}
74: -- ----------------------------------------------------------------------------
75: Procedure insert_dml
76: (p_rec in out nocopy per_vac_shd.g_rec_type
77: ) is
78: --
79: l_proc varchar2(72) := g_package||'insert_dml';
80: --
81: Begin
82: hr_utility.set_location('Entering:'||l_proc, 5);
83: p_rec.object_version_number := 1; -- Initialise the object version
84: --
85: per_vac_shd.g_api_dml := true; -- Set the api dml status
86: --
87: -- Insert the row into: per_all_vacancies
88: --
89: insert into per_all_vacancies
190: ,p_rec.assessment_id
191: ,p_rec.object_version_number
192: );
193: --
194: per_vac_shd.g_api_dml := false; -- Unset the api dml status
195: --
196: hr_utility.set_location(' Leaving:'||l_proc, 10);
197: Exception
198: When hr_api.check_integrity_violated then
196: hr_utility.set_location(' Leaving:'||l_proc, 10);
197: Exception
198: When hr_api.check_integrity_violated then
199: -- A check constraint has been violated
200: per_vac_shd.g_api_dml := false; -- Unset the api dml status
201: per_vac_shd.constraint_error
202: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
203: When hr_api.parent_integrity_violated then
204: -- Parent integrity has been violated
197: Exception
198: When hr_api.check_integrity_violated then
199: -- A check constraint has been violated
200: per_vac_shd.g_api_dml := false; -- Unset the api dml status
201: per_vac_shd.constraint_error
202: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
203: When hr_api.parent_integrity_violated then
204: -- Parent integrity has been violated
205: per_vac_shd.g_api_dml := false; -- Unset the api dml status
201: per_vac_shd.constraint_error
202: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
203: When hr_api.parent_integrity_violated then
204: -- Parent integrity has been violated
205: per_vac_shd.g_api_dml := false; -- Unset the api dml status
206: per_vac_shd.constraint_error
207: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
208: When hr_api.unique_integrity_violated then
209: -- Unique integrity has been violated
202: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
203: When hr_api.parent_integrity_violated then
204: -- Parent integrity has been violated
205: per_vac_shd.g_api_dml := false; -- Unset the api dml status
206: per_vac_shd.constraint_error
207: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
208: When hr_api.unique_integrity_violated then
209: -- Unique integrity has been violated
210: per_vac_shd.g_api_dml := false; -- Unset the api dml status
206: per_vac_shd.constraint_error
207: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
208: When hr_api.unique_integrity_violated then
209: -- Unique integrity has been violated
210: per_vac_shd.g_api_dml := false; -- Unset the api dml status
211: per_vac_shd.constraint_error
212: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
213: When Others then
214: per_vac_shd.g_api_dml := false; -- Unset the api dml status
207: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
208: When hr_api.unique_integrity_violated then
209: -- Unique integrity has been violated
210: per_vac_shd.g_api_dml := false; -- Unset the api dml status
211: per_vac_shd.constraint_error
212: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
213: When Others then
214: per_vac_shd.g_api_dml := false; -- Unset the api dml status
215: Raise;
210: per_vac_shd.g_api_dml := false; -- Unset the api dml status
211: per_vac_shd.constraint_error
212: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
213: When Others then
214: per_vac_shd.g_api_dml := false; -- Unset the api dml status
215: Raise;
216: End insert_dml;
217: --
218: -- ----------------------------------------------------------------------------
253: --
254: -- {End Of Comments}
255: -- ----------------------------------------------------------------------------
256: Procedure pre_insert
257: (p_rec in out nocopy per_vac_shd.g_rec_type
258: ) is
259: --
260: Cursor C_Sel1 is select per_vacancies_s.nextval from sys.dual;
261: --
340: --
341: -- {End Of Comments}
342: -- ----------------------------------------------------------------------------
343: Procedure post_insert
344: (p_rec in per_vac_shd.g_rec_type
345: ,p_effective_date in date
346: ) is
347: --
348: l_proc varchar2(72) := g_package||'post_insert';
472: -- ----------------------------------------------------------------------------
473: -- |---------------------------------< ins >----------------------------------|
474: -- ----------------------------------------------------------------------------
475: Procedure ins
476: (p_rec in out nocopy per_vac_shd.g_rec_type
477: ,p_effective_date in date
478: ,p_inv_pos_grade_warning out nocopy boolean
479: ,p_inv_job_grade_warning out nocopy boolean
480: ) is
570: ,p_vacancy_id out nocopy number
571: ,p_object_version_number out nocopy number
572: ) is
573: --
574: l_rec per_vac_shd.g_rec_type;
575: l_proc varchar2(72) := g_package||'ins';
576: --
577: Begin
578: hr_utility.set_location('Entering:'||l_proc, 5);
580: -- Call conversion function to turn arguments into the
581: -- p_rec structure.
582: --
583: l_rec :=
584: per_vac_shd.convert_args
585: (null
586: ,p_business_group_id
587: ,p_position_id
588: ,p_job_id