DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_JTOT_CONTACT_EXTRACT_PUB_W

Source


1 package body okl_jtot_contact_extract_pub_w as
2   /* $Header: OKLUJCXB.pls 120.1 2005/09/30 21:05:01 cklee 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 
6   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
7   function rosetta_g_miss_date_in_map(d date) return date as
8   begin
9     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
10     return d;
11   end;
12 
13   function rosetta_g_miss_num_map(n number) return number as
14     a number := fnd_api.g_miss_num;
15     b number := 0-1962.0724;
16   begin
17     if n=a then return b; end if;
18     if n=b then return a; end if;
19     return n;
20   end;
21 
22   procedure rosetta_table_copy_in_p1(t out nocopy okl_jtot_contact_extract_pub.party_tab_type, a0 JTF_VARCHAR2_TABLE_100
23     , a1 JTF_VARCHAR2_TABLE_100
24     , a2 JTF_VARCHAR2_TABLE_200
25     , a3 JTF_VARCHAR2_TABLE_300
26     , a4 JTF_VARCHAR2_TABLE_300
27     , a5 JTF_VARCHAR2_TABLE_100
28     ) as
29     ddindx binary_integer; indx binary_integer;
30   begin
31   if a0 is not null and a0.count > 0 then
32       if a0.count > 0 then
33         indx := a0.first;
34         ddindx := 1;
35         while true loop
36           t(ddindx).rle_code := a0(indx);
37           t(ddindx).id1 := a1(indx);
38           t(ddindx).id2 := a2(indx);
39           t(ddindx).name := a3(indx);
40           t(ddindx).description := a4(indx);
41           t(ddindx).object_code := a5(indx);
42           ddindx := ddindx+1;
43           if a0.last =indx
44             then exit;
45           end if;
46           indx := a0.next(indx);
47         end loop;
48       end if;
49    end if;
50   end rosetta_table_copy_in_p1;
51   procedure rosetta_table_copy_out_p1(t okl_jtot_contact_extract_pub.party_tab_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
52     , a1 out nocopy JTF_VARCHAR2_TABLE_100
53     , a2 out nocopy JTF_VARCHAR2_TABLE_200
54     , a3 out nocopy JTF_VARCHAR2_TABLE_300
55     , a4 out nocopy JTF_VARCHAR2_TABLE_300
56     , a5 out nocopy JTF_VARCHAR2_TABLE_100
57     ) as
58     ddindx binary_integer; indx binary_integer;
59   begin
60   if t is null or t.count = 0 then
61     a0 := JTF_VARCHAR2_TABLE_100();
62     a1 := JTF_VARCHAR2_TABLE_100();
63     a2 := JTF_VARCHAR2_TABLE_200();
64     a3 := JTF_VARCHAR2_TABLE_300();
65     a4 := JTF_VARCHAR2_TABLE_300();
66     a5 := JTF_VARCHAR2_TABLE_100();
67   else
68       a0 := JTF_VARCHAR2_TABLE_100();
69       a1 := JTF_VARCHAR2_TABLE_100();
70       a2 := JTF_VARCHAR2_TABLE_200();
71       a3 := JTF_VARCHAR2_TABLE_300();
72       a4 := JTF_VARCHAR2_TABLE_300();
73       a5 := JTF_VARCHAR2_TABLE_100();
74       if t.count > 0 then
75         a0.extend(t.count);
76         a1.extend(t.count);
77         a2.extend(t.count);
78         a3.extend(t.count);
79         a4.extend(t.count);
80         a5.extend(t.count);
81         ddindx := t.first;
82         indx := 1;
83         while true loop
84           a0(indx) := t(ddindx).rle_code;
85           a1(indx) := t(ddindx).id1;
86           a2(indx) := t(ddindx).id2;
87           a3(indx) := t(ddindx).name;
88           a4(indx) := t(ddindx).description;
89           a5(indx) := t(ddindx).object_code;
90           indx := indx+1;
91           if t.last =ddindx
92             then exit;
93           end if;
94           ddindx := t.next(ddindx);
95         end loop;
96       end if;
97    end if;
98   end rosetta_table_copy_out_p1;
99 
100   procedure get_party(p_api_version  NUMBER
101     , p_init_msg_list  VARCHAR2
102     , x_return_status out nocopy  VARCHAR2
103     , x_msg_count out nocopy  NUMBER
104     , x_msg_data out nocopy  VARCHAR2
105     , p_chr_id  VARCHAR2
106     , p_cle_id  VARCHAR2
107     , p_role_code  VARCHAR2
108     , p_intent  VARCHAR2
109     , p9_a0 out nocopy JTF_VARCHAR2_TABLE_100
110     , p9_a1 out nocopy JTF_VARCHAR2_TABLE_100
111     , p9_a2 out nocopy JTF_VARCHAR2_TABLE_200
112     , p9_a3 out nocopy JTF_VARCHAR2_TABLE_300
113     , p9_a4 out nocopy JTF_VARCHAR2_TABLE_300
114     , p9_a5 out nocopy JTF_VARCHAR2_TABLE_100
115   )
116 
117   as
118     ddx_party_tab okl_jtot_contact_extract_pub.party_tab_type;
119     ddindx binary_integer; indx binary_integer;
120   begin
121 
122     -- copy data to the local IN or IN-OUT args, if any
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133     -- here's the delegated call to the old PL/SQL routine
134     okl_jtot_contact_extract_pub.get_party(p_api_version,
135       p_init_msg_list,
136       x_return_status,
137       x_msg_count,
138       x_msg_data,
139       p_chr_id,
140       p_cle_id,
141       p_role_code,
142       p_intent,
143       ddx_party_tab);
144 
145     -- copy data back from the local variables to OUT or IN-OUT args, if any
146 
147 
148 
149 
150 
151 
152 
153 
154 
155     okl_jtot_contact_extract_pub_w.rosetta_table_copy_out_p1(ddx_party_tab, p9_a0
156       , p9_a1
157       , p9_a2
158       , p9_a3
159       , p9_a4
160       , p9_a5
161       );
162   end;
163 
164 end okl_jtot_contact_extract_pub_w;