[Home] [Help]
PACKAGE BODY: APPS.AR_CREDIT_MEMO_API_PUB_W
Source
1 package body ar_credit_memo_api_pub_w as
2 /* $Header: ARICMWFB.pls 120.7 2011/11/28 16:16:28 parln ship $ */
3 procedure rosetta_table_copy_in_p6(t out nocopy ar_credit_memo_api_pub.cm_notes_tbl_type_cover, a0 JTF_VARCHAR2_TABLE_2000
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).notes := 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_p6;
22 procedure rosetta_table_copy_out_p6(t ar_credit_memo_api_pub.cm_notes_tbl_type_cover, a0 out nocopy JTF_VARCHAR2_TABLE_2000
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_2000();
28 else
29 a0 := JTF_VARCHAR2_TABLE_2000();
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).notes;
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_p6;
45
46 procedure rosetta_table_copy_in_p9(t out nocopy ar_credit_memo_api_pub.cm_activity_tbl_type_cover, a0 JTF_DATE_TABLE
47 , a1 JTF_VARCHAR2_TABLE_100
48 , a2 JTF_VARCHAR2_TABLE_100
49 , a3 JTF_VARCHAR2_TABLE_100
50 , a4 JTF_VARCHAR2_TABLE_400
51 ) as
52 ddindx binary_integer; indx binary_integer;
53 begin
54 if a0 is not null and a0.count > 0 then
55 if a0.count > 0 then
56 indx := a0.first;
57 ddindx := 1;
58 while true loop
59 t(ddindx).begin_date := a0(indx);
60 t(ddindx).activity_name := a1(indx);
61 t(ddindx).status := a2(indx);
62 t(ddindx).result_code := a3(indx);
63 t(ddindx).user := a4(indx);
64 ddindx := ddindx+1;
65 if a0.last =indx
66 then exit;
67 end if;
68 indx := a0.next(indx);
69 end loop;
70 end if;
71 end if;
72 end rosetta_table_copy_in_p9;
73 procedure rosetta_table_copy_out_p9(t ar_credit_memo_api_pub.cm_activity_tbl_type_cover, a0 out nocopy JTF_DATE_TABLE
74 , a1 out nocopy JTF_VARCHAR2_TABLE_100
75 , a2 out nocopy JTF_VARCHAR2_TABLE_100
76 , a3 out nocopy JTF_VARCHAR2_TABLE_100
77 , a4 out nocopy JTF_VARCHAR2_TABLE_400
78 ) as
79 ddindx binary_integer; indx binary_integer;
80 begin
81 if t is null or t.count = 0 then
82 a0 := JTF_DATE_TABLE();
83 a1 := JTF_VARCHAR2_TABLE_100();
84 a2 := JTF_VARCHAR2_TABLE_100();
85 a3 := JTF_VARCHAR2_TABLE_100();
86 a4 := JTF_VARCHAR2_TABLE_400();
87 else
88 a0 := JTF_DATE_TABLE();
89 a1 := JTF_VARCHAR2_TABLE_100();
90 a2 := JTF_VARCHAR2_TABLE_100();
91 a3 := JTF_VARCHAR2_TABLE_100();
92 a4 := JTF_VARCHAR2_TABLE_400();
93 if t.count > 0 then
94 a0.extend(t.count);
95 a1.extend(t.count);
96 a2.extend(t.count);
97 a3.extend(t.count);
98 a4.extend(t.count);
99 ddindx := t.first;
100 indx := 1;
101 while true loop
102 a0(indx) := t(ddindx).begin_date;
103 a1(indx) := t(ddindx).activity_name;
104 a2(indx) := t(ddindx).status;
105 a3(indx) := t(ddindx).result_code;
106 a4(indx) := t(ddindx).user;
107 indx := indx+1;
108 if t.last =ddindx
109 then exit;
110 end if;
111 ddindx := t.next(ddindx);
112 end loop;
113 end if;
114 end if;
115 end rosetta_table_copy_out_p9;
116
117 procedure create_request(p_api_version NUMBER
118 , p_init_msg_list VARCHAR2
119 , p_commit VARCHAR2
120 , p_validation_level NUMBER
121 , x_return_status out nocopy VARCHAR2
122 , x_msg_count out nocopy NUMBER
123 , x_msg_data out nocopy VARCHAR2
124 , p_customer_trx_id NUMBER
125 , p_line_credit_flag VARCHAR2
126 , p_line_amount NUMBER
127 , p_tax_amount NUMBER
128 , p_freight_amount NUMBER
129 , p_cm_reason_code VARCHAR2
130 , p_comments VARCHAR2
131 , p_orig_trx_number VARCHAR2
132 , p_tax_ex_cert_num VARCHAR2
133 , p_request_url VARCHAR2
134 , p_transaction_url VARCHAR2
135 , p_trans_act_url VARCHAR2
136 , p19_a0 JTF_NUMBER_TABLE
137 , p19_a1 JTF_NUMBER_TABLE
138 , p19_a2 JTF_NUMBER_TABLE
139 , p19_a3 JTF_NUMBER_TABLE
140 , p19_a4 JTF_VARCHAR2_TABLE_100
141 , p19_a5 JTF_VARCHAR2_TABLE_200
142 , p19_a6 JTF_VARCHAR2_TABLE_200
143 , p19_a7 JTF_VARCHAR2_TABLE_200
144 , p19_a8 JTF_VARCHAR2_TABLE_200
145 , p19_a9 JTF_VARCHAR2_TABLE_200
146 , p19_a10 JTF_VARCHAR2_TABLE_200
147 , p19_a11 JTF_VARCHAR2_TABLE_200
148 , p19_a12 JTF_VARCHAR2_TABLE_200
149 , p19_a13 JTF_VARCHAR2_TABLE_200
150 , p19_a14 JTF_VARCHAR2_TABLE_200
151 , p19_a15 JTF_VARCHAR2_TABLE_200
152 , p19_a16 JTF_VARCHAR2_TABLE_200
153 , p19_a17 JTF_VARCHAR2_TABLE_200
154 , p19_a18 JTF_VARCHAR2_TABLE_200
155 , p19_a19 JTF_VARCHAR2_TABLE_200
156 , p19_a20 JTF_VARCHAR2_TABLE_100
157 , p19_a21 JTF_VARCHAR2_TABLE_200
158 , p19_a22 JTF_VARCHAR2_TABLE_200
159 , p19_a23 JTF_VARCHAR2_TABLE_200
160 , p19_a24 JTF_VARCHAR2_TABLE_200
161 , p19_a25 JTF_VARCHAR2_TABLE_200
162 , p19_a26 JTF_VARCHAR2_TABLE_200
163 , p19_a27 JTF_VARCHAR2_TABLE_200
164 , p19_a28 JTF_VARCHAR2_TABLE_200
165 , p19_a29 JTF_VARCHAR2_TABLE_200
166 , p19_a30 JTF_VARCHAR2_TABLE_200
167 , p19_a31 JTF_VARCHAR2_TABLE_200
168 , p19_a32 JTF_VARCHAR2_TABLE_200
169 , p19_a33 JTF_VARCHAR2_TABLE_200
170 , p19_a34 JTF_VARCHAR2_TABLE_200
171 , p19_a35 JTF_VARCHAR2_TABLE_200
172 , p19_a36 JTF_VARCHAR2_TABLE_200
173 , p19_a37 JTF_VARCHAR2_TABLE_200
174 , p19_a38 JTF_VARCHAR2_TABLE_200
175 , p19_a39 JTF_VARCHAR2_TABLE_200
176 , p19_a40 JTF_VARCHAR2_TABLE_200
177 , p19_a41 JTF_VARCHAR2_TABLE_200
178 , p19_a42 JTF_VARCHAR2_TABLE_200
179 , p19_a43 JTF_VARCHAR2_TABLE_200
180 , p19_a44 JTF_VARCHAR2_TABLE_200
181 , p19_a45 JTF_VARCHAR2_TABLE_200
182 , p19_a46 JTF_VARCHAR2_TABLE_200
183 , p19_a47 JTF_VARCHAR2_TABLE_200
184 , p19_a48 JTF_VARCHAR2_TABLE_200
185 , p19_a49 JTF_VARCHAR2_TABLE_200
186 , p19_a50 JTF_VARCHAR2_TABLE_200
187 , p19_a51 JTF_VARCHAR2_TABLE_200
188 , p19_a52 JTF_VARCHAR2_TABLE_200
189 , p19_a53 JTF_VARCHAR2_TABLE_200
190 , p19_a54 JTF_VARCHAR2_TABLE_200
191 , p19_a55 JTF_VARCHAR2_TABLE_200
192 , p19_a56 JTF_VARCHAR2_TABLE_100
193 , p_skip_workflow_flag VARCHAR2
194 , p_credit_method_installments VARCHAR2
195 , p_credit_method_rules VARCHAR2
196 , p_batch_source_name VARCHAR2
197 , p_org_id NUMBER
198 , x_request_id out nocopy VARCHAR2
199 , p26_a0 VARCHAR2
200 , p26_a1 VARCHAR2
201 , p26_a2 VARCHAR2
202 , p26_a3 VARCHAR2
203 , p26_a4 VARCHAR2
204 , p26_a5 VARCHAR2
205 , p26_a6 VARCHAR2
206 , p26_a7 VARCHAR2
207 , p26_a8 VARCHAR2
208 , p26_a9 VARCHAR2
209 , p26_a10 VARCHAR2
210 , p26_a11 VARCHAR2
211 , p26_a12 VARCHAR2
212 , p26_a13 VARCHAR2
213 , p26_a14 VARCHAR2
214 , p26_a15 VARCHAR2
215 , p27_a0 VARCHAR2
216 , p27_a1 VARCHAR2
217 , p27_a2 VARCHAR2
218 , p27_a3 VARCHAR2
219 , p27_a4 VARCHAR2
220 , p27_a5 VARCHAR2
221 , p27_a6 VARCHAR2
222 , p27_a7 VARCHAR2
223 , p27_a8 VARCHAR2
224 , p27_a9 VARCHAR2
225 , p27_a10 VARCHAR2
226 , p27_a11 VARCHAR2
227 , p27_a12 VARCHAR2
228 , p27_a13 VARCHAR2
229 , p27_a14 VARCHAR2
230 , p27_a15 VARCHAR2
231 , p28_a0 VARCHAR2
232 , p28_a1 VARCHAR2
233 , p28_a2 VARCHAR2
234 , p28_a3 VARCHAR2
235 , p28_a4 VARCHAR2
236 , p28_a5 VARCHAR2
237 , p28_a6 VARCHAR2
238 , p28_a7 VARCHAR2
239 , p28_a8 VARCHAR2
240 , p28_a9 VARCHAR2
241 , p28_a10 VARCHAR2
242 , p28_a11 VARCHAR2
243 , p28_a12 VARCHAR2
244 , p28_a13 VARCHAR2
245 , p28_a14 VARCHAR2
246 , p28_a15 VARCHAR2
247 , p28_a16 VARCHAR2
248 , p28_a17 VARCHAR2
249 , p28_a18 VARCHAR2
250 , p28_a19 VARCHAR2
251 , p28_a20 VARCHAR2
252 , p28_a21 VARCHAR2
253 , p28_a22 VARCHAR2
254 , p28_a23 VARCHAR2
255 , p28_a24 VARCHAR2
256 , p28_a25 VARCHAR2
257 , p28_a26 VARCHAR2
258 , p28_a27 VARCHAR2
259 , p28_a28 VARCHAR2
260 , p28_a29 VARCHAR2
261 , p28_a30 VARCHAR2
262 , p_dispute_date DATE
263 , p_internal_comment VARCHAR2
264 , p_trx_number NUMBER
265 , p_gl_date DATE
266 )
267
268 as
269 ddp_cm_line_tbl arw_cmreq_cover.cm_line_tbl_type_cover;
270 ddp_attribute_rec arw_cmreq_cover.pq_attribute_rec_type;
271 ddp_interface_attribute_rec arw_cmreq_cover.pq_interface_rec_type;
272 ddp_global_attribute_rec arw_cmreq_cover.pq_global_attribute_rec_type;
273 ddindx binary_integer; indx binary_integer;
274 begin
275
276 -- copy data to the local IN or IN-OUT args, if any
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296 arw_cmreq_cover_w.rosetta_table_copy_in_p7(ddp_cm_line_tbl, p19_a0
297 , p19_a1
298 , p19_a2
299 , p19_a3
300 , p19_a4
301 , p19_a5
302 , p19_a6
303 , p19_a7
304 , p19_a8
305 , p19_a9
306 , p19_a10
307 , p19_a11
308 , p19_a12
309 , p19_a13
310 , p19_a14
311 , p19_a15
312 , p19_a16
313 , p19_a17
314 , p19_a18
315 , p19_a19
316 , p19_a20
317 , p19_a21
318 , p19_a22
319 , p19_a23
320 , p19_a24
321 , p19_a25
322 , p19_a26
323 , p19_a27
324 , p19_a28
325 , p19_a29
326 , p19_a30
327 , p19_a31
328 , p19_a32
329 , p19_a33
330 , p19_a34
331 , p19_a35
332 , p19_a36
333 , p19_a37
334 , p19_a38
335 , p19_a39
336 , p19_a40
337 , p19_a41
338 , p19_a42
339 , p19_a43
340 , p19_a44
341 , p19_a45
342 , p19_a46
343 , p19_a47
344 , p19_a48
345 , p19_a49
346 , p19_a50
347 , p19_a51
348 , p19_a52
349 , p19_a53
350 , p19_a54
351 , p19_a55
352 , p19_a56
353 );
354
355
356
357
358
359
360
361 ddp_attribute_rec.attribute_category := p26_a0;
362 ddp_attribute_rec.attribute1 := p26_a1;
363 ddp_attribute_rec.attribute2 := p26_a2;
364 ddp_attribute_rec.attribute3 := p26_a3;
365 ddp_attribute_rec.attribute4 := p26_a4;
366 ddp_attribute_rec.attribute5 := p26_a5;
367 ddp_attribute_rec.attribute6 := p26_a6;
368 ddp_attribute_rec.attribute7 := p26_a7;
369 ddp_attribute_rec.attribute8 := p26_a8;
370 ddp_attribute_rec.attribute9 := p26_a9;
371 ddp_attribute_rec.attribute10 := p26_a10;
372 ddp_attribute_rec.attribute11 := p26_a11;
373 ddp_attribute_rec.attribute12 := p26_a12;
374 ddp_attribute_rec.attribute13 := p26_a13;
375 ddp_attribute_rec.attribute14 := p26_a14;
376 ddp_attribute_rec.attribute15 := p26_a15;
377
378 ddp_interface_attribute_rec.interface_header_context := p27_a0;
379 ddp_interface_attribute_rec.interface_header_attribute1 := p27_a1;
380 ddp_interface_attribute_rec.interface_header_attribute2 := p27_a2;
381 ddp_interface_attribute_rec.interface_header_attribute3 := p27_a3;
382 ddp_interface_attribute_rec.interface_header_attribute4 := p27_a4;
383 ddp_interface_attribute_rec.interface_header_attribute5 := p27_a5;
384 ddp_interface_attribute_rec.interface_header_attribute6 := p27_a6;
385 ddp_interface_attribute_rec.interface_header_attribute7 := p27_a7;
386 ddp_interface_attribute_rec.interface_header_attribute8 := p27_a8;
387 ddp_interface_attribute_rec.interface_header_attribute9 := p27_a9;
388 ddp_interface_attribute_rec.interface_header_attribute10 := p27_a10;
389 ddp_interface_attribute_rec.interface_header_attribute11 := p27_a11;
390 ddp_interface_attribute_rec.interface_header_attribute12 := p27_a12;
391 ddp_interface_attribute_rec.interface_header_attribute13 := p27_a13;
392 ddp_interface_attribute_rec.interface_header_attribute14 := p27_a14;
393 ddp_interface_attribute_rec.interface_header_attribute15 := p27_a15;
394
395 ddp_global_attribute_rec.global_attribute_category := p28_a0;
396 ddp_global_attribute_rec.global_attribute1 := p28_a1;
397 ddp_global_attribute_rec.global_attribute2 := p28_a2;
398 ddp_global_attribute_rec.global_attribute3 := p28_a3;
399 ddp_global_attribute_rec.global_attribute4 := p28_a4;
400 ddp_global_attribute_rec.global_attribute5 := p28_a5;
401 ddp_global_attribute_rec.global_attribute6 := p28_a6;
402 ddp_global_attribute_rec.global_attribute7 := p28_a7;
403 ddp_global_attribute_rec.global_attribute8 := p28_a8;
404 ddp_global_attribute_rec.global_attribute9 := p28_a9;
405 ddp_global_attribute_rec.global_attribute10 := p28_a10;
406 ddp_global_attribute_rec.global_attribute11 := p28_a11;
407 ddp_global_attribute_rec.global_attribute12 := p28_a12;
408 ddp_global_attribute_rec.global_attribute13 := p28_a13;
409 ddp_global_attribute_rec.global_attribute14 := p28_a14;
410 ddp_global_attribute_rec.global_attribute15 := p28_a15;
411 ddp_global_attribute_rec.global_attribute16 := p28_a16;
412 ddp_global_attribute_rec.global_attribute17 := p28_a17;
413 ddp_global_attribute_rec.global_attribute18 := p28_a18;
414 ddp_global_attribute_rec.global_attribute19 := p28_a19;
415 ddp_global_attribute_rec.global_attribute20 := p28_a20;
416 ddp_global_attribute_rec.global_attribute21 := p28_a21;
417 ddp_global_attribute_rec.global_attribute22 := p28_a22;
418 ddp_global_attribute_rec.global_attribute23 := p28_a23;
419 ddp_global_attribute_rec.global_attribute24 := p28_a24;
420 ddp_global_attribute_rec.global_attribute25 := p28_a25;
421 ddp_global_attribute_rec.global_attribute26 := p28_a26;
422 ddp_global_attribute_rec.global_attribute27 := p28_a27;
423 ddp_global_attribute_rec.global_attribute28 := p28_a28;
424 ddp_global_attribute_rec.global_attribute29 := p28_a29;
425 ddp_global_attribute_rec.global_attribute30 := p28_a30;
426
427
428
429
430
431 -- here's the delegated call to the old PL/SQL routine
432 ar_credit_memo_api_pub.create_request(p_api_version,
433 p_init_msg_list,
434 p_commit,
435 p_validation_level,
436 x_return_status,
437 x_msg_count,
438 x_msg_data,
439 p_customer_trx_id,
440 p_line_credit_flag,
441 p_line_amount,
442 p_tax_amount,
443 p_freight_amount,
444 p_cm_reason_code,
445 p_comments,
446 p_orig_trx_number,
447 p_tax_ex_cert_num,
448 p_request_url,
449 p_transaction_url,
450 p_trans_act_url,
451 ddp_cm_line_tbl,
452 p_skip_workflow_flag,
453 p_credit_method_installments,
454 p_credit_method_rules,
455 p_batch_source_name,
456 p_org_id,
457 x_request_id,
458 ddp_attribute_rec,
459 ddp_interface_attribute_rec,
460 ddp_global_attribute_rec,
461 p_dispute_date,
462 p_internal_comment,
463 p_trx_number,
464 p_gl_date);
465
466 -- copy data back from the local variables to OUT or IN-OUT args, if any
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499 end;
500
501 end ar_credit_memo_api_pub_w;