DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_ITS_PKG

Source


1 PACKAGE BODY PER_ITS_PKG as
2 /* $Header: peits01t.pkb 120.0 2005/05/31 10:31:14 appldev noship $ */
3 -- ----------------------------------------------------------------------------
4 -- return_legislation_code
5 --
6 --    Returns the legislation code for the business group of a responsibility
7 -- ----------------------------------------------------------------------------
8 --
9 FUNCTION return_legislation_code (p_responsibility_id IN NUMBER)
10                                   RETURN VARCHAR2 IS
11 --
12 l_leg_code VARCHAR2(150);
13 --
14 BEGIN
15 --
16 --
17 select c.legislation_code into l_leg_code
18 from fnd_profile_options a, fnd_profile_option_values b, per_business_groups c
19 where a.profile_option_name = 'PER_BUSINESS_GROUP_ID'
20 and a.profile_option_id = b.profile_option_id
21 and b.level_value = p_responsibility_id
22 and b.level_id = 10003   /* responsibility level profile option */
23 and b.profile_option_value = to_char(c.business_group_id);
24 --
25 return l_leg_code;
26 --
27 END RETURN_LEGISLATION_CODE;
28 --
29 END PER_ITS_PKG;