1: Package Body psp_poa_ins as
2: /* $Header: PSPOARHB.pls 120.5 2006/09/05 11:10:12 dpaudel noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' psp_poa_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: psp_poa_ins.g_organization_account_id_i := p_organization_account_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
229: Cursor C_Sel2 is
230: Select null
231: from psp_organization_accounts
232: where organization_account_id =
233: psp_poa_ins.g_organization_account_id_i;
234: --
235: l_proc varchar2(72) := g_package||'pre_insert';
236: l_exists varchar2(1);
237: --
237: --
238: Begin
239: hr_utility.set_location('Entering:'||l_proc, 5);
240: --
241: If (psp_poa_ins.g_organization_account_id_i is not null) Then
242: --
243: -- Verify registered primary key values not already in use
244: --
245: Open C_Sel2;
257: --
258: -- Use registered key values and clear globals
259: --
260: p_rec.organization_account_id :=
261: psp_poa_ins.g_organization_account_id_i;
262: psp_poa_ins.g_organization_account_id_i := null;
263: Else
264: --
265: -- No registerd key values, so select the next sequence number
258: -- Use registered key values and clear globals
259: --
260: p_rec.organization_account_id :=
261: psp_poa_ins.g_organization_account_id_i;
262: psp_poa_ins.g_organization_account_id_i := null;
263: Else
264: --
265: -- No registerd key values, so select the next sequence number
266: --
423: hr_multi_message.end_validation_set;
424: --
425: -- Call the supporting pre-insert operation
426: --
427: psp_poa_ins.pre_insert(p_rec);
428: --
429: -- Insert the row
430: --
431: psp_poa_ins.insert_dml(p_rec);
427: psp_poa_ins.pre_insert(p_rec);
428: --
429: -- Insert the row
430: --
431: psp_poa_ins.insert_dml(p_rec);
432: --
433: -- Call the supporting post-insert operation
434: --
435: psp_poa_ins.post_insert
431: psp_poa_ins.insert_dml(p_rec);
432: --
433: -- Call the supporting post-insert operation
434: --
435: psp_poa_ins.post_insert
436: (p_rec
437: );
438: --
439: -- Call to raise any errors on multi-message list
531: --
532: -- Having converted the arguments into the psp_poa_rec
533: -- plsql record structure we call the corresponding record business process.
534: --
535: psp_poa_ins.ins
536: (l_rec
537: );
538: --
539: -- As the primary key argument(s)
544: --
545: hr_utility.set_location(' Leaving:'||l_proc, 10);
546: End ins;
547: --
548: end psp_poa_ins;