72: --
73: -- {End Of Comments}
74: -- ----------------------------------------------------------------------------
75: Procedure insert_dml
76: (p_rec in out nocopy per_abc_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_abc_shd.g_api_dml := true; -- Set the api dml status
86: --
87: -- Insert the row into: per_absence_cases
88: --
89: insert into per_absence_cases
230: ,p_rec.business_group_id
231: ,p_rec.comments
232: );
233: --
234: per_abc_shd.g_api_dml := false; -- Unset the api dml status
235: --
236: hr_utility.set_location(' Leaving:'||l_proc, 10);
237: Exception
238: When hr_api.check_integrity_violated Then
236: hr_utility.set_location(' Leaving:'||l_proc, 10);
237: Exception
238: When hr_api.check_integrity_violated Then
239: -- A check constraint has been violated
240: per_abc_shd.g_api_dml := false; -- Unset the api dml status
241: per_abc_shd.constraint_error
242: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
243: When hr_api.parent_integrity_violated Then
244: -- Parent integrity has been violated
237: Exception
238: When hr_api.check_integrity_violated Then
239: -- A check constraint has been violated
240: per_abc_shd.g_api_dml := false; -- Unset the api dml status
241: per_abc_shd.constraint_error
242: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
243: When hr_api.parent_integrity_violated Then
244: -- Parent integrity has been violated
245: per_abc_shd.g_api_dml := false; -- Unset the api dml status
241: per_abc_shd.constraint_error
242: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
243: When hr_api.parent_integrity_violated Then
244: -- Parent integrity has been violated
245: per_abc_shd.g_api_dml := false; -- Unset the api dml status
246: per_abc_shd.constraint_error
247: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
248: When hr_api.unique_integrity_violated Then
249: -- Unique integrity has been violated
242: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
243: When hr_api.parent_integrity_violated Then
244: -- Parent integrity has been violated
245: per_abc_shd.g_api_dml := false; -- Unset the api dml status
246: per_abc_shd.constraint_error
247: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
248: When hr_api.unique_integrity_violated Then
249: -- Unique integrity has been violated
250: per_abc_shd.g_api_dml := false; -- Unset the api dml status
246: per_abc_shd.constraint_error
247: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
248: When hr_api.unique_integrity_violated Then
249: -- Unique integrity has been violated
250: per_abc_shd.g_api_dml := false; -- Unset the api dml status
251: per_abc_shd.constraint_error
252: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253: When Others Then
254: per_abc_shd.g_api_dml := false; -- Unset the api dml status
247: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
248: When hr_api.unique_integrity_violated Then
249: -- Unique integrity has been violated
250: per_abc_shd.g_api_dml := false; -- Unset the api dml status
251: per_abc_shd.constraint_error
252: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253: When Others Then
254: per_abc_shd.g_api_dml := false; -- Unset the api dml status
255: Raise;
250: per_abc_shd.g_api_dml := false; -- Unset the api dml status
251: per_abc_shd.constraint_error
252: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253: When Others Then
254: per_abc_shd.g_api_dml := false; -- Unset the api dml status
255: Raise;
256: End insert_dml;
257: --
258: -- ----------------------------------------------------------------------------
292: --
293: -- {End Of Comments}
294: -- ----------------------------------------------------------------------------
295: Procedure pre_insert
296: (p_rec in out nocopy per_abc_shd.g_rec_type
297: ) is
298: --
299: Cursor C_Sel1 is select per_absence_cases_s.nextval from sys.dual;
300: --
379: --
380: -- {End Of Comments}
381: -- ----------------------------------------------------------------------------
382: Procedure post_insert
383: (p_rec in per_abc_shd.g_rec_type
384: ) is
385: --
386: l_proc varchar2(72) := g_package||'post_insert';
387: --
548: -- ----------------------------------------------------------------------------
549: -- |---------------------------------< ins >----------------------------------|
550: -- ----------------------------------------------------------------------------
551: Procedure ins
552: (p_rec in out nocopy per_abc_shd.g_rec_type
553: ) is
554: --
555: l_proc varchar2(72) := g_package||'ins';
556: --
661: ,p_absence_case_id out nocopy number
662: ,p_object_version_number out nocopy number
663: ) is
664: --
665: l_rec per_abc_shd.g_rec_type;
666: l_proc varchar2(72) := g_package||'ins';
667: --
668: Begin
669: hr_utility.set_location('Entering:'||l_proc, 5);
671: -- Call conversion function to turn arguments into the
672: -- p_rec structure.
673: --
674: l_rec :=
675: per_abc_shd.convert_args
676: (null
677: ,p_name
678: ,p_person_id
679: ,p_incident_id