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