DBA Data[Home] [Help]

PACKAGE BODY: APPS.JTF_RS_RES_SSWA_PUB_W

Source


1 package body jtf_rs_res_sswa_pub_w as
2   /* $Header: jtfrsrwb.pls 120.0 2005/05/11 08:21:52 appldev ship $ */
3   rosetta_g_mistake_date date := to_date('01/01/+4713', 'MM/DD/SYYYY');
4   rosetta_g_miss_date date := to_date('01/01/-4712', 'MM/DD/SYYYY');
5 
6   function rosetta_g_miss_num_map(n number) return number as
7     a number := fnd_api.g_miss_num;
8     b number := 0-1962.0724;
9   begin
10     if n=a then return b; end if;
11     if n=b then return a; end if;
12     return n;
13   end;
14 
15   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
16   function rosetta_g_miss_date_in_map(d date) return date as
17   begin
18     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
19     return d;
20   end;
21 
22   procedure create_emp_resource(p_api_version  NUMBER
23     , p_init_msg_list  VARCHAR2
24     , p_commit  VARCHAR2
25     , p_source_first_name  VARCHAR2
26     , p_source_last_name  VARCHAR2
27     , p_source_middle_name  VARCHAR2
28     , p_employee_number  VARCHAR2
29     , p_source_sex  VARCHAR2
30     , p_source_title  VARCHAR2
31     , p_source_job_id  NUMBER
32     , p_source_email  VARCHAR2
33     , p_source_start_date  date
34     , p_source_end_date  date
35     , p_user_name  VARCHAR2
36     , p_source_address_id  NUMBER
37     , p_source_office  VARCHAR2
38     , p_source_mailstop  VARCHAR2
39     , p_source_location  VARCHAR2
40     , p_source_phone  VARCHAR2
41     , p_salesrep_number  VARCHAR2
42     , p_sales_credit_type_id  NUMBER
43     , p_source_mgr_id  NUMBER
44     , x_resource_id out NOCOPY  NUMBER
45     , x_return_status out NOCOPY  VARCHAR2
46     , x_msg_count out NOCOPY  NUMBER
47     , x_msg_data out NOCOPY  VARCHAR2
48     , p_called_from  VARCHAR2
49     , p_user_password in out NOCOPY  VARCHAR2
50   )
51   as
52     ddp_source_start_date date;
53     ddp_source_end_date date;
54     ddindx binary_integer; indx binary_integer;
55   begin
56 
57     -- copy data to the local IN or IN-OUT args, if any
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69     ddp_source_start_date := rosetta_g_miss_date_in_map(p_source_start_date);
70 
71     ddp_source_end_date := rosetta_g_miss_date_in_map(p_source_end_date);
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88     -- here's the delegated call to the old PL/SQL routine
89     jtf_rs_res_sswa_pub.create_emp_resource(p_api_version,
90       p_init_msg_list,
91       p_commit,
92       p_source_first_name,
93       p_source_last_name,
94       p_source_middle_name,
95       p_employee_number,
96       p_source_sex,
97       p_source_title,
98       p_source_job_id,
99       p_source_email,
100       ddp_source_start_date,
101       ddp_source_end_date,
102       p_user_name,
103       p_source_address_id,
104       p_source_office,
105       p_source_mailstop,
106       p_source_location,
107       p_source_phone,
108       p_salesrep_number,
109       p_sales_credit_type_id,
110       p_source_mgr_id,
111       x_resource_id,
112       x_return_status,
113       x_msg_count,
114       x_msg_data,
115       p_called_from,
116       p_user_password);
117 
118     -- copy data back from the local OUT or IN-OUT args, if any
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146   end;
147 
148   procedure update_resource(p_api_version  NUMBER
149     , p_init_msg_list  VARCHAR2
150     , p_commit  VARCHAR2
151     , p_resource_id  NUMBER
152     , p_resource_number  VARCHAR2
153     , p_resource_name  VARCHAR2
154     , p_source_name  VARCHAR2
155     , p_address_id  VARCHAR2
156     , p_source_office  VARCHAR2
157     , p_source_mailstop  VARCHAR2
158     , p_source_location  VARCHAR2
159     , p_source_phone  VARCHAR2
160     , p_source_email  VARCHAR2
161     , p_object_version_number  NUMBER
162     , p_approved  VARCHAR2
163     , p_source_job_id  NUMBER
164     , p_source_job_title  VARCHAR2
165     , p_salesrep_number  VARCHAR2
166     , p_sales_credit_type_id  NUMBER
167     , p_end_date_active  date
168     , p_user_id  NUMBER
169     , p_user_name  VARCHAR2
170     , p_mgr_resource_id  NUMBER
171     , p_org_id  NUMBER
172     , x_return_status out NOCOPY  VARCHAR2
173     , x_msg_count out NOCOPY  NUMBER
174     , x_msg_data out NOCOPY  VARCHAR2
175     , p_time_zone  NUMBER
176     , p_cost_per_hr  NUMBER
177     , p_primary_language  VARCHAR2
178     , p_secondary_language  VARCHAR2
179     , p_support_site_id  NUMBER
180     , p_source_mobile_phone  VARCHAR2
181     , p_source_pager  VARCHAR2
182   )
183   as
184     ddp_end_date_active date;
185     ddindx binary_integer; indx binary_integer;
186   begin
187 
188     -- copy data to the local IN or IN-OUT args, if any
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208     ddp_end_date_active := rosetta_g_miss_date_in_map(p_end_date_active);
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224     -- here's the delegated call to the old PL/SQL routine
225     jtf_rs_res_sswa_pub.update_resource(p_api_version,
226       p_init_msg_list,
227       p_commit,
228       p_resource_id,
229       p_resource_number,
230       p_resource_name,
231       p_source_name,
232       p_address_id,
233       p_source_office,
234       p_source_mailstop,
235       p_source_location,
236       p_source_phone,
237       p_source_email,
238       p_object_version_number,
239       p_approved,
240       p_source_job_id,
241       p_source_job_title,
242       p_salesrep_number,
243       p_sales_credit_type_id,
244       ddp_end_date_active,
245       p_user_id,
246       p_user_name,
247       p_mgr_resource_id,
248       p_org_id,
249       x_return_status,
250       x_msg_count,
251       x_msg_data,
252       p_time_zone,
253       p_cost_per_hr,
254       p_primary_language,
255       p_secondary_language,
256       p_support_site_id,
257       p_source_mobile_phone,
258       p_source_pager);
259 
260     -- copy data back from the local OUT or IN-OUT args, if any
261 
262 
263 
264 
265 
266 
267 
268 
269 
270 
271 
272 
273 
274 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 
286 
287 
288 
289 
290 
291 
292 
293 
294   end;
295 
296 end jtf_rs_res_sswa_pub_w;