1 Package Body hxc_heg_bus as
2 /* $Header: hxchegrhi.pkb 120.2 2005/09/23 10:42:21 sechandr noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hxc_heg_bus.'; -- Global package name
9 g_debug boolean :=hr_utility.debug_enabled;
10 --
11 -- The following two global variables are only to be
12 -- used by the return_legislation_code function.
13 --
14 g_legislation_code varchar2(150) default null;
15 g_entity_group_id number default null;
16 --
17 -- ----------------------------------------------------------------------------
18 -- |-----------------------< chk_non_updateable_args >------------------------|
19 -- ----------------------------------------------------------------------------
20 --
21 -- Description:
22 -- This procedure is used to ensure that non updateable attributes have
23 -- not been updated. If an attribute has been updated an error is generated.
24 --
25 -- Pre Conditions:
26 -- g_old_rec has been populated with details of the values currently in
27 -- the database.
28 --
29 -- In Arguments:
30 -- p_rec has been populated with the updated values the user would like the
31 -- record set to.
32 --
33 -- Post Success:
34 -- Processing continues if all the non updateable attributes have not
35 -- changed.
36 --
37 -- Post Failure:
38 -- An application error is raised if any of the non updatable attributes
39 -- have been altered.
40 --
41 -- ----------------------------------------------------------------------------
42 Procedure chk_non_updateable_args
43 (p_rec in hxc_heg_shd.g_rec_type
44 ) IS
45 --
46 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
47 l_error EXCEPTION;
48 l_argument varchar2(30);
49 --
50 Begin
51 --
52 -- Only proceed with the validation if a row exists for the current
53 -- record in the HR Schema.
54 --
55 IF NOT hxc_heg_shd.api_updating
56 (p_entity_group_id => p_rec.entity_group_id
57 ,p_object_version_number => p_rec.object_version_number
58 ) THEN
59 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
60 fnd_message.set_token('PROCEDURE ', l_proc);
61 fnd_message.set_token('STEP ', '5');
62 fnd_message.raise_error;
63 END IF;
64 --
65 EXCEPTION
66 WHEN l_error THEN
67 hr_api.argument_changed_error
68 (p_api_name => l_proc
69 ,p_argument => l_argument);
70 WHEN OTHERS THEN
71 RAISE;
72 End chk_non_updateable_args;
73 --
74 -- ----------------------------------------------------------------------------
75 -- |---------------------------< insert_validate >----------------------------|
76 -- ----------------------------------------------------------------------------
77 Procedure insert_validate
78 (p_rec in hxc_heg_shd.g_rec_type
79 ) is
80 --
81 l_proc varchar2(72);
82 --
83 Begin
84 g_debug:=hr_utility.debug_enabled;
85 if g_debug then
86 l_proc := g_package||'insert_validate';
87 hr_utility.set_location('Entering:'||l_proc, 5);
88 end if;
89 --
90 -- Call all supporting business operations
91 --
92 null;
93 --
94 if g_debug then
95 hr_utility.set_location(' Leaving:'||l_proc, 10);
96 end if;
97 End insert_validate;
98 --
99 -- ----------------------------------------------------------------------------
100 -- |---------------------------< update_validate >----------------------------|
101 -- ----------------------------------------------------------------------------
102 Procedure update_validate
103 (p_rec in hxc_heg_shd.g_rec_type
104 ) is
105 --
106 l_proc varchar2(72);
107 --
108 Begin
109 g_debug:=hr_utility.debug_enabled;
110 if g_debug then
111 l_proc := g_package||'update_validate';
112 hr_utility.set_location('Entering:'||l_proc, 5);
113 end if;
114 --
115 -- Call all supporting business operations
116 --
117 null;
118 --
119 chk_non_updateable_args
120 (p_rec => p_rec
121 );
122 --
123 --
124 if g_debug then
125 hr_utility.set_location(' Leaving:'||l_proc, 10);
126 end if;
127 End update_validate;
128 --
129 -- ----------------------------------------------------------------------------
130 -- |---------------------------< delete_validate >----------------------------|
131 -- ----------------------------------------------------------------------------
132 Procedure delete_validate
133 (p_rec in hxc_heg_shd.g_rec_type
134 ) is
135 --
136 l_proc varchar2(72);
137 --
138 Begin
139 g_debug:=hr_utility.debug_enabled;
140 if g_debug then
141 l_proc := g_package||'delete_validate';
142 hr_utility.set_location('Entering:'||l_proc, 5);
143 end if;
144 --
145 -- Call all supporting business operations
146 --
147 null;
148 --
149 if g_debug then
150 hr_utility.set_location(' Leaving:'||l_proc, 10);
151 end if;
152 End delete_validate;
153 --
154 end hxc_heg_bus;