[Home] [Help]
PACKAGE BODY: APPS.BEN_EBN_BUS
Source
1 Package Body ben_ebn_bus as
2 /* $Header: beebnrhi.pkb 120.1 2006/02/27 02:27:16 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_ebn_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------< chk_elig_benfts_grp_prte_id >------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- Description
15 -- This procedure is used to check that the primary key for the table
16 -- is created properly. It should be null on insert and
17 -- should not be able to be updated.
18 --
19 -- Pre Conditions
20 -- None.
21 --
22 -- In Parameters
23 -- elig_benfts_grp_prte_id PK of record being inserted or updated.
24 -- effective_date Effective Date of session
25 -- object_version_number Object version number of record being
26 -- inserted or updated.
27 --
28 -- Post Success
29 -- Processing continues
30 --
31 -- Post Failure
32 -- Errors handled by the procedure
33 --
34 -- Access Status
35 -- Internal table handler use only.
36 --
37 Procedure chk_elig_benfts_grp_prte_id(p_elig_benfts_grp_prte_id in number,
38 p_effective_date in date,
39 p_object_version_number in number) is
40 --
41 l_proc varchar2(72) := g_package||'chk_elig_benfts_grp_prte_id';
42 l_api_updating boolean;
43 --
44 Begin
45 --
46 hr_utility.set_location('Entering:'||l_proc, 5);
47 --
48 l_api_updating := ben_ebn_shd.api_updating
49 (p_effective_date => p_effective_date,
50 p_elig_benfts_grp_prte_id => p_elig_benfts_grp_prte_id,
51 p_object_version_number => p_object_version_number);
52 --
53 if (l_api_updating
54 and nvl(p_elig_benfts_grp_prte_id,hr_api.g_number)
55 <> ben_ebn_shd.g_old_rec.elig_benfts_grp_prte_id) then
56 --
57 -- raise error as PK has changed
58 --
59 ben_ebn_shd.constraint_error('BEN_ELIG_BEN_GRP_PK');
60 --
61 elsif not l_api_updating then
62 --
63 -- check if PK is null
64 --
65 if p_elig_benfts_grp_prte_id is not null then
66 --
67 -- raise error as PK is not null
68 --
69 ben_ebn_shd.constraint_error('BEN_ELIG_BEN_GRP_PK');
70 --
71 end if;
72 --
73 end if;
74 --
75 hr_utility.set_location('Leaving:'||l_proc, 10);
76 --
77 End chk_elig_benfts_grp_prte_id;
78 --
79 -- ----------------------------------------------------------------------------
80 -- |------< chk_benfts_grp_id >------|
81 -- ----------------------------------------------------------------------------
82 --
83 -- Description
84 -- This procedure checks that a referenced foreign key actually exists
85 -- in the referenced table.
86 --
87 -- Pre-Conditions
88 -- None.
89 --
90 -- In Parameters
91 -- p_elig_benfts_grp_prte_id PK
92 -- p_benfts_grp_id ID of FK column
93 -- p_effective_date session date
94 -- p_object_version_number object version number
95 --
96 -- Post Success
97 -- Processing continues
98 --
99 -- Post Failure
100 -- Error raised.
101 --
102 -- Access Status
103 -- Internal table handler use only.
104 --
105 Procedure chk_benfts_grp_id (p_elig_benfts_grp_prte_id in number,
106 p_benfts_grp_id in number,
107 p_eligy_prfl_id in number,
108 p_validation_start_date in date,
109 p_validation_end_date in date,
110 p_business_group_id in number,
111 p_effective_date in date,
112 p_object_version_number in number) is
113 --
114 l_proc varchar2(72) := g_package||'chk_benfts_grp_id';
115 l_api_updating boolean;
116 l_dummy varchar2(1);
117 l_exists varchar2(1);
118 --
119 cursor c3 is
120 select null
121 from ben_elig_benfts_grp_prte_f
122 where benfts_grp_id = p_benfts_grp_id
123 and eligy_prfl_id = p_eligy_prfl_id
124 and elig_benfts_grp_prte_id <> nvl(p_elig_benfts_grp_prte_id,hr_api.g_number)
125 and business_group_id + 0 = p_business_group_id
126 and p_validation_start_date <= effective_end_date
127 and p_validation_end_date >= effective_start_date
128 ;
129 --
130 --
131 cursor c1 is
132 select null
133 from ben_benfts_grp a
134 where a.benfts_grp_id = p_benfts_grp_id
135 and a.business_group_id + 0 = p_business_group_id
136 ;
137 --
138 Begin
139 --
140 hr_utility.set_location('Entering:'||l_proc,5);
141 --
142 l_api_updating := ben_ebn_shd.api_updating
143 (p_elig_benfts_grp_prte_id => p_elig_benfts_grp_prte_id,
144 p_effective_date => p_effective_date,
145 p_object_version_number => p_object_version_number);
146 --
147 if (l_api_updating
148 and nvl(p_benfts_grp_id,hr_api.g_number)
149 <> nvl(ben_ebn_shd.g_old_rec.benfts_grp_id,hr_api.g_number)
150 or not l_api_updating) then
151 --
152 -- check if benfts_grp_id value exists in ben_benfts_grp table
153 --
154 open c1;
155 --
156 fetch c1 into l_dummy;
157 if c1%notfound then
158 --
159 close c1;
160 --
161 -- raise error as FK does not relate to PK in ben_benfts_grp
162 -- table.
163 --
164 ben_ebn_shd.constraint_error('BEN_ELIG_BEN_GRP_FK1');
165 --
166 end if;
167 --
168 close c1;
169 --
170 --
171 open c3;
172 fetch c3 into l_exists;
173 if c3%found then
174 close c3;
175 --
176 -- raise error as this lgl enty already exists for this profile
177 --
178 fnd_message.set_name('BEN', 'BEN_91349_DUP_ELIG_CRITERIA');
179 fnd_message.raise_error;
180 --
181 end if;
182 --
183 close c3;
184 --
185 end if;
186 --
187 hr_utility.set_location('Leaving:'||l_proc,10);
188 --
189 End chk_benfts_grp_id;
190 --
191 -- ----------------------------------------------------------------------------
192 -- |------< chk_excld_flag >------|
193 -- ----------------------------------------------------------------------------
194 --
195 -- Description
196 -- This procedure is used to check that the lookup value is valid.
197 --
198 -- Pre Conditions
199 -- None.
200 --
201 -- In Parameters
202 -- elig_benfts_grp_prte_id PK of record being inserted or updated.
203 -- excld_flag Value of lookup code.
204 -- effective_date effective date
205 -- object_version_number Object version number of record being
206 -- inserted or updated.
207 --
208 -- Post Success
209 -- Processing continues
210 --
211 -- Post Failure
212 -- Error handled by procedure
213 --
214 -- Access Status
215 -- Internal table handler use only.
216 --
217 Procedure chk_excld_flag(p_elig_benfts_grp_prte_id in number,
218 p_excld_flag in varchar2,
219 p_effective_date in date,
220 p_object_version_number in number) is
221 --
222 l_proc varchar2(72) := g_package||'chk_excld_flag';
223 l_api_updating boolean;
224 --
225 Begin
226 --
227 hr_utility.set_location('Entering:'||l_proc, 5);
228 --
229 l_api_updating := ben_ebn_shd.api_updating
230 (p_elig_benfts_grp_prte_id => p_elig_benfts_grp_prte_id,
231 p_effective_date => p_effective_date,
232 p_object_version_number => p_object_version_number);
233 --
234 if (l_api_updating
235 and p_excld_flag
236 <> nvl(ben_ebn_shd.g_old_rec.excld_flag,hr_api.g_varchar2)
237 or not l_api_updating) then
238 --
239 -- check if value of lookup falls within lookup type.
240 --
241 --
242 if hr_api.not_exists_in_hr_lookups
243 (p_lookup_type => 'YES_NO',
244 p_lookup_code => p_excld_flag,
245 p_effective_date => p_effective_date) then
246 --
247 -- raise error as does not exist as lookup
248 --
249 hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
250 hr_utility.raise_error;
251 --
252 end if;
253 --
254 end if;
255 --
256 hr_utility.set_location('Leaving:'||l_proc,10);
257 --
258 end chk_excld_flag;
259 --
260 --Bug:5054189
261 -- ---------------------------------------------------------------------------
262 -- |-----------------------< chk_duplicate_ordr_num >---------------------------|
263 -- ---------------------------------------------------------------------------
264 --
265 -- Description
266 -- Ensure that the Sequence Number is unique
267 -- within business_group
268 --
269 -- Pre Conditions
270 -- None.
271 --
272 -- In Parameters
273 -- p_elig_benfts_grp_prte_id elig_benfts_grp_prte_id
274 -- p_eligy_prfl_id eligy_prfl_id
275 -- p_ordr_num Sequence Number
276 -- p_business_group_id
277 --
278 -- Post Success
279 -- Processing continues
280 --
281 -- Post Failure
282 -- Errors handled by the procedure
283 --
284 -- Access Status
285 -- Internal table handler use only
286 --
287
288 Procedure chk_duplicate_ordr_num
289 ( p_elig_benfts_grp_prte_id in number
290 ,p_eligy_prfl_id in number
291 ,p_ordr_num in number
292 ,p_business_group_id in number)
293 is
294 l_proc varchar2(72) := g_package||'chk_duplicate_ordr_num';
295 l_dummy char(1);
296 cursor c1 is
297 select null
298 from ben_elig_benfts_grp_prte_f
299 where elig_benfts_grp_prte_id <> nvl(p_elig_benfts_grp_prte_id,-1)
300 and eligy_prfl_id = p_eligy_prfl_id
301 and ordr_num = p_ordr_num
302 and business_group_id = p_business_group_id;
303 --
304 Begin
305 hr_utility.set_location('Entering:'||l_proc, 5);
306 --
307 open c1;
308 fetch c1 into l_dummy;
309 if c1%found then
310 close c1;
311 fnd_message.set_name('BEN','BEN_91001_SEQ_NOT_UNIQUE');
312 fnd_message.raise_error;
313 end if;
314 close c1;
315 --
316 hr_utility.set_location('Leaving:'||l_proc, 15);
317 End chk_duplicate_ordr_num;
318 -- ----------------------------------------------------------------------------
319 -- |--------------------------< dt_update_validate >--------------------------|
320 -- ----------------------------------------------------------------------------
321 -- {Start Of Comments}
322 --
323 -- Description:
324 -- This procedure is used for referential integrity of datetracked
325 -- parent entities when a datetrack update operation is taking place
326 -- and where there is no cascading of update defined for this entity.
327 --
328 -- Prerequisites:
329 -- This procedure is called from the update_validate.
330 --
331 -- In Parameters:
332 --
333 -- Post Success:
334 -- Processing continues.
335 --
336 -- Post Failure:
337 --
338 -- Developer Implementation Notes:
339 -- This procedure should not need maintenance unless the HR Schema model
340 -- changes.
341 --
342 -- Access Status:
343 -- Internal Row Handler Use Only.
344 --
345 -- {End Of Comments}
346 -- ----------------------------------------------------------------------------
347 Procedure dt_update_validate
348 (p_eligy_prfl_id in number default hr_api.g_number,
349 p_datetrack_mode in varchar2,
350 p_validation_start_date in date,
351 p_validation_end_date in date) Is
352 --
353 l_proc varchar2(72) := g_package||'dt_update_validate';
354 l_integrity_error Exception;
355 l_table_name all_tables.table_name%TYPE;
356 --
357 Begin
358 hr_utility.set_location('Entering:'||l_proc, 5);
359 --
360 -- Ensure that the p_datetrack_mode argument is not null
361 --
362 hr_api.mandatory_arg_error
363 (p_api_name => l_proc,
364 p_argument => 'datetrack_mode',
365 p_argument_value => p_datetrack_mode);
366 --
367 -- Only perform the validation if the datetrack update mode is valid
368 --
369 If (dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode)) then
370 --
371 --
372 -- Ensure the arguments are not null
373 --
374 hr_api.mandatory_arg_error
375 (p_api_name => l_proc,
376 p_argument => 'validation_start_date',
377 p_argument_value => p_validation_start_date);
378 --
379 hr_api.mandatory_arg_error
380 (p_api_name => l_proc,
381 p_argument => 'validation_end_date',
382 p_argument_value => p_validation_end_date);
383 --
384 If ((nvl(p_eligy_prfl_id, hr_api.g_number) <> hr_api.g_number) and
385 NOT (dt_api.check_min_max_dates
386 (p_base_table_name => 'ben_eligy_prfl_f',
387 p_base_key_column => 'eligy_prfl_id',
388 p_base_key_value => p_eligy_prfl_id,
389 p_from_date => p_validation_start_date,
390 p_to_date => p_validation_end_date))) Then
391 l_table_name := 'ben_eligy_prfl_f';
392 Raise l_integrity_error;
393 End If;
394 --
395 End If;
396 --
397 hr_utility.set_location(' Leaving:'||l_proc, 10);
398 Exception
399 When l_integrity_error Then
400 --
401 -- A referential integrity check was violated therefore
402 -- we must error
403 --
404 ben_utility.parent_integrity_error(p_table_name => l_table_name);
405 --
406 When Others Then
407 --
408 -- An unhandled or unexpected error has occurred which
409 -- we must report
410 --
411 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
412 hr_utility.set_message_token('PROCEDURE', l_proc);
413 hr_utility.set_message_token('STEP','15');
414 hr_utility.raise_error;
415 End dt_update_validate;
416 --
417 -- ----------------------------------------------------------------------------
418 -- |--------------------------< dt_delete_validate >--------------------------|
419 -- ----------------------------------------------------------------------------
420 -- {Start Of Comments}
421 --
422 -- Description:
423 -- This procedure is used for referential integrity of datetracked
424 -- child entities when either a datetrack DELETE or ZAP is in operation
425 -- and where there is no cascading of delete defined for this entity.
426 -- For the datetrack mode of DELETE or ZAP we must ensure that no
427 -- datetracked child rows exist between the validation start and end
428 -- dates.
429 --
430 -- Prerequisites:
431 -- This procedure is called from the delete_validate.
432 --
433 -- In Parameters:
434 --
435 -- Post Success:
436 -- Processing continues.
437 --
438 -- Post Failure:
439 -- If a row exists by determining the returning Boolean value from the
440 -- generic dt_api.rows_exist function then we must supply an error via
441 -- the use of the local exception handler l_rows_exist.
442 --
443 -- Developer Implementation Notes:
444 -- This procedure should not need maintenance unless the HR Schema model
445 -- changes.
446 --
447 -- Access Status:
448 -- Internal Row Handler Use Only.
449 --
450 -- {End Of Comments}
451 -- ----------------------------------------------------------------------------
452 Procedure dt_delete_validate
453 (p_elig_benfts_grp_prte_id in number,
454 p_datetrack_mode in varchar2,
455 p_validation_start_date in date,
456 p_validation_end_date in date) Is
457 --
458 l_proc varchar2(72) := g_package||'dt_delete_validate';
459 l_rows_exist Exception;
460 l_table_name all_tables.table_name%TYPE;
461 --
462 Begin
463 hr_utility.set_location('Entering:'||l_proc, 5);
464 --
465 -- Ensure that the p_datetrack_mode argument is not null
466 --
467 hr_api.mandatory_arg_error
468 (p_api_name => l_proc,
469 p_argument => 'datetrack_mode',
470 p_argument_value => p_datetrack_mode);
471 --
472 -- Only perform the validation if the datetrack mode is either
473 -- DELETE or ZAP
474 --
475 If (p_datetrack_mode = 'DELETE' or
476 p_datetrack_mode = 'ZAP') then
477 --
478 --
479 -- Ensure the arguments are not null
480 --
481 hr_api.mandatory_arg_error
482 (p_api_name => l_proc,
483 p_argument => 'validation_start_date',
484 p_argument_value => p_validation_start_date);
485 --
486 hr_api.mandatory_arg_error
487 (p_api_name => l_proc,
491 hr_api.mandatory_arg_error
488 p_argument => 'validation_end_date',
489 p_argument_value => p_validation_end_date);
490 --
492 (p_api_name => l_proc,
493 p_argument => 'elig_benfts_grp_prte_id',
494 p_argument_value => p_elig_benfts_grp_prte_id);
495 --
496 --
497 --
498 End If;
499 --
500 hr_utility.set_location(' Leaving:'||l_proc, 10);
501 Exception
502 When l_rows_exist Then
503 --
504 -- A referential integrity check was violated therefore
505 -- we must error
506 --
507 ben_utility.child_exists_error(p_table_name => l_table_name);
508 --
509 When Others Then
510 --
511 -- An unhandled or unexpected error has occurred which
512 -- we must report
513 --
514 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
515 hr_utility.set_message_token('PROCEDURE', l_proc);
516 hr_utility.set_message_token('STEP','15');
517 hr_utility.raise_error;
518 End dt_delete_validate;
519 --
520 -- ----------------------------------------------------------------------------
521 -- |---------------------------< insert_validate >----------------------------|
522 -- ----------------------------------------------------------------------------
523 Procedure insert_validate
524 (p_rec in ben_ebn_shd.g_rec_type,
525 p_effective_date in date,
526 p_datetrack_mode in varchar2,
527 p_validation_start_date in date,
528 p_validation_end_date in date) is
529 --
530 l_proc varchar2(72) := g_package||'insert_validate';
531 --
532 Begin
533 hr_utility.set_location('Entering:'||l_proc, 5);
534 --
535 -- Call all supporting business operations
536 --
537 --
538 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
539 --
540 chk_elig_benfts_grp_prte_id
541 (p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id,
542 p_effective_date => p_effective_date,
543 p_object_version_number => p_rec.object_version_number);
544 --
545 chk_benfts_grp_id
546 (p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id,
547 p_benfts_grp_id => p_rec.benfts_grp_id,
548 p_eligy_prfl_id => p_rec.eligy_prfl_id,
549 p_validation_start_date => p_validation_start_date,
550 p_validation_end_date => p_validation_end_date,
551 p_business_group_id => p_rec.business_group_id,
552 p_effective_date => p_effective_date,
553 p_object_version_number => p_rec.object_version_number);
554 --
555 chk_excld_flag
556 (p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id,
557 p_excld_flag => p_rec.excld_flag,
558 p_effective_date => p_effective_date,
559 p_object_version_number => p_rec.object_version_number);
560 --
561 chk_duplicate_ordr_num
562 ( p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id
563 ,p_eligy_prfl_id => p_rec.eligy_prfl_id
564 ,p_ordr_num => p_rec.ordr_num
565 ,p_business_group_id => p_rec.business_group_id);
566 --
567 hr_utility.set_location(' Leaving:'||l_proc, 10);
568 End insert_validate;
569 --
570 -- ----------------------------------------------------------------------------
571 -- |---------------------------< update_validate >----------------------------|
572 -- ----------------------------------------------------------------------------
573 Procedure update_validate
574 (p_rec in ben_ebn_shd.g_rec_type,
575 p_effective_date in date,
576 p_datetrack_mode in varchar2,
577 p_validation_start_date in date,
578 p_validation_end_date in date) is
579 --
580 l_proc varchar2(72) := g_package||'update_validate';
581 --
582 Begin
583 hr_utility.set_location('Entering:'||l_proc, 5);
584 --
585 -- Call all supporting business operations
586 --
587 --
588 hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
589 --
590 chk_elig_benfts_grp_prte_id
591 (p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id,
592 p_effective_date => p_effective_date,
593 p_object_version_number => p_rec.object_version_number);
594 --
595 chk_benfts_grp_id
596 (p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id,
597 p_benfts_grp_id => p_rec.benfts_grp_id,
598 p_eligy_prfl_id => p_rec.eligy_prfl_id,
599 p_validation_start_date => p_validation_start_date,
600 p_validation_end_date => p_validation_end_date,
601 p_business_group_id => p_rec.business_group_id,
602 p_effective_date => p_effective_date,
603 p_object_version_number => p_rec.object_version_number);
604 --
605 chk_excld_flag
606 (p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id,
607 p_excld_flag => p_rec.excld_flag,
608 p_effective_date => p_effective_date,
609 p_object_version_number => p_rec.object_version_number);
610 --
611 chk_duplicate_ordr_num
612 ( p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id
613 ,p_eligy_prfl_id => p_rec.eligy_prfl_id
614 ,p_ordr_num => p_rec.ordr_num
615 ,p_business_group_id => p_rec.business_group_id);
616 -- Call the datetrack update integrity operation
617 --
618 dt_update_validate
619 (p_eligy_prfl_id => p_rec.eligy_prfl_id,
620 p_datetrack_mode => p_datetrack_mode,
621 p_validation_start_date => p_validation_start_date,
622 p_validation_end_date => p_validation_end_date);
623 --
624 hr_utility.set_location(' Leaving:'||l_proc, 10);
625 End update_validate;
626 --
627 -- ----------------------------------------------------------------------------
628 -- |---------------------------< delete_validate >----------------------------|
629 -- ----------------------------------------------------------------------------
630 Procedure delete_validate
631 (p_rec in ben_ebn_shd.g_rec_type,
632 p_effective_date in date,
633 p_datetrack_mode in varchar2,
634 p_validation_start_date in date,
635 p_validation_end_date in date) is
636 --
637 l_proc varchar2(72) := g_package||'delete_validate';
638 --
639 Begin
640 hr_utility.set_location('Entering:'||l_proc, 5);
641 --
642 -- Call all supporting business operations
643 --
644 dt_delete_validate
645 (p_datetrack_mode => p_datetrack_mode,
646 p_validation_start_date => p_validation_start_date,
647 p_validation_end_date => p_validation_end_date,
648 p_elig_benfts_grp_prte_id => p_rec.elig_benfts_grp_prte_id);
649 --
650 hr_utility.set_location(' Leaving:'||l_proc, 10);
651 End delete_validate;
652 --
653 --
654 -- ---------------------------------------------------------------------------
655 -- |---------------------< return_legislation_code >-------------------------|
656 -- ---------------------------------------------------------------------------
657 --
658 function return_legislation_code
659 (p_elig_benfts_grp_prte_id in number) return varchar2 is
660 --
661 -- Declare cursor
662 --
663 cursor csr_leg_code is
664 select a.legislation_code
665 from per_business_groups a,
666 ben_elig_benfts_grp_prte_f b
667 where b.elig_benfts_grp_prte_id = p_elig_benfts_grp_prte_id
668 and a.business_group_id = b.business_group_id;
669 --
670 -- Declare local variables
671 --
672 l_legislation_code varchar2(150);
673 l_proc varchar2(72) := g_package||'return_legislation_code';
674 --
675 begin
676 --
677 hr_utility.set_location('Entering:'|| l_proc, 10);
678 --
679 -- Ensure that all the mandatory parameter are not null
680 --
681 hr_api.mandatory_arg_error(p_api_name => l_proc,
682 p_argument => 'elig_benfts_grp_prte_id',
683 p_argument_value => p_elig_benfts_grp_prte_id);
684 --
685 open csr_leg_code;
686 --
687 fetch csr_leg_code into l_legislation_code;
688 --
689 if csr_leg_code%notfound then
690 --
691 close csr_leg_code;
692 --
693 -- The primary key is invalid therefore we must error
694 --
695 hr_utility.set_message(801,'HR_7220_INVALID_PRIMARY_KEY');
696 hr_utility.raise_error;
697 --
698 end if;
699 --
700 close csr_leg_code;
701 --
702 hr_utility.set_location(' Leaving:'|| l_proc, 20);
703 --
704 return l_legislation_code;
705 --
706 end return_legislation_code;
707 --
708 end ben_ebn_bus;