[Home] [Help]
PACKAGE BODY: APPS.OKC_AQ_PVT_W
Source
1 package body okc_aq_pvt_w as
2 /* $Header: okc_aq_pvt_w_b.pls 120.0 2005/05/26 09:36:50 appldev noship $ */
3
4 procedure rosetta_table_copy_in_p1(t out nocopy okc_aq_pvt.msg_tab_typ, a0 JTF_VARCHAR2_TABLE_200
5 , a1 JTF_VARCHAR2_TABLE_300
6 ) as
7 ddindx binary_integer; indx binary_integer;
8 begin
9 if a0 is not null and a0.count=0 then
10 t := okc_aq_pvt.msg_tab_typ();
11 elsif a0 is not null and a0.count > 0 then
12 if a0.count > 0 then
13 t := okc_aq_pvt.msg_tab_typ();
14 t.extend(a0.count);
15 indx := a0.first;
16 ddindx := 1;
17 while true loop
18 t(ddindx).element_name := a0(indx);
19 t(ddindx).element_value := a1(indx);
20 ddindx := ddindx+1;
21 if a0.last =indx
22 then exit;
23 end if;
24 indx := a0.next(indx);
25 end loop;
26 end if;
27 end if;
28 end rosetta_table_copy_in_p1;
29
30 procedure rosetta_table_copy_out_p1(t okc_aq_pvt.msg_tab_typ, a0 out nocopy JTF_VARCHAR2_TABLE_200
31 , a1 out nocopy JTF_VARCHAR2_TABLE_300
32 ) as
33 ddindx binary_integer; indx binary_integer;
34 begin
35 if t is null then
36 a0 := null;
37 a1 := null;
38 elsif t.count = 0 then
39 a0 := JTF_VARCHAR2_TABLE_200();
40 a1 := JTF_VARCHAR2_TABLE_300();
41 else
42 a0 := JTF_VARCHAR2_TABLE_200();
43 a1 := JTF_VARCHAR2_TABLE_300();
44 if t.count > 0 then
45 a0.extend(t.count);
46 a1.extend(t.count);
47 ddindx := t.first;
48 indx := 1;
49 while true loop
50 a0(indx) := t(ddindx).element_name;
51 a1(indx) := t(ddindx).element_value;
52 indx := indx+1;
53 if t.last =ddindx
54 then exit;
55 end if;
56 ddindx := t.next(ddindx);
57 end loop;
58 end if;
59 end if;
60 end rosetta_table_copy_out_p1;
61
62 end okc_aq_pvt_w;