DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_FR_EMPLOYEE_API

Source


1 Package Body hr_fr_employee_api as
2 /* $Header: peempfri.pkb 115.3 2002/12/12 15:13:22 sfmorris noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := 'hr_fr_employee_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |-------------------------< create_fr_employee >---------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_fr_employee
13   (p_validate                      in     boolean
14   ,p_hire_date                     in     date
15   ,p_business_group_id             in     number
16   ,p_last_name                     in     varchar2
17   ,p_sex                           in     varchar2
18   ,p_person_type_id                in     number
19   ,p_comments                      in     varchar2
20   ,p_date_employee_data_verified   in     date
21   ,p_date_of_birth                 in     date
22   ,p_email_address                 in     varchar2
23   ,p_employee_number               in out nocopy varchar2
24   ,p_expense_check_send_to_addres  in     varchar2
25   ,p_first_name                    in     varchar2
26   ,p_known_as                      in     varchar2
27   ,p_marital_status                in     varchar2
28   ,p_middle_names                  in     varchar2
29   ,p_nationality                   in     varchar2
30   ,p_ni_number                     in     varchar2
31   ,p_previous_last_name            in     varchar2
32   ,p_registered_disabled_flag      in     varchar2
33   ,p_title                         in     varchar2
34   ,p_vendor_id                     in     number
35   ,p_work_telephone                in     varchar2
36   ,p_attribute_category            in     varchar2
37   ,p_attribute1                    in     varchar2
38   ,p_attribute2                    in     varchar2
39   ,p_attribute3                    in     varchar2
40   ,p_attribute4                    in     varchar2
41   ,p_attribute5                    in     varchar2
42   ,p_attribute6                    in     varchar2
43   ,p_attribute7                    in     varchar2
44   ,p_attribute8                    in     varchar2
45   ,p_attribute9                    in     varchar2
46   ,p_attribute10                   in     varchar2
47   ,p_attribute11                   in     varchar2
48   ,p_attribute12                   in     varchar2
49   ,p_attribute13                   in     varchar2
50   ,p_attribute14                   in     varchar2
51   ,p_attribute15                   in     varchar2
52   ,p_attribute16                   in     varchar2
53   ,p_attribute17                   in     varchar2
54   ,p_attribute18                   in     varchar2
55   ,p_attribute19                   in     varchar2
56   ,p_attribute20                   in     varchar2
57   ,p_attribute21                   in     varchar2
58   ,p_attribute22                   in     varchar2
59   ,p_attribute23                   in     varchar2
60   ,p_attribute24                   in     varchar2
61   ,p_attribute25                   in     varchar2
62   ,p_attribute26                   in     varchar2
63   ,p_attribute27                   in     varchar2
64   ,p_attribute28                   in     varchar2
65   ,p_attribute29                   in     varchar2
66   ,p_attribute30                   in     varchar2
67   ,p_date_of_death                 in     date
68   ,p_maiden_name                   in     varchar2
69   ,p_department_of_birth           in     varchar2
70   ,p_town_of_birth                 in     varchar2
71   ,p_country_of_birth              in     varchar2
72   ,p_military_status               in     varchar2
73   ,p_date_last_school_certificate  in     varchar2
74   ,p_school_name                   in     varchar2
75   ,p_level_of_education            in     varchar2
76   ,p_date_first_entry_into_france  in     varchar2
77   ,p_cpam_name                     in     varchar2
78   ,p_correspondence_language       in     varchar2
79   ,p_fast_path_employee            in     varchar2
80   ,p_fte_capacity                  in     number
81   ,p_honors                        in     varchar2
82   ,p_internal_location             in     varchar2
83   ,p_mailstop                      in     varchar2
84   ,p_office_number                 in     varchar2
85   ,p_pre_name_adjunct              in     varchar2
86   ,p_projected_start_date          in     date
87   ,p_resume_exists                 in     varchar2
88   ,p_resume_last_updated           in     date
89   ,p_student_status                in     varchar2
90   ,p_work_schedule                 in     varchar2
91   ,p_suffix                        in     varchar2
92   ,p_person_id                        out nocopy number
93   ,p_assignment_id                    out nocopy number
94   ,p_per_object_version_number        out nocopy number
95   ,p_asg_object_version_number        out nocopy number
96   ,p_per_effective_start_date         out nocopy date
97   ,p_per_effective_end_date           out nocopy date
98   ,p_full_name                        out nocopy varchar2
99   ,p_per_comment_id                   out nocopy number
100   ,p_assignment_sequence              out nocopy number
101   ,p_assignment_number                out nocopy varchar2
102   ,p_name_combination_warning         out nocopy boolean
103   ,p_assign_payroll_warning           out nocopy boolean
104   ) is
105   --
106   -- Declare cursors and local variables
107   --
108   l_proc                 varchar2(72) := g_package||'create_fr_employee';
109   l_legislation_code     varchar2(2);
110   --
111   cursor csr_bg is
112     select legislation_code
113     from per_business_groups pbg
114     where pbg.business_group_id = p_business_group_id;
115   --
116 begin
117   hr_utility.set_location('Entering:'|| l_proc, 5);
118   --
119   -- Validation in addition to Row Handlers
120   --
121   -- Check that the specified business group is valid.
122   --
123   open csr_bg;
124   fetch csr_bg
125   into l_legislation_code;
126   if csr_bg%notfound then
127     close csr_bg;
128     hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
129     hr_utility.raise_error;
130   end if;
131   close csr_bg;
132   --
133   -- Check that the legislation of the specified business group is 'FR'.
134   --
135   if l_legislation_code <> 'FR' then
136     hr_utility.set_message(801, 'HR_7961_PER_BUS_GRP_INVALID');
137     hr_utility.set_message_token('LEG_CODE','FR');
138     hr_utility.raise_error;
139   end if;
140 
141   hr_utility.set_location(l_proc, 6);
142   --
143   -- Call the person business process
144   --
145   hr_employee_api.create_employee
146   (p_validate                     => p_validate
147   ,p_hire_date                    => p_hire_date
148   ,p_business_group_id            => p_business_group_id
149   ,p_last_name                    => p_last_name
150   ,p_sex                          => p_sex
151   ,p_person_type_id               => p_person_type_id
152   ,p_per_comments                 => p_comments
153   ,p_date_employee_data_verified  => p_date_employee_data_verified
154   ,p_date_of_birth                => p_date_of_birth
155   ,p_email_address                => p_email_address
156   ,p_employee_number              => p_employee_number
157   ,p_expense_check_send_to_addres => p_expense_check_send_to_addres
158   ,p_first_name                   => p_first_name
159   ,p_known_as                     => p_known_as
160   ,p_marital_status               => p_marital_status
161   ,p_middle_names                 => p_middle_names
162   ,p_nationality                  => p_nationality
163   ,p_national_identifier          => p_ni_number
164   ,p_previous_last_name           => p_previous_last_name
165   ,p_registered_disabled_flag     => p_registered_disabled_flag
166   ,p_title                        => p_title
167   ,p_vendor_id                    => p_vendor_id
168   ,p_work_telephone               => p_work_telephone
169   ,p_attribute_category           => p_attribute_category
170   ,p_attribute1                   => p_attribute1
171   ,p_attribute2                   => p_attribute2
172   ,p_attribute3                   => p_attribute3
173   ,p_attribute4                   => p_attribute4
174   ,p_attribute5                   => p_attribute5
175   ,p_attribute6                   => p_attribute6
176   ,p_attribute7                   => p_attribute7
177   ,p_attribute8                   => p_attribute8
178   ,p_attribute9                   => p_attribute9
179   ,p_attribute10                  => p_attribute10
180   ,p_attribute11                  => p_attribute11
181   ,p_attribute12                  => p_attribute12
182   ,p_attribute13                  => p_attribute13
183   ,p_attribute14                  => p_attribute14
184   ,p_attribute15                  => p_attribute15
185   ,p_attribute16                  => p_attribute16
186   ,p_attribute17                  => p_attribute17
187   ,p_attribute18                  => p_attribute18
188   ,p_attribute19                  => p_attribute19
189   ,p_attribute20                  => p_attribute20
190   ,p_attribute21                  => p_attribute21
191   ,p_attribute22                  => p_attribute22
192   ,p_attribute23                  => p_attribute23
193   ,p_attribute24                  => p_attribute24
194   ,p_attribute25                  => p_attribute25
195   ,p_attribute26                  => p_attribute26
196   ,p_attribute27                  => p_attribute27
197   ,p_attribute28                  => p_attribute28
198   ,p_attribute29                  => p_attribute29
199   ,p_attribute30                  => p_attribute30
200   ,p_per_information_category     => 'FR'
201   ,p_per_information1             => p_maiden_name
202   ,p_per_information6             => p_military_status
203   ,p_per_information7             => p_date_last_school_certificate
204   ,p_per_information8             => p_school_name
205   ,p_per_information9             => p_level_of_education
206   ,p_per_information10            => p_date_first_entry_into_france
207   ,p_per_information11            => p_cpam_name
208   ,p_date_of_death                => p_date_of_death
209   ,p_correspondence_language      => p_correspondence_language
210   ,p_fast_path_employee           => p_fast_path_employee
211   ,p_fte_capacity                 => p_fte_capacity
212   ,p_honors                       => p_honors
213   ,p_internal_location            => p_internal_location
214   ,p_mailstop                     => p_mailstop
215   ,p_office_number                => p_office_number
216   ,p_pre_name_adjunct             => p_pre_name_adjunct
217   ,p_projected_start_date         => p_projected_start_date
218   ,p_resume_exists                => p_resume_exists
219   ,p_resume_last_updated          => p_resume_last_updated
220   ,p_student_status               => p_student_status
221   ,p_work_schedule                => p_work_schedule
222   ,p_suffix                       => p_suffix
223   ,p_town_of_birth                => p_town_of_birth
224   ,p_region_of_birth              => p_department_of_birth
225   ,p_country_of_birth             => p_country_of_birth
226   ,p_person_id                    => p_person_id
227   ,p_assignment_id                => p_assignment_id
228   ,p_per_object_version_number    => p_per_object_version_number
229   ,p_asg_object_version_number    => p_asg_object_version_number
230   ,p_per_effective_start_date     => p_per_effective_start_date
231   ,p_per_effective_end_date       => p_per_effective_end_date
232   ,p_full_name                    => p_full_name
233   ,p_per_comment_id               => p_per_comment_id
234   ,p_assignment_sequence          => p_assignment_sequence
235   ,p_assignment_number            => p_assignment_number
236   ,p_name_combination_warning     => p_name_combination_warning
237   ,p_assign_payroll_warning       => p_assign_payroll_warning
238   );
239   --
240   hr_utility.set_location(' Leaving:'||l_proc, 7);
241 --
242 end create_fr_employee;
243 --
244 end hr_fr_employee_api;