DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_SEED_PERSON_TYPES

Source


1 package body ben_seed_person_types as
2 /* $Header: benpptse.pkb 120.0 2005/05/28 09:18:09 appldev noship $ */
3 --------------------------------------------------------------------------------
4 /*
5 +==============================================================================+
6 |			Copyright (c) 1997 Oracle Corporation		       |
7 |			   Redwood Shores, California, USA		       |
8 |			        All rights reserved.			       |
9 +==============================================================================+
10 --
11 Name
12 	Seed Person Types
13 Purpose
14         This package is used to seed person types on a business group basis.
15 History
16         Date             Who        Version    What?
17         ----             ---        -------    -----
18         16 Jun 98        G Perry    110.0      Created.
19 */
20 --------------------------------------------------------------------------------
21 --
22 g_package varchar2(80) := 'ben_seed_person_types';
23 --
24 type g_varchar80 is table of varchar2(80) index by binary_integer;
25 --
26 procedure seed_person_types(p_business_group_id in number) is
27   --
28   l_package               varchar2(80) := g_package||'.seed_person_types';
29   l_active_flag           g_varchar80;
30   l_default_flag          g_varchar80;
31   l_system_person_type    g_varchar80;
32   l_user_person_type      g_varchar80;
33   l_person_type_id        number;
34   l_number_of_types       number(9) := 3;
35   --
36 begin
37   --
38   hr_utility.set_location ('Entering '||l_package,10);
39   --
40   -- Setup arrays
41   --
42   l_active_flag(1) := 'Y';
43   l_active_flag(2) := 'Y';
44   l_active_flag(3) := 'Y';
45   --
46   l_default_flag(1) := 'N';
47   l_default_flag(2) := 'N';
48   l_default_flag(3) := 'N';
49   --
50   l_system_person_type(1) := 'BNF';
51   l_system_person_type(2) := 'DPNT';
52   l_system_person_type(3) := 'PRTN';
53   --
54   l_user_person_type(1) := 'Beneficiary';
55   l_user_person_type(2) := 'Dependent';
56   l_user_person_type(3) := 'Participant';
57   --
58   for l_count in 1..l_number_of_types loop
59     --
60     select per_person_types_s.nextval
61     into   l_person_type_id
62     from   sys.dual;
63     --
64     insert into per_person_types
65     (person_type_id,
66      business_group_id,
67      active_flag,
68      default_flag,
69      system_person_type,
70      user_person_type)
71     values
72     (l_person_type_id,
73      p_business_group_id,
74      l_active_flag(l_count),
75      l_default_flag(l_count),
76      l_system_person_type(l_count),
77      l_user_person_type(l_count));
78     --
79   end loop;
80   --
81   hr_utility.set_location ('Leaving '||l_package,10);
82   --
83 end seed_person_types;
84 --
85 end ben_seed_person_types;