[Home] [Help]
PACKAGE BODY: APPS.BEN_EXT_CRIT_TYP_API
Source
1 Package Body ben_EXT_CRIT_TYP_api as
2 /* $Header: bexctapi.pkb 115.4 2002/12/24 22:24:42 rpillay ship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' ben_EXT_CRIT_TYP_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_EXT_CRIT_TYP >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_EXT_CRIT_TYP
13 (p_validate in boolean default false
14 ,p_ext_crit_typ_id out nocopy number
15 ,p_crit_typ_cd in varchar2 default null
16 ,p_ext_crit_prfl_id in number default null
17 ,p_business_group_id in number default null
18 ,p_legislation_code in varchar2 default null
19 ,p_object_version_number out nocopy number
20 ,p_effective_date in date
21 ,p_excld_flag in varchar2
22 ) is
23 --
24 -- Declare cursors and local variables
25 --
26 l_ext_crit_typ_id ben_ext_crit_typ.ext_crit_typ_id%TYPE;
27 l_proc varchar2(72) := g_package||'create_EXT_CRIT_TYP';
28 l_object_version_number ben_ext_crit_typ.object_version_number%TYPE;
29 --
30 begin
31 --
32 hr_utility.set_location('Entering:'|| l_proc, 10);
33 --
34 -- Issue a savepoint if operating in validation only mode
35 --
36 savepoint create_EXT_CRIT_TYP;
37 --
38 hr_utility.set_location(l_proc, 20);
39 --
40 -- Process Logic
41 --
42 begin
43 --
44 -- Start of API User Hook for the before hook of create_EXT_CRIT_TYP
45 --
46 ben_EXT_CRIT_TYP_bk1.create_EXT_CRIT_TYP_b
47 (
48 p_crit_typ_cd => p_crit_typ_cd
49 ,p_ext_crit_prfl_id => p_ext_crit_prfl_id
50 ,p_business_group_id => p_business_group_id
51 ,p_legislation_code => p_legislation_code
52 ,p_effective_date => trunc(p_effective_date)
53 ,p_excld_flag => p_excld_flag
54 );
55 exception
56 when hr_api.cannot_find_prog_unit then
57 hr_api.cannot_find_prog_unit_error
58 (
59 p_module_name => 'CREATE_EXT_CRIT_TYP'
60 ,p_hook_type => 'BP'
61 );
62 --
63 -- End of API User Hook for the before hook of create_EXT_CRIT_TYP
64 --
65 end;
66 --
67 ben_xct_ins.ins
68 (
69 p_ext_crit_typ_id => l_ext_crit_typ_id
70 ,p_crit_typ_cd => p_crit_typ_cd
71 ,p_ext_crit_prfl_id => p_ext_crit_prfl_id
72 ,p_business_group_id => p_business_group_id
73 ,p_legislation_code => p_legislation_code
74 ,p_object_version_number => l_object_version_number
75 ,p_effective_date => trunc(p_effective_date)
76 ,p_excld_flag => p_excld_flag
77 );
78 --
79 begin
80 --
81 -- Start of API User Hook for the after hook of create_EXT_CRIT_TYP
82 --
83 ben_EXT_CRIT_TYP_bk1.create_EXT_CRIT_TYP_a
84 (
85 p_ext_crit_typ_id => l_ext_crit_typ_id
86 ,p_crit_typ_cd => p_crit_typ_cd
87 ,p_ext_crit_prfl_id => p_ext_crit_prfl_id
88 ,p_business_group_id => p_business_group_id
89 ,p_legislation_code => p_legislation_code
90 ,p_object_version_number => l_object_version_number
91 ,p_effective_date => trunc(p_effective_date)
92 ,p_excld_flag => p_excld_flag
93 );
94 exception
95 when hr_api.cannot_find_prog_unit then
96 hr_api.cannot_find_prog_unit_error
97 (p_module_name => 'CREATE_EXT_CRIT_TYP'
98 ,p_hook_type => 'AP'
99 );
100 --
101 -- End of API User Hook for the after hook of create_EXT_CRIT_TYP
102 --
103 end;
104 --
105 hr_utility.set_location(l_proc, 60);
106 --
107 -- When in validation only mode raise the Validate_Enabled exception
108 --
109 if p_validate then
110 raise hr_api.validate_enabled;
111 end if;
112 --
113 -- Set all output arguments
114 --
115 p_ext_crit_typ_id := l_ext_crit_typ_id;
116 p_object_version_number := l_object_version_number;
117 --
118 hr_utility.set_location(' Leaving:'||l_proc, 70);
119 --
120 exception
121 --
122 when hr_api.validate_enabled then
123 --
124 -- As the Validate_Enabled exception has been raised
125 -- we must rollback to the savepoint
126 --
127 ROLLBACK TO create_EXT_CRIT_TYP;
128 --
129 -- Only set output warning arguments
130 -- (Any key or derived arguments must be set to null
131 -- when validation only mode is being used.)
132 --
133 p_ext_crit_typ_id := null;
134 p_object_version_number := null;
135 hr_utility.set_location(' Leaving:'||l_proc, 80);
136 --
137 when others then
138 --
139 -- A validation or unexpected error has occured
140 --
141 ROLLBACK TO create_EXT_CRIT_TYP;
142 /* Inserted for nocopy changes */
143 p_ext_crit_typ_id := null;
144 p_object_version_number := null;
145 raise;
146 --
147 end create_EXT_CRIT_TYP;
148 -- ----------------------------------------------------------------------------
149 -- |------------------------< update_EXT_CRIT_TYP >--- ------------------|
150 -- ----------------------------------------------------------------------------
151 --
152 procedure update_EXT_CRIT_TYP
153 (p_validate in boolean default false
154 ,p_ext_crit_typ_id in number
155 ,p_crit_typ_cd in varchar2 default hr_api.g_varchar2
156 ,p_ext_crit_prfl_id in number default hr_api.g_number
157 ,p_business_group_id in number default hr_api.g_number
158 ,p_legislation_code in varchar2 default hr_api.g_varchar2
159 ,p_object_version_number in out nocopy number
160 ,p_effective_date in date
161 ,p_excld_flag in varchar2 default hr_api.g_varchar2
162 ) is
163 --
164 -- Declare cursors and local variables
165 --
166 l_proc varchar2(72) := g_package||'update_EXT_CRIT_TYP';
167 l_object_version_number ben_ext_crit_typ.object_version_number%TYPE;
168 --
169 begin
170 --
171 hr_utility.set_location('Entering:'|| l_proc, 10);
172 --
173 -- Issue a savepoint if operating in validation only mode
174 --
175 savepoint update_EXT_CRIT_TYP;
176 --
177 hr_utility.set_location(l_proc, 20);
178 --
179 -- Process Logic
180 --
181 l_object_version_number := p_object_version_number;
182 --
183 begin
184 --
185 -- Start of API User Hook for the before hook of update_EXT_CRIT_TYP
186 --
187 ben_EXT_CRIT_TYP_bk2.update_EXT_CRIT_TYP_b
188 (
189 p_ext_crit_typ_id => p_ext_crit_typ_id
190 ,p_crit_typ_cd => p_crit_typ_cd
191 ,p_ext_crit_prfl_id => p_ext_crit_prfl_id
192 ,p_business_group_id => p_business_group_id
193 ,p_legislation_code => p_legislation_code
194 ,p_object_version_number => p_object_version_number
195 ,p_effective_date => trunc(p_effective_date)
196 ,p_excld_flag => p_excld_flag
197 );
198 exception
199 when hr_api.cannot_find_prog_unit then
200 hr_api.cannot_find_prog_unit_error
201 (p_module_name => 'UPDATE_EXT_CRIT_TYP'
202 ,p_hook_type => 'BP'
203 );
204 --
205 -- End of API User Hook for the before hook of update_EXT_CRIT_TYP
206 --
207 end;
208 --
209 ben_xct_upd.upd
210 (
211 p_ext_crit_typ_id => p_ext_crit_typ_id
212 ,p_crit_typ_cd => p_crit_typ_cd
213 ,p_ext_crit_prfl_id => p_ext_crit_prfl_id
214 ,p_business_group_id => p_business_group_id
215 ,p_legislation_code => p_legislation_code
216 ,p_object_version_number => l_object_version_number
217 ,p_effective_date => trunc(p_effective_date)
218 ,p_excld_flag => p_excld_flag
219 );
220 --
221 begin
222 --
223 -- Start of API User Hook for the after hook of update_EXT_CRIT_TYP
224 --
225 ben_EXT_CRIT_TYP_bk2.update_EXT_CRIT_TYP_a
226 (
227 p_ext_crit_typ_id => p_ext_crit_typ_id
228 ,p_crit_typ_cd => p_crit_typ_cd
229 ,p_ext_crit_prfl_id => p_ext_crit_prfl_id
230 ,p_business_group_id => p_business_group_id
231 ,p_legislation_code => p_legislation_code
232 ,p_object_version_number => l_object_version_number
233 ,p_effective_date => trunc(p_effective_date)
234 ,p_excld_flag => p_excld_flag
235 );
236 exception
237 when hr_api.cannot_find_prog_unit then
238 hr_api.cannot_find_prog_unit_error
239 (p_module_name => 'UPDATE_EXT_CRIT_TYP'
240 ,p_hook_type => 'AP'
241 );
242 --
243 -- End of API User Hook for the after hook of update_EXT_CRIT_TYP
244 --
245 end;
246 --
247 hr_utility.set_location(l_proc, 60);
248 --
249 -- When in validation only mode raise the Validate_Enabled exception
250 --
251 if p_validate then
252 raise hr_api.validate_enabled;
253 end if;
254 --
255 -- Set all output arguments
256 --
257 p_object_version_number := l_object_version_number;
258 --
259 hr_utility.set_location(' Leaving:'||l_proc, 70);
260 --
261 exception
262 --
263 when hr_api.validate_enabled then
264 --
265 -- As the Validate_Enabled exception has been raised
266 -- we must rollback to the savepoint
267 --
268 ROLLBACK TO update_EXT_CRIT_TYP;
269 --
270 -- Only set output warning arguments
271 -- (Any key or derived arguments must be set to null
272 -- when validation only mode is being used.)
273 --
274 hr_utility.set_location(' Leaving:'||l_proc, 80);
275 --
276 when others then
277 --
278 -- A validation or unexpected error has occured
279 --
280 ROLLBACK TO update_EXT_CRIT_TYP;
281 /* Inserted for nocopy changes */
282 p_object_version_number := l_object_version_number;
283 raise;
284 --
285 end update_EXT_CRIT_TYP;
286 -- ----------------------------------------------------------------------------
287 -- |------------------------< delete_EXT_CRIT_TYP >----------------------|
288 -- ----------------------------------------------------------------------------
289 --
290 procedure delete_EXT_CRIT_TYP
291 (p_validate in boolean default false
292 ,p_ext_crit_typ_id in number
293 ,p_legislation_code in varchar2 default null
294 ,p_object_version_number in out nocopy number
295 ,p_effective_date in date
296 ) is
297 --
298 -- Declare cursors and local variables
299 --
300 l_proc varchar2(72) := g_package||'update_EXT_CRIT_TYP';
301 l_object_version_number ben_ext_crit_typ.object_version_number%TYPE;
302 --
303 begin
304 --
305 hr_utility.set_location('Entering:'|| l_proc, 10);
306 --
307 -- Issue a savepoint if operating in validation only mode
308 --
309 savepoint delete_EXT_CRIT_TYP;
310 --
311 hr_utility.set_location(l_proc, 20);
312 --
313 -- Process Logic
314 --
315 l_object_version_number := p_object_version_number;
316 --
317 --
318 begin
319 --
320 -- Start of API User Hook for the before hook of delete_EXT_CRIT_TYP
321 --
322 ben_EXT_CRIT_TYP_bk3.delete_EXT_CRIT_TYP_b
323 (
324 p_ext_crit_typ_id => p_ext_crit_typ_id
325 ,p_legislation_code => p_legislation_code
326 ,p_object_version_number => p_object_version_number
327 ,p_effective_date => trunc(p_effective_date)
328 );
329 exception
330 when hr_api.cannot_find_prog_unit then
331 hr_api.cannot_find_prog_unit_error
332 (p_module_name => 'DELETE_EXT_CRIT_TYP'
333 ,p_hook_type => 'BP'
334 );
335 --
336 -- End of API User Hook for the before hook of delete_EXT_CRIT_TYP
337 --
338 end;
339 --
340 ben_xct_del.del
341 (
342 p_ext_crit_typ_id => p_ext_crit_typ_id
343 ,p_legislation_code => p_legislation_code
344 ,p_object_version_number => l_object_version_number
345 ,p_effective_date => p_effective_date
346 );
347 --
348 begin
349 --
350 -- Start of API User Hook for the after hook of delete_EXT_CRIT_TYP
351 --
352 ben_EXT_CRIT_TYP_bk3.delete_EXT_CRIT_TYP_a
353 (
354 p_ext_crit_typ_id => p_ext_crit_typ_id
355 ,p_legislation_code => p_legislation_code
356 ,p_object_version_number => l_object_version_number
357 ,p_effective_date => trunc(p_effective_date)
358 );
359 exception
360 when hr_api.cannot_find_prog_unit then
361 hr_api.cannot_find_prog_unit_error
362 (p_module_name => 'DELETE_EXT_CRIT_TYP'
363 ,p_hook_type => 'AP'
364 );
365 --
366 -- End of API User Hook for the after hook of delete_EXT_CRIT_TYP
367 --
368 end;
369 --
370 hr_utility.set_location(l_proc, 60);
371 --
372 -- When in validation only mode raise the Validate_Enabled exception
373 --
374 if p_validate then
375 raise hr_api.validate_enabled;
376 end if;
377 --
378 hr_utility.set_location(' Leaving:'||l_proc, 70);
379 --
380 exception
381 --
382 when hr_api.validate_enabled then
383 --
384 -- As the Validate_Enabled exception has been raised
385 -- we must rollback to the savepoint
386 --
387 ROLLBACK TO delete_EXT_CRIT_TYP;
388 --
389 -- Only set output warning arguments
390 -- (Any key or derived arguments must be set to null
391 -- when validation only mode is being used.)
392 --
393 --
394 when others then
395 --
396 -- A validation or unexpected error has occured
397 --
398 ROLLBACK TO delete_EXT_CRIT_TYP;
399 /* Inserted for nocopy changes */
400 p_object_version_number := l_object_version_number;
401 raise;
402 --
403 end delete_EXT_CRIT_TYP;
404 --
405 -- ----------------------------------------------------------------------------
406 -- |-------------------------------< lck >------------------------------------|
407 -- ----------------------------------------------------------------------------
408 --
409 procedure lck
410 (
411 p_ext_crit_typ_id in number
412 ,p_object_version_number in number
413 ) is
414 --
415 --
416 -- Declare cursors and local variables
417 --
418 l_proc varchar2(72) := g_package||'lck';
419 --
420 begin
421 --
422 hr_utility.set_location('Entering:'|| l_proc, 10);
423 --
424 ben_xct_shd.lck
425 (
426 p_ext_crit_typ_id => p_ext_crit_typ_id
430 hr_utility.set_location(' Leaving:'||l_proc, 70);
427 ,p_object_version_number => p_object_version_number
428 );
429 --
431 --
432 end lck;
433 --
434 end ben_EXT_CRIT_TYP_api;