1: Package Body irc_ilp_ins as
2: /* $Header: irilprhi.pkb 120.2 2011/01/05 04:44:35 avarri noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := 'irc_ilp_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: irc_ilp_ins.g_location_pref_id_i := p_location_pref_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
239: Cursor C_Sel2 is
240: Select null
241: from irc_location_preferences
242: where location_pref_id =
243: irc_ilp_ins.g_location_pref_id_i;
244: --
245: l_proc varchar2(72) := g_package||'pre_insert';
246: l_exists varchar2(1);
247: --
247: --
248: Begin
249: hr_utility.set_location('Entering:'||l_proc, 5);
250: --
251: If (irc_ilp_ins.g_location_pref_id_i is not null) Then
252: --
253: -- Verify registered primary key values not already in use
254: --
255: Open C_Sel2;
267: --
268: -- Use registered key values and clear globals
269: --
270: p_rec.location_pref_id :=
271: irc_ilp_ins.g_location_pref_id_i;
272: irc_ilp_ins.g_location_pref_id_i := null;
273: Else
274: --
275: -- No registerd key values, so select the next sequence number
268: -- Use registered key values and clear globals
269: --
270: p_rec.location_pref_id :=
271: irc_ilp_ins.g_location_pref_id_i;
272: irc_ilp_ins.g_location_pref_id_i := null;
273: Else
274: --
275: -- No registerd key values, so select the next sequence number
276: --
447: hr_multi_message.end_validation_set;
448: --
449: -- Call the supporting pre-insert operation
450: --
451: irc_ilp_ins.pre_insert(p_rec);
452: --
453: -- Insert the row
454: --
455: irc_ilp_ins.insert_dml(p_rec);
451: irc_ilp_ins.pre_insert(p_rec);
452: --
453: -- Insert the row
454: --
455: irc_ilp_ins.insert_dml(p_rec);
456: --
457: -- Call the supporting post-insert operation
458: --
459: irc_ilp_ins.post_insert
455: irc_ilp_ins.insert_dml(p_rec);
456: --
457: -- Call the supporting post-insert operation
458: --
459: irc_ilp_ins.post_insert
460: (p_effective_date
461: ,p_rec
462: );
463: --
567: --
568: -- Having converted the arguments into the irc_ilp_rec
569: -- plsql record structure we call the corresponding record business process.
570: --
571: irc_ilp_ins.ins
572: (p_effective_date
573: ,l_rec
574: );
575: --
581: --
582: hr_utility.set_location(' Leaving:'||l_proc, 10);
583: End ins;
584: --
585: end irc_ilp_ins;