1 package body pa_pwp_invoice_links_w as
2 /* $Header: painvlnb.pls 120.0.12010000.1 2008/11/14 13:03:37 svivaram noship $ */
3 procedure rosetta_table_copy_in_p1(t out nocopy pa_pwp_invoice_links.link_tab, a0 JTF_NUMBER_TABLE
4 , a1 JTF_NUMBER_TABLE
5 , a2 JTF_NUMBER_TABLE
6 ) as
7 ddindx binary_integer; indx binary_integer;
8 begin
9 if a0 is not null and a0.count > 0 then
10 if a0.count > 0 then
11 indx := a0.first;
12 ddindx := 1;
13 while true loop
14 t(ddindx).project_id := a0(indx);
15 t(ddindx).draft_invoice_num := a1(indx);
16 t(ddindx).ap_invoice_id := a2(indx);
17 ddindx := ddindx+1;
18 if a0.last =indx
19 then exit;
20 end if;
21 indx := a0.next(indx);
22 end loop;
23 end if;
24 end if;
25 end rosetta_table_copy_in_p1;
26 procedure rosetta_table_copy_out_p1(t pa_pwp_invoice_links.link_tab, a0 out nocopy JTF_NUMBER_TABLE
27 , a1 out nocopy JTF_NUMBER_TABLE
28 , a2 out nocopy JTF_NUMBER_TABLE
29 ) as
30 ddindx binary_integer; indx binary_integer;
31 begin
32 if t is null or t.count = 0 then
33 a0 := JTF_NUMBER_TABLE();
34 a1 := JTF_NUMBER_TABLE();
35 a2 := JTF_NUMBER_TABLE();
36 else
37 a0 := JTF_NUMBER_TABLE();
38 a1 := JTF_NUMBER_TABLE();
39 a2 := JTF_NUMBER_TABLE();
40 if t.count > 0 then
41 a0.extend(t.count);
42 a1.extend(t.count);
43 a2.extend(t.count);
44 ddindx := t.first;
45 indx := 1;
46 while true loop
47 a0(indx) := t(ddindx).project_id;
48 a1(indx) := t(ddindx).draft_invoice_num;
49 a2(indx) := t(ddindx).ap_invoice_id;
50 indx := indx+1;
51 if t.last =ddindx
52 then exit;
53 end if;
54 ddindx := t.next(ddindx);
55 end loop;
56 end if;
57 end if;
58 end rosetta_table_copy_out_p1;
59
60 procedure del_invoice_link(p0_a0 JTF_NUMBER_TABLE
61 , p0_a1 JTF_NUMBER_TABLE
62 , p0_a2 JTF_NUMBER_TABLE
63 , x_return_status out nocopy VARCHAR2
64 , x_msg_count out nocopy NUMBER
65 , x_msg_data out nocopy VARCHAR2
66 )
67
68 as
69 ddpa_link_tab pa_pwp_invoice_links.link_tab;
70 ddindx binary_integer; indx binary_integer;
71 begin
72
73 -- copy data to the local IN or IN-OUT args, if any
74 pa_pwp_invoice_links_w.rosetta_table_copy_in_p1(ddpa_link_tab, p0_a0
75 , p0_a1
76 , p0_a2
77 );
78
79
80
81
82 -- here's the delegated call to the old PL/SQL routine
83 pa_pwp_invoice_links.del_invoice_link(ddpa_link_tab,
84 x_return_status,
85 x_msg_count,
86 x_msg_data);
87
88 -- copy data back from the local variables to OUT or IN-OUT args, if any
89
90
91
92 end;
93
94 procedure add_invoice_link(p0_a0 JTF_NUMBER_TABLE
95 , p0_a1 JTF_NUMBER_TABLE
96 , p0_a2 JTF_NUMBER_TABLE
97 , x_return_status out nocopy VARCHAR2
98 , x_msg_count out nocopy NUMBER
99 , x_msg_data out nocopy VARCHAR2
100 )
101
102 as
103 ddpa_link_tab pa_pwp_invoice_links.link_tab;
104 ddindx binary_integer; indx binary_integer;
105 begin
106
107 -- copy data to the local IN or IN-OUT args, if any
108 pa_pwp_invoice_links_w.rosetta_table_copy_in_p1(ddpa_link_tab, p0_a0
109 , p0_a1
110 , p0_a2
111 );
112
113
114
115
116 -- here's the delegated call to the old PL/SQL routine
117 pa_pwp_invoice_links.add_invoice_link(ddpa_link_tab,
118 x_return_status,
119 x_msg_count,
120 x_msg_data);
121
122 -- copy data back from the local variables to OUT or IN-OUT args, if any
123
124
125
126 end;
127
128 end pa_pwp_invoice_links_w;