1 Package Body hxc_tks_bus as
2 /* $Header: hxctksrhi.pkb 120.2 2005/09/23 05:29:46 rchennur noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hxc_tks_bus.'; -- Global package name
9 g_debug boolean := hr_utility.debug_enabled;
10 --
11 --
12 -- ----------------------------------------------------------------------------
13 -- |-----------------------< chk_non_updateable_args >------------------------|
14 -- ----------------------------------------------------------------------------
15 -- {Start Of Comments}
16 --
17 -- Description:
18 -- This procedure is used to ensure that non updateable attributes have
19 -- not been updated. If an attribute has been updated an error is generated.
20 --
21 -- Pre Conditions:
22 -- g_old_rec has been populated with details of the values currently in
23 -- the database.
24 --
25 -- In Arguments:
26 -- p_rec has been populated with the updated values the user would like the
27 -- record set to.
28 --
29 -- Post Success:
30 -- Processing continues if all the non updateable attributes have not
31 -- changed.
32 --
33 -- Post Failure:
34 -- An application error is raised if any of the non updatable attributes
35 -- have been altered.
36 --
37 -- {End Of Comments}
38 -- ----------------------------------------------------------------------------
39 Procedure chk_non_updateable_args
40 (p_rec in hxc_tks_shd.g_rec_type
41 ) IS
42 --
43 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
44 --
45 Begin
46 --
47 -- Only proceed with the validation if a row exists for the current
48 -- record in the HR Schema.
49 --
50 IF NOT hxc_tks_shd.api_updating
51 (p_submission_id => p_rec.submission_id
52 ) THEN
53 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
54 fnd_message.set_token('PROCEDURE ', l_proc);
55 fnd_message.set_token('STEP ', '5');
56 fnd_message.raise_error;
57 END IF;
58 --
59 -- EDIT_HERE: Add checks to ensure non-updateable args have
60 -- not been updated.
61 --
62 End chk_non_updateable_args;
63 --
64 -- ----------------------------------------------------------------------------
65 -- |---------------------------< insert_validate >----------------------------|
66 -- ----------------------------------------------------------------------------
67 Procedure insert_validate
68 (p_rec in hxc_tks_shd.g_rec_type
69 ) is
70 --
71 l_proc varchar2(72) ;
72 --
73 Begin
74 g_debug :=hr_utility.debug_enabled;
75 if g_debug then
76 l_proc := g_package||'insert_validate';
77 hr_utility.set_location('Entering:'||l_proc, 5);
78 end if;
79 --
80 -- Call all supporting business operations
81 --
82 --
83 -- EDIT_HERE: As this table does not have a mandatory business_group_id
84 -- column, ensure client_info is populated by calling a suitable
85 -- ???_???_bus.set_security_group_id procedure, or add one of the following
86 -- comments:
87 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
88 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
89 --
90 -- Validate Dependent Attributes
91 --
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_tks_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 --
117 -- EDIT_HERE: As this table does not have a mandatory business_group_id
118 -- column, ensure client_info is populated by calling a suitable
119 -- ???_???_bus.set_security_group_id procedure, or add one of the following
120 -- comments:
121 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
122 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
123 --
124 -- Validate Dependent Attributes
125 --
126 chk_non_updateable_args
127 (p_rec => p_rec
128 );
129 --
130 --
131 if g_debug then
132 hr_utility.set_location(' Leaving:'||l_proc, 10);
133 end if;
134 End update_validate;
135 --
136 -- ----------------------------------------------------------------------------
137 -- |---------------------------< delete_validate >----------------------------|
138 -- ----------------------------------------------------------------------------
139 Procedure delete_validate
140 (p_rec in hxc_tks_shd.g_rec_type
141 ) is
142 --
143 l_proc varchar2(72) ;
144 --
145 Begin
146 g_debug :=hr_utility.debug_enabled;
147 if g_debug then
148 l_proc := g_package||'delete_validate';
149 hr_utility.set_location('Entering:'||l_proc, 5);
150 end if;
151 --
152 -- Call all supporting business operations
153 --
154 if g_debug then
155 hr_utility.set_location(' Leaving:'||l_proc, 10);
156 end if;
157 End delete_validate;
158 --
159 end hxc_tks_bus;
|
|
|