DBA Data[Home] [Help]

PACKAGE BODY: APPS.CN_ATTAIN_TIER_PVT_W

Source


1 package body cn_attain_tier_pvt_w as
2   /* $Header: cnwattrb.pls 115.3 2002/11/25 22:22:46 nkodkani 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_p1(t out nocopy cn_attain_tier_pvt.attain_tier_tbl_type, a0 JTF_NUMBER_TABLE
14     , a1 JTF_NUMBER_TABLE
15     , a2 JTF_NUMBER_TABLE
16     , a3 JTF_VARCHAR2_TABLE_100
17     , a4 JTF_VARCHAR2_TABLE_200
18     , a5 JTF_VARCHAR2_TABLE_200
19     , a6 JTF_VARCHAR2_TABLE_200
20     , a7 JTF_VARCHAR2_TABLE_200
21     , a8 JTF_VARCHAR2_TABLE_200
22     , a9 JTF_VARCHAR2_TABLE_200
23     , a10 JTF_VARCHAR2_TABLE_200
24     , a11 JTF_VARCHAR2_TABLE_200
25     , a12 JTF_VARCHAR2_TABLE_200
26     , a13 JTF_VARCHAR2_TABLE_200
27     , a14 JTF_VARCHAR2_TABLE_200
28     , a15 JTF_VARCHAR2_TABLE_200
29     , a16 JTF_VARCHAR2_TABLE_200
30     , a17 JTF_VARCHAR2_TABLE_200
31     , a18 JTF_VARCHAR2_TABLE_200
32     , a19 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).attain_tier_id := a0(indx);
42           t(ddindx).attain_schedule_id := a1(indx);
43           t(ddindx).percent := a2(indx);
44           t(ddindx).attribute_category := a3(indx);
45           t(ddindx).attribute1 := a4(indx);
46           t(ddindx).attribute2 := a5(indx);
47           t(ddindx).attribute3 := a6(indx);
48           t(ddindx).attribute4 := a7(indx);
49           t(ddindx).attribute5 := a8(indx);
50           t(ddindx).attribute6 := a9(indx);
51           t(ddindx).attribute7 := a10(indx);
52           t(ddindx).attribute8 := a11(indx);
53           t(ddindx).attribute9 := a12(indx);
54           t(ddindx).attribute10 := a13(indx);
55           t(ddindx).attribute11 := a14(indx);
56           t(ddindx).attribute12 := a15(indx);
57           t(ddindx).attribute13 := a16(indx);
58           t(ddindx).attribute14 := a17(indx);
59           t(ddindx).attribute15 := a18(indx);
60           t(ddindx).object_version_number := a19(indx);
61           ddindx := ddindx+1;
62           if a0.last =indx
63             then exit;
64           end if;
65           indx := a0.next(indx);
66         end loop;
67       end if;
68    end if;
69   end rosetta_table_copy_in_p1;
70   procedure rosetta_table_copy_out_p1(t cn_attain_tier_pvt.attain_tier_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
71     , a1 out nocopy JTF_NUMBER_TABLE
72     , a2 out nocopy JTF_NUMBER_TABLE
73     , a3 out nocopy JTF_VARCHAR2_TABLE_100
74     , a4 out nocopy JTF_VARCHAR2_TABLE_200
75     , a5 out nocopy JTF_VARCHAR2_TABLE_200
76     , a6 out nocopy JTF_VARCHAR2_TABLE_200
77     , a7 out nocopy JTF_VARCHAR2_TABLE_200
78     , a8 out nocopy JTF_VARCHAR2_TABLE_200
79     , a9 out nocopy JTF_VARCHAR2_TABLE_200
80     , a10 out nocopy JTF_VARCHAR2_TABLE_200
81     , a11 out nocopy JTF_VARCHAR2_TABLE_200
82     , a12 out nocopy JTF_VARCHAR2_TABLE_200
83     , a13 out nocopy JTF_VARCHAR2_TABLE_200
84     , a14 out nocopy JTF_VARCHAR2_TABLE_200
85     , a15 out nocopy JTF_VARCHAR2_TABLE_200
86     , a16 out nocopy JTF_VARCHAR2_TABLE_200
87     , a17 out nocopy JTF_VARCHAR2_TABLE_200
88     , a18 out nocopy JTF_VARCHAR2_TABLE_200
89     , a19 out nocopy JTF_NUMBER_TABLE
90     ) as
91     ddindx binary_integer; indx binary_integer;
92   begin
93   if t is null or t.count = 0 then
94     a0 := JTF_NUMBER_TABLE();
95     a1 := JTF_NUMBER_TABLE();
96     a2 := JTF_NUMBER_TABLE();
97     a3 := JTF_VARCHAR2_TABLE_100();
98     a4 := JTF_VARCHAR2_TABLE_200();
99     a5 := JTF_VARCHAR2_TABLE_200();
100     a6 := JTF_VARCHAR2_TABLE_200();
101     a7 := JTF_VARCHAR2_TABLE_200();
102     a8 := JTF_VARCHAR2_TABLE_200();
103     a9 := JTF_VARCHAR2_TABLE_200();
104     a10 := JTF_VARCHAR2_TABLE_200();
105     a11 := JTF_VARCHAR2_TABLE_200();
106     a12 := JTF_VARCHAR2_TABLE_200();
107     a13 := JTF_VARCHAR2_TABLE_200();
108     a14 := JTF_VARCHAR2_TABLE_200();
109     a15 := JTF_VARCHAR2_TABLE_200();
110     a16 := JTF_VARCHAR2_TABLE_200();
111     a17 := JTF_VARCHAR2_TABLE_200();
112     a18 := JTF_VARCHAR2_TABLE_200();
113     a19 := JTF_NUMBER_TABLE();
114   else
115       a0 := JTF_NUMBER_TABLE();
116       a1 := JTF_NUMBER_TABLE();
117       a2 := JTF_NUMBER_TABLE();
118       a3 := JTF_VARCHAR2_TABLE_100();
119       a4 := JTF_VARCHAR2_TABLE_200();
120       a5 := JTF_VARCHAR2_TABLE_200();
121       a6 := JTF_VARCHAR2_TABLE_200();
122       a7 := JTF_VARCHAR2_TABLE_200();
123       a8 := JTF_VARCHAR2_TABLE_200();
124       a9 := JTF_VARCHAR2_TABLE_200();
125       a10 := JTF_VARCHAR2_TABLE_200();
126       a11 := JTF_VARCHAR2_TABLE_200();
127       a12 := JTF_VARCHAR2_TABLE_200();
128       a13 := JTF_VARCHAR2_TABLE_200();
129       a14 := JTF_VARCHAR2_TABLE_200();
130       a15 := JTF_VARCHAR2_TABLE_200();
131       a16 := JTF_VARCHAR2_TABLE_200();
132       a17 := JTF_VARCHAR2_TABLE_200();
133       a18 := JTF_VARCHAR2_TABLE_200();
134       a19 := JTF_NUMBER_TABLE();
135       if t.count > 0 then
136         a0.extend(t.count);
137         a1.extend(t.count);
138         a2.extend(t.count);
139         a3.extend(t.count);
140         a4.extend(t.count);
141         a5.extend(t.count);
142         a6.extend(t.count);
143         a7.extend(t.count);
144         a8.extend(t.count);
145         a9.extend(t.count);
146         a10.extend(t.count);
147         a11.extend(t.count);
148         a12.extend(t.count);
149         a13.extend(t.count);
150         a14.extend(t.count);
151         a15.extend(t.count);
152         a16.extend(t.count);
153         a17.extend(t.count);
154         a18.extend(t.count);
155         a19.extend(t.count);
156         ddindx := t.first;
157         indx := 1;
158         while true loop
159           a0(indx) := t(ddindx).attain_tier_id;
160           a1(indx) := t(ddindx).attain_schedule_id;
161           a2(indx) := t(ddindx).percent;
162           a3(indx) := t(ddindx).attribute_category;
163           a4(indx) := t(ddindx).attribute1;
164           a5(indx) := t(ddindx).attribute2;
165           a6(indx) := t(ddindx).attribute3;
166           a7(indx) := t(ddindx).attribute4;
167           a8(indx) := t(ddindx).attribute5;
168           a9(indx) := t(ddindx).attribute6;
169           a10(indx) := t(ddindx).attribute7;
170           a11(indx) := t(ddindx).attribute8;
171           a12(indx) := t(ddindx).attribute9;
172           a13(indx) := t(ddindx).attribute10;
173           a14(indx) := t(ddindx).attribute11;
174           a15(indx) := t(ddindx).attribute12;
175           a16(indx) := t(ddindx).attribute13;
176           a17(indx) := t(ddindx).attribute14;
177           a18(indx) := t(ddindx).attribute15;
178           a19(indx) := t(ddindx).object_version_number;
179           indx := indx+1;
180           if t.last =ddindx
181             then exit;
182           end if;
183           ddindx := t.next(ddindx);
184         end loop;
185       end if;
186    end if;
187   end rosetta_table_copy_out_p1;
188 
189   procedure create_attain_tier(p_api_version  NUMBER
190     , p_init_msg_list  VARCHAR2
191     , p_commit  VARCHAR2
192     , p_validation_level  NUMBER
193     , p4_a0  NUMBER
194     , p4_a1  NUMBER
195     , p4_a2  NUMBER
196     , p4_a3  VARCHAR2
197     , p4_a4  VARCHAR2
198     , p4_a5  VARCHAR2
199     , p4_a6  VARCHAR2
200     , p4_a7  VARCHAR2
201     , p4_a8  VARCHAR2
202     , p4_a9  VARCHAR2
203     , p4_a10  VARCHAR2
204     , p4_a11  VARCHAR2
205     , p4_a12  VARCHAR2
206     , p4_a13  VARCHAR2
207     , p4_a14  VARCHAR2
208     , p4_a15  VARCHAR2
209     , p4_a16  VARCHAR2
210     , p4_a17  VARCHAR2
211     , p4_a18  VARCHAR2
212     , p4_a19  NUMBER
213     , x_return_status out nocopy  VARCHAR2
214     , x_msg_count out nocopy  NUMBER
215     , x_msg_data out nocopy  VARCHAR2
216   )
217 
218   as
219     ddp_attain_tier cn_attain_tier_pvt.attain_tier_rec_type;
220     ddindx binary_integer; indx binary_integer;
221   begin
222 
223     -- copy data to the local IN or IN-OUT args, if any
224 
225 
226 
227 
228     ddp_attain_tier.attain_tier_id := p4_a0;
229     ddp_attain_tier.attain_schedule_id := p4_a1;
230     ddp_attain_tier.percent := p4_a2;
231     ddp_attain_tier.attribute_category := p4_a3;
232     ddp_attain_tier.attribute1 := p4_a4;
233     ddp_attain_tier.attribute2 := p4_a5;
234     ddp_attain_tier.attribute3 := p4_a6;
235     ddp_attain_tier.attribute4 := p4_a7;
236     ddp_attain_tier.attribute5 := p4_a8;
237     ddp_attain_tier.attribute6 := p4_a9;
238     ddp_attain_tier.attribute7 := p4_a10;
239     ddp_attain_tier.attribute8 := p4_a11;
240     ddp_attain_tier.attribute9 := p4_a12;
241     ddp_attain_tier.attribute10 := p4_a13;
242     ddp_attain_tier.attribute11 := p4_a14;
243     ddp_attain_tier.attribute12 := p4_a15;
244     ddp_attain_tier.attribute13 := p4_a16;
245     ddp_attain_tier.attribute14 := p4_a17;
246     ddp_attain_tier.attribute15 := p4_a18;
247     ddp_attain_tier.object_version_number := p4_a19;
248 
249 
250 
251 
252     -- here's the delegated call to the old PL/SQL routine
253     cn_attain_tier_pvt.create_attain_tier(p_api_version,
254       p_init_msg_list,
255       p_commit,
256       p_validation_level,
257       ddp_attain_tier,
258       x_return_status,
259       x_msg_count,
260       x_msg_data);
261 
262     -- copy data back from the local variables to OUT or IN-OUT args, if any
263 
264 
265 
266 
267 
268 
269 
270   end;
271 
272   procedure update_attain_tier(p_api_version  NUMBER
273     , p_init_msg_list  VARCHAR2
274     , p_commit  VARCHAR2
275     , p_validation_level  NUMBER
276     , p4_a0  NUMBER
277     , p4_a1  NUMBER
278     , p4_a2  NUMBER
279     , p4_a3  VARCHAR2
280     , p4_a4  VARCHAR2
281     , p4_a5  VARCHAR2
282     , p4_a6  VARCHAR2
283     , p4_a7  VARCHAR2
284     , p4_a8  VARCHAR2
285     , p4_a9  VARCHAR2
286     , p4_a10  VARCHAR2
287     , p4_a11  VARCHAR2
288     , p4_a12  VARCHAR2
289     , p4_a13  VARCHAR2
290     , p4_a14  VARCHAR2
291     , p4_a15  VARCHAR2
292     , p4_a16  VARCHAR2
293     , p4_a17  VARCHAR2
294     , p4_a18  VARCHAR2
295     , p4_a19  NUMBER
296     , x_return_status out nocopy  VARCHAR2
297     , x_msg_count out nocopy  NUMBER
298     , x_msg_data out nocopy  VARCHAR2
299   )
300 
301   as
302     ddp_attain_tier cn_attain_tier_pvt.attain_tier_rec_type;
303     ddindx binary_integer; indx binary_integer;
304   begin
305 
306     -- copy data to the local IN or IN-OUT args, if any
307 
308 
309 
310 
311     ddp_attain_tier.attain_tier_id := p4_a0;
312     ddp_attain_tier.attain_schedule_id := p4_a1;
313     ddp_attain_tier.percent := p4_a2;
314     ddp_attain_tier.attribute_category := p4_a3;
315     ddp_attain_tier.attribute1 := p4_a4;
316     ddp_attain_tier.attribute2 := p4_a5;
317     ddp_attain_tier.attribute3 := p4_a6;
318     ddp_attain_tier.attribute4 := p4_a7;
319     ddp_attain_tier.attribute5 := p4_a8;
320     ddp_attain_tier.attribute6 := p4_a9;
321     ddp_attain_tier.attribute7 := p4_a10;
322     ddp_attain_tier.attribute8 := p4_a11;
323     ddp_attain_tier.attribute9 := p4_a12;
324     ddp_attain_tier.attribute10 := p4_a13;
325     ddp_attain_tier.attribute11 := p4_a14;
326     ddp_attain_tier.attribute12 := p4_a15;
327     ddp_attain_tier.attribute13 := p4_a16;
328     ddp_attain_tier.attribute14 := p4_a17;
329     ddp_attain_tier.attribute15 := p4_a18;
330     ddp_attain_tier.object_version_number := p4_a19;
331 
332 
333 
334 
335     -- here's the delegated call to the old PL/SQL routine
336     cn_attain_tier_pvt.update_attain_tier(p_api_version,
337       p_init_msg_list,
338       p_commit,
339       p_validation_level,
340       ddp_attain_tier,
341       x_return_status,
342       x_msg_count,
343       x_msg_data);
344 
345     -- copy data back from the local variables to OUT or IN-OUT args, if any
346 
347 
348 
349 
350 
351 
352 
353   end;
354 
355   procedure delete_attain_tier(p_api_version  NUMBER
356     , p_init_msg_list  VARCHAR2
357     , p_commit  VARCHAR2
358     , p_validation_level  NUMBER
359     , p4_a0  NUMBER
360     , p4_a1  NUMBER
361     , p4_a2  NUMBER
362     , p4_a3  VARCHAR2
363     , p4_a4  VARCHAR2
364     , p4_a5  VARCHAR2
365     , p4_a6  VARCHAR2
366     , p4_a7  VARCHAR2
367     , p4_a8  VARCHAR2
368     , p4_a9  VARCHAR2
369     , p4_a10  VARCHAR2
370     , p4_a11  VARCHAR2
371     , p4_a12  VARCHAR2
372     , p4_a13  VARCHAR2
373     , p4_a14  VARCHAR2
374     , p4_a15  VARCHAR2
375     , p4_a16  VARCHAR2
376     , p4_a17  VARCHAR2
377     , p4_a18  VARCHAR2
378     , p4_a19  NUMBER
379     , x_return_status out nocopy  VARCHAR2
380     , x_msg_count out nocopy  NUMBER
381     , x_msg_data out nocopy  VARCHAR2
382   )
383 
384   as
385     ddp_attain_tier cn_attain_tier_pvt.attain_tier_rec_type;
386     ddindx binary_integer; indx binary_integer;
387   begin
388 
389     -- copy data to the local IN or IN-OUT args, if any
390 
391 
392 
393 
394     ddp_attain_tier.attain_tier_id := p4_a0;
395     ddp_attain_tier.attain_schedule_id := p4_a1;
396     ddp_attain_tier.percent := p4_a2;
397     ddp_attain_tier.attribute_category := p4_a3;
398     ddp_attain_tier.attribute1 := p4_a4;
399     ddp_attain_tier.attribute2 := p4_a5;
400     ddp_attain_tier.attribute3 := p4_a6;
401     ddp_attain_tier.attribute4 := p4_a7;
402     ddp_attain_tier.attribute5 := p4_a8;
403     ddp_attain_tier.attribute6 := p4_a9;
404     ddp_attain_tier.attribute7 := p4_a10;
405     ddp_attain_tier.attribute8 := p4_a11;
406     ddp_attain_tier.attribute9 := p4_a12;
407     ddp_attain_tier.attribute10 := p4_a13;
408     ddp_attain_tier.attribute11 := p4_a14;
409     ddp_attain_tier.attribute12 := p4_a15;
410     ddp_attain_tier.attribute13 := p4_a16;
411     ddp_attain_tier.attribute14 := p4_a17;
412     ddp_attain_tier.attribute15 := p4_a18;
413     ddp_attain_tier.object_version_number := p4_a19;
414 
415 
416 
417 
418     -- here's the delegated call to the old PL/SQL routine
419     cn_attain_tier_pvt.delete_attain_tier(p_api_version,
420       p_init_msg_list,
421       p_commit,
422       p_validation_level,
423       ddp_attain_tier,
424       x_return_status,
425       x_msg_count,
426       x_msg_data);
427 
428     -- copy data back from the local variables to OUT or IN-OUT args, if any
429 
430 
431 
432 
433 
434 
435 
436   end;
437 
438   procedure get_attain_tier(p_api_version  NUMBER
439     , p_init_msg_list  VARCHAR2
440     , p_commit  VARCHAR2
441     , p_validation_level  NUMBER
442     , p_attain_schedule_id  NUMBER
443     , p5_a0 out nocopy JTF_NUMBER_TABLE
444     , p5_a1 out nocopy JTF_NUMBER_TABLE
445     , p5_a2 out nocopy JTF_NUMBER_TABLE
446     , p5_a3 out nocopy JTF_VARCHAR2_TABLE_100
447     , p5_a4 out nocopy JTF_VARCHAR2_TABLE_200
448     , p5_a5 out nocopy JTF_VARCHAR2_TABLE_200
449     , p5_a6 out nocopy JTF_VARCHAR2_TABLE_200
450     , p5_a7 out nocopy JTF_VARCHAR2_TABLE_200
451     , p5_a8 out nocopy JTF_VARCHAR2_TABLE_200
452     , p5_a9 out nocopy JTF_VARCHAR2_TABLE_200
453     , p5_a10 out nocopy JTF_VARCHAR2_TABLE_200
454     , p5_a11 out nocopy JTF_VARCHAR2_TABLE_200
455     , p5_a12 out nocopy JTF_VARCHAR2_TABLE_200
456     , p5_a13 out nocopy JTF_VARCHAR2_TABLE_200
457     , p5_a14 out nocopy JTF_VARCHAR2_TABLE_200
458     , p5_a15 out nocopy JTF_VARCHAR2_TABLE_200
459     , p5_a16 out nocopy JTF_VARCHAR2_TABLE_200
460     , p5_a17 out nocopy JTF_VARCHAR2_TABLE_200
461     , p5_a18 out nocopy JTF_VARCHAR2_TABLE_200
462     , p5_a19 out nocopy JTF_NUMBER_TABLE
463     , x_return_status out nocopy  VARCHAR2
464     , x_msg_count out nocopy  NUMBER
465     , x_msg_data out nocopy  VARCHAR2
466   )
467 
468   as
469     ddx_attain_tier cn_attain_tier_pvt.attain_tier_tbl_type;
470     ddindx binary_integer; indx binary_integer;
471   begin
472 
473     -- copy data to the local IN or IN-OUT args, if any
474 
475 
476 
477 
478 
479 
480 
481 
482 
483     -- here's the delegated call to the old PL/SQL routine
484     cn_attain_tier_pvt.get_attain_tier(p_api_version,
485       p_init_msg_list,
486       p_commit,
487       p_validation_level,
488       p_attain_schedule_id,
489       ddx_attain_tier,
490       x_return_status,
491       x_msg_count,
492       x_msg_data);
493 
494     -- copy data back from the local variables to OUT or IN-OUT args, if any
495 
496 
497 
498 
499 
500     cn_attain_tier_pvt_w.rosetta_table_copy_out_p1(ddx_attain_tier, p5_a0
501       , p5_a1
502       , p5_a2
503       , p5_a3
504       , p5_a4
505       , p5_a5
506       , p5_a6
507       , p5_a7
508       , p5_a8
509       , p5_a9
510       , p5_a10
511       , p5_a11
512       , p5_a12
513       , p5_a13
514       , p5_a14
515       , p5_a15
516       , p5_a16
517       , p5_a17
518       , p5_a18
519       , p5_a19
520       );
521 
522 
523 
524   end;
525 
526 end cn_attain_tier_pvt_w;