DBA Data[Home] [Help]
Skip to content

PACKAGE BODY: APPS.HR_MX_EMPLOYEE_APPLICANT_API

Source


1 PACKAGE BODY hr_mx_employee_applicant_api AS
2 /* $Header: pemxwrea.pkb 120.0 2005/05/31 11:33 appldev noship $ */
3 --
4   g_package  varchar2(33);
5   g_debug    boolean;
6 -- -----------------------------------------------------------------------------
7 -- |--------------------< mx_hire_to_employee_applicant >----------------------|
8 -- -----------------------------------------------------------------------------
9 --
10 PROCEDURE mx_hire_to_employee_applicant
11   (p_validate                     IN     BOOLEAN                                     DEFAULT FALSE
12   ,p_hire_date                    IN     DATE
13   ,p_person_id                    IN     per_all_people_f.person_id%TYPE
14   ,p_per_object_version_number    IN OUT NOCOPY per_all_people_f.object_version_number%TYPE
15   ,p_person_type_id               IN     per_person_types.person_type_id%TYPE        DEFAULT NULL
16   ,p_hire_all_accepted_asgs       IN     VARCHAR2
17   ,p_assignment_id                IN     per_all_assignments_f.assignment_id%TYPE    DEFAULT NULL
18   ,p_CURP_id                      IN     per_all_people_f.national_identifier%TYPE   DEFAULT hr_api.g_varchar2
19   ,p_employee_number              IN OUT NOCOPY per_all_people_f.employee_number%TYPE
20   ,p_per_effective_start_date        OUT NOCOPY per_all_people_f.effective_start_date%TYPE
21   ,p_per_effective_end_date          OUT NOCOPY per_all_people_f.effective_end_date%TYPE
22   ,p_assign_payroll_warning          OUT NOCOPY BOOLEAN
23   ,p_oversubscribed_vacancy_id       OUT NOCOPY NUMBER
24   )
25 is
26     -- Declare cursors and local variables
27     l_proc               VARCHAR2(72);
28     l_business_group_id  per_all_people_f.business_group_id%TYPE;
29 
30     --
31   BEGIN
32 
33     l_proc := g_package||'mx_hire_to_employee_applicant';
34 
35     if g_debug then
36       hr_utility.set_location('Entering:'|| l_proc, 10);
37     end if;
38 
39     -----------------------------------------------------------------
40     -- Check that the business group of the person is in 'MX'
41     -- legislation.
42     -----------------------------------------------------------------
43     l_business_group_id := hr_mx_utility.get_bg_from_person(p_person_id);
44 
45    if g_debug then
46     hr_utility.set_location(l_proc, 20);
47    end if;
48 
49     hr_mx_utility.check_bus_grp(l_business_group_id, 'MX');
50 
51    if g_debug then
52     hr_utility.set_location(l_proc, 30);
53    end if;
54 
55     --
56     -- Call the person business process
57     --
58     hr_employee_applicant_api.hire_to_employee_applicant
59   (p_validate                     =>	p_validate
60   ,p_hire_date                    =>	p_hire_date
61   ,p_person_id                    =>	p_person_id
62   ,p_per_object_version_number    =>	p_per_object_version_number
63   ,p_person_type_id               =>	p_person_type_id
64   ,p_hire_all_accepted_asgs       =>	p_hire_all_accepted_asgs
65   ,p_assignment_id                =>	p_assignment_id
66   ,p_national_identifier          =>	p_CURP_id
67   ,p_employee_number              =>	p_employee_number
68   ,p_per_effective_start_date     =>	p_per_effective_start_date
69   ,p_per_effective_end_date       =>	p_per_effective_end_date
70   ,p_assign_payroll_warning       =>	p_assign_payroll_warning
71   ,p_oversubscribed_vacancy_id    =>	p_oversubscribed_vacancy_id );
72 
73   --
74   if g_debug then
75        hr_utility.set_location('Leaving: '||l_proc, 40);
76   end if;
77   --
78   end mx_hire_to_employee_applicant;
79 
80 begin
81   g_package := 'hr_mx_employee_applicant_api.';
82   g_debug   := hr_utility.debug_enabled;
83 end hr_mx_employee_applicant_api;