1 PACKAGE hr_cn_employee_api AUTHID CURRENT_USER AS
2 /* $Header: hrcnwree.pkh 120.3 2005/11/04 05:36:16 jcolman noship $ */
3 /*#
4 * This package contains employee APIs for China.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Employee for China
8 */
9 g_trace boolean := FALSE;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |----------------------------< create_cn_employee >------------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 -- {Start Of Comments}
16 /*#
17 * This API creates an employee for business groups using the legislation for
18 * China.
19 *
20 * This API calls the generic create_employee API. It maps certain columns to
21 * user-friendly names appropriate for China so as to ensure easy
22 * identification. As this API is an alternative API, see the generic
23 * create_employee API for further explanation.
24 *
25 * <p><b>Licensing</b><br>
26 * This API is licensed for use with Human Resources.
27 *
28 * <p><b>Prerequisites</b><br>
29 * A business group for the China legislation must be present as on the
30 * effective date. See the corresponding generic API for further details.
31 *
32 * <p><b>Post Success</b><br>
33 * The person, primary assignment and period of service will be created.
34 *
35 * <p><b>Post Failure</b><br>
36 * The API does not create the person and raises an error.
37 * @param p_validate If true, then validation alone will be performed and the
38 * database will remain unchanged. If false and all validation checks pass,
39 * then the database will be modified.
40 * @param p_hire_date The date on which the employee is hired.
41 * @param p_business_group_id {@rep:casecolumn
42 * PER_ALL_PEOPLE_F.BUSINESS_GROUP_ID}
43 * @param p_family_or_last_name {@rep:casecolumn PER_ALL_PEOPLE_F.LAST_NAME}
44 * @param p_sex Legal gender. Valid values are defined by the 'SEX' lookup
45 * type.
46 * @param p_person_type_id {@rep:casecolumn PER_ALL_PEOPLE_F.PERSON_TYPE_ID}
47 * @param p_per_comments Employee comment text.
48 * @param p_date_employee_data_verified {@rep:casecolumn
49 * PER_ALL_PEOPLE_F.DATE_EMPLOYEE_DATA_VERIFIED}
50 * @param p_date_of_birth {@rep:casecolumn PER_ALL_PEOPLE_F.DATE_OF_BIRTH}
51 * @param p_email_address {@rep:casecolumn PER_ALL_PEOPLE_F.EMAIL_ADDRESS}
52 * @param p_employee_number The business group's employee number generation
53 * method determines when the API derives and passes out an applicant number or
54 * when the calling program should pass in a value. When the API call completes
55 * if p_validate is false then this will be set to the generated employee
56 * number or passed value. If p_validate is true then will be set to null.
57 * @param p_expense_check_send_to_addres Address to which the expense should be
58 * sent. Valid values are determined by the 'HOME_OFFICE' lookup type.
59 * @param p_given_or_first_name {@rep:casecolumn PER_ALL_PEOPLE_F.FIRST_NAME}
60 * @param p_known_as {@rep:casecolumn PER_ALL_PEOPLE_F.KNOWN_AS}
61 * @param p_marital_status Marital status. Valid values are defined by the
62 * 'MAR_STATUS' lookup type.
63 * @param p_middle_names {@rep:casecolumn PER_ALL_PEOPLE_F.MIDDLE_NAMES}
64 * @param p_nationality Nationality. Valid values are defined by the
65 * 'NATIONALITY' lookup type.
66 * @param p_citizen_identification_num {@rep:casecolumn
67 * PER_ALL_PEOPLE_F.NATIONAL_IDENTIFIER}
68 * @param p_previous_last_name {@rep:casecolumn
69 * PER_ALL_PEOPLE_F.PREVIOUS_LAST_NAME}
70 * @param p_registered_disabled_flag Indicates whether the person is classified
71 * as disabled. Valid values are defined by the 'REGISTERED_DISABLED' lookup
72 * type.
73 * @param p_title Title e.g. Mr, Mrs, Dr. Valid values are defined by the
74 * 'TITLE' lookup type.
75 * @param p_vendor_id {@rep:casecolumn PER_ALL_PEOPLE_F.VENDOR_ID}
76 * @param p_work_telephone {@rep:casecolumn PER_ALL_PEOPLE_F.WORK_TELEPHONE}
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_hukou_type Hukou Type. Valid values are defined by the
110 * 'CN_HUKOU_TYPE' lookup type.
111 * @param p_hukou_location Hukou Location. Valid values are defined by the
112 * 'CN_HUKOU_LOCN' lookup type.
113 * @param p_highest_education_level Highest education level. Valid values are
114 * defined by the 'CN_HIGH_EDU_LEVEL' lookup type.
115 * @param p_number_of_children Number of children. This fields stores the
116 * number of children of the person. Valid values are whole numbers.
117 * @param p_expatriate_indicator Expatriate indicator. Valid values are defined
118 * by the 'YES_NO' lookup type.
119 * @param p_health_status Health status. Valid values are defined by the
120 * 'CN_HEALTH_STATUS' lookup type.
121 * @param p_tax_exemption_indicator Tax exempt indicator.Valid values are
122 * defined by the 'YES_NO' lookup type.
123 * @param p_percentage Tax exemption percentage. Determines the percentage of
124 * Special Tax Exemption based on the Tax Exemption Indicator. If left blank
125 * this defaults to a global value defined by MOLSS as per the current tax
126 * regulations
127 * @param p_family_han_yu_pin_yin_name Han Yu Pin Yin Last Name as specified on
128 * the Passport for Chinese residents.
129 * @param p_given_han_yu_pin_yin_name Han Yu Pin Yin First Name as specified on
130 * the Passport for Chinese residents.
131 * @param p_previous_name Previous Name of the applicant in case of a change in
132 * name.
133 * @param p_race_ethnic_orgin Race ethnic origin. Valid values are defined by
134 * the 'CN_RACE' lookup type.
135 * @param p_social_security_ic_number Social Security Identification Number.
136 * @param p_date_of_death {@rep:casecolumn PER_ALL_PEOPLE_F.DATE_OF_DEATH}
137 * @param p_background_check_status Background check status. Valid values are
138 * defined by the 'YES_NO' lookup type.
139 * @param p_background_date_check {@rep:casecolumn
140 * PER_ALL_PEOPLE_F.BACKGROUND_DATE_CHECK}
141 * @param p_blood_type Indicates the blood type of the person. Valid values are
142 * defined by the 'BLOOD_TYPE' lookup type.
143 * @param p_correspondence_language {@rep:casecolumn
144 * PER_ALL_PEOPLE_F.CORRESPONDENCE_LANGUAGE}
145 * @param p_fast_path_employee {@rep:casecolumn
146 * PER_ALL_PEOPLE_F.FAST_PATH_EMPLOYEE}
147 * @param p_fte_capacity {@rep:casecolumn PER_ALL_PEOPLE_F.FTE_CAPACITY}
148 * @param p_honors {@rep:casecolumn PER_ALL_PEOPLE_F.HONORS}
149 * @param p_internal_location {@rep:casecolumn
150 * PER_ALL_PEOPLE_F.INTERNAL_LOCATION}
151 * @param p_last_medical_test_by {@rep:casecolumn
152 * PER_ALL_PEOPLE_F.LAST_MEDICAL_TEST_BY}
153 * @param p_last_medical_test_date {@rep:casecolumn
154 * PER_ALL_PEOPLE_F.LAST_MEDICAL_TEST_DATE}
155 * @param p_mailstop {@rep:casecolumn PER_ALL_PEOPLE_F.MAILSTOP}
156 * @param p_office_number {@rep:casecolumn PER_ALL_PEOPLE_F.OFFICE_NUMBER}
157 * @param p_on_military_service Indicates if the person is on military service.
158 * Valid values are defined by the 'YES_NO' lookup type.
159 * @param p_pre_name_adjunct Prefix for the employee name
160 * @param p_projected_start_date {@rep:casecolumn
161 * PER_ALL_PEOPLE_F.PROJECTED_START_DATE}
162 * @param p_resume_exists Indicates whether a resume for the person exists.
163 * Valid values are defined by the 'YES_NO' lookup type.
164 * @param p_resume_last_updated {@rep:casecolumn
165 * PER_ALL_PEOPLE_F.RESUME_LAST_UPDATED}
166 * @param p_second_passport_exists Indicates if the person has a second
167 * passport available. Valid values are defined by the 'YES_NO' lookup type.
168 * @param p_student_status Indicates the student status of the applicant. Valid
169 * values are defined by the 'STUDENT_STATUS' lookup type.
170 * @param p_work_schedule Work schedule. Valid values are defined by the
171 * 'WORK_SCHEDULE' lookup type.
172 * @param p_suffix Suffix for the employee name
173 * @param p_benefit_group_id {@rep:casecolumn
174 * PER_ALL_PEOPLE_F.BENEFIT_GROUP_ID}
175 * @param p_receipt_of_death_cert_date {@rep:casecolumn
176 * PER_ALL_PEOPLE_F.RECEIPT_OF_DEATH_CERT_DATE}
177 * @param p_coord_ben_med_pln_no {@rep:casecolumn
178 * PER_ALL_PEOPLE_F.COORD_BEN_MED_PLN_NO}
179 * @param p_coord_ben_no_cvg_flag Coordination of benefits no other coverage
180 * flag. Valid values are defined by 'YES_NO' lookup type.
181 * @param p_coord_ben_med_ext_er {@rep:casecolumn
182 * PER_ALL_PEOPLE_F.COORD_BEN_MED_EXT_ER}
183 * @param p_coord_ben_med_pl_name {@rep:casecolumn
184 * PER_ALL_PEOPLE_F.COORD_BEN_MED_PL_NAME}
185 * @param p_coord_ben_med_insr_crr_name {@rep:casecolumn
186 * PER_ALL_PEOPLE_F.COORD_BEN_MED_INSR_CRR_NAME}
187 * @param p_coord_ben_med_insr_crr_ident {@rep:casecolumn
188 * PER_ALL_PEOPLE_F.COORD_BEN_MED_INSR_CRR_IDENT}
189 * @param p_coord_ben_med_cvg_strt_dt {@rep:casecolumn
190 * PER_ALL_PEOPLE_F.COORD_BEN_MED_CVG_STRT_DT}
191 * @param p_coord_ben_med_cvg_end_dt {@rep:casecolumn
192 * PER_ALL_PEOPLE_F.COORD_BEN_MED_CVG_END_DT}
193 * @param p_uses_tobacco_flag Indicates if the person uses tabacco. Valid
194 * values are defined by the 'YES_NO' lookup type.
195 * @param p_dpdnt_adoption_date {@rep:casecolumn
196 * PER_ALL_PEOPLE_F.DPDNT_ADOPTION_DATE}
197 * @param p_dpdnt_vlntry_svce_flag Indicates if the person's dependent is on
198 * voluntary service. Valid values are defined by the 'YES_NO' lookup type.
199 * @param p_original_date_of_hire {@rep:casecolumn
200 * PER_ALL_PEOPLE_F.ORIGINAL_DATE_OF_HIRE}
201 * @param p_adjusted_svc_date {@rep:casecolumn
202 * PER_PERIODS_OF_SERVICE.ADJUSTED_SVC_DATE}
203 * @param p_place_of_birth Indicates town of birth
204 * @param p_original_hometown Indicates region of birth
205 * @param p_country_of_birth Indicates the country of birth of Employee. Valid
206 * values are defined by the view FND_TERRITORIES_VL
207 * @param p_global_person_id Global Person Id
208 * @param p_party_id Party for whom the address applies.
209 * @param p_person_id If p_validate is false, then this uniquely identifies the
210 * person created. If p_validate is true, then set to null.
211 * @param p_assignment_id If p_validate is false, then this uniquely identifies
212 * the created assignment. If p_validate is true, then set to null.
213 * @param p_per_object_version_number If p_validate is false, then set to the
214 * version number of the created person. If p_validate is true, then the value
215 * will be null.
216 * @param p_asg_object_version_number If p_validate is false, then this
217 * parameter is set to the version number of the assignment created. If
218 * p_validate is true, then this parameter is null.
219 * @param p_per_effective_start_date If p_validate is false, then set to the
220 * earliest effective start date for the created Employee. If p_validate is
221 * true, then set to null.
222 * @param p_per_effective_end_date If p_validate is false, then set to the
223 * effective end date for the created Employee. If p_validate is true, then set
224 * to null.
225 * @param p_full_name If p_validate is false, this will be set to the complete
226 * full name of the person. If p_validate is true this will be null.
227 * @param p_per_comment_id If p_validate is false, this will be set to the
228 * comments for the person. If p_validate is true this will be null.
229 * @param p_assignment_sequence If p_validate is false, this will be set to the
230 * assignment sequence for the person. If p_validate is true this will be null.
231 * @param p_assignment_number If p_validate is false, this will be set to the
232 * assignment number of the person. If p_validate is true this will be null.
233 * @param p_name_combination_warning If set to true, then the combination of
234 * last name, first name and date of birth existed prior to calling this API.
235 * @param p_assign_payroll_warning If set to true, then the date of birth is
236 * not entered. If set to false, then the date of birth has been entered.
237 * Indicates if it will be possible to set the payroll on any of this person's
238 * assignments.
239 * @param p_orig_hire_warning If p_validate is false, this will be set if an
240 * warnings exists. If p_validate is true this will be null.
241 * @rep:displayname Create Employee for China
242 * @rep:category BUSINESS_ENTITY PER_EMPLOYEE
243 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
244 * @rep:scope public
245 * @rep:lifecycle active
246 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
247 */
248 --
249 -- {End Of Comments}
250 --
251 PROCEDURE create_cn_employee
252 (p_validate in boolean default false
253 ,p_hire_date in date
254 ,p_business_group_id in number
255 ,p_family_or_last_name in varchar2
256 ,p_sex in varchar2
260 ,p_date_of_birth in date default null
257 ,p_person_type_id in number default null
258 ,p_per_comments in varchar2 default null
259 ,p_date_employee_data_verified in date default null
261 ,p_email_address in varchar2 default null
262 ,p_employee_number in out nocopy varchar2
263 ,p_expense_check_send_to_addres in varchar2 default null
264 ,p_given_or_first_name in varchar2 default null
265 ,p_known_as in varchar2 default null
266 ,p_marital_status in varchar2 default null
267 ,p_middle_names in varchar2 default null
268 ,p_nationality in varchar2 default null
269 ,p_citizen_identification_num in varchar2 default null
270 ,p_previous_last_name in varchar2 default null
271 ,p_registered_disabled_flag in varchar2 default null
272 ,p_title in varchar2 default null
273 ,p_vendor_id in number default null
274 ,p_work_telephone in varchar2 default null
275 ,p_attribute_category in varchar2 default null
276 ,p_attribute1 in varchar2 default null
277 ,p_attribute2 in varchar2 default null
278 ,p_attribute3 in varchar2 default null
279 ,p_attribute4 in varchar2 default null
280 ,p_attribute5 in varchar2 default null
281 ,p_attribute6 in varchar2 default null
282 ,p_attribute7 in varchar2 default null
283 ,p_attribute8 in varchar2 default null
284 ,p_attribute9 in varchar2 default null
285 ,p_attribute10 in varchar2 default null
286 ,p_attribute11 in varchar2 default null
287 ,p_attribute12 in varchar2 default null
288 ,p_attribute13 in varchar2 default null
289 ,p_attribute14 in varchar2 default null
290 ,p_attribute15 in varchar2 default null
291 ,p_attribute16 in varchar2 default null
292 ,p_attribute17 in varchar2 default null
293 ,p_attribute18 in varchar2 default null
294 ,p_attribute19 in varchar2 default null
295 ,p_attribute20 in varchar2 default null
296 ,p_attribute21 in varchar2 default null
297 ,p_attribute22 in varchar2 default null
298 ,p_attribute23 in varchar2 default null
299 ,p_attribute24 in varchar2 default null
300 ,p_attribute25 in varchar2 default null
301 ,p_attribute26 in varchar2 default null
302 ,p_attribute27 in varchar2 default null
303 ,p_attribute28 in varchar2 default null
304 ,p_attribute29 in varchar2 default null
305 ,p_attribute30 in varchar2 default null
306 ,p_hukou_type in varchar2
307 ,p_hukou_location in varchar2
308 ,p_highest_education_level in varchar2 default null
309 ,p_number_of_children in varchar2 default null
310 ,p_expatriate_indicator in varchar2 default 'N' -- Bug 2782045
311 ,p_health_status in varchar2 default null
312 ,p_tax_exemption_indicator in varchar2 default null
313 ,p_percentage in varchar2 default null
314 ,p_family_han_yu_pin_yin_name in varchar2 default null
315 ,p_given_han_yu_pin_yin_name in varchar2 default null
316 ,p_previous_name in varchar2 default null
317 ,p_race_ethnic_orgin in varchar2 default null
318 ,p_social_security_ic_number in varchar2 default null
319 ,p_date_of_death in date default null
320 ,p_background_check_status in varchar2 default null
321 ,p_background_date_check in date default null
322 ,p_blood_type in varchar2 default null
323 ,p_correspondence_language in varchar2 default null
324 ,p_fast_path_employee in varchar2 default null
325 ,p_fte_capacity in number default null
326 ,p_honors in varchar2 default null
327 ,p_internal_location in varchar2 default null
328 ,p_last_medical_test_by in varchar2 default null
329 ,p_last_medical_test_date in date default null
330 ,p_mailstop in varchar2 default null
331 ,p_office_number in varchar2 default null
332 ,p_on_military_service in varchar2 default null
333 ,p_pre_name_adjunct in varchar2 default null
334 ,p_projected_start_date in date default null
335 ,p_resume_exists in varchar2 default null
336 ,p_resume_last_updated in date default null
337 ,p_second_passport_exists in varchar2 default null
338 ,p_student_status in varchar2 default null
339 ,p_work_schedule in varchar2 default null
340 ,p_suffix in varchar2 default null
341 ,p_benefit_group_id in number default null
342 ,p_receipt_of_death_cert_date in date default null
343 ,p_coord_ben_med_pln_no in varchar2 default null
347 ,p_coord_ben_med_insr_crr_name in varchar2 default null
344 ,p_coord_ben_no_cvg_flag in varchar2 default 'N'
345 ,p_coord_ben_med_ext_er in varchar2 default null
346 ,p_coord_ben_med_pl_name in varchar2 default null
348 ,p_coord_ben_med_insr_crr_ident in varchar2 default null
349 ,p_coord_ben_med_cvg_strt_dt in date default null
350 ,p_coord_ben_med_cvg_end_dt in date default null
351 ,p_uses_tobacco_flag in varchar2 default null
352 ,p_dpdnt_adoption_date in date default null
353 ,p_dpdnt_vlntry_svce_flag in varchar2 default 'N'
354 ,p_original_date_of_hire in date default null
355 ,p_adjusted_svc_date in date default null
356 ,p_place_of_birth in varchar2 default null
357 ,p_original_hometown in varchar2 default null
358 ,p_country_of_birth in varchar2 default null
359 ,p_global_person_id in varchar2 default null
360 ,p_party_id in number default null
361 ,p_person_id out nocopy number
362 ,p_assignment_id out nocopy number
363 ,p_per_object_version_number out nocopy number
364 ,p_asg_object_version_number out nocopy number
365 ,p_per_effective_start_date out nocopy date
366 ,p_per_effective_end_date out nocopy date
367 ,p_full_name out nocopy varchar2
368 ,p_per_comment_id out nocopy number
369 ,p_assignment_sequence out nocopy number
370 ,p_assignment_number out nocopy varchar2
371 ,p_name_combination_warning out nocopy boolean
372 ,p_assign_payroll_warning out nocopy boolean
373 ,p_orig_hire_warning out nocopy boolean);
374 --
375
376 END hr_cn_employee_api;