DBA Data[Home] [Help]

PACKAGE BODY: APPS.HXC_ULP_BUS

Source


1 Package Body hxc_ulp_bus as
2 /* $Header: hxculprhi.pkb 120.2 2005/09/23 09:52:13 rchennur noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  hxc_ulp_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_layout_comp_prompt_id       number         default null;
16 --
17 -- ----------------------------------------------------------------------------
18 -- |-----------------------< chk_non_updateable_args >------------------------|
19 -- ----------------------------------------------------------------------------
20 -- {Start Of Comments}
21 --
22 -- Description:
23 --   This procedure is used to ensure that non updateable attributes have
24 --   not been updated. If an attribute has been updated an error is generated.
25 --
26 -- Pre Conditions:
27 --   g_old_rec has been populated with details of the values currently in
28 --   the database.
29 --
30 -- In Arguments:
31 --   p_rec has been populated with the updated values the user would like the
32 --   record set to.
33 --
34 -- Post Success:
35 --   Processing continues if all the non updateable attributes have not
36 --   changed.
37 --
38 -- Post Failure:
39 --   An application error is raised if any of the non updatable attributes
40 --   have been altered.
41 --
42 -- {End Of Comments}
43 -- ----------------------------------------------------------------------------
44 Procedure chk_non_updateable_args
45   (p_rec in hxc_ulp_shd.g_rec_type
46   ) IS
47 --
48   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
49   l_error    EXCEPTION;
50   l_argument varchar2(30);
51 --
52 Begin
53   --
54   -- Only proceed with the validation if a row exists for the current
55   -- record in the hxc Schema.
56   --
57   IF NOT hxc_ulp_shd.api_updating
58       (p_layout_comp_prompt_id                => p_rec.layout_comp_prompt_id
59       ,p_object_version_number                => p_rec.object_version_number
60       ) THEN
61      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
62      fnd_message.set_token('PROCEDURE ', l_proc);
63      fnd_message.set_token('STEP ', '5');
64      fnd_message.raise_error;
65   END IF;
66   --
67   -- EDIT_HERE: Add checks to ensure non-updateable args have
68   --            not been updated.
69   --
70   EXCEPTION
71     WHEN l_error THEN
72        hr_api.argument_changed_error
73          (p_api_name => l_proc
74          ,p_argument => l_argument);
75     WHEN OTHERS THEN
76        RAISE;
77 End chk_non_updateable_args;
78 --
79 -- ----------------------------------------------------------------------------
80 -- |---------------------------< insert_validate >----------------------------|
81 -- ----------------------------------------------------------------------------
82 Procedure insert_validate
83   (p_rec                          in hxc_ulp_shd.g_rec_type
84   ) is
85 --
86   l_proc  varchar2(72) ;
87 --
88 Begin
89   g_debug :=hr_utility.debug_enabled;
90   if g_debug then
91   	l_proc := g_package||'insert_validate';
92   	hr_utility.set_location('Entering:'||l_proc, 5);
93   end if;
94   --
95   -- Call all supporting business operations
96   --
97   --
98   -- EDIT_HERE: As this table does not have a mandatory business_group_id
99   -- column, ensure client_info is populated by calling a suitable
100   -- ???_???_bus.set_security_group_id procedure, or add one of the following
101   -- comments:
102   -- "-- No business group context.  HR_STANDARD_LOOKUPS used for validation."
103   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
104   --
105   --
106   if g_debug then
107   	hr_utility.set_location(' Leaving:'||l_proc, 10);
108   end if;
109 End insert_validate;
110 --
111 -- ----------------------------------------------------------------------------
112 -- |---------------------------< update_validate >----------------------------|
113 -- ----------------------------------------------------------------------------
114 Procedure update_validate
115   (p_rec                          in hxc_ulp_shd.g_rec_type
116   ) is
117 --
118   l_proc  varchar2(72) ;
119 --
120 Begin
121   g_debug :=hr_utility.debug_enabled;
122   if g_debug then
123   	l_proc := g_package||'update_validate';
124   	hr_utility.set_location('Entering:'||l_proc, 5);
125   end if;
126   --
127   -- Call all supporting business operations
128   --
129   --
130   -- EDIT_HERE: As this table does not have a mandatory business_group_id
131   -- column, ensure client_info is populated by calling a suitable
132   -- ???_???_bus.set_security_group_id procedure, or add one of the following
133   -- comments:
134   -- "-- No business group context.  HR_STANDARD_LOOKUPS used for validation."
135   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
136   --
137   chk_non_updateable_args
138     (p_rec              => p_rec
139     );
140   --
141   --
142   if g_debug then
143   	hr_utility.set_location(' Leaving:'||l_proc, 10);
144   end if;
145 End update_validate;
146 --
147 -- ----------------------------------------------------------------------------
148 -- |---------------------------< delete_validate >----------------------------|
149 -- ----------------------------------------------------------------------------
150 Procedure delete_validate
151   (p_rec                          in hxc_ulp_shd.g_rec_type
152   ) is
153 --
154   l_proc  varchar2(72) ;
155 --
156 Begin
157   g_debug :=hr_utility.debug_enabled;
158   if g_debug then
159   	l_proc := g_package||'delete_validate';
160   	hr_utility.set_location('Entering:'||l_proc, 5);
161   end if;
162   --
163   -- Call all supporting business operations
164   --
165   if g_debug then
166   	hr_utility.set_location(' Leaving:'||l_proc, 10);
167   end if;
168 End delete_validate;
169 --
170 end hxc_ulp_bus;