1 PACKAGE hr_in_employee_api AS
2 /* $Header: peempini.pkh 120.2 2007/10/05 11:26:10 sivanara ship $ */
3 /*#
4 * This package contains employee APIs.
5 * @rep:scope public
6 * @rep:product PER
7 * @rep:displayname Employee for India
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< create_in_employee >------------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates an employee.
17 *
18 * A new employee is created, along with a default primary assignment and a
19 * period of service. Secure user functionality is included in this version of
20 * the API.<P>The following parameters are currently unsupported and must
21 * have a null value : p_fast_path_employee p_projected_start_date.
22 *
23 * <p><b>Licensing</b><br>
24 * This API is licensed for use with Human Resources.
25 *
26 * <p><b>Prerequisites</b><br>
27 * If person_type_id is supplied, it must have a corresponding system person
28 * type of 'EMP', must be active and be in the same business group as that of
29 * the employee being created.
30 *
31 * <p><b>Post Success</b><br>
32 * The person, primary assignment and period of service will be successfully
33 * inserted into the database.
34 *
35 * <p><b>Post Failure</b><br>
36 * The API does not create the person, primary assignment or period of service
37 * and raises an error.
38 *
39 * @param p_validate If true, then validation alone will be performed and the
40 * database will remain unchanged. If false and all validation checks pass,
41 * then the database will be modified.
42 * @param p_hire_date The employee hire date and thus the effective start date
43 * of the person, primary assignment and period of service.
44 * @param p_business_group_id The employee's business group.
45 * @param p_last_name Employee's last name.
46 * @param p_sex Employee's sex. Valid values are defined by 'SEX' lookup type.
47 * @param p_person_type_id Person type id. If this value is omitted then the
48 * person_type_id of the default `EMP' system person type in the employee's
49 * business group is used.
50 * @param p_per_comments Comments for person record.
51 * @param p_date_employee_data_verified The date on which the employee data was
52 * last verified.
53 * @param p_date_of_birth Date of birth of the employee.
54 * @param p_email_address Email address of the employee.
55 * @param p_employee_number The business group's employee number generation
56 * method determines when the API derives and passes out an employee number or
57 * when the calling program should pass in a value. When the API call completes
58 * if p_validate is false then will be set to the employee number. If
59 * p_validate is true then will be set to the passed value.
60 * @param p_expense_check_send_to_addres Type of mailing address. Valid values
61 * are defined by 'HOME_OFFICE' lookup type.
62 * @param p_first_name Employee's first name.
63 * @param p_alias_name Alternative name of the employee.
64 * @param p_marital_status Marital status of the employee. Valid values are
65 * defined by 'MAR_STATUS' lookup type.
66 * @param p_middle_names Employee middle name(s).
67 * @param p_nationality Nationality of the person. Valid values are defined by
68 * 'NATIONALITY' lookup type.
69 * @param p_national_identifier National identifier of the employee.
70 * @param p_previous_last_name Previous last name of the employee.
71 * @param p_registered_disabled_flag Indicates whether person is classified as
72 * disabled. Valid values are defined by 'REGISTERED_DISABLED' lookup type.
73 * @param p_title Employee's title. Valid values are defined by 'TITLE' lookup
74 * type.
75 * @param p_vendor_id Unique identifier of supplier.
76 * @param p_work_telephone Work telephone of the employee.
77 * @param p_attribute_category This context value determines which flexfield
78 * structure to use with the descriptive flexfield segments.
79 * @param p_attribute1 Descriptive flexfield segment.
80 * @param p_attribute2 Descriptive flexfield segment.
81 * @param p_attribute3 Descriptive flexfield segment.
82 * @param p_attribute4 Descriptive flexfield segment.
83 * @param p_attribute5 Descriptive flexfield segment.
84 * @param p_attribute6 Descriptive flexfield segment.
85 * @param p_attribute7 Descriptive flexfield segment.
86 * @param p_attribute8 Descriptive flexfield segment.
87 * @param p_attribute9 Descriptive flexfield segment.
88 * @param p_attribute10 Descriptive flexfield segment.
89 * @param p_attribute11 Descriptive flexfield segment.
90 * @param p_attribute12 Descriptive flexfield segment.
91 * @param p_attribute13 Descriptive flexfield segment.
92 * @param p_attribute14 Descriptive flexfield segment.
93 * @param p_attribute15 Descriptive flexfield segment.
94 * @param p_attribute16 Descriptive flexfield segment.
95 * @param p_attribute17 Descriptive flexfield segment.
96 * @param p_attribute18 Descriptive flexfield segment.
97 * @param p_attribute19 Descriptive flexfield segment.
98 * @param p_attribute20 Descriptive flexfield segment.
99 * @param p_attribute21 Descriptive flexfield segment.
100 * @param p_attribute22 Descriptive flexfield segment.
101 * @param p_attribute23 Descriptive flexfield segment.
102 * @param p_attribute24 Descriptive flexfield segment.
103 * @param p_attribute25 Descriptive flexfield segment.
104 * @param p_attribute26 Descriptive flexfield segment.
105 * @param p_attribute27 Descriptive flexfield segment.
106 * @param p_attribute28 Descriptive flexfield segment.
107 * @param p_attribute29 Descriptive flexfield segment.
108 * @param p_attribute30 Descriptive flexfield segment.
109 * @param p_NSSN of the person. Should be 14 digit number.
110 * @param p_pan PAN of the person. Should be in correct format (XXXXX9999X).
111 * @param p_pan_af PAN Applied for Flag. Valid values are defined by 'YES_NO'
112 * lookup type. Has to be null if p_pan is populated.
113 * @param p_ex_serviceman Military Status. Valid values are defined by 'YES_NO'
114 * lookup type.
115 * @param p_resident_status Residential Status of the person. Valid values are
116 * defined by 'IN_RESIDENTIAL_STATUS' lookup type.
117 * @param p_pf_number PF Number of the employee.
118 * @param p_esi_number ESI Nnumber of the employee.
119 * @param p_superannuation_number Superannuation Number of the employee.
120 * @param p_group_ins_number Group Insurance Number of the employee.
121 * @param p_gratuity_number Gratuity Number of the employee.
122 * @param p_pension_number Pension Number of the employee.
123 * @param p_date_of_death Date of death of the employee.
124 * @param p_background_check_status Y/N flag indicates whether background check
125 * has been performed.
126 * @param p_background_date_check Date background check was performed.
127 * @param p_blood_type Type of blood group of the employee. Valid values are
128 * defined by 'BLOOD_TYPE' lookup type.
129 * @param p_correspondence_language Preferred language for correspondance.
130 * Valid values are defined by FND_LANGUAGES.
131 * @param p_fast_path_employee Obsolete parameter, do not use.
132 * @param p_fte_capacity Full time/part time availability for work.
133 * @param p_honors Honors or degrees awarded.
134 * @param p_internal_location Internal location of office.
135 * @param p_last_medical_test_by Name of physician who performed last medical
136 * test.
137 * @param p_last_medical_test_date Date of last medical test.
138 * @param p_mailstop Office identifier for internal mail.
139 * @param p_office_number Office number of the employee.
140 * @param p_on_military_service Y/N flag indicating whether person is employed
141 * in military service.
142 * @param p_pre_name_adjunct Prefix in the name of the employee.
143 * @param p_rehire_recommendation The employee can be rehired or not after
144 * termination.
145 * @param p_projected_start_date Obsolete parameter, do not use.
146 * @param p_resume_exists Y/N flag indicating whether resume is on file.
147 * @param p_resume_last_updated Date when the resume was last updated.
148 * @param p_second_passport_exists Y/N flag indicating whether person has
149 * multiple passports.
150 * @param p_student_status Full time/part time status of student. Valid values
151 * are defined by 'STUDENT_STATUS' lookup type.
152 * @param p_work_schedule Type of work schedule indicating which days the
153 * person works. Valid values are defined by 'WORK_SCHEDULE' lookup type.
154 * @param p_suffix Employee's suffix.
155 * @param p_benefit_group_id Identification for benefit group of the employee.
156 * @param p_receipt_of_death_cert_date Date when the death certificate was
157 * received.
158 * @param p_coord_ben_med_pln_no Coordination of benefits medical group plan
159 * number.
160 * @param p_coord_ben_no_cvg_flag Coordination of benefits no other coverage
161 * flag.
162 * @param p_coord_ben_med_ext_er Secondary medical coverage external employer.
163 * @param p_coord_ben_med_pl_name Secondary medical coverage name.
164 * @param p_coord_ben_med_insr_crr_name Secondary medical coverage insurance
165 * carrier name.
166 * @param p_coord_ben_med_insr_crr_ident Identifier for secondary medical
167 * coverage insurance carrier.
168 * @param p_coord_ben_med_cvg_strt_dt Secondary medical coverage effective
169 * start date.
170 * @param p_coord_ben_med_cvg_end_dt Secondary medical coverage effective end
171 * date.
172 * @param p_uses_tobacco_flag Tobacco type used by the employee. Valid values
173 * are defined by 'TOBACCO_USER' lookup type.
174 * @param p_dpdnt_adoption_date Date dependent was adopted.
175 * @param p_dpdnt_vlntry_svce_flag Indicates whether the dependent is on
176 * voluntary service.
177 * @param p_original_date_of_hire Original date of hire of the employee.
178 * @param p_adjusted_svc_date Adjusted service date.
179 * @param p_place_of_birth Town or city of birth of the employee.
180 * @param p_region_of_birth Geographical region of birth of the employee.
181 * @param p_country_of_birth Country of birth of the employee.
182 * @param p_global_person_id Global Identification number for the employee.
183 * @param p_party_id Identifier for the party.
184 * @param p_person_id If p_validate is false, then this uniquely identifies the
185 * person created. If p_validate is true, then set to null.
186 * @param p_assignment_id If p_validate is false, then this uniquely identifies
187 * the created assignment. If p_validate is true, then set to null.
188 * @param p_per_object_version_number If p_validate is false, then set to the
189 * version number of the created person. If p_validate is true, then the value
190 * will be null.
191 * @param p_asg_object_version_number If p_validate is false, then this
192 * parameter is set to the version number of the assignment created. If
193 * p_validate is true, then this parameter is null.
194 * @param p_per_effective_start_date If p_validate is false, this will be set
195 * to the effective start date of the person. If p_validate is true this will
196 * be null.
197 * @param p_per_effective_end_date If p_validate is false, this will be set to
198 * the effective end date of the person. If p_validate is true this will be
199 * null.
200 * @param p_full_name If p_validate is false, this will be set to the complete
201 * full name of the person. If p_validate is true this will be null.
202 * @param p_per_comment_id If p_validate is false this will be set to the id of
203 * the corresponding person comment row, if any comment text exists. If
204 * p_validate is true this will be null.
205 * @param p_assignment_sequence If p_validate is false this will be set to the
206 * sequence number of the primary assignment. If p_validate is true this will
207 * be null.
208 * @param p_assignment_number If p_validate is false this will be set to the
209 * assignment number of the primary assignment. If p_validate is true this will
210 * be null.
211 * @param p_name_combination_warning If set to true, then the combination of
212 * last name, first name and date of birth existed prior to calling this API.
213 * @param p_assign_payroll_warning If set to true, then the date of birth is
214 * not entered. If set to false, then the date of birth has been entered.
215 * Indicates if it will be possible to set the payroll on any of this person's
216 * assignments.
217 * @param p_orig_hire_warning Set to true if the original date of hire is not
218 * null and the person type is not EMP,EMP_APL, EX_EMP or EX_EMP_APL.
219 * @rep:displayname Create Employee for India
220 * @rep:category BUSINESS_ENTITY PER_EMPLOYEE
221 * @rep:lifecycle active
222 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
223 * @rep:scope public
224 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
225 */
226 --
227 -- {End Of Comments}
228 --
229 procedure create_in_employee
230 (p_validate IN boolean default false
231 ,p_hire_date IN date
232 ,p_business_group_id IN number
233 ,p_last_name IN varchar2
234 ,p_sex IN varchar2
235 ,p_person_type_id IN number default null
236 ,p_per_comments IN varchar2 default null
237 ,p_date_employee_data_verified IN date default null
238 ,p_date_of_birth IN date default null
239 ,p_email_address IN varchar2 default null
240 ,p_employee_number IN out nocopy varchar2
241 ,p_expense_check_send_to_addres IN varchar2 default null
242 ,p_first_name IN varchar2 default null
243 ,p_alias_name IN varchar2 default null --Bugfix 3762728
244 ,p_marital_status IN varchar2 default null
245 ,p_middle_names IN varchar2 default null
246 ,p_nationality IN varchar2 default null
247 ,p_national_identifier IN varchar2 default null
248 ,p_previous_last_name IN varchar2 default null
249 ,p_registered_disabled_flag IN varchar2 default null
250 ,p_title IN varchar2 default null
251 ,p_vendor_id IN number default null
252 ,p_work_telephone IN varchar2 default null
253 ,p_attribute_category IN varchar2 default null
254 ,p_attribute1 IN varchar2 default null
255 ,p_attribute2 IN varchar2 default null
256 ,p_attribute3 IN varchar2 default null
257 ,p_attribute4 IN varchar2 default null
258 ,p_attribute5 IN varchar2 default null
259 ,p_attribute6 IN varchar2 default null
260 ,p_attribute7 IN varchar2 default null
261 ,p_attribute8 IN varchar2 default null
262 ,p_attribute9 IN varchar2 default null
263 ,p_attribute10 IN varchar2 default null
264 ,p_attribute11 IN varchar2 default null
265 ,p_attribute12 IN varchar2 default null
266 ,p_attribute13 IN varchar2 default null
267 ,p_attribute14 IN varchar2 default null
268 ,p_attribute15 IN varchar2 default null
269 ,p_attribute16 IN varchar2 default null
270 ,p_attribute17 IN varchar2 default null
271 ,p_attribute18 IN varchar2 default null
272 ,p_attribute19 IN varchar2 default null
273 ,p_attribute20 IN varchar2 default null
274 ,p_attribute21 IN varchar2 default null
275 ,p_attribute22 IN varchar2 default null
276 ,p_attribute23 IN varchar2 default null
277 ,p_attribute24 IN varchar2 default null
278 ,p_attribute25 IN varchar2 default null
279 ,p_attribute26 IN varchar2 default null
280 ,p_attribute27 IN varchar2 default null
281 ,p_attribute28 IN varchar2 default null
282 ,p_attribute29 IN varchar2 default null
283 ,p_attribute30 IN varchar2 default null
284 ,p_pan IN varchar2 default null
285 ,p_pan_af IN varchar2 default null
286 ,p_ex_serviceman IN varchar2 default null --Bugfix 3762728
287 ,p_resident_status IN varchar2 default null
288 ,p_pf_number IN varchar2 default null
289 ,p_esi_number IN varchar2 default null
290 ,p_superannuation_number IN varchar2 default null
291 ,p_group_ins_number IN varchar2 default null
292 ,p_gratuity_number IN varchar2 default null
293 ,p_pension_number IN varchar2 default NULL
294 ,p_NSSN IN varchar2 default NULL
295 --,p_employee_category IN varchar2 default null --Bugfix 3762728
296 ,p_date_of_death IN date default null
297 ,p_background_check_status IN varchar2 default null
298 ,p_background_date_check IN date default null
299 ,p_blood_type IN varchar2 default null
300 ,p_correspondence_language IN varchar2 default null
301 ,p_fast_path_employee IN varchar2 default null
302 ,p_fte_capacity IN number default null
303 ,p_honors IN varchar2 default null
304 ,p_internal_location IN varchar2 default null
305 ,p_last_medical_test_by IN varchar2 default null
306 ,p_last_medical_test_date IN date default null
307 ,p_mailstop IN varchar2 default null
308 ,p_office_number IN varchar2 default null
309 ,p_on_military_service IN varchar2 default null
310 ,p_pre_name_adjunct IN varchar2 default null
311 ,p_rehire_recommendation IN varchar2 default null
312 ,p_projected_start_date IN date default null
313 ,p_resume_exists IN varchar2 default null
314 ,p_resume_last_updated IN date default null
315 ,p_second_passport_exists IN varchar2 default null
316 ,p_student_status IN varchar2 default null
317 ,p_work_schedule IN varchar2 default null
318 ,p_suffix IN varchar2 default null
319 ,p_benefit_group_id IN number default null
320 ,p_receipt_of_death_cert_date IN date default null
321 ,p_coord_ben_med_pln_no IN varchar2 default null
322 ,p_coord_ben_no_cvg_flag IN varchar2 default 'N'
323 ,p_coord_ben_med_ext_er IN varchar2 default null
324 ,p_coord_ben_med_pl_name IN varchar2 default null
325 ,p_coord_ben_med_insr_crr_name IN varchar2 default null
326 ,p_coord_ben_med_insr_crr_ident IN varchar2 default null
327 ,p_coord_ben_med_cvg_strt_dt IN date default null
328 ,p_coord_ben_med_cvg_end_dt IN date default null
329 ,p_uses_tobacco_flag IN varchar2 default null
330 ,p_dpdnt_adoption_date IN date default null
331 ,p_dpdnt_vlntry_svce_flag IN varchar2 default 'N'
332 ,p_original_date_of_hire IN date default null
333 ,p_adjusted_svc_date IN date default null
334 ,p_place_of_birth IN varchar2 default null --Bugfix 3762728
335 ,p_region_of_birth IN varchar2 default null
336 ,p_country_of_birth IN varchar2 default null
337 ,p_global_person_id IN varchar2 default null
338 ,p_party_id IN number default null
339 ,p_person_id OUT NOCOPY number
340 ,p_assignment_id OUT NOCOPY number
341 ,p_per_object_version_number OUT NOCOPY number
342 ,p_asg_object_version_number OUT NOCOPY number
343 ,p_per_effective_start_date OUT NOCOPY date
344 ,p_per_effective_end_date OUT NOCOPY date
345 ,p_full_name OUT NOCOPY varchar2
346 ,p_per_comment_id OUT NOCOPY number
347 ,p_assignment_sequence OUT NOCOPY number
348 ,p_assignment_number OUT NOCOPY varchar2
349 ,p_name_combination_warning OUT NOCOPY boolean
350 ,p_assign_payroll_warning OUT NOCOPY boolean
351 ,p_orig_hire_warning OUT NOCOPY boolean
352 );
353
354 END hr_in_employee_api;