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