1: Package Body ben_bcm_ins as
2: /* $Header: bebcmrhi.pkb 115.2 2003/03/10 14:31:07 ssrayapu noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' ben_bcm_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: ben_bcm_ins.g_cwb_matrix_id_i := p_cwb_matrix_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
183: Cursor C_Sel2 is
184: Select null
185: from ben_cwb_matrix
186: where cwb_matrix_id =
187: ben_bcm_ins.g_cwb_matrix_id_i;
188: --
189: l_proc varchar2(72) := g_package||'pre_insert';
190: l_exists varchar2(1);
191: --
191: --
192: Begin
193: hr_utility.set_location('Entering:'||l_proc, 5);
194: --
195: If (ben_bcm_ins.g_cwb_matrix_id_i is not null) Then
196: --
197: -- Verify registered primary key values not already in use
198: --
199: Open C_Sel2;
211: --
212: -- Use registered key values and clear globals
213: --
214: p_rec.cwb_matrix_id :=
215: ben_bcm_ins.g_cwb_matrix_id_i;
216: ben_bcm_ins.g_cwb_matrix_id_i := null;
217: Else
218: --
219: -- No registerd key values, so select the next sequence number
212: -- Use registered key values and clear globals
213: --
214: p_rec.cwb_matrix_id :=
215: ben_bcm_ins.g_cwb_matrix_id_i;
216: ben_bcm_ins.g_cwb_matrix_id_i := null;
217: Else
218: --
219: -- No registerd key values, so select the next sequence number
220: --
335: hr_multi_message.end_validation_set;
336: --
337: -- Call the supporting pre-insert operation
338: --
339: ben_bcm_ins.pre_insert(p_rec);
340: --
341: -- Insert the row
342: --
343: ben_bcm_ins.insert_dml(p_rec);
339: ben_bcm_ins.pre_insert(p_rec);
340: --
341: -- Insert the row
342: --
343: ben_bcm_ins.insert_dml(p_rec);
344: --
345: -- Call the supporting post-insert operation
346: --
347: ben_bcm_ins.post_insert
343: ben_bcm_ins.insert_dml(p_rec);
344: --
345: -- Call the supporting post-insert operation
346: --
347: ben_bcm_ins.post_insert
348: (p_effective_date
349: ,p_rec
350: );
351: --
399: --
400: -- Having converted the arguments into the ben_bcm_rec
401: -- plsql record structure we call the corresponding record business process.
402: --
403: ben_bcm_ins.ins
404: (p_effective_date
405: ,l_rec
406: );
407: --
413: --
414: hr_utility.set_location(' Leaving:'||l_proc, 10);
415: End ins;
416: --
417: end ben_bcm_ins;