71: -- Internal Development Use Only.
72: --
73: -- {End Of Comments}
74: -- ----------------------------------------------------------------------------
75: Procedure insert_dml(p_rec in out nocopy ota_tfh_api_shd.g_rec_type) is
76: --
77: l_proc varchar2(72) := g_package||'insert_dml';
78: --
79: Begin
79: Begin
80: hr_utility.set_location('Entering:'||l_proc, 5);
81: p_rec.object_version_number := 1; -- Initialise the object version
82: --
83: ota_tfh_api_shd.g_api_dml := true; -- Set the api dml status
84: --
85: -- Insert the row into: ota_finance_headers
86: --
87: insert into ota_finance_headers
352: p_rec.transfer_from_cc_id,
353: p_rec.transfer_to_cc_id
354: );
355: --
356: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
357: --
358: hr_utility.set_location(' Leaving:'||l_proc, 10);
359: Exception
360: When hr_api.check_integrity_violated Then
358: hr_utility.set_location(' Leaving:'||l_proc, 10);
359: Exception
360: When hr_api.check_integrity_violated Then
361: -- A check constraint has been violated
362: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
363: ota_tfh_api_shd.constraint_error
364: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
365: When hr_api.parent_integrity_violated Then
366: -- Parent integrity has been violated
359: Exception
360: When hr_api.check_integrity_violated Then
361: -- A check constraint has been violated
362: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
363: ota_tfh_api_shd.constraint_error
364: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
365: When hr_api.parent_integrity_violated Then
366: -- Parent integrity has been violated
367: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
363: ota_tfh_api_shd.constraint_error
364: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
365: When hr_api.parent_integrity_violated Then
366: -- Parent integrity has been violated
367: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
368: ota_tfh_api_shd.constraint_error
369: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
370: When hr_api.unique_integrity_violated Then
371: -- Unique integrity has been violated
364: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
365: When hr_api.parent_integrity_violated Then
366: -- Parent integrity has been violated
367: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
368: ota_tfh_api_shd.constraint_error
369: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
370: When hr_api.unique_integrity_violated Then
371: -- Unique integrity has been violated
372: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
368: ota_tfh_api_shd.constraint_error
369: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
370: When hr_api.unique_integrity_violated Then
371: -- Unique integrity has been violated
372: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
373: ota_tfh_api_shd.constraint_error
374: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
375: When Others Then
376: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
369: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
370: When hr_api.unique_integrity_violated Then
371: -- Unique integrity has been violated
372: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
373: ota_tfh_api_shd.constraint_error
374: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
375: When Others Then
376: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
377: Raise;
372: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
373: ota_tfh_api_shd.constraint_error
374: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
375: When Others Then
376: ota_tfh_api_shd.g_api_dml := false; -- Unset the api dml status
377: Raise;
378: End insert_dml;
379: --
380: -- ----------------------------------------------------------------------------
413: -- Internal Development Use Only.
414: --
415: -- {End Of Comments}
416: -- ----------------------------------------------------------------------------
417: Procedure pre_insert(p_rec in out nocopy ota_tfh_api_shd.g_rec_type) is
418: --
419: l_proc varchar2(72) := g_package||'pre_insert';
420: --
421: Cursor C_Sel1 is select ota_finance_headers_s.nextval from sys.dual;
504: -- Internal Development Use Only.
505: --
506: -- {End Of Comments}
507: -- ----------------------------------------------------------------------------
508: Procedure post_insert(p_rec in ota_tfh_api_shd.g_rec_type) is
509: --
510: l_proc varchar2(72) := g_package||'post_insert';
511: --
512: Begin
519: -- |---------------------------------< ins >----------------------------------|
520: -- ----------------------------------------------------------------------------
521: Procedure ins
522: (
523: p_rec in out nocopy ota_tfh_api_shd.g_rec_type,
524: p_validate in boolean default false,
525: p_transaction_type in varchar2 default 'INSERT'
526: ) is
527: --
711: p_validate in boolean default false,
712: p_transaction_type in varchar2 default 'INSERT'
713: ) is
714: --
715: l_rec ota_tfh_api_shd.g_rec_type;
716: l_proc varchar2(72) := g_package||'ins';
717: --
718: Begin
719: hr_utility.set_location('Entering:'||l_proc, 5);
721: -- Call conversion function to turn arguments into the
722: -- p_rec structure.
723: --
724: l_rec :=
725: ota_tfh_api_shd.convert_args
726: (
727: null,
728: p_superceding_header_id,
729: p_authorizer_person_id,