1: Package Body irc_pcv_ins as
2: /* $Header: irpcvrhi.pkb 120.0 2005/10/03 14:59:01 rbanda noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' irc_pcv_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_pcv_ins.g_prof_area_criteria_valu_id_i := p_prof_area_criteria_value_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
169: Cursor C_Sel2 is
170: Select null
171: from irc_prof_area_criteria_values
172: where prof_area_criteria_value_id =
173: irc_pcv_ins.g_prof_area_criteria_valu_id_i;
174: --
175: l_proc varchar2(72) := g_package||'pre_insert';
176: l_exists varchar2(1);
177: --
177: --
178: Begin
179: hr_utility.set_location('Entering:'||l_proc, 5);
180: --
181: If (irc_pcv_ins.g_prof_area_criteria_valu_id_i is not null) Then
182: --
183: -- Verify registered primary key values not already in use
184: --
185: Open C_Sel2;
197: --
198: -- Use registered key values and clear globals
199: --
200: p_rec.prof_area_criteria_value_id :=
201: irc_pcv_ins.g_prof_area_criteria_valu_id_i;
202: irc_pcv_ins.g_prof_area_criteria_valu_id_i := null;
203: Else
204: --
205: -- No registerd key values, so select the next sequence number
198: -- Use registered key values and clear globals
199: --
200: p_rec.prof_area_criteria_value_id :=
201: irc_pcv_ins.g_prof_area_criteria_valu_id_i;
202: irc_pcv_ins.g_prof_area_criteria_valu_id_i := null;
203: Else
204: --
205: -- No registerd key values, so select the next sequence number
206: --
307: hr_multi_message.end_validation_set;
308: --
309: -- Call the supporting pre-insert operation
310: --
311: irc_pcv_ins.pre_insert(p_rec);
312: --
313: -- Insert the row
314: --
315: irc_pcv_ins.insert_dml(p_rec);
311: irc_pcv_ins.pre_insert(p_rec);
312: --
313: -- Insert the row
314: --
315: irc_pcv_ins.insert_dml(p_rec);
316: --
317: -- Call the supporting post-insert operation
318: --
319: irc_pcv_ins.post_insert
315: irc_pcv_ins.insert_dml(p_rec);
316: --
317: -- Call the supporting post-insert operation
318: --
319: irc_pcv_ins.post_insert
320: (p_effective_date
321: ,p_rec
322: );
323: --
357: --
358: -- Having converted the arguments into the irc_pcv_rec
359: -- plsql record structure we call the corresponding record business process.
360: --
361: irc_pcv_ins.ins
362: (p_effective_date
363: ,l_rec
364: );
365: --
371: --
372: hr_utility.set_location(' Leaving:'||l_proc, 10);
373: End ins;
374: --
375: end irc_pcv_ins;