[Home] [Help]
PACKAGE BODY: APPS.PAY_PAYFV_ELEMENT_ENTRIES_PKG
Source
1 package body PAY_PAYFV_ELEMENT_ENTRIES_PKG as
2 /* $Header: payfvele.pkb 115.4 2003/01/16 13:08:22 adhunter noship $ */
3 --------------------------------------------------------------------------------
4 /*
5 +==============================================================================+
6 | Copyright (c) 2001 Oracle Corporation |
7 | Redwood Shores, California, USA |
8 | All rights reserved |
9 +==============================================================================+
10
11 Name
12 Supporting functions for BIS view PAY_PAYFV_ELEMENT_ENTRIES.
13 Purpose
14 To return non-id table information where needed to enhance the
15 performance of the view.
16 History
17 115.0 15-Jan-2001 J.Tomkins Created
18
19 115.1 23-Feb-2001 J.Tomkins Removed '_all' from table names to include
20 required security (Bug. 1425084)
21 115.2 09-Dec-2002 joward MLS enabled grade name
22 115.3 23-Dec-2002 joward MLS enabled job name
23 */
24 --------------------------------------------------------------------------------
25 FUNCTION get_job (p_job_id IN NUMBER) RETURN VARCHAR2 IS
26 --
27 l_name VARCHAR2(240);
28 --
29 begin
30 --
31 select name
32 into l_name
33 from per_jobs_vl
34 where job_id = p_job_id;
35 --
36 return l_name;
37 --
38 exception
39 when others then
40 return (NULL);
41 --
42 end get_job;
43 -----------------------------------------------------------
44 FUNCTION get_position (p_pos_id IN NUMBER) RETURN VARCHAR2 IS
45 --
46 l_name VARCHAR2(240);
47 --
48 begin
49 --
50 select name
51 into l_name
52 from per_positions
53 where position_id = p_pos_id;
54 --
55 return l_name;
56 --
57 exception
58 when others then
59 return (NULL);
60 --
61 end get_position;
62 -----------------------------------------------------------
63 FUNCTION get_grade (p_grade_id IN NUMBER) RETURN VARCHAR2 IS
64 --
65 l_name VARCHAR2(240);
66 --
67 begin
68 --
69 select name
70 into l_name
71 from per_grades_vl
72 where grade_id = p_grade_id;
73 --
74 return l_name;
75 --
76 exception
77 when others then
78 return (NULL);
79 --
80 end get_grade;
81 -----------------------------------------------------------
82 FUNCTION get_location (p_loc_id IN NUMBER) RETURN VARCHAR2 IS
83 --
84 l_location VARCHAR2(20);
85 --
86 begin
87 --
88 select location_code
89 into l_location
90 from hr_locations_all_tl
91 where location_id = p_loc_id
92 and language = userenv('LANG');
93 --
94 return l_location;
95 --
96 exception
97 when others then
98 return (NULL);
99 --
100 end get_location;
101 -----------------------------------------------------------
102 FUNCTION get_pay_basis (p_pay_id IN NUMBER) RETURN VARCHAR2 IS
103 --
104 l_basis VARCHAR2(30);
105 --
106 begin
107 --
108 select pay_basis
109 into l_basis
110 from per_pay_bases
111 where pay_basis_id = p_pay_id;
112 --
113 return l_basis;
114 --
115 exception
116 when others then
117 return (NULL);
118 --
119 end get_pay_basis;
120 -----------------------------------------------------------
121 FUNCTION get_payroll (p_payroll_id IN NUMBER) RETURN VARCHAR2 IS
122 --
123 l_payroll VARCHAR2(80);
124 --
125 begin
126 --
127 select payroll_name
128 into l_payroll
129 from pay_payrolls_f
130 where payroll_id = p_payroll_id
131 and sysdate between effective_start_date
132 and effective_end_date;
133 --
134 return l_payroll;
135 --
136 exception
137 when others then
138 return (NULL);
139 --
140 end get_payroll;
141 --
142 END PAY_PAYFV_ELEMENT_ENTRIES_PKG;