DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_CAREER_PATH_ELEMENTS_PKG

Source


1 package body PER_CAREER_PATH_ELEMENTS_PKG as
2 /* $Header: pecpe01t.pkb 120.0 2005/05/31 07:11:08 appldev noship $ */
3 
4 procedure navigate_path(p_child_id IN NUMBER,
5                         p_child_name IN OUT nocopy VARCHAR2,
6                         p_cpath_id IN NUMBER,
7                         p_parent_id IN OUT nocopy NUMBER,
8                         p_parent_name IN OUT nocopy VARCHAR2,
9                         p_bgroup_id IN NUMBER) IS
10 
11 cursor c1 is
12 select name
13 from   per_jobs_v
14 where  job_id = p_child_id;
15 --
16 
17 cursor c2 is
18 select x.job_id,
19        x.name
20 from   per_jobs_v x,
21        per_career_path_elements y
22 where  x.business_group_id + 0 = p_bgroup_id
23 and    x.job_id = y.parent_job_id
24 and    y.career_path_id = p_cpath_id
25 and    y.subordinate_job_id = p_child_id;
26 --
27 --
28 begin
29 --
30 hr_utility.set_location('per_career_path_elements_pkg.navigate_path',1);
31 --
32 open c1;
33 --
34   fetch c1 into p_child_name;
35 --
36 close c1;
37 --
38 hr_utility.set_location('per_career_path_elements_pkg.navigate_path',2);
39 --
40 open c2;
41 --
42   fetch c2 into p_parent_id,
43                 p_parent_name;
44 --
45 close c2;
46 
47 
48 end navigate_path;
49 
50 
51 
52 procedure get_id(p_cpath_ele_id IN OUT nocopy NUMBER) IS
53 
54 cursor c3 is
55 select per_career_path_elements_s.nextval
56 from sys.dual;
57 --
58 begin
59 --
60 hr_utility.set_location('per_career_path_elements_pkg.get_id',1);
61 --
62 open c3;
63 --
64   fetch c3 into p_cpath_ele_id;
65 --
66 close c3;
67 
68 end get_id;
69 
70 
71 
72 
73 procedure stb_del_validation(p_bgroup_id IN NUMBER,
74                              p_cpath_id IN NUMBER,
75                              p_sjob_id IN NUMBER) IS
76   l_exists VARCHAR2(1);
77 
78 cursor c4 is
79 select 'x'
80 from per_career_path_elements
81 where business_group_id + 0 = p_bgroup_id
82 and career_path_id = p_cpath_id
83 and parent_job_id = p_sjob_id;
84 --
85 begin
86 --
87 hr_utility.set_location('per_career_path_elements_pkg.stb_del_validation',1);
88 --
89 open c4;
90 --
91   fetch c4 into l_exists;
92 --
93   IF c4%found THEN
94   close c4;
95   hr_utility.set_message(801, 'PER_7845_DEF_CAR_MAP_DELETE');
96   hr_utility.raise_error;
97 
98   END IF;
99 
100 close c4;
101 
102 end stb_del_validation;
103 
104 
105 
106 procedure get_name(p_sjob_id IN NUMBER,
107                    p_sjob_name IN OUT nocopy VARCHAR2) is
108 
109 cursor c5 is
110 select name
111 from per_jobs_v
112 where job_id = p_sjob_id;
113 --
114 begin
115 --
116 hr_utility.set_location('per_career_path_elements_pkg.get_name',1);
117 --
118 open c5;
119 --
120 fetch c5 into p_sjob_name;
121 --
122 close c5;
123 
124 end get_name;
125 
126 
127 end PER_CAREER_PATH_ELEMENTS_PKG;