[Home] [Help]
PACKAGE BODY: APPS.PV_PG_ENRQ_INIT_SOURCES_PVT_W
Source
1 package body pv_pg_enrq_init_sources_pvt_w as
2 /* $Header: pvxwpeib.pls 115.1 2002/11/28 01:15:52 jkylee 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 -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
7 function rosetta_g_miss_date_in_map(d date) return date as
8 begin
9 if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
10 return d;
11 end;
12
13 procedure rosetta_table_copy_in_p2(t out nocopy pv_pg_enrq_init_sources_pvt.enrq_init_sources_tbl_type, a0 JTF_NUMBER_TABLE
14 , a1 JTF_NUMBER_TABLE
15 , a2 JTF_NUMBER_TABLE
16 , a3 JTF_NUMBER_TABLE
17 , a4 JTF_NUMBER_TABLE
18 , a5 JTF_NUMBER_TABLE
19 , a6 JTF_DATE_TABLE
20 , a7 JTF_NUMBER_TABLE
21 , a8 JTF_DATE_TABLE
22 , a9 JTF_NUMBER_TABLE
23 ) as
24 ddindx binary_integer; indx binary_integer;
25 begin
26 if a0 is not null and a0.count > 0 then
27 if a0.count > 0 then
28 indx := a0.first;
29 ddindx := 1;
30 while true loop
31 t(ddindx).initiation_source_id := a0(indx);
32 t(ddindx).object_version_number := a1(indx);
33 t(ddindx).enrl_request_id := a2(indx);
34 t(ddindx).prev_membership_id := a3(indx);
35 t(ddindx).enrl_change_rule_id := a4(indx);
36 t(ddindx).created_by := a5(indx);
37 t(ddindx).creation_date := rosetta_g_miss_date_in_map(a6(indx));
38 t(ddindx).last_updated_by := a7(indx);
39 t(ddindx).last_update_date := rosetta_g_miss_date_in_map(a8(indx));
40 t(ddindx).last_update_login := a9(indx);
41 ddindx := ddindx+1;
42 if a0.last =indx
43 then exit;
44 end if;
45 indx := a0.next(indx);
46 end loop;
47 end if;
48 end if;
49 end rosetta_table_copy_in_p2;
50 procedure rosetta_table_copy_out_p2(t pv_pg_enrq_init_sources_pvt.enrq_init_sources_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
51 , a1 out nocopy JTF_NUMBER_TABLE
52 , a2 out nocopy JTF_NUMBER_TABLE
53 , a3 out nocopy JTF_NUMBER_TABLE
54 , a4 out nocopy JTF_NUMBER_TABLE
55 , a5 out nocopy JTF_NUMBER_TABLE
56 , a6 out nocopy JTF_DATE_TABLE
57 , a7 out nocopy JTF_NUMBER_TABLE
58 , a8 out nocopy JTF_DATE_TABLE
59 , a9 out nocopy JTF_NUMBER_TABLE
60 ) as
61 ddindx binary_integer; indx binary_integer;
62 begin
63 if t is null or t.count = 0 then
64 a0 := JTF_NUMBER_TABLE();
65 a1 := JTF_NUMBER_TABLE();
66 a2 := JTF_NUMBER_TABLE();
67 a3 := JTF_NUMBER_TABLE();
68 a4 := JTF_NUMBER_TABLE();
69 a5 := JTF_NUMBER_TABLE();
70 a6 := JTF_DATE_TABLE();
71 a7 := JTF_NUMBER_TABLE();
72 a8 := JTF_DATE_TABLE();
73 a9 := JTF_NUMBER_TABLE();
74 else
75 a0 := JTF_NUMBER_TABLE();
76 a1 := JTF_NUMBER_TABLE();
77 a2 := JTF_NUMBER_TABLE();
78 a3 := JTF_NUMBER_TABLE();
79 a4 := JTF_NUMBER_TABLE();
80 a5 := JTF_NUMBER_TABLE();
81 a6 := JTF_DATE_TABLE();
82 a7 := JTF_NUMBER_TABLE();
83 a8 := JTF_DATE_TABLE();
84 a9 := JTF_NUMBER_TABLE();
85 if t.count > 0 then
86 a0.extend(t.count);
87 a1.extend(t.count);
88 a2.extend(t.count);
89 a3.extend(t.count);
90 a4.extend(t.count);
91 a5.extend(t.count);
92 a6.extend(t.count);
93 a7.extend(t.count);
94 a8.extend(t.count);
95 a9.extend(t.count);
96 ddindx := t.first;
97 indx := 1;
98 while true loop
99 a0(indx) := t(ddindx).initiation_source_id;
100 a1(indx) := t(ddindx).object_version_number;
101 a2(indx) := t(ddindx).enrl_request_id;
102 a3(indx) := t(ddindx).prev_membership_id;
103 a4(indx) := t(ddindx).enrl_change_rule_id;
104 a5(indx) := t(ddindx).created_by;
105 a6(indx) := t(ddindx).creation_date;
106 a7(indx) := t(ddindx).last_updated_by;
107 a8(indx) := t(ddindx).last_update_date;
108 a9(indx) := t(ddindx).last_update_login;
109 indx := indx+1;
110 if t.last =ddindx
111 then exit;
112 end if;
113 ddindx := t.next(ddindx);
114 end loop;
115 end if;
116 end if;
117 end rosetta_table_copy_out_p2;
118
119 procedure create_pg_enrq_init_sources(p_api_version_number NUMBER
120 , p_init_msg_list VARCHAR2
121 , p_commit VARCHAR2
122 , p_validation_level NUMBER
123 , x_return_status out nocopy VARCHAR2
124 , x_msg_count out nocopy NUMBER
125 , x_msg_data out nocopy VARCHAR2
126 , p7_a0 NUMBER
127 , p7_a1 NUMBER
128 , p7_a2 NUMBER
129 , p7_a3 NUMBER
130 , p7_a4 NUMBER
131 , p7_a5 NUMBER
132 , p7_a6 DATE
133 , p7_a7 NUMBER
134 , p7_a8 DATE
135 , p7_a9 NUMBER
136 , x_initiation_source_id out nocopy NUMBER
137 )
138
139 as
140 ddp_enrq_init_sources_rec pv_pg_enrq_init_sources_pvt.enrq_init_sources_rec_type;
141 ddindx binary_integer; indx binary_integer;
142 begin
143
144 -- copy data to the local IN or IN-OUT args, if any
145
146
147
148
149
150
151
152 ddp_enrq_init_sources_rec.initiation_source_id := p7_a0;
153 ddp_enrq_init_sources_rec.object_version_number := p7_a1;
154 ddp_enrq_init_sources_rec.enrl_request_id := p7_a2;
155 ddp_enrq_init_sources_rec.prev_membership_id := p7_a3;
156 ddp_enrq_init_sources_rec.enrl_change_rule_id := p7_a4;
157 ddp_enrq_init_sources_rec.created_by := p7_a5;
158 ddp_enrq_init_sources_rec.creation_date := rosetta_g_miss_date_in_map(p7_a6);
159 ddp_enrq_init_sources_rec.last_updated_by := p7_a7;
160 ddp_enrq_init_sources_rec.last_update_date := rosetta_g_miss_date_in_map(p7_a8);
161 ddp_enrq_init_sources_rec.last_update_login := p7_a9;
162
163
164 -- here's the delegated call to the old PL/SQL routine
165 pv_pg_enrq_init_sources_pvt.create_pg_enrq_init_sources(p_api_version_number,
166 p_init_msg_list,
167 p_commit,
168 p_validation_level,
169 x_return_status,
170 x_msg_count,
171 x_msg_data,
172 ddp_enrq_init_sources_rec,
173 x_initiation_source_id);
174
175 -- copy data back from the local variables to OUT or IN-OUT args, if any
176
177
178
179
180
181
182
183
184 end;
185
186 procedure update_pg_enrq_init_sources(p_api_version_number NUMBER
187 , p_init_msg_list VARCHAR2
188 , p_commit VARCHAR2
189 , p_validation_level NUMBER
190 , x_return_status out nocopy VARCHAR2
191 , x_msg_count out nocopy NUMBER
192 , x_msg_data out nocopy VARCHAR2
193 , p7_a0 NUMBER
194 , p7_a1 NUMBER
195 , p7_a2 NUMBER
196 , p7_a3 NUMBER
197 , p7_a4 NUMBER
198 , p7_a5 NUMBER
199 , p7_a6 DATE
200 , p7_a7 NUMBER
201 , p7_a8 DATE
202 , p7_a9 NUMBER
203 )
204
205 as
206 ddp_enrq_init_sources_rec pv_pg_enrq_init_sources_pvt.enrq_init_sources_rec_type;
207 ddindx binary_integer; indx binary_integer;
208 begin
209
210 -- copy data to the local IN or IN-OUT args, if any
211
212
213
214
215
216
217
218 ddp_enrq_init_sources_rec.initiation_source_id := p7_a0;
219 ddp_enrq_init_sources_rec.object_version_number := p7_a1;
220 ddp_enrq_init_sources_rec.enrl_request_id := p7_a2;
221 ddp_enrq_init_sources_rec.prev_membership_id := p7_a3;
222 ddp_enrq_init_sources_rec.enrl_change_rule_id := p7_a4;
223 ddp_enrq_init_sources_rec.created_by := p7_a5;
224 ddp_enrq_init_sources_rec.creation_date := rosetta_g_miss_date_in_map(p7_a6);
225 ddp_enrq_init_sources_rec.last_updated_by := p7_a7;
226 ddp_enrq_init_sources_rec.last_update_date := rosetta_g_miss_date_in_map(p7_a8);
227 ddp_enrq_init_sources_rec.last_update_login := p7_a9;
228
229 -- here's the delegated call to the old PL/SQL routine
230 pv_pg_enrq_init_sources_pvt.update_pg_enrq_init_sources(p_api_version_number,
231 p_init_msg_list,
232 p_commit,
233 p_validation_level,
234 x_return_status,
235 x_msg_count,
236 x_msg_data,
237 ddp_enrq_init_sources_rec);
238
239 -- copy data back from the local variables to OUT or IN-OUT args, if any
240
241
242
243
244
245
246
247 end;
248
249 procedure validate_pg_init_src(p_api_version_number NUMBER
250 , p_init_msg_list VARCHAR2
251 , p_validation_level NUMBER
252 , p3_a0 NUMBER
253 , p3_a1 NUMBER
254 , p3_a2 NUMBER
255 , p3_a3 NUMBER
256 , p3_a4 NUMBER
257 , p3_a5 NUMBER
258 , p3_a6 DATE
259 , p3_a7 NUMBER
260 , p3_a8 DATE
261 , p3_a9 NUMBER
262 , p_validation_mode VARCHAR2
263 , x_return_status out nocopy VARCHAR2
264 , x_msg_count out nocopy NUMBER
265 , x_msg_data out nocopy VARCHAR2
266 )
267
268 as
269 ddp_enrq_init_sources_rec pv_pg_enrq_init_sources_pvt.enrq_init_sources_rec_type;
270 ddindx binary_integer; indx binary_integer;
271 begin
272
273 -- copy data to the local IN or IN-OUT args, if any
274
275
276
277 ddp_enrq_init_sources_rec.initiation_source_id := p3_a0;
278 ddp_enrq_init_sources_rec.object_version_number := p3_a1;
279 ddp_enrq_init_sources_rec.enrl_request_id := p3_a2;
280 ddp_enrq_init_sources_rec.prev_membership_id := p3_a3;
281 ddp_enrq_init_sources_rec.enrl_change_rule_id := p3_a4;
282 ddp_enrq_init_sources_rec.created_by := p3_a5;
283 ddp_enrq_init_sources_rec.creation_date := rosetta_g_miss_date_in_map(p3_a6);
284 ddp_enrq_init_sources_rec.last_updated_by := p3_a7;
285 ddp_enrq_init_sources_rec.last_update_date := rosetta_g_miss_date_in_map(p3_a8);
286 ddp_enrq_init_sources_rec.last_update_login := p3_a9;
287
288
289
290
291
292 -- here's the delegated call to the old PL/SQL routine
293 pv_pg_enrq_init_sources_pvt.validate_pg_init_src(p_api_version_number,
294 p_init_msg_list,
295 p_validation_level,
296 ddp_enrq_init_sources_rec,
297 p_validation_mode,
298 x_return_status,
299 x_msg_count,
300 x_msg_data);
301
302 -- copy data back from the local variables to OUT or IN-OUT args, if any
303
304
305
306
307
308
309
310 end;
311
312 procedure check_init_src_items(p0_a0 NUMBER
313 , p0_a1 NUMBER
314 , p0_a2 NUMBER
315 , p0_a3 NUMBER
316 , p0_a4 NUMBER
317 , p0_a5 NUMBER
318 , p0_a6 DATE
319 , p0_a7 NUMBER
320 , p0_a8 DATE
321 , p0_a9 NUMBER
322 , p_validation_mode VARCHAR2
323 , x_return_status out nocopy VARCHAR2
324 )
325
326 as
327 ddp_enrq_init_sources_rec pv_pg_enrq_init_sources_pvt.enrq_init_sources_rec_type;
328 ddindx binary_integer; indx binary_integer;
329 begin
330
331 -- copy data to the local IN or IN-OUT args, if any
332 ddp_enrq_init_sources_rec.initiation_source_id := p0_a0;
333 ddp_enrq_init_sources_rec.object_version_number := p0_a1;
334 ddp_enrq_init_sources_rec.enrl_request_id := p0_a2;
335 ddp_enrq_init_sources_rec.prev_membership_id := p0_a3;
336 ddp_enrq_init_sources_rec.enrl_change_rule_id := p0_a4;
337 ddp_enrq_init_sources_rec.created_by := p0_a5;
338 ddp_enrq_init_sources_rec.creation_date := rosetta_g_miss_date_in_map(p0_a6);
339 ddp_enrq_init_sources_rec.last_updated_by := p0_a7;
340 ddp_enrq_init_sources_rec.last_update_date := rosetta_g_miss_date_in_map(p0_a8);
341 ddp_enrq_init_sources_rec.last_update_login := p0_a9;
342
343
344
345 -- here's the delegated call to the old PL/SQL routine
346 pv_pg_enrq_init_sources_pvt.check_init_src_items(ddp_enrq_init_sources_rec,
347 p_validation_mode,
348 x_return_status);
349
350 -- copy data back from the local variables to OUT or IN-OUT args, if any
351
352
353 end;
354
355 procedure validate_init_src_rec(p_api_version_number NUMBER
356 , p_init_msg_list VARCHAR2
357 , x_return_status out nocopy VARCHAR2
358 , x_msg_count out nocopy NUMBER
359 , x_msg_data out nocopy VARCHAR2
360 , p5_a0 NUMBER
361 , p5_a1 NUMBER
362 , p5_a2 NUMBER
363 , p5_a3 NUMBER
364 , p5_a4 NUMBER
365 , p5_a5 NUMBER
366 , p5_a6 DATE
367 , p5_a7 NUMBER
368 , p5_a8 DATE
369 , p5_a9 NUMBER
370 )
371
372 as
373 ddp_enrq_init_sources_rec pv_pg_enrq_init_sources_pvt.enrq_init_sources_rec_type;
374 ddindx binary_integer; indx binary_integer;
375 begin
376
377 -- copy data to the local IN or IN-OUT args, if any
378
379
380
381
382
383 ddp_enrq_init_sources_rec.initiation_source_id := p5_a0;
384 ddp_enrq_init_sources_rec.object_version_number := p5_a1;
385 ddp_enrq_init_sources_rec.enrl_request_id := p5_a2;
386 ddp_enrq_init_sources_rec.prev_membership_id := p5_a3;
387 ddp_enrq_init_sources_rec.enrl_change_rule_id := p5_a4;
388 ddp_enrq_init_sources_rec.created_by := p5_a5;
389 ddp_enrq_init_sources_rec.creation_date := rosetta_g_miss_date_in_map(p5_a6);
390 ddp_enrq_init_sources_rec.last_updated_by := p5_a7;
391 ddp_enrq_init_sources_rec.last_update_date := rosetta_g_miss_date_in_map(p5_a8);
392 ddp_enrq_init_sources_rec.last_update_login := p5_a9;
393
394 -- here's the delegated call to the old PL/SQL routine
395 pv_pg_enrq_init_sources_pvt.validate_init_src_rec(p_api_version_number,
396 p_init_msg_list,
397 x_return_status,
398 x_msg_count,
399 x_msg_data,
400 ddp_enrq_init_sources_rec);
401
402 -- copy data back from the local variables to OUT or IN-OUT args, if any
403
404
405
406
407
408 end;
409
410 end pv_pg_enrq_init_sources_pvt_w;