[Home] [Help]
PACKAGE BODY: APPS.AMW_SCOPE_PVT_W
Source
1 package body amw_scope_pvt_w as
2 /* $Header: amwwscpb.pls 120.0 2005/05/31 21:35:35 appldev noship $ */
3 procedure rosetta_table_copy_in_p1(t out nocopy amw_scope_pvt.sub_tbl_type, a0 JTF_VARCHAR2_TABLE_200
4 ) as
5 ddindx binary_integer; indx binary_integer;
6 begin
7 if a0 is not null and a0.count > 0 then
8 if a0.count > 0 then
9 indx := a0.first;
10 ddindx := 1;
11 while true loop
12 t(ddindx).subsidiary_code := a0(indx);
13 ddindx := ddindx+1;
14 if a0.last =indx
15 then exit;
16 end if;
17 indx := a0.next(indx);
18 end loop;
19 end if;
20 end if;
21 end rosetta_table_copy_in_p1;
22 procedure rosetta_table_copy_out_p1(t amw_scope_pvt.sub_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_200
23 ) as
24 ddindx binary_integer; indx binary_integer;
25 begin
26 if t is null or t.count = 0 then
27 a0 := JTF_VARCHAR2_TABLE_200();
28 else
29 a0 := JTF_VARCHAR2_TABLE_200();
30 if t.count > 0 then
31 a0.extend(t.count);
32 ddindx := t.first;
33 indx := 1;
34 while true loop
35 a0(indx) := t(ddindx).subsidiary_code;
36 indx := indx+1;
37 if t.last =ddindx
38 then exit;
39 end if;
40 ddindx := t.next(ddindx);
41 end loop;
42 end if;
43 end if;
44 end rosetta_table_copy_out_p1;
45
46 procedure rosetta_table_copy_in_p3(t out nocopy amw_scope_pvt.sub_new_tbl_type, a0 JTF_NUMBER_TABLE
47 ) as
48 ddindx binary_integer; indx binary_integer;
49 begin
50 if a0 is not null and a0.count > 0 then
51 if a0.count > 0 then
52 indx := a0.first;
53 ddindx := 1;
54 while true loop
55 t(ddindx).subsidiary_id := a0(indx);
56 ddindx := ddindx+1;
57 if a0.last =indx
58 then exit;
59 end if;
60 indx := a0.next(indx);
61 end loop;
62 end if;
63 end if;
64 end rosetta_table_copy_in_p3;
65 procedure rosetta_table_copy_out_p3(t amw_scope_pvt.sub_new_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
66 ) as
67 ddindx binary_integer; indx binary_integer;
68 begin
69 if t is null or t.count = 0 then
70 a0 := JTF_NUMBER_TABLE();
71 else
72 a0 := JTF_NUMBER_TABLE();
73 if t.count > 0 then
74 a0.extend(t.count);
75 ddindx := t.first;
76 indx := 1;
77 while true loop
78 a0(indx) := t(ddindx).subsidiary_id;
79 indx := indx+1;
80 if t.last =ddindx
81 then exit;
82 end if;
83 ddindx := t.next(ddindx);
84 end loop;
85 end if;
86 end if;
87 end rosetta_table_copy_out_p3;
88
89 procedure rosetta_table_copy_in_p5(t out nocopy amw_scope_pvt.lob_tbl_type, a0 JTF_VARCHAR2_TABLE_200
90 ) as
91 ddindx binary_integer; indx binary_integer;
92 begin
93 if a0 is not null and a0.count > 0 then
94 if a0.count > 0 then
95 indx := a0.first;
96 ddindx := 1;
97 while true loop
98 t(ddindx).lob_code := a0(indx);
99 ddindx := ddindx+1;
100 if a0.last =indx
101 then exit;
102 end if;
103 indx := a0.next(indx);
104 end loop;
105 end if;
106 end if;
107 end rosetta_table_copy_in_p5;
108 procedure rosetta_table_copy_out_p5(t amw_scope_pvt.lob_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_200
109 ) as
110 ddindx binary_integer; indx binary_integer;
111 begin
112 if t is null or t.count = 0 then
113 a0 := JTF_VARCHAR2_TABLE_200();
114 else
115 a0 := JTF_VARCHAR2_TABLE_200();
116 if t.count > 0 then
117 a0.extend(t.count);
118 ddindx := t.first;
119 indx := 1;
120 while true loop
121 a0(indx) := t(ddindx).lob_code;
122 indx := indx+1;
123 if t.last =ddindx
124 then exit;
125 end if;
126 ddindx := t.next(ddindx);
127 end loop;
128 end if;
129 end if;
130 end rosetta_table_copy_out_p5;
131
132 procedure rosetta_table_copy_in_p7(t out nocopy amw_scope_pvt.lob_new_tbl_type, a0 JTF_NUMBER_TABLE
133 ) as
134 ddindx binary_integer; indx binary_integer;
135 begin
136 if a0 is not null and a0.count > 0 then
137 if a0.count > 0 then
138 indx := a0.first;
139 ddindx := 1;
140 while true loop
141 t(ddindx).lob_id := a0(indx);
142 ddindx := ddindx+1;
143 if a0.last =indx
144 then exit;
145 end if;
146 indx := a0.next(indx);
147 end loop;
148 end if;
149 end if;
150 end rosetta_table_copy_in_p7;
151 procedure rosetta_table_copy_out_p7(t amw_scope_pvt.lob_new_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
152 ) as
153 ddindx binary_integer; indx binary_integer;
154 begin
155 if t is null or t.count = 0 then
156 a0 := JTF_NUMBER_TABLE();
157 else
158 a0 := JTF_NUMBER_TABLE();
159 if t.count > 0 then
160 a0.extend(t.count);
161 ddindx := t.first;
162 indx := 1;
163 while true loop
164 a0(indx) := t(ddindx).lob_id;
165 indx := indx+1;
166 if t.last =ddindx
167 then exit;
168 end if;
169 ddindx := t.next(ddindx);
170 end loop;
171 end if;
172 end if;
173 end rosetta_table_copy_out_p7;
174
175 procedure rosetta_table_copy_in_p9(t out nocopy amw_scope_pvt.org_tbl_type, a0 JTF_NUMBER_TABLE
176 ) as
177 ddindx binary_integer; indx binary_integer;
178 begin
179 if a0 is not null and a0.count > 0 then
180 if a0.count > 0 then
181 indx := a0.first;
182 ddindx := 1;
183 while true loop
184 t(ddindx).org_id := a0(indx);
185 ddindx := ddindx+1;
186 if a0.last =indx
187 then exit;
188 end if;
189 indx := a0.next(indx);
190 end loop;
191 end if;
192 end if;
193 end rosetta_table_copy_in_p9;
194 procedure rosetta_table_copy_out_p9(t amw_scope_pvt.org_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
195 ) as
196 ddindx binary_integer; indx binary_integer;
197 begin
198 if t is null or t.count = 0 then
199 a0 := JTF_NUMBER_TABLE();
200 else
201 a0 := JTF_NUMBER_TABLE();
202 if t.count > 0 then
203 a0.extend(t.count);
204 ddindx := t.first;
205 indx := 1;
206 while true loop
207 a0(indx) := t(ddindx).org_id;
208 indx := indx+1;
209 if t.last =ddindx
210 then exit;
211 end if;
212 ddindx := t.next(ddindx);
213 end loop;
214 end if;
215 end if;
216 end rosetta_table_copy_out_p9;
217
218 procedure rosetta_table_copy_in_p11(t out nocopy amw_scope_pvt.process_tbl_type, a0 JTF_NUMBER_TABLE
219 ) as
220 ddindx binary_integer; indx binary_integer;
221 begin
222 if a0 is not null and a0.count > 0 then
223 if a0.count > 0 then
224 indx := a0.first;
225 ddindx := 1;
226 while true loop
227 t(ddindx).process_id := a0(indx);
228 ddindx := ddindx+1;
229 if a0.last =indx
230 then exit;
231 end if;
232 indx := a0.next(indx);
233 end loop;
234 end if;
235 end if;
236 end rosetta_table_copy_in_p11;
237 procedure rosetta_table_copy_out_p11(t amw_scope_pvt.process_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
238 ) as
239 ddindx binary_integer; indx binary_integer;
240 begin
241 if t is null or t.count = 0 then
242 a0 := JTF_NUMBER_TABLE();
243 else
244 a0 := JTF_NUMBER_TABLE();
245 if t.count > 0 then
246 a0.extend(t.count);
247 ddindx := t.first;
248 indx := 1;
249 while true loop
250 a0(indx) := t(ddindx).process_id;
251 indx := indx+1;
252 if t.last =ddindx
253 then exit;
254 end if;
255 ddindx := t.next(ddindx);
256 end loop;
257 end if;
258 end if;
259 end rosetta_table_copy_out_p11;
260
261 procedure rosetta_table_copy_in_p13(t out nocopy amw_scope_pvt.proc_hier_tbl_type, a0 JTF_NUMBER_TABLE
262 , a1 JTF_NUMBER_TABLE
263 , a2 JTF_NUMBER_TABLE
264 , a3 JTF_NUMBER_TABLE
265 ) as
266 ddindx binary_integer; indx binary_integer;
267 begin
268 if a0 is not null and a0.count > 0 then
269 if a0.count > 0 then
270 indx := a0.first;
271 ddindx := 1;
272 while true loop
273 t(ddindx).top_process_id := a0(indx);
274 t(ddindx).parent_process_id := a1(indx);
275 t(ddindx).process_id := a2(indx);
276 t(ddindx).level_id := a3(indx);
277 ddindx := ddindx+1;
278 if a0.last =indx
279 then exit;
280 end if;
281 indx := a0.next(indx);
282 end loop;
283 end if;
284 end if;
285 end rosetta_table_copy_in_p13;
286 procedure rosetta_table_copy_out_p13(t amw_scope_pvt.proc_hier_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
287 , a1 out nocopy JTF_NUMBER_TABLE
288 , a2 out nocopy JTF_NUMBER_TABLE
289 , a3 out nocopy JTF_NUMBER_TABLE
290 ) as
291 ddindx binary_integer; indx binary_integer;
292 begin
293 if t is null or t.count = 0 then
294 a0 := JTF_NUMBER_TABLE();
295 a1 := JTF_NUMBER_TABLE();
296 a2 := JTF_NUMBER_TABLE();
297 a3 := JTF_NUMBER_TABLE();
298 else
299 a0 := JTF_NUMBER_TABLE();
300 a1 := JTF_NUMBER_TABLE();
301 a2 := JTF_NUMBER_TABLE();
302 a3 := JTF_NUMBER_TABLE();
303 if t.count > 0 then
304 a0.extend(t.count);
305 a1.extend(t.count);
306 a2.extend(t.count);
307 a3.extend(t.count);
308 ddindx := t.first;
309 indx := 1;
310 while true loop
311 a0(indx) := t(ddindx).top_process_id;
312 a1(indx) := t(ddindx).parent_process_id;
313 a2(indx) := t(ddindx).process_id;
314 a3(indx) := t(ddindx).level_id;
315 indx := indx+1;
316 if t.last =ddindx
317 then exit;
318 end if;
319 ddindx := t.next(ddindx);
320 end loop;
321 end if;
322 end if;
323 end rosetta_table_copy_out_p13;
324
325 procedure add_scope(p_api_version_number NUMBER
326 , p_init_msg_list VARCHAR2
327 , p_commit VARCHAR2
328 , p_validation_level NUMBER
329 , p_entity_id NUMBER
330 , p_entity_type VARCHAR2
331 , p_sub_vs VARCHAR2
332 , p_lob_vs VARCHAR2
333 , p8_a0 JTF_VARCHAR2_TABLE_200
334 , p9_a0 JTF_VARCHAR2_TABLE_200
335 , p10_a0 JTF_NUMBER_TABLE
336 , p11_a0 JTF_NUMBER_TABLE
337 , x_return_status out nocopy VARCHAR2
338 , x_msg_count out nocopy NUMBER
339 , x_msg_data out nocopy VARCHAR2
340 )
341
342 as
343 ddp_subsidiary_tbl amw_scope_pvt.sub_tbl_type;
344 ddp_lob_tbl amw_scope_pvt.lob_tbl_type;
345 ddp_org_tbl amw_scope_pvt.org_tbl_type;
346 ddp_process_tbl amw_scope_pvt.process_tbl_type;
347 ddindx binary_integer; indx binary_integer;
348 begin
349
350 -- copy data to the local IN or IN-OUT args, if any
351
352
353
354
355
356
357
358
359 amw_scope_pvt_w.rosetta_table_copy_in_p1(ddp_subsidiary_tbl, p8_a0
360 );
361
362 amw_scope_pvt_w.rosetta_table_copy_in_p5(ddp_lob_tbl, p9_a0
363 );
364
365 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_tbl, p10_a0
366 );
367
368 amw_scope_pvt_w.rosetta_table_copy_in_p11(ddp_process_tbl, p11_a0
369 );
370
371
372
373
374 -- here's the delegated call to the old PL/SQL routine
375 amw_scope_pvt.add_scope(p_api_version_number,
376 p_init_msg_list,
377 p_commit,
378 p_validation_level,
379 p_entity_id,
380 p_entity_type,
381 p_sub_vs,
382 p_lob_vs,
383 ddp_subsidiary_tbl,
384 ddp_lob_tbl,
385 ddp_org_tbl,
386 ddp_process_tbl,
387 x_return_status,
388 x_msg_count,
389 x_msg_data);
390
391 -- copy data back from the local variables to OUT or IN-OUT args, if any
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406 end;
407
408 procedure populate_custom_hierarchy(p0_a0 JTF_NUMBER_TABLE
409 , p_entity_id NUMBER
410 , p_entity_type VARCHAR2
411 )
412
413 as
414 ddp_org_tbl amw_scope_pvt.org_tbl_type;
415 ddindx binary_integer; indx binary_integer;
416 begin
417
418 -- copy data to the local IN or IN-OUT args, if any
419 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_tbl, p0_a0
420 );
421
422
423
424 -- here's the delegated call to the old PL/SQL routine
425 amw_scope_pvt.populate_custom_hierarchy(ddp_org_tbl,
426 p_entity_id,
427 p_entity_type);
428
429 -- copy data back from the local variables to OUT or IN-OUT args, if any
430
431
432 end;
433
434 procedure generate_organization_list(p_entity_id NUMBER
435 , p_entity_type VARCHAR2
436 , p2_a0 JTF_NUMBER_TABLE
437 , p3_a0 out nocopy JTF_NUMBER_TABLE
438 )
439
440 as
441 ddp_org_tbl amw_scope_pvt.org_tbl_type;
442 ddp_org_new_tbl amw_scope_pvt.org_tbl_type;
443 ddindx binary_integer; indx binary_integer;
444 begin
445
446 -- copy data to the local IN or IN-OUT args, if any
447
448
449 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_tbl, p2_a0
450 );
451
452
453 -- here's the delegated call to the old PL/SQL routine
454 amw_scope_pvt.generate_organization_list(p_entity_id,
455 p_entity_type,
456 ddp_org_tbl,
457 ddp_org_new_tbl);
458
459 -- copy data back from the local variables to OUT or IN-OUT args, if any
460
461
462
463 amw_scope_pvt_w.rosetta_table_copy_out_p9(ddp_org_new_tbl, p3_a0
464 );
465 end;
466
467 procedure generate_subsidiary_list(p_entity_id NUMBER
468 , p_entity_type VARCHAR2
469 , p2_a0 JTF_NUMBER_TABLE
470 , p3_a0 JTF_VARCHAR2_TABLE_200
471 , p_sub_vs VARCHAR2
472 , p5_a0 out nocopy JTF_NUMBER_TABLE
473 )
474
475 as
476 ddp_org_new_tbl amw_scope_pvt.org_tbl_type;
477 ddp_subsidiary_tbl amw_scope_pvt.sub_tbl_type;
478 ddp_sub_new_tbl amw_scope_pvt.sub_new_tbl_type;
479 ddindx binary_integer; indx binary_integer;
480 begin
481
482 -- copy data to the local IN or IN-OUT args, if any
483
484
485 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_new_tbl, p2_a0
486 );
487
488 amw_scope_pvt_w.rosetta_table_copy_in_p1(ddp_subsidiary_tbl, p3_a0
489 );
490
491
492
493 -- here's the delegated call to the old PL/SQL routine
494 amw_scope_pvt.generate_subsidiary_list(p_entity_id,
495 p_entity_type,
496 ddp_org_new_tbl,
497 ddp_subsidiary_tbl,
498 p_sub_vs,
499 ddp_sub_new_tbl);
500
501 -- copy data back from the local variables to OUT or IN-OUT args, if any
502
503
504
505
506
507 amw_scope_pvt_w.rosetta_table_copy_out_p3(ddp_sub_new_tbl, p5_a0
508 );
509 end;
510
511 procedure generate_lob_list(p_entity_id NUMBER
512 , p_entity_type VARCHAR2
513 , p2_a0 JTF_NUMBER_TABLE
514 , p3_a0 JTF_VARCHAR2_TABLE_200
515 , p_sub_vs VARCHAR2
516 , p5_a0 JTF_VARCHAR2_TABLE_200
517 , p_lob_vs VARCHAR2
518 , p7_a0 out nocopy JTF_NUMBER_TABLE
519 )
520
521 as
522 ddp_org_new_tbl amw_scope_pvt.org_tbl_type;
523 ddp_subsidiary_tbl amw_scope_pvt.sub_tbl_type;
524 ddp_lob_tbl amw_scope_pvt.lob_tbl_type;
525 ddp_lob_new_tbl amw_scope_pvt.lob_new_tbl_type;
526 ddindx binary_integer; indx binary_integer;
527 begin
528
529 -- copy data to the local IN or IN-OUT args, if any
530
531
532 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_new_tbl, p2_a0
533 );
534
535 amw_scope_pvt_w.rosetta_table_copy_in_p1(ddp_subsidiary_tbl, p3_a0
536 );
537
538
539 amw_scope_pvt_w.rosetta_table_copy_in_p5(ddp_lob_tbl, p5_a0
540 );
541
542
543
544 -- here's the delegated call to the old PL/SQL routine
545 amw_scope_pvt.generate_lob_list(p_entity_id,
546 p_entity_type,
547 ddp_org_new_tbl,
548 ddp_subsidiary_tbl,
549 p_sub_vs,
550 ddp_lob_tbl,
551 p_lob_vs,
552 ddp_lob_new_tbl);
553
554 -- copy data back from the local variables to OUT or IN-OUT args, if any
555
556
557
558
559
560
561
562 amw_scope_pvt_w.rosetta_table_copy_out_p7(ddp_lob_new_tbl, p7_a0
563 );
564 end;
565
566 procedure populate_process_hierarchy(p_api_version_number NUMBER
567 , p_init_msg_list VARCHAR2
568 , p_commit VARCHAR2
569 , p_validation_level NUMBER
570 , p_entity_type VARCHAR2
571 , p_entity_id NUMBER
572 , p6_a0 JTF_NUMBER_TABLE
573 , p7_a0 JTF_NUMBER_TABLE
574 , x_return_status out nocopy VARCHAR2
575 , x_msg_count out nocopy NUMBER
576 , x_msg_data out nocopy VARCHAR2
577 )
578
579 as
580 ddp_org_tbl amw_scope_pvt.org_tbl_type;
581 ddp_process_tbl amw_scope_pvt.process_tbl_type;
582 ddindx binary_integer; indx binary_integer;
583 begin
584
585 -- copy data to the local IN or IN-OUT args, if any
586
587
588
589
590
591
592 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_tbl, p6_a0
593 );
594
595 amw_scope_pvt_w.rosetta_table_copy_in_p11(ddp_process_tbl, p7_a0
596 );
597
598
599
600
601 -- here's the delegated call to the old PL/SQL routine
602 amw_scope_pvt.populate_process_hierarchy(p_api_version_number,
603 p_init_msg_list,
604 p_commit,
605 p_validation_level,
606 p_entity_type,
607 p_entity_id,
608 ddp_org_tbl,
609 ddp_process_tbl,
610 x_return_status,
611 x_msg_count,
612 x_msg_data);
613
614 -- copy data back from the local variables to OUT or IN-OUT args, if any
615
616
617
618
619
620
621
622
623
624
625 end;
626
627 procedure populate_denormalized_tables(p_entity_type VARCHAR2
628 , p_entity_id NUMBER
629 , p2_a0 JTF_NUMBER_TABLE
630 , p3_a0 JTF_NUMBER_TABLE
631 , p_mode VARCHAR2
632 )
633
634 as
635 ddp_org_tbl amw_scope_pvt.org_tbl_type;
636 ddp_process_tbl amw_scope_pvt.process_tbl_type;
637 ddindx binary_integer; indx binary_integer;
638 begin
639
640 -- copy data to the local IN or IN-OUT args, if any
641
642
643 amw_scope_pvt_w.rosetta_table_copy_in_p9(ddp_org_tbl, p2_a0
644 );
645
646 amw_scope_pvt_w.rosetta_table_copy_in_p11(ddp_process_tbl, p3_a0
647 );
648
649
650 -- here's the delegated call to the old PL/SQL routine
651 amw_scope_pvt.populate_denormalized_tables(p_entity_type,
652 p_entity_id,
653 ddp_org_tbl,
654 ddp_process_tbl,
655 p_mode);
656
657 -- copy data back from the local variables to OUT or IN-OUT args, if any
658
659
660
661
662 end;
663
664 procedure manage_processes(p_api_version_number NUMBER
665 , p_init_msg_list VARCHAR2
666 , p_commit VARCHAR2
667 , p_validation_level NUMBER
668 , p_entity_type VARCHAR2
669 , p_entity_id NUMBER
670 , p_organization_id NUMBER
671 , p7_a0 JTF_NUMBER_TABLE
672 , p7_a1 JTF_NUMBER_TABLE
673 , p7_a2 JTF_NUMBER_TABLE
674 , p7_a3 JTF_NUMBER_TABLE
675 , x_return_status out nocopy VARCHAR2
676 , x_msg_count out nocopy NUMBER
677 , x_msg_data out nocopy VARCHAR2
678 )
679
680 as
681 ddp_proc_hier_tbl amw_scope_pvt.proc_hier_tbl_type;
682 ddindx binary_integer; indx binary_integer;
683 begin
684
685 -- copy data to the local IN or IN-OUT args, if any
686
687
688
689
690
691
692
693 amw_scope_pvt_w.rosetta_table_copy_in_p13(ddp_proc_hier_tbl, p7_a0
694 , p7_a1
695 , p7_a2
696 , p7_a3
697 );
698
699
700
701
702 -- here's the delegated call to the old PL/SQL routine
703 amw_scope_pvt.manage_processes(p_api_version_number,
704 p_init_msg_list,
705 p_commit,
706 p_validation_level,
707 p_entity_type,
708 p_entity_id,
709 p_organization_id,
710 ddp_proc_hier_tbl,
711 x_return_status,
712 x_msg_count,
713 x_msg_data);
714
715 -- copy data back from the local variables to OUT or IN-OUT args, if any
716
717
718
719
720
721
722
723
724
725
726 end;
727
728 end amw_scope_pvt_w;