1: Package Body irc_cmc_ins as
2: /* $Header: ircmcrhi.pkb 120.0 2007/11/19 11:04:15 sethanga noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' irc_cmc_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_cmc_ins.g_communication_id_i := p_communication_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
177: Cursor C_Sel2 is
178: Select null
179: from irc_communications
180: where communication_id =
181: irc_cmc_ins.g_communication_id_i;
182: --
183: l_proc varchar2(72) := g_package||'pre_insert';
184: l_exists varchar2(1);
185: --
185: --
186: Begin
187: hr_utility.set_location('Entering:'||l_proc, 5);
188: --
189: If (irc_cmc_ins.g_communication_id_i is not null) Then
190: --
191: -- Verify registered primary key values not already in use
192: --
193: Open C_Sel2;
205: --
206: -- Use registered key values and clear globals
207: --
208: p_rec.communication_id :=
209: irc_cmc_ins.g_communication_id_i;
210: irc_cmc_ins.g_communication_id_i := null;
211: Else
212: --
213: -- No registerd key values, so select the next sequence number
206: -- Use registered key values and clear globals
207: --
208: p_rec.communication_id :=
209: irc_cmc_ins.g_communication_id_i;
210: irc_cmc_ins.g_communication_id_i := null;
211: Else
212: --
213: -- No registerd key values, so select the next sequence number
214: --
323: hr_multi_message.end_validation_set;
324: --
325: -- Call the supporting pre-insert operation
326: --
327: irc_cmc_ins.pre_insert(p_rec);
328: --
329: -- Insert the row
330: --
331: irc_cmc_ins.insert_dml(p_rec);
327: irc_cmc_ins.pre_insert(p_rec);
328: --
329: -- Insert the row
330: --
331: irc_cmc_ins.insert_dml(p_rec);
332: --
333: -- Call the supporting post-insert operation
334: --
335: --irc_cmc_ins.post_insert
331: irc_cmc_ins.insert_dml(p_rec);
332: --
333: -- Call the supporting post-insert operation
334: --
335: --irc_cmc_ins.post_insert
336: -- (p_effective_date
337: -- ,p_rec
338: -- );
339: --
381: --
382: -- Having converted the arguments into the irc_cmc_rec
383: -- plsql record structure we call the corresponding record business process.
384: --
385: irc_cmc_ins.ins
386: (p_effective_date
387: ,l_rec
388: );
389: --
395: --
396: hr_utility.set_location(' Leaving:'||l_proc, 10);
397: End ins;
398: --
399: end irc_cmc_ins;