1: Package Body ota_anc_ins as
2: /* $Header: otancrhi.pkb 115.0 2003/12/01 05:59 arkashya noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ota_anc_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: --
22: --
23: Begin
24: hr_utility.set_location('Entering:'||l_proc, 10);
25: --
26: ota_anc_ins.g_announcement_id_i := p_announcement_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
215: Cursor C_Sel2 is
216: Select null
217: from ota_announcements
218: where announcement_id =
219: ota_anc_ins.g_announcement_id_i;
220: --
221: l_proc varchar2(72) := g_package||'pre_insert';
222: l_exists varchar2(1);
223: --
223: --
224: Begin
225: hr_utility.set_location('Entering:'||l_proc, 5);
226: --
227: If (ota_anc_ins.g_announcement_id_i is not null) Then
228: --
229: -- Verify registered primary key values not already in use
230: --
231: Open C_Sel2;
243: --
244: -- Use registered key values and clear globals
245: --
246: p_rec.announcement_id :=
247: ota_anc_ins.g_announcement_id_i;
248: ota_anc_ins.g_announcement_id_i := null;
249: Else
250: --
251: -- No registerd key values, so select the next sequence number
244: -- Use registered key values and clear globals
245: --
246: p_rec.announcement_id :=
247: ota_anc_ins.g_announcement_id_i;
248: ota_anc_ins.g_announcement_id_i := null;
249: Else
250: --
251: -- No registerd key values, so select the next sequence number
252: --
399: hr_multi_message.end_validation_set;
400: --
401: -- Call the supporting pre-insert operation
402: --
403: ota_anc_ins.pre_insert(p_rec);
404: --
405: -- Insert the row
406: --
407: ota_anc_ins.insert_dml(p_rec);
403: ota_anc_ins.pre_insert(p_rec);
404: --
405: -- Insert the row
406: --
407: ota_anc_ins.insert_dml(p_rec);
408: --
409: -- Call the supporting post-insert operation
410: --
411: ota_anc_ins.post_insert
407: ota_anc_ins.insert_dml(p_rec);
408: --
409: -- Call the supporting post-insert operation
410: --
411: ota_anc_ins.post_insert
412: (p_effective_date
413: ,p_rec
414: );
415: --
495: --
496: -- Having converted the arguments into the ota_anc_rec
497: -- plsql record structure we call the corresponding record business process.
498: --
499: ota_anc_ins.ins
500: (p_effective_date
501: ,l_rec
502: );
503: --
509: --
510: hr_utility.set_location(' Leaving:'||l_proc, 10);
511: End ins;
512: --
513: end ota_anc_ins;