1: Package Body pay_spr_ins as
2: /* $Header: pysprrhi.pkb 120.0 2005/05/29 08:54:06 appldev noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' pay_spr_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: --
24: --
25: Begin
26: hr_utility.set_location('Entering:'||l_proc, 10);
27: --
28: pay_spr_ins.g_security_profile_id_i := p_security_profile_id;
29: pay_spr_ins.g_payroll_id_i := p_payroll_id;
30: --
31: hr_utility.set_location(' Leaving:'||l_proc, 20);
32: End set_base_key_value;
25: Begin
26: hr_utility.set_location('Entering:'||l_proc, 10);
27: --
28: pay_spr_ins.g_security_profile_id_i := p_security_profile_id;
29: pay_spr_ins.g_payroll_id_i := p_payroll_id;
30: --
31: hr_utility.set_location(' Leaving:'||l_proc, 20);
32: End set_base_key_value;
33: --
180: Cursor C_Sel2 is
181: Select null
182: from pay_security_payrolls
183: where security_profile_id =
184: pay_spr_ins.g_security_profile_id_i
185: and payroll_id =
186: pay_spr_ins.g_payroll_id_i;
187: --
188: l_proc varchar2(72) := g_package||'pre_insert';
182: from pay_security_payrolls
183: where security_profile_id =
184: pay_spr_ins.g_security_profile_id_i
185: and payroll_id =
186: pay_spr_ins.g_payroll_id_i;
187: --
188: l_proc varchar2(72) := g_package||'pre_insert';
189: l_exists varchar2(1);
190: --
190: --
191: Begin
192: hr_utility.set_location('Entering:'||l_proc, 5);
193: --
194: If (pay_spr_ins.g_security_profile_id_i is not null and
195: pay_spr_ins.g_payroll_id_i is not null) Then
196: --
197: -- Verify registered primary key values not already in use
198: --
191: Begin
192: hr_utility.set_location('Entering:'||l_proc, 5);
193: --
194: If (pay_spr_ins.g_security_profile_id_i is not null and
195: pay_spr_ins.g_payroll_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.security_profile_id :=
215: pay_spr_ins.g_security_profile_id_i;
216: pay_spr_ins.g_security_profile_id_i := null;
217: p_rec.payroll_id :=
218: pay_spr_ins.g_payroll_id_i;
219: pay_spr_ins.g_payroll_id_i := null;
212: -- Use registered key values and clear globals
213: --
214: p_rec.security_profile_id :=
215: pay_spr_ins.g_security_profile_id_i;
216: pay_spr_ins.g_security_profile_id_i := null;
217: p_rec.payroll_id :=
218: pay_spr_ins.g_payroll_id_i;
219: pay_spr_ins.g_payroll_id_i := null;
220:
214: p_rec.security_profile_id :=
215: pay_spr_ins.g_security_profile_id_i;
216: pay_spr_ins.g_security_profile_id_i := null;
217: p_rec.payroll_id :=
218: pay_spr_ins.g_payroll_id_i;
219: pay_spr_ins.g_payroll_id_i := null;
220:
221: End If;
222: --
215: pay_spr_ins.g_security_profile_id_i;
216: pay_spr_ins.g_security_profile_id_i := null;
217: p_rec.payroll_id :=
218: pay_spr_ins.g_payroll_id_i;
219: pay_spr_ins.g_payroll_id_i := null;
220:
221: End If;
222: --
223: hr_utility.set_location(' Leaving:'||l_proc, 10);
315: hr_multi_message.end_validation_set;
316: --
317: -- Call the supporting pre-insert operation
318: --
319: pay_spr_ins.pre_insert(p_rec);
320: --
321: -- Insert the row
322: --
323: pay_spr_ins.insert_dml(p_rec);
319: pay_spr_ins.pre_insert(p_rec);
320: --
321: -- Insert the row
322: --
323: pay_spr_ins.insert_dml(p_rec);
324: --
325: -- Call the supporting post-insert operation
326: --
327: pay_spr_ins.post_insert
323: pay_spr_ins.insert_dml(p_rec);
324: --
325: -- Call the supporting post-insert operation
326: --
327: pay_spr_ins.post_insert
328: (p_effective_date
329: ,p_rec
330: );
331: --
388: --
389: -- Having converted the arguments into the pay_spr_rec
390: -- plsql record structure we call the corresponding record business process.
391: --
392: pay_spr_ins.ins
393: (p_effective_date
394: ,l_rec
395: );
396: --
398: --
399: hr_utility.set_location(' Leaving:'||l_proc, 10);
400: End ins;
401: --
402: end pay_spr_ins;