DBA Data[Home] [Help]

PACKAGE: APPS.HR_MX_EMPLOYEE_API

Source


1 PACKAGE hr_mx_employee_api AS
2 /* $Header: pemxwree.pkh 120.1 2005/10/02 02:43:03 aroussel $ */
3 /*#
4  * This package contains employee APIs for Mexico.
5  * @rep:scope public
6  * @rep:product PER
7  * @rep:displayname Employee for Mexico
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< create_mx_employee >------------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16  * This API creates a new employee for Mexico.
17  *
18  * This API creates a default primary assignment and a period of service for
19  * the employee. Secure user functionality is included in this version of the
20  * API. The employee is visible to secure users in the business group. HR
21  * Foundation users can use the following parameters only: p_validate,
22  * p_hire_date, p_business_group_id, p_last_name, p_previous_last_name,
23  * p_mailstop, p_office_number, p_internal_location, p_correspondence_language,
24  * p_known_as, p_sex, p_date_of_birth, p_email_address, p_employee_number,
25  * p_expense_check_send_to_addres, p_first_name, p_middle_names,
26  * p_national_identifier, p_title, p_attribute_category, and p_attribute1-30.
27  *
28  * <p><b>Licensing</b><br>
29  * This API is licensed for use with Human Resources and HR Foundation.
30  *
31  * <p><b>Prerequisites</b><br>
32  * The business group must exist on the effective date. If person_type_id is
33  * supplied, it must have a corresponding system person type of EMP and must be
34  * active in the same business group as the employee being created.
35  *
36  * <p><b>Post Success</b><br>
37  * The person, period of service, and default employee assignment are created.
38  *
39  * <p><b>Post Failure</b><br>
40  * The employee is not created and an error is raised.
41  *
42  * @param p_validate If true, then validation alone will be performed and the
43  * database will remain unchanged. If false and all validation checks pass,
44  * then the database will be modified.
45  * @param p_hire_date Hire Date.
46  * @param p_business_group_id Business group of the person.
47  * @param p_paternal_last_name Last name.
48  * @param p_sex Legal gender. Valid values are defined by the SEX lookup type.
49  * @param p_person_type_id Type of employee being created.
50  * @param p_comments Person comment text.
51  * @param p_date_employee_data_verified Date on which the employee data was
52  * last verified.
53  * @param p_date_of_birth Date of birth.
54  * @param p_email_address Email address.
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
58  * completes, if p_validate is false, then set to the employee number. If
59  * p_validate is true, then set to the passed value.
60  * @param p_expense_check_send_to_addres Mailing address.
61  * @param p_first_name First name.
62  * @param p_known_as Preferred name.
63  * @param p_marital_status Marital status. Valid values are defined by the
64  * MAR_STATUS lookup type.
65  * @param p_second_name Second name of the person.
66  * @param p_nationality Nationality. Valid values are defined by the
67  * NATIONALITY lookup type.
68  * @param p_curp_id Mexican National Identifier.
69  * @param p_registered_disabled_flag Flag indicating whether the person is
70  * classified as disabled.
71  * @param p_title Title. Valid values are defined by the TITLE lookup type.
72  * @param p_vendor_id Obsolete parameter, do not use.
73  * @param p_work_telephone Obsolete parameter, do not use.
74  * @param p_attribute_category This context value determines which flexfield
75  * structure to use with the descriptive flexfield segments.
76  * @param p_attribute1 Descriptive flexfield segment.
77  * @param p_attribute2 Descriptive flexfield segment.
78  * @param p_attribute3 Descriptive flexfield segment.
79  * @param p_attribute4 Descriptive flexfield segment.
80  * @param p_attribute5 Descriptive flexfield segment.
81  * @param p_attribute6 Descriptive flexfield segment.
82  * @param p_attribute7 Descriptive flexfield segment.
83  * @param p_attribute8 Descriptive flexfield segment.
84  * @param p_attribute9 Descriptive flexfield segment.
85  * @param p_attribute10 Descriptive flexfield segment.
86  * @param p_attribute11 Descriptive flexfield segment.
87  * @param p_attribute12 Descriptive flexfield segment.
88  * @param p_attribute13 Descriptive flexfield segment.
89  * @param p_attribute14 Descriptive flexfield segment.
90  * @param p_attribute15 Descriptive flexfield segment.
91  * @param p_attribute16 Descriptive flexfield segment.
92  * @param p_attribute17 Descriptive flexfield segment.
93  * @param p_attribute18 Descriptive flexfield segment.
94  * @param p_attribute19 Descriptive flexfield segment.
95  * @param p_attribute20 Descriptive flexfield segment.
96  * @param p_attribute21 Descriptive flexfield segment.
97  * @param p_attribute22 Descriptive flexfield segment.
98  * @param p_attribute23 Descriptive flexfield segment.
99  * @param p_attribute24 Descriptive flexfield segment.
100  * @param p_attribute25 Descriptive flexfield segment.
101  * @param p_attribute26 Descriptive flexfield segment.
102  * @param p_attribute27 Descriptive flexfield segment.
103  * @param p_attribute28 Descriptive flexfield segment.
104  * @param p_attribute29 Descriptive flexfield segment.
105  * @param p_attribute30 Descriptive flexfield segment.
106  * @param p_maternal_last_name Maternal last name of the person.
107  * @param p_rfc_id Federal Contributor Identifier (Registro Federal de
108  * Contribuyentes).
109  * @param p_ss_id Social Security Identifier.
110  * @param p_imss_med_center Social Security Medical Center.
111  * @param p_fed_gov_affil_id Federal Government Affiliation Identifier (Clave
112  * de Afiliacion).
113  * @param p_mil_serv_id Military Service Identifier (Cartilla Militar).
114  * @param p_date_of_death Date of death.
115  * @param p_background_check_status Flag indicating whether the person's
116  * background has been checked.
117  * @param p_background_date_check Date on which the background check was
118  * performed.
119  * @param p_blood_type Blood type.
120  * @param p_correspondence_language Preferred language for correspondence.
121  * @param p_fast_path_employee Obsolete parameter, do not use.
122  * @param p_fte_capacity Obsolete parameter, do not use.
123  * @param p_honors Honors awarded.
124  * @param p_internal_location Internal location of office.
125  * @param p_last_medical_test_by Name of physician who performed the last
126  * medical test.
127  * @param p_last_medical_test_date Date of last medical test.
128  * @param p_mailstop Internal mail location.
129  * @param p_office_number Office number.
130  * @param p_on_military_service Flag indicating whether the person is on
131  * military service.
132  * @param p_pre_name_adjunct Prefix before the person's name.
133  * @param p_rehire_recommendation Obsolete parameter, do not use.
134  * @param p_projected_start_date Obsolete parameter, do not use.
135  * @param p_resume_exists Flag indicating whether the person's resume is on
136  * file.
137  * @param p_resume_last_updated Date on which the resume was last updated.
138  * @param p_second_passport_exists Flag indicating whether a person has
139  * multiple passports.
140  * @param p_student_status If this employee is a student, this field is used to
141  * capture their status. Valid values are defined by the STUDENT_STATUS lookup
142  * type.
143  * @param p_work_schedule Days on which this person will work.
144  * @param p_suffix Suffix after the person's last name e.g. Sr., Jr., III.
145  * @param p_benefit_group_id Benefit group to which this person will belong.
146  * @param p_receipt_of_death_cert_date Date death certificate was received.
147  * @param p_coord_ben_med_pln_no Secondary medical plan name. Column used for
148  * external processing.
149  * @param p_coord_ben_no_cvg_flag No secondary medical plan coverage. Column
150  * used for external processing.
151  * @param p_coord_ben_med_ext_er Secondary external medical coverage. Column
152  * used for external processing.
153  * @param p_coord_ben_med_pl_name Secondary medical coverage name. Column used
154  * for external processing.
155  * @param p_coord_ben_med_insr_crr_name Secondary medical coverage insurance
156  * carrier name. Column used for external processing.
157  * @param p_coord_ben_med_insr_crr_ident Secondary medical coverage insurance
158  * carrier identifier. Column used for external processing.
159  * @param p_coord_ben_med_cvg_strt_dt Secondary medical coverage effective
160  * start date. Column used for external processing.
161  * @param p_coord_ben_med_cvg_end_dt Secondary medical coverage effective end
162  * date. Column used for external processing.
163  * @param p_uses_tobacco_flag Flag indicating whether the person uses tobacco.
164  * @param p_dpdnt_adoption_date Date on which the dependent was adopted.
165  * @param p_dpdnt_vlntry_svce_flag Flag indicating whether the dependent is on
166  * voluntary service.
167  * @param p_original_date_of_hire Original date of hire.
168  * @param p_adjusted_svc_date Adjusted service date.
169  * @param p_town_of_birth Town or city of birth.
170  * @param p_region_of_birth Geographical region of birth.
171  * @param p_country_of_birth Country of birth.
172  * @param p_global_person_id Obsolete parameter, do not use.
173  * @param p_party_id TCA party for whom you create the person record.
174  * @param p_person_id If p_validate is false, then this uniquely identifies the
175  * person created. If p_validate is true, then set to null.
176  * @param p_assignment_id If p_validate is false, then this uniquely identifies
177  * the created assignment. If p_validate is true, then set to null.
178  * @param p_per_object_version_number If p_validate is false, then set to the
179  * version number of the created person. If p_validate is true, then the value
180  * will be null.
181  * @param p_asg_object_version_number If p_validate is false, then this
182  * parameter is set to the version number of the assignment created. If
183  * p_validate is true, then this parameter is null.
184  * @param p_per_effective_start_date If p_validate is false, then set to the
185  * earliest effective start date for the created person. If p_validate is true,
186  * then set to null.
187  * @param p_per_effective_end_date If p_validate is false, then set to the
188  * effective end date for the created person. If p_validate is true, then set
189  * to null.
190  * @param p_full_name If p_validate is false, then set to the complete full
191  * name of the person. If p_validate is true, then set to null.
192  * @param p_per_comment_id If p_validate is false and comment text was
193  * provided, then will be set to the identifier of the created person comment
194  * record. If p_validate is true or no comment text was provided, then will be
195  * null.
196  * @param p_assignment_sequence If p_validate is false, then set to the
197  * sequence number of the default assignment. If p_validate is true, then set
198  * to null.
199  * @param p_assignment_number If p_validate is false, then set to the
200  * assignment number of the default assignment. If p_validate is true, then set
201  * to null.
202  * @param p_name_combination_warning If set to true, then the combination of
203  * last name, first name and date of birth existed prior to calling this API.
204  * @param p_assign_payroll_warning If set to true, then the date of birth is
205  * not entered. If set to false, then the date of birth has been entered.
206  * Indicates if it will be possible to set the payroll on any of this person's
207  * assignments.
208  * @param p_orig_hire_warning Set to true if the original hire date is
209  * populated and the person type is not "Employee", "Employee
210  * and Applicant", "Ex-employee" or "Ex-employee and
211  * Applicant".
212  * @rep:displayname Create Employee for Mexico
213  * @rep:category BUSINESS_ENTITY PER_EMPLOYEE
214  * @rep:lifecycle active
215  * @rep:category MISC_EXTENSIONS HR_DATAPUMP
216  * @rep:scope public
217 */
218 --
219 -- {End Of Comments}
220 --
221 procedure create_mx_employee
222   (p_validate                       in      boolean  default false
223   ,p_hire_date                      in      date
224   ,p_business_group_id              in      number
225   ,p_paternal_last_name             in      varchar2
226   ,p_sex                            in      varchar2
227   ,p_person_type_id                 in      number   default null
228   ,p_comments                       in      varchar2 default null
229   ,p_date_employee_data_verified    in      date     default null
230   ,p_date_of_birth                  in      date     default null
231   ,p_email_address                  in      varchar2 default null
232   ,p_employee_number                in out  nocopy varchar2
233   ,p_expense_check_send_to_addres   in      varchar2 default null
234   ,p_first_name                     in      varchar2 default null
235   ,p_known_as                       in      varchar2 default null
236   ,p_marital_status                 in      varchar2 default null
237   ,p_second_name                    in      varchar2 default null
238   ,p_nationality                    in      varchar2 default null
239   ,p_CURP_id                        in      varchar2 default null
240   ,p_registered_disabled_flag       in      varchar2 default null
241   ,p_title                          in      varchar2 default null
242   ,p_vendor_id                      in      number   default null
243   ,p_work_telephone                 in      varchar2 default null
244   ,p_attribute_category             in      varchar2 default null
245   ,p_attribute1                     in      varchar2 default null
246   ,p_attribute2                     in      varchar2 default null
247   ,p_attribute3                     in      varchar2 default null
248   ,p_attribute4                     in      varchar2 default null
249   ,p_attribute5                     in      varchar2 default null
250   ,p_attribute6                     in      varchar2 default null
251   ,p_attribute7                     in      varchar2 default null
252   ,p_attribute8                     in      varchar2 default null
253   ,p_attribute9                     in      varchar2 default null
254   ,p_attribute10                    in      varchar2 default null
255   ,p_attribute11                    in      varchar2 default null
256   ,p_attribute12                    in      varchar2 default null
257   ,p_attribute13                    in      varchar2 default null
258   ,p_attribute14                    in      varchar2 default null
259   ,p_attribute15                    in      varchar2 default null
260   ,p_attribute16                    in      varchar2 default null
261   ,p_attribute17                    in      varchar2 default null
262   ,p_attribute18                    in      varchar2 default null
263   ,p_attribute19                    in      varchar2 default null
264   ,p_attribute20                    in      varchar2 default null
265   ,p_attribute21                    in      varchar2 default null
266   ,p_attribute22                    in      varchar2 default null
267   ,p_attribute23                    in      varchar2 default null
268   ,p_attribute24                    in      varchar2 default null
269   ,p_attribute25                    in      varchar2 default null
270   ,p_attribute26                    in      varchar2 default null
271   ,p_attribute27                    in      varchar2 default null
272   ,p_attribute28                    in      varchar2 default null
273   ,p_attribute29                    in      varchar2 default null
274   ,p_attribute30                    in      varchar2 default null
275   ,p_maternal_last_name             in      varchar2 default null
276   ,p_RFC_id                         in      varchar2 default null
277   ,p_SS_id                          in      varchar2 default null
278   ,p_IMSS_med_center                in      varchar2 default null
279   ,p_fed_gov_affil_id               in      varchar2 default null
280   ,p_mil_serv_id                    in      varchar2 default null
281   ,p_date_of_death                  in      date     default null
282   ,p_background_check_status        in      varchar2 default null
283   ,p_background_date_check          in      date     default null
284   ,p_blood_type                     in      varchar2 default null
285   ,p_correspondence_language        in      varchar2 default null
286   ,p_fast_path_employee             in      varchar2 default null
287   ,p_fte_capacity                   in      number   default null
288   ,p_honors                         in      varchar2 default null
289   ,p_internal_location              in      varchar2 default null
290   ,p_last_medical_test_by           in      varchar2 default null
291   ,p_last_medical_test_date         in      date     default null
292   ,p_mailstop                       in      varchar2 default null
293   ,p_office_number                  in      varchar2 default null
294   ,p_on_military_service            in      varchar2 default null
295   ,p_pre_name_adjunct               in      varchar2 default null
296   ,p_rehire_recommendation          in      varchar2 default null
297   ,p_projected_start_date           in      date     default null
298   ,p_resume_exists                  in      varchar2 default null
299   ,p_resume_last_updated            in      date     default null
300   ,p_second_passport_exists         in      varchar2 default null
301   ,p_student_status                 in      varchar2 default null
302   ,p_work_schedule                  in      varchar2 default null
303   ,p_suffix                         in      varchar2 default null
304   ,p_benefit_group_id               in      number   default null
305   ,p_receipt_of_death_cert_date     in      date     default null
306   ,p_coord_ben_med_pln_no           in      varchar2 default null
307   ,p_coord_ben_no_cvg_flag          in      varchar2 default 'N'
308   ,p_coord_ben_med_ext_er           in      varchar2 default null
309   ,p_coord_ben_med_pl_name          in      varchar2 default null
310   ,p_coord_ben_med_insr_crr_name    in      varchar2 default null
311   ,p_coord_ben_med_insr_crr_ident   in      varchar2 default null
312   ,p_coord_ben_med_cvg_strt_dt      in      date     default null
313   ,p_coord_ben_med_cvg_end_dt       in      date     default null
314   ,p_uses_tobacco_flag              in      varchar2 default null
315   ,p_dpdnt_adoption_date            in      date     default null
316   ,p_dpdnt_vlntry_svce_flag         in      varchar2 default 'N'
317   ,p_original_date_of_hire          in      date     default null
318   ,p_adjusted_svc_date              in      date     default null
319   ,p_town_of_birth                  in      varchar2 default null
320   ,p_region_of_birth                in      varchar2 default null
321   ,p_country_of_birth               in      varchar2 default null
322   ,p_global_person_id               in      varchar2 default null
323   ,p_party_id                       in      number   default null
324   ,p_person_id                      out     nocopy number
325   ,p_assignment_id                  out     nocopy number
326   ,p_per_object_version_number      out     nocopy number
327   ,p_asg_object_version_number      out     nocopy number
328   ,p_per_effective_start_date       out     nocopy date
329   ,p_per_effective_end_date         out     nocopy date
330   ,p_full_name                      out     nocopy varchar2
331   ,p_per_comment_id                 out     nocopy number
332   ,p_assignment_sequence            out     nocopy number
333   ,p_assignment_number              out     nocopy varchar2
334   ,p_name_combination_warning       out     nocopy boolean
335   ,p_assign_payroll_warning         out     nocopy boolean
336   ,p_orig_hire_warning              out     nocopy boolean);
337 --
338 -- ----------------------------------------------------------------------------
339 -- |-----------------------------< mx_hire_into_job >-------------------------|
340 -- ----------------------------------------------------------------------------
341 --
342 -- {Start Of Comments}
343 /*#
344  *
345  * This API hires a person for Mexico by converting the person of type
346  * Applicant to a person of type Employee (EMP).
347  *
348  * <p><b>Licensing</b><br>
349  * This API is licensed for use with Human Resources.
350  *
351  * <p><b>Prerequisites</b><br>
352  * The applicant must exist in the relevant business group and must have an
353  * applicant assignment with the assignment status Accepted. If person_type_id
354  * is supplied, it must have a corresponding system person type of EMP and must
355  * be active in the same business group as the applicant being changed to
356  * employee.
357  *
358  * <p><b>Post Success</b><br>
359  * The applicant has been successfully hired as an employee with a default
360  * employee assignment.
361  *
362  * <p><b>Post Failure</b><br>
363  * The applicant is not hired as an employee and an error is raised.
364  *
365  * @param p_validate If true, then validation alone will be performed and the
366  * database will remain unchanged. If false and all validation checks pass,
367  * then the database will be modified.
368  * @param p_effective_date Determines when the DateTrack operation comes into
369  * force.
370  * @param p_person_id Identifies the person record to modify.
371  * @param p_object_version_number Pass in the current version number of the
372  * person to be updated. When the API completes if p_validate is false, will be
373  * set to the new version number of the updated person. If p_validate is true
374  * will be set to the same value which was passed in.
375  * @param p_employee_number The business group's employee number generation
376  * method determines when you can update the employee value. To keep the
377  * existing employee number pass in hr_api.g_varchar2. When the API call
378  * completes, if p_validate is false, then set to the employee number. If
379  * p_validate is true, then set to the passed value.
380  * @param p_datetrack_update_mode Indicates which DateTrack mode to use when
381  * updating the record. You must set to either UPDATE, CORRECTION,
382  * UPDATE_OVERRIDE or UPDATE_CHANGE_INSERT. Modes available for use with a
383  * particular record depend on the dates of previous record changes and the
384  * effective date of this change.
385  * @param p_person_type_id Type of employee being created.
386  * @param p_curp_id Mexican National Identifier.
387  * @param p_effective_start_date If p_validate is false, then set to the
388  * effective start date on the updated person row which now exists as of the
389  * effective date. If p_validate is true, then set to null.
390  * @param p_effective_end_date If p_validate is false, then set to the
391  * effective end date on the updated person row which now exists as of the
392  * effective date. If p_validate is true, then set to null.
393  * @param p_assign_payroll_warning If set to true, then the date of birth is
394  * not entered. If set to false, then the date of birth has been entered.
395  * Indicates if it will be possible to set the payroll on any of this person's
396  * assignments.
397  * @param p_orig_hire_warning If set to true, an orginal date of hire exists
398  * for an applicant who has never been an employee.
399  * @rep:displayname Hire Into Job for Mexico
400  * @rep:category BUSINESS_ENTITY PER_EMPLOYEE
401  * @rep:lifecycle active
402  * @rep:scope public
403 */
404 --
405 -- {End Of Comments}
406 --
407 PROCEDURE mx_hire_into_job
408   (p_validate                     IN     BOOLEAN  DEFAULT FALSE
409   ,p_effective_date               IN     DATE
410   ,p_person_id                    IN     NUMBER
411   ,p_object_version_number        IN OUT NOCOPY NUMBER
412   ,p_employee_number              IN OUT NOCOPY VARCHAR2
413   ,p_datetrack_update_mode        IN     VARCHAR2 DEFAULT NULL
414   ,p_person_type_id               IN     NUMBER   DEFAULT NULL
415   ,p_CURP_id                      IN     VARCHAR2 DEFAULT NULL
416   ,p_effective_start_date            OUT NOCOPY DATE
417   ,p_effective_end_date              OUT NOCOPY DATE
418   ,p_assign_payroll_warning          OUT NOCOPY BOOLEAN
419   ,p_orig_hire_warning               OUT NOCOPY BOOLEAN
420   ) ;
421 
422 
423 END HR_MX_EMPLOYEE_API ;