1: Package Body irc_rav_ins as
2: /* $Header: irravrhi.pkb 120.2 2011/01/05 04:43:06 avarri noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' irc_rav_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_rav_ins.g_vac_rec_area_id_i := p_vac_rec_area_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
171: Cursor C_Sel2 is
172: Select null
173: from irc_vac_rec_area_values
174: where vac_rec_area_id =
175: irc_rav_ins.g_vac_rec_area_id_i;
176: --
177: l_proc varchar2(72) := g_package||'pre_insert';
178: l_exists varchar2(1);
179: --
179: --
180: Begin
181: hr_utility.set_location('Entering:'||l_proc, 5);
182: --
183: If (irc_rav_ins.g_vac_rec_area_id_i is not null) Then
184: --
185: -- Verify registered primary key values not already in use
186: --
187: Open C_Sel2;
199: --
200: -- Use registered key values and clear globals
201: --
202: p_rec.vac_rec_area_id :=
203: irc_rav_ins.g_vac_rec_area_id_i;
204: irc_rav_ins.g_vac_rec_area_id_i := null;
205: Else
206: --
207: -- No registerd key values, so select the next sequence number
200: -- Use registered key values and clear globals
201: --
202: p_rec.vac_rec_area_id :=
203: irc_rav_ins.g_vac_rec_area_id_i;
204: irc_rav_ins.g_vac_rec_area_id_i := null;
205: Else
206: --
207: -- No registerd key values, so select the next sequence number
208: --
311: hr_multi_message.end_validation_set;
312: --
313: -- Call the supporting pre-insert operation
314: --
315: irc_rav_ins.pre_insert(p_rec);
316: --
317: -- Insert the row
318: --
319: irc_rav_ins.insert_dml(p_rec);
315: irc_rav_ins.pre_insert(p_rec);
316: --
317: -- Insert the row
318: --
319: irc_rav_ins.insert_dml(p_rec);
320: --
321: -- Call the supporting post-insert operation
322: --
323: irc_rav_ins.post_insert
319: irc_rav_ins.insert_dml(p_rec);
320: --
321: -- Call the supporting post-insert operation
322: --
323: irc_rav_ins.post_insert
324: (p_effective_date
325: ,p_rec
326: );
327: --
363: --
364: -- Having converted the arguments into the irc_rav_rec
365: -- plsql record structure we call the corresponding record business process.
366: --
367: irc_rav_ins.ins
368: (p_effective_date
369: ,l_rec
370: );
371: --
377: --
378: hr_utility.set_location(' Leaving:'||l_proc, 10);
379: End ins;
380: --
381: end irc_rav_ins;