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