1 package body cn_srp_pmt_plans_pvt_w as
2 /* $Header: cnwsppab.pls 120.3 2005/09/14 03:43 vensrini noship $ */
3 procedure rosetta_table_copy_in_p1(t out nocopy cn_srp_pmt_plans_pvt.payrun_tbl, a0 JTF_VARCHAR2_TABLE_100) as
4 ddindx binary_integer; indx binary_integer;
5 begin
6 if a0 is null then
7 t := null;
8 elsif a0.count = 0 then
9 t := cn_srp_pmt_plans_pvt.payrun_tbl();
10 else
11 if a0.count > 0 then
12 t := cn_srp_pmt_plans_pvt.payrun_tbl();
13 t.extend(a0.count);
14 indx := a0.first;
15 ddindx := 1;
16 while true loop
17 t(ddindx) := a0(indx);
18 ddindx := ddindx+1;
19 if a0.last =indx
20 then exit;
21 end if;
22 indx := a0.next(indx);
23 end loop;
24 end if;
25 end if;
26 end rosetta_table_copy_in_p1;
27 procedure rosetta_table_copy_out_p1(t cn_srp_pmt_plans_pvt.payrun_tbl, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
28 ddindx binary_integer; indx binary_integer;
29 begin
30 if t is null then
31 a0 := null;
32 elsif t.count = 0 then
33 a0 := JTF_VARCHAR2_TABLE_100();
34 else
35 a0 := JTF_VARCHAR2_TABLE_100();
36 if t.count > 0 then
37 a0.extend(t.count);
38 ddindx := t.first;
39 indx := 1;
40 while true loop
41 a0(indx) := t(ddindx);
42 indx := indx+1;
43 if t.last =ddindx
44 then exit;
45 end if;
46 ddindx := t.next(ddindx);
47 end loop;
48 end if;
49 end if;
50 end rosetta_table_copy_out_p1;
51
52 procedure create_srp_pmt_plan(p_api_version NUMBER
53 , p_init_msg_list VARCHAR2
54 , p_commit VARCHAR2
55 , p_validation_level NUMBER
56 , x_return_status out nocopy VARCHAR2
57 , x_loading_status out nocopy VARCHAR2
58 , x_msg_count out nocopy NUMBER
59 , x_msg_data out nocopy VARCHAR2
60 , p8_a0 in out nocopy NUMBER
61 , p8_a1 in out nocopy NUMBER
62 , p8_a2 in out nocopy NUMBER
63 , p8_a3 in out nocopy NUMBER
64 , p8_a4 in out nocopy DATE
65 , p8_a5 in out nocopy DATE
66 , p8_a6 in out nocopy NUMBER
67 , p8_a7 in out nocopy NUMBER
68 , p8_a8 in out nocopy NUMBER
69 , p8_a9 in out nocopy NUMBER
70 , p8_a10 in out nocopy VARCHAR2
71 , p8_a11 in out nocopy NUMBER
72 )
73
74 as
75 ddp_pmt_plan_assign_rec cn_srp_pmt_plans_pvt.pmt_plan_assign_rec;
76 ddindx binary_integer; indx binary_integer;
77 begin
78
79 -- copy data to the local IN or IN-OUT args, if any
80
81
82
83
84
85
86
87
88 ddp_pmt_plan_assign_rec.srp_pmt_plan_id := p8_a0;
89 ddp_pmt_plan_assign_rec.salesrep_id := p8_a1;
90 ddp_pmt_plan_assign_rec.org_id := p8_a2;
91 ddp_pmt_plan_assign_rec.pmt_plan_id := p8_a3;
92 ddp_pmt_plan_assign_rec.start_date := p8_a4;
93 ddp_pmt_plan_assign_rec.end_date := p8_a5;
94 ddp_pmt_plan_assign_rec.minimum_amount := p8_a6;
95 ddp_pmt_plan_assign_rec.maximum_amount := p8_a7;
96 ddp_pmt_plan_assign_rec.srp_role_id := p8_a8;
97 ddp_pmt_plan_assign_rec.role_pmt_plan_id := p8_a9;
98 ddp_pmt_plan_assign_rec.lock_flag := p8_a10;
99 ddp_pmt_plan_assign_rec.object_version_number := p8_a11;
100
101 -- here's the delegated call to the old PL/SQL routine
102 cn_srp_pmt_plans_pvt.create_srp_pmt_plan(p_api_version,
103 p_init_msg_list,
104 p_commit,
105 p_validation_level,
106 x_return_status,
107 x_loading_status,
108 x_msg_count,
109 x_msg_data,
110 ddp_pmt_plan_assign_rec);
111
112 -- copy data back from the local variables to OUT or IN-OUT args, if any
113
114
115
116
117
118
119
120
121 p8_a0 := ddp_pmt_plan_assign_rec.srp_pmt_plan_id;
122 p8_a1 := ddp_pmt_plan_assign_rec.salesrep_id;
123 p8_a2 := ddp_pmt_plan_assign_rec.org_id;
124 p8_a3 := ddp_pmt_plan_assign_rec.pmt_plan_id;
125 p8_a4 := ddp_pmt_plan_assign_rec.start_date;
126 p8_a5 := ddp_pmt_plan_assign_rec.end_date;
127 p8_a6 := ddp_pmt_plan_assign_rec.minimum_amount;
128 p8_a7 := ddp_pmt_plan_assign_rec.maximum_amount;
129 p8_a8 := ddp_pmt_plan_assign_rec.srp_role_id;
130 p8_a9 := ddp_pmt_plan_assign_rec.role_pmt_plan_id;
131 p8_a10 := ddp_pmt_plan_assign_rec.lock_flag;
132 p8_a11 := ddp_pmt_plan_assign_rec.object_version_number;
133 end;
134
135 procedure update_srp_pmt_plan(p_api_version 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_loading_status out nocopy VARCHAR2
141 , x_msg_count out nocopy NUMBER
142 , x_msg_data out nocopy VARCHAR2
143 , p8_a0 in out nocopy NUMBER
144 , p8_a1 in out nocopy NUMBER
145 , p8_a2 in out nocopy NUMBER
146 , p8_a3 in out nocopy NUMBER
147 , p8_a4 in out nocopy DATE
148 , p8_a5 in out nocopy DATE
149 , p8_a6 in out nocopy NUMBER
150 , p8_a7 in out nocopy NUMBER
151 , p8_a8 in out nocopy NUMBER
152 , p8_a9 in out nocopy NUMBER
153 , p8_a10 in out nocopy VARCHAR2
154 , p8_a11 in out nocopy NUMBER
155 )
156
157 as
158 ddp_pmt_plan_assign_rec cn_srp_pmt_plans_pvt.pmt_plan_assign_rec;
159 ddindx binary_integer; indx binary_integer;
160 begin
161
162 -- copy data to the local IN or IN-OUT args, if any
163
164
165
166
167
168
169
170
171 ddp_pmt_plan_assign_rec.srp_pmt_plan_id := p8_a0;
172 ddp_pmt_plan_assign_rec.salesrep_id := p8_a1;
173 ddp_pmt_plan_assign_rec.org_id := p8_a2;
174 ddp_pmt_plan_assign_rec.pmt_plan_id := p8_a3;
175 ddp_pmt_plan_assign_rec.start_date := p8_a4;
176 ddp_pmt_plan_assign_rec.end_date := p8_a5;
177 ddp_pmt_plan_assign_rec.minimum_amount := p8_a6;
178 ddp_pmt_plan_assign_rec.maximum_amount := p8_a7;
179 ddp_pmt_plan_assign_rec.srp_role_id := p8_a8;
180 ddp_pmt_plan_assign_rec.role_pmt_plan_id := p8_a9;
181 ddp_pmt_plan_assign_rec.lock_flag := p8_a10;
182 ddp_pmt_plan_assign_rec.object_version_number := p8_a11;
183
184 -- here's the delegated call to the old PL/SQL routine
185 cn_srp_pmt_plans_pvt.update_srp_pmt_plan(p_api_version,
186 p_init_msg_list,
187 p_commit,
188 p_validation_level,
189 x_return_status,
190 x_loading_status,
191 x_msg_count,
192 x_msg_data,
193 ddp_pmt_plan_assign_rec);
194
195 -- copy data back from the local variables to OUT or IN-OUT args, if any
196
197
198
199
200
201
202
203
204 p8_a0 := ddp_pmt_plan_assign_rec.srp_pmt_plan_id;
205 p8_a1 := ddp_pmt_plan_assign_rec.salesrep_id;
206 p8_a2 := ddp_pmt_plan_assign_rec.org_id;
207 p8_a3 := ddp_pmt_plan_assign_rec.pmt_plan_id;
208 p8_a4 := ddp_pmt_plan_assign_rec.start_date;
209 p8_a5 := ddp_pmt_plan_assign_rec.end_date;
210 p8_a6 := ddp_pmt_plan_assign_rec.minimum_amount;
211 p8_a7 := ddp_pmt_plan_assign_rec.maximum_amount;
212 p8_a8 := ddp_pmt_plan_assign_rec.srp_role_id;
213 p8_a9 := ddp_pmt_plan_assign_rec.role_pmt_plan_id;
214 p8_a10 := ddp_pmt_plan_assign_rec.lock_flag;
215 p8_a11 := ddp_pmt_plan_assign_rec.object_version_number;
216 end;
217
218 procedure check_payruns(p_operation VARCHAR2
219 , p_srp_pmt_plan_id NUMBER
220 , p_salesrep_id NUMBER
221 , p_start_date DATE
222 , p_end_date DATE
223 , x_payrun_tbl out nocopy JTF_VARCHAR2_TABLE_100
224 )
225
226 as
227 ddx_payrun_tbl cn_srp_pmt_plans_pvt.payrun_tbl;
228 ddindx binary_integer; indx binary_integer;
229 begin
230
231 -- copy data to the local IN or IN-OUT args, if any
232
233
234
235
236
237
238 -- here's the delegated call to the old PL/SQL routine
239 cn_srp_pmt_plans_pvt.check_payruns(p_operation,
240 p_srp_pmt_plan_id,
241 p_salesrep_id,
242 p_start_date,
243 p_end_date,
244 ddx_payrun_tbl);
245
246 -- copy data back from the local variables to OUT or IN-OUT args, if any
247
248
249
250
251
252 cn_srp_pmt_plans_pvt_w.rosetta_table_copy_out_p1(ddx_payrun_tbl, x_payrun_tbl);
253 end;
254
255 end cn_srp_pmt_plans_pvt_w;