DBA Data[Home] [Help]

PACKAGE BODY: APPS.HXC_DTL_BUS

Source


1 Package Body hxc_dtl_bus as
2 /* $Header: hxcdtlrhi.pkb 120.2 2005/09/23 08:07:34 sechandr noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  hxc_dtl_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_dtl_shd.g_rec_type
41   ) IS
42 --
43   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
44   l_error    EXCEPTION;
45   l_argument varchar2(30);
46 --
47 Begin
48   --
49   -- Only proceed with the validation if a row exists for the current
50   -- record in the HR Schema.
51   --
52   IF NOT hxc_dtl_shd.api_updating
53       (p_alias_definition_id                  => p_rec.alias_definition_id
54       ,p_language                             => p_rec.language
55       ) THEN
56      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
57      fnd_message.set_token('PROCEDURE ', l_proc);
58      fnd_message.set_token('STEP ', '5');
59      fnd_message.raise_error;
60   END IF;
61   --
62   -- EDIT_HERE: Add checks to ensure non-updateable args have
63   --            not been updated.
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_dtl_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   --
93   -- EDIT_HERE: As this table does not have a mandatory business_group_id
94   -- column, ensure client_info is populated by calling a suitable
95   -- ???_???_bus.set_security_group_id procedure, or add one of the following
96   -- comments:
97   -- "-- No business group context.  HR_STANDARD_LOOKUPS used for validation."
98   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
99   --
100   --
101   if g_debug then
102 	hr_utility.set_location(' Leaving:'||l_proc, 10);
103   end if;
104 End insert_validate;
105 --
106 -- ----------------------------------------------------------------------------
107 -- |---------------------------< update_validate >----------------------------|
108 -- ----------------------------------------------------------------------------
109 Procedure update_validate
110   (p_rec                          in hxc_dtl_shd.g_rec_type
111   ) is
112 --
113   l_proc  varchar2(72);
114 --
115 Begin
116   g_debug:=hr_utility.debug_enabled;
117   if g_debug then
118 	 l_proc:= g_package||'update_validate';
119 	 hr_utility.set_location('Entering:'||l_proc, 5);
120   end if;
121   --
122   -- Call all supporting business operations
123   --
124   --
125   -- EDIT_HERE: As this table does not have a mandatory business_group_id
126   -- column, ensure client_info is populated by calling a suitable
127   -- ???_???_bus.set_security_group_id procedure, or add one of the following
128   -- comments:
129   -- "-- No business group context.  HR_STANDARD_LOOKUPS used for validation."
130   -- "-- CLIENT_INFO not set.  No lookup validation or joins to HR_LOOKUPS."
131   --
132   chk_non_updateable_args
133     (p_rec              => p_rec
134     );
135   --
136   --
137   if g_debug then
138 	hr_utility.set_location(' Leaving:'||l_proc, 10);
139   end if;
140 End update_validate;
141 --
142 -- ----------------------------------------------------------------------------
143 -- |---------------------------< delete_validate >----------------------------|
144 -- ----------------------------------------------------------------------------
145 Procedure delete_validate
146   (p_rec                          in hxc_dtl_shd.g_rec_type
147   ) is
148 --
149   l_proc  varchar2(72);
150 --
151 Begin
152   if g_debug then
153 	l_proc := g_package||'delete_validate';
154 	hr_utility.set_location('Entering:'||l_proc, 5);
155   end if;
156   --
157   -- Call all supporting business operations
158   --
159   if g_debug then
160 	hr_utility.set_location(' Leaving:'||l_proc, 10);
161   end if;
162 End delete_validate;
163 --
164 end hxc_dtl_bus;