1 package body PER_CAREER_PATHS_PKG_1 as
2 /* $Header: pecpt01.pkb 115.1 99/07/17 18:51:52 porting ship $ */
3
4 procedure stb_del_val(p_cpath_id IN NUMBER) IS
5 l_exists VARCHAR2(1);
6
7 cursor c1 is
8 select 'x'
9 from per_career_path_elements
10 where career_path_id = p_cpath_id;
11 --
12 begin
13 --
14 hr_utility.set_location('per_career_paths_pkg_1.stb_del_val',1);
15 --
16 open c1;
17 --
18 fetch c1 into l_exists;
19 --
20 IF c1%found THEN
21 hr_utility.set_message(800, 'PER_7840_DEF_CAR_PATH_DELETE');
22 close c1;
23 hr_utility.raise_error;
24 END IF;
25 --
26 close c1;
27 --
28 end stb_del_val;
29
30
31 procedure unique_chk(p_bgroup_id IN NUMBER,
32 p_name IN VARCHAR2,
33 p_rowid IN VARCHAR2) IS
34 l_exists2 VARCHAR2(1);
35
36 cursor c2 is
37 select 'x'
38 from per_career_paths
39 where business_group_id + 0 = p_bgroup_id
40 and upper(name) = upper(p_name)
41 and (p_rowid is null
42 or (p_rowid is not null and chartorowid(p_rowid) <> rowid));
43 --
44 begin
45 --
46 hr_utility.set_location('per_career_paths_pkg_1.unique_chk',1);
47 --
48 open c2;
49 --
50 fetch c2 into l_exists2;
51 --
52 IF c2%found THEN
53 hr_utility.set_message(800, 'PER_7841_DEF_CAR_PATH_EXISTS');
54 close c2;
55 hr_utility.raise_error;
56 END IF;
57 --
58 close c2;
59 --
60 end unique_chk;
61
62
63 procedure get_id(p_cpath_id IN OUT NUMBER) IS
64
65 cursor c3 is
66 select per_career_paths_s.nextval
67 from sys.dual;
68 --
69 begin
70 --
71 hr_utility.set_location('per_career_paths_pkg_1.get_id',1);
72 --
73 open c3;
74 --
75 fetch c3 into p_cpath_id;
76 --
77 close c3;
78 --
79 end get_id;
80
81
82
83 end PER_CAREER_PATHS_PKG_1;