DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_GROSSUP_BAL_EXCL_API

Source


1 Package Body pay_grossup_bal_excl_api as
2 /* $Header: pygbeapi.pkb 115.1 2003/01/28 11:05:04 dsaxby noship $ */
3 --
4 --
5 -- Package Variables
6 --
7 g_package  varchar2(33) := '  pay_grossup_bal_excl_api.';
8 --
9 -- ----------------------------------------------------------------------------
10 -- |------------------------< create_grossup_bal >------------------------|
11 -- ----------------------------------------------------------------------------
12 -- {Start Of Comments}
13 --
14 -- Description:
15 --
16 -- Prerequisites:
17 --
18 --
19 -- In Parameters:
20 --   Name                           Reqd Type     Description
21 --
22 -- Post Success:
23 --
24 -- Out Parameters:
25 --   Name                                Type     Description
26 --
27 -- Post Failure:
28 --
29 -- Access Status:
30 --   Public.
31 --
32 -- {End Of Comments}
33 --
34 procedure create_grossup_bal
35 (
36    p_validate                       in            boolean default false
37   ,p_start_date                     in            date
38   ,p_end_date                       in            date
39   ,p_source_id                      in            number
40   ,p_source_type                    in            varchar2
41   ,p_balance_type_id                in            number
42   ,p_grossup_balances_id               out nocopy number
43   ,p_object_version_number             out nocopy number
44 ) is
45  --
46   l_proc varchar2(72) := g_package||'create_grossup_bal.';
47   l_object_version_number pay_grossup_bal_exclusions.object_version_number%TYPE;
48   l_grossup_balances_id pay_grossup_bal_exclusions.grossup_balances_id%TYPE;
49  --
50 begin
51   --
52   hr_utility.set_location('Entering:'|| l_proc, 10);
53   --
54   If p_validate then
55     --
56     -- Issue the savepoint.
57     --
58     savepoint create_grossup_bal;
59   --
60   End If;
61 --
62   hr_utility.set_location(l_proc, 20);
63   --
64   -- Process Logic
65   --
66   pay_gbe_ins.ins
67   (
68    p_start_date         => p_start_date
69   ,p_end_date           => p_end_date
70   ,p_source_id          => p_source_id
71   ,p_source_type        => p_source_type
72   ,p_balance_type_id    => p_balance_type_id
73   ,p_grossup_balances_id  => l_grossup_balances_id
74   ,p_object_version_number => l_object_version_number
75   );
76 --
77   If p_validate then
78     Raise HR_Api.Validate_Enabled;
79   End If;
80 --
81   hr_utility.set_location(' Leaving:'||l_proc, 10);
82 --
83   p_object_version_number         := l_object_version_number;
84   p_grossup_balances_id           := l_object_version_number;
85 --
86 exception
87   --
88   when HR_Api.Validate_Enabled then
89     --
90     -- A validation or unexpected error has occured
91     --
92     ROLLBACK TO create_grossup_bal;
93 --
94 end create_grossup_bal;
95 -- ----------------------------------------------------------------------------
96 -- |------------------------< update_grossup_bal >------------------------|
97 -- ----------------------------------------------------------------------------
98 -- {Start Of Comments}
99 --
100 -- Description:
101 --
102 -- Prerequisites:
103 --
104 --
105 -- In Parameters:
106 --   Name                           Reqd Type     Description
107 --
108 -- Post Success:
109 --
110 -- Out Parameters:
111 --   Name                                Type     Description
112 --
113 -- Post Failure:
114 --
115 -- Access Status:
116 --   Public.
117 --
118 -- {End Of Comments}
119 --
120 procedure update_grossup_bal
121 (
122    p_validate                     in     boolean default false
123   ,p_grossup_balances_id          in     number
124   ,p_object_version_number        in out nocopy number
125   ,p_start_date                   in     date      default hr_api.g_date
126   ,p_end_date                     in     date      default hr_api.g_date
127   ,p_source_id                    in     number    default hr_api.g_number
128   ,p_source_type                  in     varchar2  default hr_api.g_varchar2
129   ,p_balance_type_id              in     number    default hr_api.g_number
130 ) is
131   --
132   -- Declare cursors and local variables
133   --
134   l_proc                  varchar2(72) := g_package||'update_grossup_bal.';
135   l_object_version_number pay_grossup_bal_exclusions.object_version_number%TYPE;
136   --
137 begin
138   hr_utility.set_location('Entering:'|| l_proc, 10);
139   --
140   If p_validate then
141     --
142     -- Issue the savepoint.
143     --
144     savepoint update_grossup_bal;
145   --
146   End If;
147 --
148   l_object_version_number := p_object_version_number;
149   pay_gbe_upd.upd
150   (
151    p_grossup_balances_id          => p_grossup_balances_id
152   ,p_object_version_number        => l_object_version_number
153   ,p_start_date                   => p_start_date
154   ,p_end_date                     => p_end_date
155   ,p_source_id                    => p_source_id
156   ,p_source_type                  => p_source_type
157   ,p_balance_type_id              => p_balance_type_id
158   );
159   hr_utility.set_location('Entering:'|| l_proc, 20);
160 --
161   --
162   -- If we are validating then raise the Validate_Enabled exception
163   --
164   If p_validate then
165     Raise HR_Api.Validate_Enabled;
166   End If;
167   --
168   p_object_version_number         := l_object_version_number;
169 --
170 exception
171   --
172   when HR_Api.Validate_Enabled then
173     --
174     -- A validation or unexpected error has occured
175     --
176     ROLLBACK TO update_grossup_bal;
177     --
178 end update_grossup_bal;
179 --
180 -- ----------------------------------------------------------------------------
181 -- |------------------------< delete_grossup_bal >------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description:
186 --
187 -- Prerequisites:
188 --
189 --
190 -- In Parameters:
191 --   Name                           Reqd Type     Description
192 --
193 -- Post Success:
194 --
195 -- Out Parameters:
196 --   Name                                Type     Description
197 --
198 -- Post Failure:
199 --
200 -- Access Status:
201 --   Public.
202 --
203 -- {End Of Comments}
204 --
205 procedure delete_grossup_bal
206 (
207    p_validate                       in     boolean default false
208   ,p_grossup_balances_id                  in     number
209   ,p_object_version_number                in     number) is
210   --
211   -- Declare cursors and local variables
212   --
213   l_proc                  varchar2(72) := g_package||'update_grossup_bal.';
214   --
215 begin
216   --
217   hr_utility.set_location('Entering:'|| l_proc, 10);
218   --
219   If p_validate then
220     --
221     -- Issue the savepoint.
222     --
223     savepoint delete_grossup_bal;
224   --
225   End If;
226   --
227   pay_gbe_del.del
228   (
229    p_grossup_balances_id          => p_grossup_balances_id
230   ,p_object_version_number        => p_object_version_number
231   );
232   hr_utility.set_location(' Leaving:'||l_proc, 70);
233   --
234   --
235   --
236   -- If we are validating then raise the Validate_Enabled exception
237   --
238   If p_validate then
239     Raise HR_Api.Validate_Enabled;
240   End If;
241 --
242 exception
243   when HR_Api.Validate_Enabled then
244     --
245     -- A validation or unexpected error has occured
246     --
247     ROLLBACK TO delete_grossup_bal;
248     --
249 end delete_grossup_bal;
250 --
251 -- ----------------------------------------------------------------------------
252 -- |------------------------< lck_grossup_bal >------------------------|
253 -- ----------------------------------------------------------------------------
254 -- {Start Of Comments}
255 --
256 -- Description:
257 --
258 -- Prerequisites:
259 --
260 --
261 -- In Parameters:
262 --   Name                           Reqd Type     Description
263 --
264 -- Post Success:
265 --
266 -- Out Parameters:
267 --   Name                                Type     Description
268 --
269 -- Post Failure:
270 --
271 -- Access Status:
272 --   Public.
273 --
274 -- {End Of Comments}
275 --
276 procedure lck_grossup_bal
277 (
278    p_grossup_balances_id                  in     number
279   ,p_object_version_number                in     number
280   ) is
281   --
282   --
283   -- Declare cursors and local variables
284   l_proc                  varchar2(72) := g_package||'update_grossup_bal.';
285   --
286 begin
287   --
288   hr_utility.set_location('Entering:'|| l_proc, 10);
289   --
290   pay_gbe_shd.lck
291   (
292    p_grossup_balances_id            => p_grossup_balances_id
293   ,p_object_version_number          => p_object_version_number
294     );
295   --
296   hr_utility.set_location(' Leaving:'||l_proc, 70);
297   --
298 end lck_grossup_bal;
299 --
300 end pay_grossup_bal_excl_api;