DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_SPEC_PKG

Source


1 package body hr_spec_PKG as
2 /* $Header: hrspec.pkb 115.4 99/07/17 05:37:04 porting sh $ */
3 ------------------------------------------------------------------------------
4 /*
5 +==============================================================================+
6 |                       Copyright (c) 1994 Oracle Corporation                  |
7 |                          Redwood Shores, California, USA                     |
8 |                               All rights reserved.                           |
9 +==============================================================================+
10 Name
11 	HR Libraries server-side agent
12 Purpose
13 	Agent handles all server-side traffic to and from forms libraries. This
14 	is particularly necessary because we wish to avoid the situation where
15 	a form and its libraries both refer to the same server-side package.
16 	Forms/libraries appears to be unable to cope with this situation in
17 	circumstances which we cannot yet define.
18 History
19 	21 Apr 95	N Simpson	Created
20 	17 May 95	N Simpson	Added delete_ownerships,
21 					insert_ownerships and
22 					startup_insert_allowed to
23 					remove all sql from client side and
24 					thus allow library to be made global
25         06 Sep 95       S Desai         Added test_path_to_perbecvd
26 					      test_path_to_perbeben
27         08 Sep 95	D Kerr		Changed datatype of parameter
28 					chk_asg_on_payroll from %TYPE to
29 					number. Workaround for forms bug.
30 	11 Mar 96       D Kerr		Added checkformat and changeformat
31 	19 Aug 97	Sxshah	Banner now on eack line.
32 	21 Aug 97       V Treiger       Added procedures per_date_range and
33 	                                asg_date_range.
34         21 May 98       D Kerr          Added overload for chk_asg_payroll
35                                         620733.
36         06 Apr 99       S Doshi         Flexible Dates Conversion
37 115.4   21 Apr 99       cborrett.uk     Multiradix conversion.
38 */
39 g_dummy	number;
40 --
41 procedure test_path_to_perwsspp (p_ass_id    NUMBER) is
42 --
43 begin
44 per_spinal_pt_plcmt_pkg.test_path_to_perwsspp (p_ass_id);
45 --
46 end test_path_to_perwsspp;
47 --
48 procedure test_path_to_perbecvd ( p_element_entry_id NUMBER )is
49 --
50 begin
51     ben_covered_dependents_pkg.test_path_to_perbecvd (p_element_entry_id);
52 end test_path_to_perbecvd;
53 --
54 procedure test_path_to_perbeben (p_element_entry_id NUMBER ) is
55 --
56 begin
57     ben_beneficiaries_pkg.test_path_to_perbeben (p_element_entry_id);
58 end test_path_to_perbeben;
59 --
60 procedure chk_asg_on_payroll
61   (p_assignment_id  in NUMBER
62     ) is
63 begin
64 --
65 pay_qpq_api.chk_asg_on_payroll (p_assignment_id);
66 --
67 end chk_asg_on_payroll;
68 --620733. For some reason the payment methods package takes a varchar
69 --rather than a date as a parameter. Making the current routine take
70 --a date for simplicity.
71 --
72 procedure chk_asg_on_payroll
73   (p_assignment_id  in NUMBER,
74    p_effective_date in DATE
75     ) is
76 begin
77 --
78   pay_payment_methods_pkg.check_asg_on_payroll (p_assignment_id,
79                                                 fnd_date.date_to_canonical(p_effective_date));
80 --
81 end;
82 -----------------------------------------------------------------
83 function startup_insert_allowed (p_session_id	number) return boolean is
84 --
85 -- Returns TRUE if there is a row in hr_owner_definitions for the users
86 -- session (ie the first session they open with forms), which indicates
87 -- that startup data may be inserted by the user.
88 --
89 cursor csr_ownership is
90 	select	1
91 	from	hr_owner_definitions
92 	where	session_id = p_session_id;
93 	--
94 l_insert_allowed	boolean := FALSE;
95 --
96 begin
97 --
98 open csr_ownership;
99 fetch csr_ownership into g_dummy;
100 l_insert_allowed := csr_ownership%found;
101 close csr_ownership;
102 --
103 return l_insert_allowed;
104 --
105 end startup_insert_allowed;
106 -------------------------------------------------------------------------
107 procedure insert_ownerships (
108 --
109 -- Inserts ownerships for startup data
110 --
111 	--
112 	p_session_id	number,
113 	p_key_name	varchar2,
114 	p_key_value	number) is
115 	--
116 cursor csr_definition is
117 	select	product_short_name
118 	from	hr_owner_definitions
119 	where	session_id = p_session_id;
120 	--
121 begin
122 --
123 for product in csr_definition LOOP
124   --
125   insert into hr_application_ownerships (
126 	--
127 	key_name,
128 	key_value,
129 	product_name)
130 	--
131   values (
132 	p_key_name,
133 	fnd_number.number_to_canonical(p_key_value),
134 	product.product_short_name);
135 	--
136 end loop;
137 --
138 end insert_ownerships;
139 -------------------------------------------------------------------------
140 procedure delete_ownerships (
141 --
142 -- Deletes ownerships for startup data
143 --
144 	--
145 	p_key_name	varchar2,
146 	p_key_value	number) is
147 	--
148 begin
149 --
150 delete from hr_application_ownerships
151 where key_name = p_key_name
152 and key_value = fnd_number.number_to_canonical(p_key_value);
153 --
154 end delete_ownerships;
155 -------------------------------------------------------------------------
156 
157 procedure checkformat
158 ( value   in out varchar2,
159   format  in     varchar2,
160   output  in out varchar2,
161   minimum in     varchar2,
162   maximum in     varchar2,
163   nullok  in     varchar2,
164   rgeflg  in out varchar2,
165   curcode in     varchar2
166 ) is
167 begin
168 --
169    hr_chkfmt.checkformat( value,
170 			  format,
171 			  output,
172 			  minimum,
173 			  maximum,
174 			  nullok,
175 			  rgeflg,
176 			  curcode ) ;
177 --
178 end checkformat ;
179 -------------------------------------------------------------------------
180 procedure changeformat
181 ( input   in     varchar2,
182   output  out    varchar2,
183   format  in     varchar2,
184   curcode in     varchar2
185 ) is
186 begin
187 --
188   hr_chkfmt.changeformat ( input,
189 			   output,
190 			   format,
191 			   curcode ) ;
192 --
193 end changeformat ;
194 -------------------------------------------------------------------------
195 -------------------------------------------------------------------------
196 procedure per_date_range
197 ( p_person_id  in      number,
198   p_date_from  in out  date,
199   p_date_to    in out  date
200 ) is
201 begin
202 --
203   per_people3_pkg.get_date_range ( p_person_id,
204 			           p_date_from,
205 			           p_date_to ) ;
206 --
207 end per_date_range ;
208 -------------------------------------------------------------------------
209 procedure asg_date_range
210 ( p_assignment_id  in      number,
211   p_date_from      in out  date,
212   p_date_to        in out  date
213 ) is
214 begin
215 --
216   per_people3_pkg.get_asg_date_range ( p_assignment_id,
217 			               p_date_from,
218 			               p_date_to ) ;
219 --
220 end asg_date_range ;
221 -------------------------------------------------------------------------
222 end	hr_spec_pkg;