DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_IE_PAY_ADVICE_REPORT

Source


1 Package body pay_ie_pay_advice_report as
2 /* $Header: pyiersoe.pkb 115.1 2003/09/15 10:56:48 vmkhande noship $ */
3    g_package          CONSTANT VARCHAR2(33) := 'pay_ie_pay_advice_report.';
4 
5    Function get_address_line_1 (p_location_code varchar2,
6                                p_business_group_id varchar2)
7    return varchar2
8    is
9    l_address_line_1 varchar2(150);
10    begin
11        hr_utility.trace('Entering ' ||g_package || 'get_address_line_1' );
12        select ADDRESS_LINE_1 into l_address_line_1
13        from  hr_locations_all
14            where location_code = p_location_code and
15                  nvl(BUSINESS_GROUP_ID,p_business_group_id) =
16                                         p_business_group_id;
17 
18        hr_utility.trace('l_address_line_1 ' ||l_address_line_1 );
19        return l_address_line_1;
20        Exception
21        when others then
22             hr_utility.trace('Exception! Setting l_address_line_1 as null' ||l_address_line_1 );
23             l_address_line_1 := null;
24             return l_address_line_1;
25    end;
26 
27    Function get_address_line_2 (p_location_code varchar2,
28                                p_business_group_id varchar2)
29    return varchar2
30    is
31    l_address_line_2 varchar2(150);
32    begin
33        hr_utility.trace('Entering ' ||g_package || 'get_address_line_2' );
34        select ADDRESS_LINE_2 into l_address_line_2
35        from  hr_locations_all
36            where location_code = p_location_code and
37                  nvl(BUSINESS_GROUP_ID,p_business_group_id) =
38                                         p_business_group_id;
39 
40        hr_utility.trace('l_address_line_2 ' ||l_address_line_2 );
41        return l_address_line_2;
42        Exception
43        when others then
44             hr_utility.trace('Exception! Setting l_address_line_2 as null' ||l_address_line_2 );
45             l_address_line_2 := null;
46             return l_address_line_2;
47    end;
48 
49    Function get_address_line_3 (p_location_code varchar2,
50                                p_business_group_id varchar2)
51    return varchar2
52    is
53    l_address_line_3 varchar2(150);
54    begin
55        hr_utility.trace('Entering ' ||g_package || 'get_address_line_3' );
56        select ADDRESS_LINE_3 into l_address_line_3
57        from  hr_locations_all
58            where location_code = p_location_code and
59                  nvl(BUSINESS_GROUP_ID,p_business_group_id) =
60                                         p_business_group_id;
61 
62        hr_utility.trace('l_address_line_3 ' ||l_address_line_3 );
63        return l_address_line_3;
64        Exception
65        when others then
66             hr_utility.trace('Exception! Setting l_address_line_3 as null' ||l_address_line_3 );
67             l_address_line_3 := null;
68             return l_address_line_3;
69    end;
70 
71  -- region 1 is county
72    Function get_region_1       (p_location_code varchar2,
73                                p_business_group_id varchar2,
74                                p_effective_date Date)
75    return varchar2
76 
77    is
78    l_REGION_1 varchar2(150);
79    begin
80 
81     hr_utility.trace('Entering ' ||g_package || 'get_region1' );
82     select HR_COUNTY.meaning into l_REGION_1
83        from  hr_locations_all,
84            	 HR_LOOKUPS  HR_COUNTY
85            where location_code = p_location_code and
86                  nvl(BUSINESS_GROUP_ID,p_business_group_id) =
87                                         p_business_group_id   AND
88                  HR_COUNTY.LOOKUP_TYPE(+) ='IE_COUNTY' AND
89                  HR_COUNTY.LOOKUP_CODE(+) = REGION_1 AND
90                  p_effective_date between nvl(START_DATE_ACTIVE,p_effective_date)
91                  and  nvl(END_DATE_ACTIVE,p_effective_date);
92        hr_utility.trace('l_REGION_1 ' ||l_REGION_1);
93        return l_REGION_1;
94        Exception
95        when others then
96             hr_utility.trace('Exception! Setting l_REGION_1 as null' );
97             l_REGION_1 := null;
98             return l_REGION_1;
99    end;
100 
101    Function get_region_2   (p_location_code varchar2,
102                                p_business_group_id varchar2)
103    return varchar2
104    is
105    l_region_2 varchar2(150);
106    begin
107        hr_utility.trace('Entering ' ||g_package || 'get_region_2' );
108        select REGION_2 into l_region_2
109        from  hr_locations_all
110            where location_code = p_location_code and
111                  nvl(BUSINESS_GROUP_ID,p_business_group_id) =
112                                         p_business_group_id;
113 
114        hr_utility.trace('l_region_2 ' ||l_region_2 );
115        return l_region_2;
116        Exception
117        when others then
118             hr_utility.trace('Exception! Setting l_region_2 as null'  );
119             l_region_2 := null;
120             return l_region_2;
121    end;
122 
123    Function get_country       (p_location_code varchar2,
124                                p_business_group_id varchar2)
125   return varchar2
126   is
127   l_country varchar2(150);
128    begin
129        hr_utility.trace('Entering ' ||g_package || 'get_country' );
130        select TERRITORY_SHORT_NAME into l_country
131        from  hr_locations_all,
132             FND_TERRITORIES_VL fnd_ter
133            where location_code = p_location_code and
134                  nvl(BUSINESS_GROUP_ID,p_business_group_id) =
135                                         p_business_group_id and
136                  FND_TER.TERRITORY_CODE(+) = COUNTRY;
137        hr_utility.trace('l_country ' ||l_country );
138        return l_country;
139        Exception
140        when others then
141             hr_utility.trace('Exception! Setting l_country as null'  );
142             l_country := null;
143             return l_country;
144    end;
145 end;