1: Package Body ota_lci_ins as
2: /* $Header: otlcirhi.pkb 120.1 2006/10/09 11:53:51 sschauha noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ota_lci_ins.'; -- Global package name
9: --
10: -- The following global variables are only to be used by
11: -- the set_base_key_value and pre_insert procedures.
12: --
24: --
25: Begin
26: hr_utility.set_location('Entering:'||l_proc, 10);
27: --
28: ota_lci_ins.g_learning_path_id_i := p_learning_path_id;
29: ota_lci_ins.g_category_usage_id_i := p_category_usage_id;
30: --
31: hr_utility.set_location(' Leaving:'||l_proc, 20);
32: End set_base_key_value;
25: Begin
26: hr_utility.set_location('Entering:'||l_proc, 10);
27: --
28: ota_lci_ins.g_learning_path_id_i := p_learning_path_id;
29: ota_lci_ins.g_category_usage_id_i := p_category_usage_id;
30: --
31: hr_utility.set_location(' Leaving:'||l_proc, 20);
32: End set_base_key_value;
33: --
220: Cursor C_Sel2 is
221: Select null
222: from ota_lp_cat_inclusions
223: where learning_path_id =
224: ota_lci_ins.g_learning_path_id_i
225: or category_usage_id =
226: ota_lci_ins.g_category_usage_id_i;
227: --
228: */
222: from ota_lp_cat_inclusions
223: where learning_path_id =
224: ota_lci_ins.g_learning_path_id_i
225: or category_usage_id =
226: ota_lci_ins.g_category_usage_id_i;
227: --
228: */
229: l_proc varchar2(72) := g_package||'pre_insert';
230: -- l_exists varchar2(1);
232: Begin
233: hr_utility.set_location('Entering:'||l_proc, 5);
234: --
235: /*
236: If (ota_lci_ins.g_learning_path_id_i is not null or
237: ota_lci_ins.g_category_usage_id_i is not null) Then
238: --
239: -- Verify registered primary key values not already in use
240: --
233: hr_utility.set_location('Entering:'||l_proc, 5);
234: --
235: /*
236: If (ota_lci_ins.g_learning_path_id_i is not null or
237: ota_lci_ins.g_category_usage_id_i is not null) Then
238: --
239: -- Verify registered primary key values not already in use
240: --
241: Open C_Sel2;
259: from global location. No need to set these global location again to null because _api will require learning_path_id and
260: category_usage_id and ins will set global location by these value. In any case global location will not carry any old value.
261:
262: p_rec.learning_path_id :=
263: ota_lci_ins.g_learning_path_id_i;
264: ota_lci_ins.g_learning_path_id_i := null;
265: p_rec.category_usage_id :=
266: ota_lci_ins.g_category_usage_id_i;
267: ota_lci_ins.g_category_usage_id_i := null;
260: category_usage_id and ins will set global location by these value. In any case global location will not carry any old value.
261:
262: p_rec.learning_path_id :=
263: ota_lci_ins.g_learning_path_id_i;
264: ota_lci_ins.g_learning_path_id_i := null;
265: p_rec.category_usage_id :=
266: ota_lci_ins.g_category_usage_id_i;
267: ota_lci_ins.g_category_usage_id_i := null;
268: End Bug 5586350*/
262: p_rec.learning_path_id :=
263: ota_lci_ins.g_learning_path_id_i;
264: ota_lci_ins.g_learning_path_id_i := null;
265: p_rec.category_usage_id :=
266: ota_lci_ins.g_category_usage_id_i;
267: ota_lci_ins.g_category_usage_id_i := null;
268: End Bug 5586350*/
269: /*
270: Else
263: ota_lci_ins.g_learning_path_id_i;
264: ota_lci_ins.g_learning_path_id_i := null;
265: p_rec.category_usage_id :=
266: ota_lci_ins.g_category_usage_id_i;
267: ota_lci_ins.g_category_usage_id_i := null;
268: End Bug 5586350*/
269: /*
270: Else
271: --
419: p_rec.learning_path_id := null;
420: p_rec.category_usage_id := null;
421: */
422:
423: ota_lci_ins.set_base_key_value( p_learning_path_id => l_learning_path_id
424: ,p_category_usage_id => l_category_usage_id
425: );
426:
427:
439: hr_multi_message.end_validation_set;
440: --
441: -- Call the supporting pre-insert operation
442: --
443: ota_lci_ins.pre_insert(p_rec);
444: --
445: -- Insert the row
446: --
447: ota_lci_ins.insert_dml(p_rec);
443: ota_lci_ins.pre_insert(p_rec);
444: --
445: -- Insert the row
446: --
447: ota_lci_ins.insert_dml(p_rec);
448: --
449: -- Call the supporting post-insert operation
450: --
451: ota_lci_ins.post_insert
447: ota_lci_ins.insert_dml(p_rec);
448: --
449: -- Call the supporting post-insert operation
450: --
451: ota_lci_ins.post_insert
452: (p_effective_date
453: ,p_rec
454: );
455: --
539: --
540: -- Having converted the arguments into the ota_lci_rec
541: -- plsql record structure we call the corresponding record business process.
542: --
543: ota_lci_ins.ins
544: (p_effective_date
545: ,l_rec
546: );
547: --
554: --
555: hr_utility.set_location(' Leaving:'||l_proc, 10);
556: End ins;
557: --
558: end ota_lci_ins;