[Home] [Help]
PACKAGE BODY: APPS.CS_SR_DUP_CHK_PVT_W
Source
1 package body cs_sr_dup_chk_pvt_w as
2 /* $Header: csdupwb.pls 120.0 2011/12/16 11:47:11 shramana noship $ */
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 rosetta_g_mistake_date_high date := to_date('01/01/+4710', 'MM/DD/SYYYY');
6 rosetta_g_mistake_date_low date := to_date('01/01/-4710', 'MM/DD/SYYYY');
7
8 -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
9 function rosetta_g_miss_date_in_map(d date) return date as
10 begin
11 if d > rosetta_g_mistake_date_high then return fnd_api.g_miss_date; end if;
12 if d < rosetta_g_mistake_date_low then return fnd_api.g_miss_date; end if;
13 return d;
14 end;
15
16 procedure rosetta_table_copy_in_p1(t out nocopy cs_sr_dup_chk_pvt.cs_extended_attr_tbl, a0 JTF_NUMBER_TABLE
17 , a1 JTF_VARCHAR2_TABLE_100
18 , a2 JTF_VARCHAR2_TABLE_100
19 ) as
20 ddindx binary_integer; indx binary_integer;
21 begin
22 if a0 is not null and a0.count > 0 then
23 if a0.count > 0 then
24 indx := a0.first;
25 ddindx := 1;
26 while true loop
27 t(ddindx).incident_type_id := a0(indx);
28 t(ddindx).sr_attribute_code := a1(indx);
29 t(ddindx).sr_attribute_value := a2(indx);
30 ddindx := ddindx+1;
31 if a0.last =indx
32 then exit;
33 end if;
34 indx := a0.next(indx);
35 end loop;
36 end if;
37 end if;
38 end rosetta_table_copy_in_p1;
39 procedure rosetta_table_copy_out_p1(t cs_sr_dup_chk_pvt.cs_extended_attr_tbl, a0 out nocopy JTF_NUMBER_TABLE
40 , a1 out nocopy JTF_VARCHAR2_TABLE_100
41 , a2 out nocopy JTF_VARCHAR2_TABLE_100
42 ) as
43 ddindx binary_integer; indx binary_integer;
44 begin
45 if t is null or t.count = 0 then
46 a0 := JTF_NUMBER_TABLE();
47 a1 := JTF_VARCHAR2_TABLE_100();
48 a2 := JTF_VARCHAR2_TABLE_100();
49 else
50 a0 := JTF_NUMBER_TABLE();
51 a1 := JTF_VARCHAR2_TABLE_100();
52 a2 := JTF_VARCHAR2_TABLE_100();
53 if t.count > 0 then
54 a0.extend(t.count);
55 a1.extend(t.count);
56 a2.extend(t.count);
57 ddindx := t.first;
58 indx := 1;
59 while true loop
60 a0(indx) := t(ddindx).incident_type_id;
61 a1(indx) := t(ddindx).sr_attribute_code;
62 a2(indx) := t(ddindx).sr_attribute_value;
63 indx := indx+1;
64 if t.last =ddindx
65 then exit;
66 end if;
67 ddindx := t.next(ddindx);
68 end loop;
69 end if;
70 end if;
71 end rosetta_table_copy_out_p1;
72
73 procedure rosetta_table_copy_in_p3(t out nocopy cs_sr_dup_chk_pvt.sr_dupl_tbl, a0 JTF_NUMBER_TABLE
74 , a1 JTF_VARCHAR2_TABLE_2000
75 ) as
76 ddindx binary_integer; indx binary_integer;
77 begin
78 if a0 is not null and a0.count > 0 then
79 if a0.count > 0 then
80 indx := a0.first;
81 ddindx := 1;
82 while true loop
83 t(ddindx).incident_id := a0(indx);
84 t(ddindx).reason_desc := a1(indx);
85 ddindx := ddindx+1;
86 if a0.last =indx
87 then exit;
88 end if;
89 indx := a0.next(indx);
90 end loop;
91 end if;
92 end if;
93 end rosetta_table_copy_in_p3;
94 procedure rosetta_table_copy_out_p3(t cs_sr_dup_chk_pvt.sr_dupl_tbl, a0 out nocopy JTF_NUMBER_TABLE
95 , a1 out nocopy JTF_VARCHAR2_TABLE_2000
96 ) as
97 ddindx binary_integer; indx binary_integer;
98 begin
99 if t is null or t.count = 0 then
100 a0 := JTF_NUMBER_TABLE();
101 a1 := JTF_VARCHAR2_TABLE_2000();
102 else
103 a0 := JTF_NUMBER_TABLE();
104 a1 := JTF_VARCHAR2_TABLE_2000();
105 if t.count > 0 then
106 a0.extend(t.count);
107 a1.extend(t.count);
108 ddindx := t.first;
109 indx := 1;
110 while true loop
111 a0(indx) := t(ddindx).incident_id;
112 a1(indx) := t(ddindx).reason_desc;
113 indx := indx+1;
117 ddindx := t.next(ddindx);
114 if t.last =ddindx
115 then exit;
116 end if;
118 end loop;
119 end if;
120 end if;
121 end rosetta_table_copy_out_p3;
122
123 procedure rosetta_table_copy_in_p5(t out nocopy cs_sr_dup_chk_pvt.sr_dupl_link_tbl, a0 JTF_NUMBER_TABLE
124 , a1 JTF_NUMBER_TABLE
125 , a2 JTF_NUMBER_TABLE
126 , a3 JTF_VARCHAR2_TABLE_2000
127 ) as
128 ddindx binary_integer; indx binary_integer;
129 begin
130 if a0 is not null and a0.count > 0 then
131 if a0.count > 0 then
132 indx := a0.first;
133 ddindx := 1;
134 while true loop
135 t(ddindx).incident_id := a0(indx);
136 t(ddindx).incident_link_id := a1(indx);
137 t(ddindx).incident_link_number := a2(indx);
138 t(ddindx).reason_desc := a3(indx);
139 ddindx := ddindx+1;
140 if a0.last =indx
141 then exit;
142 end if;
143 indx := a0.next(indx);
144 end loop;
145 end if;
146 end if;
147 end rosetta_table_copy_in_p5;
148 procedure rosetta_table_copy_out_p5(t cs_sr_dup_chk_pvt.sr_dupl_link_tbl, a0 out nocopy JTF_NUMBER_TABLE
149 , a1 out nocopy JTF_NUMBER_TABLE
150 , a2 out nocopy JTF_NUMBER_TABLE
151 , a3 out nocopy JTF_VARCHAR2_TABLE_2000
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 a1 := JTF_NUMBER_TABLE();
158 a2 := JTF_NUMBER_TABLE();
159 a3 := JTF_VARCHAR2_TABLE_2000();
160 else
161 a0 := JTF_NUMBER_TABLE();
162 a1 := JTF_NUMBER_TABLE();
163 a2 := JTF_NUMBER_TABLE();
164 a3 := JTF_VARCHAR2_TABLE_2000();
165 if t.count > 0 then
166 a0.extend(t.count);
167 a1.extend(t.count);
168 a2.extend(t.count);
169 a3.extend(t.count);
170 ddindx := t.first;
171 indx := 1;
172 while true loop
173 a0(indx) := t(ddindx).incident_id;
174 a1(indx) := t(ddindx).incident_link_id;
175 a2(indx) := t(ddindx).incident_link_number;
176 a3(indx) := t(ddindx).reason_desc;
177 indx := indx+1;
178 if t.last =ddindx
179 then exit;
180 end if;
181 ddindx := t.next(ddindx);
182 end loop;
183 end if;
184 end if;
185 end rosetta_table_copy_out_p5;
186
187 procedure duplicate_check(p_api_version NUMBER
188 , p_init_msg_list VARCHAR2
189 , p_commit VARCHAR2
190 , p_validation_level NUMBER
191 , p_incident_id NUMBER
192 , p_incident_type_id NUMBER
193 , p_customer_product_id NUMBER
194 , p_instance_serial_number VARCHAR2
195 , p_current_serial_number VARCHAR2
196 , p_inv_item_serial_number VARCHAR2
197 , p_customer_id NUMBER
198 , p_inventory_item_id NUMBER
199 , p12_a0 JTF_NUMBER_TABLE
200 , p12_a1 JTF_VARCHAR2_TABLE_100
201 , p12_a2 JTF_VARCHAR2_TABLE_100
202 , p13_a0 VARCHAR2
203 , p13_a1 VARCHAR2
204 , p13_a2 VARCHAR2
205 , p13_a3 VARCHAR2
206 , p13_a4 VARCHAR2
207 , p13_a5 VARCHAR2
208 , p13_a6 VARCHAR2
209 , x_duplicate_flag out nocopy VARCHAR2
210 , p15_a0 out nocopy JTF_NUMBER_TABLE
211 , p15_a1 out nocopy JTF_VARCHAR2_TABLE_2000
212 , x_dup_found_at out nocopy VARCHAR2
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_cs_extended_attr cs_sr_dup_chk_pvt.cs_extended_attr_tbl;
220 ddp_incident_address cs_sr_dup_chk_pvt.cs_incident_address_rec;
221 ddx_sr_dupl_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
222 ddindx binary_integer; indx binary_integer;
223 begin
224
225 -- copy data to the local IN or IN-OUT args, if any
226
227
228
229
230
231
232
233
234
235
236
237
238 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p1(ddp_cs_extended_attr, p12_a0
239 , p12_a1
240 , p12_a2
241 );
242
243 ddp_incident_address.incident_address := p13_a0;
244 ddp_incident_address.incident_city := p13_a1;
245 ddp_incident_address.incident_state := p13_a2;
246 ddp_incident_address.incident_country := p13_a3;
247 ddp_incident_address.incident_province := p13_a4;
248 ddp_incident_address.incident_postal_code := p13_a5;
249 ddp_incident_address.incident_county := p13_a6;
250
251
252
253
254
255
256
257 -- here's the delegated call to the old PL/SQL routine
258 cs_sr_dup_chk_pvt.duplicate_check(p_api_version,
259 p_init_msg_list,
260 p_commit,
261 p_validation_level,
262 p_incident_id,
263 p_incident_type_id,
264 p_customer_product_id,
265 p_instance_serial_number,
266 p_current_serial_number,
267 p_inv_item_serial_number,
268 p_customer_id,
269 p_inventory_item_id,
270 ddp_cs_extended_attr,
271 ddp_incident_address,
272 x_duplicate_flag,
273 ddx_sr_dupl_rec,
274 x_dup_found_at,
275 x_return_status,
276 x_msg_count,
277 x_msg_data);
278
279 -- copy data back from the local variables to OUT or IN-OUT args, if any
280
281
282
283
284
285
286
287
288
289
293
290
291
292
294
295 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p3(ddx_sr_dupl_rec, p15_a0
296 , p15_a1
297 );
298
299
300
301
302 end;
303
304 procedure check_ea_duplicate_setup(p_incident_id NUMBER
305 , p_incident_type_id NUMBER
306 , p2_a0 JTF_NUMBER_TABLE
307 , p2_a1 JTF_VARCHAR2_TABLE_100
308 , p2_a2 JTF_VARCHAR2_TABLE_100
309 , p3_a0 VARCHAR2
310 , p3_a1 VARCHAR2
311 , p3_a2 VARCHAR2
312 , p3_a3 VARCHAR2
313 , p3_a4 VARCHAR2
314 , p3_a5 VARCHAR2
315 , p3_a6 VARCHAR2
316 , p_ea_attr_dup_flag in out nocopy VARCHAR2
317 , p5_a0 out nocopy JTF_NUMBER_TABLE
318 , p5_a1 out nocopy JTF_VARCHAR2_TABLE_2000
319 , p_ea_ia_dup out nocopy VARCHAR2
320 , p_ea_ea_dup out nocopy VARCHAR2
321 , p_return_status out nocopy VARCHAR2
322 )
323
324 as
325 ddp_cs_extended_attr cs_sr_dup_chk_pvt.cs_extended_attr_tbl;
326 ddp_incident_address cs_sr_dup_chk_pvt.cs_incident_address_rec;
327 ddp_cs_ea_dup_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
328 ddindx binary_integer; indx binary_integer;
329 begin
330
331 -- copy data to the local IN or IN-OUT args, if any
332
333
334 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p1(ddp_cs_extended_attr, p2_a0
335 , p2_a1
336 , p2_a2
337 );
338
339 ddp_incident_address.incident_address := p3_a0;
340 ddp_incident_address.incident_city := p3_a1;
341 ddp_incident_address.incident_state := p3_a2;
342 ddp_incident_address.incident_country := p3_a3;
343 ddp_incident_address.incident_province := p3_a4;
344 ddp_incident_address.incident_postal_code := p3_a5;
345 ddp_incident_address.incident_county := p3_a6;
346
347
348
349
350
351
352 -- here's the delegated call to the old PL/SQL routine
353 cs_sr_dup_chk_pvt.check_ea_duplicate_setup(p_incident_id,
354 p_incident_type_id,
355 ddp_cs_extended_attr,
356 ddp_incident_address,
357 p_ea_attr_dup_flag,
358 ddp_cs_ea_dup_rec,
359 p_ea_ia_dup,
360 p_ea_ea_dup,
361 p_return_status);
362
363 -- copy data back from the local variables to OUT or IN-OUT args, if any
364
365
366
367
368
369 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p3(ddp_cs_ea_dup_rec, p5_a0
370 , p5_a1
371 );
372
373
374
375 end;
376
377 procedure perform_ea_duplicate(p_incident_id NUMBER
378 , p_incident_type_id NUMBER
379 , p2_a0 JTF_NUMBER_TABLE
380 , p2_a1 JTF_VARCHAR2_TABLE_100
381 , p2_a2 JTF_VARCHAR2_TABLE_100
382 , p3_a0 VARCHAR2
383 , p3_a1 VARCHAR2
384 , p3_a2 VARCHAR2
385 , p3_a3 VARCHAR2
386 , p3_a4 VARCHAR2
387 , p3_a5 VARCHAR2
388 , p3_a6 VARCHAR2
389 , p_ea_attr_dup_flag in out nocopy VARCHAR2
390 , p5_a0 out nocopy JTF_NUMBER_TABLE
391 , p5_a1 out nocopy JTF_VARCHAR2_TABLE_2000
392 , p_ea_ia_dup out nocopy VARCHAR2
393 , p_ea_ea_dup out nocopy VARCHAR2
394 , p_return_status out nocopy VARCHAR2
395 )
396
397 as
398 ddp_cs_extended_attr cs_sr_dup_chk_pvt.cs_extended_attr_tbl;
399 ddp_incident_address cs_sr_dup_chk_pvt.cs_incident_address_rec;
400 ddp_cs_ea_dup_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
401 ddindx binary_integer; indx binary_integer;
402 begin
403
404 -- copy data to the local IN or IN-OUT args, if any
405
406
407 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p1(ddp_cs_extended_attr, p2_a0
408 , p2_a1
409 , p2_a2
410 );
411
412 ddp_incident_address.incident_address := p3_a0;
413 ddp_incident_address.incident_city := p3_a1;
414 ddp_incident_address.incident_state := p3_a2;
415 ddp_incident_address.incident_country := p3_a3;
416 ddp_incident_address.incident_province := p3_a4;
417 ddp_incident_address.incident_postal_code := p3_a5;
418 ddp_incident_address.incident_county := p3_a6;
419
420
421
422
423
424
425 -- here's the delegated call to the old PL/SQL routine
426 cs_sr_dup_chk_pvt.perform_ea_duplicate(p_incident_id,
427 p_incident_type_id,
428 ddp_cs_extended_attr,
429 ddp_incident_address,
430 p_ea_attr_dup_flag,
431 ddp_cs_ea_dup_rec,
432 p_ea_ia_dup,
433 p_ea_ea_dup,
434 p_return_status);
435
436 -- copy data back from the local variables to OUT or IN-OUT args, if any
437
438
439
440
441
442 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p3(ddp_cs_ea_dup_rec, p5_a0
443 , p5_a1
444 );
445
446
447
448 end;
449
450 procedure perform_dup_on_sr_field(p_customer_product_id NUMBER
451 , p_customer_id NUMBER
452 , p_inventory_item_id NUMBER
453 , p_instance_serial_number VARCHAR2
454 , p_current_serial_number VARCHAR2
455 , p_inv_item_serial_number VARCHAR2
456 , p_incident_id NUMBER
457 , p7_a0 in out nocopy JTF_NUMBER_TABLE
458 , p7_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
459 , p_cs_sr_dup_flag in out nocopy VARCHAR2
460 , p_dup_from in out nocopy NUMBER
461 , p_return_status out nocopy VARCHAR2
462 )
463
464 as
465 ddp_cs_sr_dup_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
466 ddindx binary_integer; indx binary_integer;
467 begin
468
469 -- copy data to the local IN or IN-OUT args, if any
473
470
471
472
474
475
476
477 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p3(ddp_cs_sr_dup_rec, p7_a0
478 , p7_a1
479 );
480
481
482
483
484 -- here's the delegated call to the old PL/SQL routine
485 cs_sr_dup_chk_pvt.perform_dup_on_sr_field(p_customer_product_id,
486 p_customer_id,
487 p_inventory_item_id,
488 p_instance_serial_number,
489 p_current_serial_number,
490 p_inv_item_serial_number,
491 p_incident_id,
492 ddp_cs_sr_dup_rec,
493 p_cs_sr_dup_flag,
494 p_dup_from,
495 p_return_status);
496
497 -- copy data back from the local variables to OUT or IN-OUT args, if any
498
499
500
501
502
503
504
505 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p3(ddp_cs_sr_dup_rec, p7_a0
506 , p7_a1
507 );
508
509
510
511 end;
512
513 procedure check_sr_instance_dup(p_customer_product_id NUMBER
514 , p_incident_id NUMBER
515 , p2_a0 in out nocopy JTF_NUMBER_TABLE
516 , p2_a1 in out nocopy JTF_NUMBER_TABLE
517 , p2_a2 in out nocopy JTF_NUMBER_TABLE
518 , p2_a3 in out nocopy JTF_VARCHAR2_TABLE_2000
519 , p_cs_sr_dup_flag in out nocopy VARCHAR2
520 , p_return_status out nocopy VARCHAR2
521 )
522
523 as
524 ddp_cs_sr_dup_link_rec cs_sr_dup_chk_pvt.sr_dupl_link_tbl;
525 ddindx binary_integer; indx binary_integer;
526 begin
527
528 -- copy data to the local IN or IN-OUT args, if any
529
530
531 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p5(ddp_cs_sr_dup_link_rec, p2_a0
532 , p2_a1
533 , p2_a2
534 , p2_a3
535 );
536
537
538
539 -- here's the delegated call to the old PL/SQL routine
540 cs_sr_dup_chk_pvt.check_sr_instance_dup(p_customer_product_id,
541 p_incident_id,
542 ddp_cs_sr_dup_link_rec,
543 p_cs_sr_dup_flag,
544 p_return_status);
545
546 -- copy data back from the local variables to OUT or IN-OUT args, if any
547
548
549 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p5(ddp_cs_sr_dup_link_rec, p2_a0
550 , p2_a1
551 , p2_a2
552 , p2_a3
553 );
554
555
556 end;
557
558 procedure check_sr_serialnum_dup(p_instance_serial_number VARCHAR2
559 , p_current_serial_number VARCHAR2
560 , p_inv_item_serial_number VARCHAR2
561 , p_incident_id NUMBER
562 , p4_a0 in out nocopy JTF_NUMBER_TABLE
563 , p4_a1 in out nocopy JTF_NUMBER_TABLE
564 , p4_a2 in out nocopy JTF_NUMBER_TABLE
565 , p4_a3 in out nocopy JTF_VARCHAR2_TABLE_2000
566 , p_cs_sr_dup_flag in out nocopy VARCHAR2
567 , p_return_status out nocopy VARCHAR2
568 )
569
570 as
571 ddp_cs_sr_dup_link_rec cs_sr_dup_chk_pvt.sr_dupl_link_tbl;
572 ddindx binary_integer; indx binary_integer;
573 begin
574
575 -- copy data to the local IN or IN-OUT args, if any
576
577
578
579
580 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p5(ddp_cs_sr_dup_link_rec, p4_a0
581 , p4_a1
582 , p4_a2
583 , p4_a3
584 );
585
586
587
588 -- here's the delegated call to the old PL/SQL routine
589 cs_sr_dup_chk_pvt.check_sr_serialnum_dup(p_instance_serial_number,
590 p_current_serial_number,
591 p_inv_item_serial_number,
592 p_incident_id,
593 ddp_cs_sr_dup_link_rec,
594 p_cs_sr_dup_flag,
595 p_return_status);
596
597 -- copy data back from the local variables to OUT or IN-OUT args, if any
598
599
600
601
602 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p5(ddp_cs_sr_dup_link_rec, p4_a0
603 , p4_a1
604 , p4_a2
605 , p4_a3
606 );
607
608
609 end;
610
611 procedure check_sr_custprod_dup(p_customer_id NUMBER
612 , p_inventory_item_id NUMBER
613 , p_incident_id NUMBER
614 , p3_a0 in out nocopy JTF_NUMBER_TABLE
615 , p3_a1 in out nocopy JTF_NUMBER_TABLE
616 , p3_a2 in out nocopy JTF_NUMBER_TABLE
617 , p3_a3 in out nocopy JTF_VARCHAR2_TABLE_2000
618 , p_cs_sr_dup_flag in out nocopy VARCHAR2
619 , p_return_status out nocopy VARCHAR2
620 )
621
622 as
623 ddp_cs_sr_dup_link_rec cs_sr_dup_chk_pvt.sr_dupl_link_tbl;
624 ddindx binary_integer; indx binary_integer;
625 begin
626
627 -- copy data to the local IN or IN-OUT args, if any
628
629
630
631 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p5(ddp_cs_sr_dup_link_rec, p3_a0
632 , p3_a1
633 , p3_a2
634 , p3_a3
635 );
636
637
638
639 -- here's the delegated call to the old PL/SQL routine
640 cs_sr_dup_chk_pvt.check_sr_custprod_dup(p_customer_id,
641 p_inventory_item_id,
642 p_incident_id,
643 ddp_cs_sr_dup_link_rec,
644 p_cs_sr_dup_flag,
645 p_return_status);
646
647 -- copy data back from the local variables to OUT or IN-OUT args, if any
648
649
650
651 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p5(ddp_cs_sr_dup_link_rec, p3_a0
652 , p3_a1
653 , p3_a2
654 , p3_a3
655 );
656
657
658 end;
659
663 , p_current_serial_number VARCHAR2
660 procedure check_sr_custprodserial_dup(p_customer_id NUMBER
661 , p_inventory_item_id NUMBER
662 , p_instance_serial_number VARCHAR2
664 , p_inv_item_serial_number VARCHAR2
665 , p_incident_id NUMBER
666 , p6_a0 in out nocopy JTF_NUMBER_TABLE
667 , p6_a1 in out nocopy JTF_NUMBER_TABLE
668 , p6_a2 in out nocopy JTF_NUMBER_TABLE
669 , p6_a3 in out nocopy JTF_VARCHAR2_TABLE_2000
670 , p_cs_sr_dup_flag in out nocopy VARCHAR2
671 , p_return_status out nocopy VARCHAR2
672 )
673
674 as
675 ddp_cs_sr_dup_link_rec cs_sr_dup_chk_pvt.sr_dupl_link_tbl;
676 ddindx binary_integer; indx binary_integer;
677 begin
678
679 -- copy data to the local IN or IN-OUT args, if any
680
681
682
683
684
685
686 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p5(ddp_cs_sr_dup_link_rec, p6_a0
687 , p6_a1
688 , p6_a2
689 , p6_a3
690 );
691
692
693
694 -- here's the delegated call to the old PL/SQL routine
695 cs_sr_dup_chk_pvt.check_sr_custprodserial_dup(p_customer_id,
696 p_inventory_item_id,
697 p_instance_serial_number,
698 p_current_serial_number,
699 p_inv_item_serial_number,
700 p_incident_id,
701 ddp_cs_sr_dup_link_rec,
702 p_cs_sr_dup_flag,
703 p_return_status);
704
705 -- copy data back from the local variables to OUT or IN-OUT args, if any
706
707
708
709
710
711
712 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p5(ddp_cs_sr_dup_link_rec, p6_a0
713 , p6_a1
714 , p6_a2
715 , p6_a3
716 );
717
718
719 end;
720
721 procedure construct_unique_list_dup_sr(p0_a0 JTF_NUMBER_TABLE
722 , p0_a1 JTF_VARCHAR2_TABLE_2000
723 , p_ea_attr_dup_flag VARCHAR2
724 , p2_a0 JTF_NUMBER_TABLE
725 , p2_a1 JTF_VARCHAR2_TABLE_2000
726 , p_cs_sr_dup_flag VARCHAR2
727 , p_dup_from NUMBER
728 , p_ea_ea_dup VARCHAR2
729 , p_ea_ia_dup VARCHAR2
730 , p7_a0 in out nocopy JTF_NUMBER_TABLE
731 , p7_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
732 , p_duplicate_flag in out nocopy VARCHAR2
733 , p_return_status out nocopy VARCHAR2
734 )
735
736 as
737 ddp_cs_ea_dup_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
738 ddp_cs_sr_dup_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
739 ddp_sr_dup_rec cs_sr_dup_chk_pvt.sr_dupl_tbl;
740 ddindx binary_integer; indx binary_integer;
741 begin
742
743 -- copy data to the local IN or IN-OUT args, if any
744 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p3(ddp_cs_ea_dup_rec, p0_a0
745 , p0_a1
746 );
747
748
749 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p3(ddp_cs_sr_dup_rec, p2_a0
750 , p2_a1
751 );
752
753
754
755
756
757 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p3(ddp_sr_dup_rec, p7_a0
758 , p7_a1
759 );
760
761
762
763 -- here's the delegated call to the old PL/SQL routine
764 cs_sr_dup_chk_pvt.construct_unique_list_dup_sr(ddp_cs_ea_dup_rec,
765 p_ea_attr_dup_flag,
766 ddp_cs_sr_dup_rec,
767 p_cs_sr_dup_flag,
768 p_dup_from,
769 p_ea_ea_dup,
770 p_ea_ia_dup,
771 ddp_sr_dup_rec,
772 p_duplicate_flag,
773 p_return_status);
774
775 -- copy data back from the local variables to OUT or IN-OUT args, if any
776
777
778
779
780
781
782
783 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p3(ddp_sr_dup_rec, p7_a0
784 , p7_a1
785 );
786
787
788 end;
789
790 procedure check_dup_sr_link(p0_a0 JTF_NUMBER_TABLE
791 , p0_a1 JTF_NUMBER_TABLE
792 , p0_a2 JTF_NUMBER_TABLE
793 , p0_a3 JTF_VARCHAR2_TABLE_2000
794 , p1_a0 in out nocopy JTF_NUMBER_TABLE
795 , p1_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
796 , p_return_status out nocopy VARCHAR2
797 )
798
799 as
800 ddp_dup_found_tbl cs_sr_dup_chk_pvt.sr_dupl_link_tbl;
801 ddp_dup_tbl cs_sr_dup_chk_pvt.sr_dupl_tbl;
802 ddindx binary_integer; indx binary_integer;
803 begin
804
805 -- copy data to the local IN or IN-OUT args, if any
806 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p5(ddp_dup_found_tbl, p0_a0
807 , p0_a1
808 , p0_a2
809 , p0_a3
810 );
811
812 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p3(ddp_dup_tbl, p1_a0
813 , p1_a1
814 );
815
816
817 -- here's the delegated call to the old PL/SQL routine
818 cs_sr_dup_chk_pvt.check_dup_sr_link(ddp_dup_found_tbl,
819 ddp_dup_tbl,
820 p_return_status);
821
822 -- copy data back from the local variables to OUT or IN-OUT args, if any
823
824 cs_sr_dup_chk_pvt_w.rosetta_table_copy_out_p3(ddp_dup_tbl, p1_a0
825 , p1_a1
826 );
827
828 end;
829
830 function check_if_already_in_list(p0_a0 JTF_NUMBER_TABLE
831 , p0_a1 JTF_VARCHAR2_TABLE_2000
832 , p_sr_link_id NUMBER
833 ) return varchar2
834
835 as
836 ddp_dup_tbl cs_sr_dup_chk_pvt.sr_dupl_tbl;
837 ddindx binary_integer; indx binary_integer;
838 ddrosetta_retval varchar2(4000);
842 cs_sr_dup_chk_pvt_w.rosetta_table_copy_in_p3(ddp_dup_tbl, p0_a0
839 begin
840
841 -- copy data to the local IN or IN-OUT args, if any
843 , p0_a1
844 );
845
846
847 -- here's the delegated call to the old PL/SQL routine
848 ddrosetta_retval := cs_sr_dup_chk_pvt.check_if_already_in_list(ddp_dup_tbl,
849 p_sr_link_id);
850
851 -- copy data back from the local variables to OUT or IN-OUT args, if any
852
853
854 return ddrosetta_retval;
855 end;
856
857 end cs_sr_dup_chk_pvt_w;