[Home] [Help]
PACKAGE BODY: APPS.OKL_JTOT_EXTRACT_W
Source
1 package body okl_jtot_extract_w as
2 /* $Header: OKLEJEXB.pls 120.2 2005/12/07 19:54:43 smereddy 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_p4(t out nocopy okl_jtot_extract.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_p4;
51 procedure rosetta_table_copy_out_p4(t okl_jtot_extract.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_p4;
99
100 procedure rosetta_table_copy_in_p6(t out nocopy okl_jtot_extract.rle_code_tbl_type, a0 JTF_VARCHAR2_TABLE_100
101 , a1 JTF_VARCHAR2_TABLE_100
102 ) as
103 ddindx binary_integer; indx binary_integer;
104 begin
105 if a0 is not null and a0.count > 0 then
106 if a0.count > 0 then
107 indx := a0.first;
108 ddindx := 1;
109 while true loop
110 t(ddindx).scs_code := a0(indx);
111 t(ddindx).rle_code := a1(indx);
112 ddindx := ddindx+1;
113 if a0.last =indx
114 then exit;
115 end if;
116 indx := a0.next(indx);
117 end loop;
118 end if;
119 end if;
120 end rosetta_table_copy_in_p6;
121 procedure rosetta_table_copy_out_p6(t okl_jtot_extract.rle_code_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
122 , a1 out nocopy JTF_VARCHAR2_TABLE_100
123 ) as
124 ddindx binary_integer; indx binary_integer;
125 begin
126 if t is null or t.count = 0 then
127 a0 := JTF_VARCHAR2_TABLE_100();
128 a1 := JTF_VARCHAR2_TABLE_100();
129 else
130 a0 := JTF_VARCHAR2_TABLE_100();
131 a1 := JTF_VARCHAR2_TABLE_100();
132 if t.count > 0 then
133 a0.extend(t.count);
134 a1.extend(t.count);
135 ddindx := t.first;
136 indx := 1;
137 while true loop
138 a0(indx) := t(ddindx).scs_code;
139 a1(indx) := t(ddindx).rle_code;
140 indx := indx+1;
141 if t.last =ddindx
142 then exit;
143 end if;
144 ddindx := t.next(ddindx);
145 end loop;
146 end if;
147 end if;
148 end rosetta_table_copy_out_p6;
149
150 procedure get_party(p_api_version NUMBER
151 , p_init_msg_list VARCHAR2
152 , x_return_status out nocopy VARCHAR2
153 , x_msg_count out nocopy NUMBER
154 , x_msg_data out nocopy VARCHAR2
155 , p_chr_id VARCHAR2
156 , p_cle_id VARCHAR2
157 , p_role_code VARCHAR2
158 , p_intent VARCHAR2
159 , p9_a0 out nocopy JTF_VARCHAR2_TABLE_100
160 , p9_a1 out nocopy JTF_VARCHAR2_TABLE_100
161 , p9_a2 out nocopy JTF_VARCHAR2_TABLE_200
162 , p9_a3 out nocopy JTF_VARCHAR2_TABLE_300
163 , p9_a4 out nocopy JTF_VARCHAR2_TABLE_300
164 , p9_a5 out nocopy JTF_VARCHAR2_TABLE_100
165 )
166
167 as
168 ddx_party_tab okl_jtot_extract.party_tab_type;
169 ddindx binary_integer; indx binary_integer;
170 begin
171
172 -- copy data to the local IN or IN-OUT args, if any
173
174
175
176
177
178
179
180
181
182
183 -- here's the delegated call to the old PL/SQL routine
184 okl_jtot_extract.get_party(p_api_version,
185 p_init_msg_list,
186 x_return_status,
187 x_msg_count,
188 x_msg_data,
189 p_chr_id,
190 p_cle_id,
191 p_role_code,
192 p_intent,
193 ddx_party_tab);
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
205 okl_jtot_extract_w.rosetta_table_copy_out_p4(ddx_party_tab, p9_a0
206 , p9_a1
207 , p9_a2
208 , p9_a3
209 , p9_a4
210 , p9_a5
211 );
212 end;
213
214 procedure get_subclass_def_roles(p_api_version NUMBER
215 , p_init_msg_list VARCHAR2
216 , x_return_status out nocopy VARCHAR2
217 , x_msg_count out nocopy NUMBER
218 , x_msg_data out nocopy VARCHAR2
219 , p_scs_code VARCHAR2
220 , p6_a0 out nocopy JTF_VARCHAR2_TABLE_100
221 , p6_a1 out nocopy JTF_VARCHAR2_TABLE_100
222 )
223
224 as
225 ddx_rle_code_tbl okl_jtot_extract.rle_code_tbl_type;
226 ddindx binary_integer; indx binary_integer;
227 begin
228
229 -- copy data to the local IN or IN-OUT args, if any
230
231
232
233
234
235
236
237 -- here's the delegated call to the old PL/SQL routine
238 okl_jtot_extract.get_subclass_def_roles(p_api_version,
239 p_init_msg_list,
240 x_return_status,
241 x_msg_count,
242 x_msg_data,
243 p_scs_code,
244 ddx_rle_code_tbl);
245
246 -- copy data back from the local variables to OUT or IN-OUT args, if any
247
248
249
250
251
252
253 okl_jtot_extract_w.rosetta_table_copy_out_p6(ddx_rle_code_tbl, p6_a0
254 , p6_a1
255 );
256 end;
257
258 procedure get_contract_def_roles(p_api_version NUMBER
259 , p_init_msg_list VARCHAR2
260 , x_return_status out nocopy VARCHAR2
261 , x_msg_count out nocopy NUMBER
262 , x_msg_data out nocopy VARCHAR2
263 , p_chr_id VARCHAR2
264 , p6_a0 out nocopy JTF_VARCHAR2_TABLE_100
265 , p6_a1 out nocopy JTF_VARCHAR2_TABLE_100
266 )
267
268 as
269 ddx_rle_code_tbl okl_jtot_extract.rle_code_tbl_type;
270 ddindx binary_integer; indx binary_integer;
271 begin
272
273 -- copy data to the local IN or IN-OUT args, if any
274
275
276
277
278
279
280
281 -- here's the delegated call to the old PL/SQL routine
282 okl_jtot_extract.get_contract_def_roles(p_api_version,
283 p_init_msg_list,
284 x_return_status,
285 x_msg_count,
286 x_msg_data,
287 p_chr_id,
288 ddx_rle_code_tbl);
289
290 -- copy data back from the local variables to OUT or IN-OUT args, if any
291
292
293
294
295
296
297 okl_jtot_extract_w.rosetta_table_copy_out_p6(ddx_rle_code_tbl, p6_a0
298 , p6_a1
299 );
300 end;
301
302 end okl_jtot_extract_w;