[Home] [Help]
PACKAGE BODY: APPS.OKL_VP_JTF_PARTY_NAME_PVT_W
Source
1 package body okl_vp_jtf_party_name_pvt_w as
2 /* $Header: OKLECTSB.pls 115.7 2003/10/02 23:17:46 manumanu 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_vp_jtf_party_name_pvt.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_vp_jtf_party_name_pvt.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 rosetta_table_copy_in_p3(t out nocopy okl_vp_jtf_party_name_pvt.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_p3;
121 procedure rosetta_table_copy_out_p3(t okl_vp_jtf_party_name_pvt.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_p3;
149
150 procedure rosetta_table_copy_in_p9(t out nocopy okl_vp_jtf_party_name_pvt.contact_tab_type, a0 JTF_VARCHAR2_TABLE_100
151 , a1 JTF_VARCHAR2_TABLE_100
152 , a2 JTF_VARCHAR2_TABLE_200
153 , a3 JTF_VARCHAR2_TABLE_300
154 , a4 JTF_VARCHAR2_TABLE_300
155 , a5 JTF_VARCHAR2_TABLE_100
156 ) as
157 ddindx binary_integer; indx binary_integer;
158 begin
159 if a0 is not null and a0.count > 0 then
160 if a0.count > 0 then
161 indx := a0.first;
162 ddindx := 1;
163 while true loop
164 t(ddindx).cro_code := a0(indx);
165 t(ddindx).id1 := a1(indx);
166 t(ddindx).id2 := a2(indx);
167 t(ddindx).name := a3(indx);
168 t(ddindx).description := a4(indx);
169 t(ddindx).object_code := a5(indx);
170 ddindx := ddindx+1;
171 if a0.last =indx
172 then exit;
173 end if;
174 indx := a0.next(indx);
175 end loop;
176 end if;
177 end if;
178 end rosetta_table_copy_in_p9;
179 procedure rosetta_table_copy_out_p9(t okl_vp_jtf_party_name_pvt.contact_tab_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
180 , a1 out nocopy JTF_VARCHAR2_TABLE_100
181 , a2 out nocopy JTF_VARCHAR2_TABLE_200
182 , a3 out nocopy JTF_VARCHAR2_TABLE_300
183 , a4 out nocopy JTF_VARCHAR2_TABLE_300
184 , a5 out nocopy JTF_VARCHAR2_TABLE_100
185 ) as
186 ddindx binary_integer; indx binary_integer;
187 begin
188 if t is null or t.count = 0 then
189 a0 := JTF_VARCHAR2_TABLE_100();
190 a1 := JTF_VARCHAR2_TABLE_100();
191 a2 := JTF_VARCHAR2_TABLE_200();
192 a3 := JTF_VARCHAR2_TABLE_300();
193 a4 := JTF_VARCHAR2_TABLE_300();
194 a5 := JTF_VARCHAR2_TABLE_100();
195 else
196 a0 := JTF_VARCHAR2_TABLE_100();
197 a1 := JTF_VARCHAR2_TABLE_100();
198 a2 := JTF_VARCHAR2_TABLE_200();
199 a3 := JTF_VARCHAR2_TABLE_300();
200 a4 := JTF_VARCHAR2_TABLE_300();
201 a5 := JTF_VARCHAR2_TABLE_100();
202 if t.count > 0 then
203 a0.extend(t.count);
204 a1.extend(t.count);
205 a2.extend(t.count);
206 a3.extend(t.count);
207 a4.extend(t.count);
208 a5.extend(t.count);
209 ddindx := t.first;
210 indx := 1;
211 while true loop
212 a0(indx) := t(ddindx).cro_code;
213 a1(indx) := t(ddindx).id1;
214 a2(indx) := t(ddindx).id2;
215 a3(indx) := t(ddindx).name;
216 a4(indx) := t(ddindx).description;
217 a5(indx) := t(ddindx).object_code;
218 indx := indx+1;
219 if t.last =ddindx
220 then exit;
221 end if;
222 ddindx := t.next(ddindx);
223 end loop;
224 end if;
225 end if;
226 end rosetta_table_copy_out_p9;
227
228 procedure get_party(p_api_version NUMBER
229 , p_init_msg_list VARCHAR2
230 , x_return_status out nocopy VARCHAR2
231 , x_msg_count out nocopy NUMBER
232 , x_msg_data out nocopy VARCHAR2
233 , p_chr_id VARCHAR2
234 , p_cle_id VARCHAR2
235 , p_role_code VARCHAR2
236 , p_intent VARCHAR2
237 , p9_a0 out nocopy JTF_VARCHAR2_TABLE_100
238 , p9_a1 out nocopy JTF_VARCHAR2_TABLE_100
239 , p9_a2 out nocopy JTF_VARCHAR2_TABLE_200
240 , p9_a3 out nocopy JTF_VARCHAR2_TABLE_300
241 , p9_a4 out nocopy JTF_VARCHAR2_TABLE_300
242 , p9_a5 out nocopy JTF_VARCHAR2_TABLE_100
243 )
244
245 as
246 ddx_party_tab okl_vp_jtf_party_name_pvt.party_tab_type;
247 ddindx binary_integer; indx binary_integer;
248 begin
249
250 -- copy data to the local IN or IN-OUT args, if any
251
252
253
254
255
256
257
258
259
260
261 -- here's the delegated call to the old PL/SQL routine
262 okl_vp_jtf_party_name_pvt.get_party(p_api_version,
263 p_init_msg_list,
264 x_return_status,
265 x_msg_count,
266 x_msg_data,
267 p_chr_id,
268 p_cle_id,
269 p_role_code,
270 p_intent,
271 ddx_party_tab);
272
273 -- copy data back from the local variables to OUT or IN-OUT args, if any
274
275
276
277
278
279
280
281
282
283 okl_vp_jtf_party_name_pvt_w.rosetta_table_copy_out_p1(ddx_party_tab, p9_a0
284 , p9_a1
285 , p9_a2
286 , p9_a3
287 , p9_a4
288 , p9_a5
289 );
290 end;
291
292 procedure get_subclass_def_roles(p_scs_code VARCHAR2
293 , p1_a0 out nocopy JTF_VARCHAR2_TABLE_100
294 , p1_a1 out nocopy JTF_VARCHAR2_TABLE_100
295 )
296
297 as
298 ddx_rle_code_tbl okl_vp_jtf_party_name_pvt.rle_code_tbl_type;
299 ddindx binary_integer; indx binary_integer;
300 begin
301
302 -- copy data to the local IN or IN-OUT args, if any
303
304
305 -- here's the delegated call to the old PL/SQL routine
306 okl_vp_jtf_party_name_pvt.get_subclass_def_roles(p_scs_code,
307 ddx_rle_code_tbl);
308
309 -- copy data back from the local variables to OUT or IN-OUT args, if any
310
311 okl_vp_jtf_party_name_pvt_w.rosetta_table_copy_out_p3(ddx_rle_code_tbl, p1_a0
312 , p1_a1
313 );
314 end;
315
316 procedure get_contract_def_roles(p_chr_id VARCHAR2
317 , p1_a0 out nocopy JTF_VARCHAR2_TABLE_100
318 , p1_a1 out nocopy JTF_VARCHAR2_TABLE_100
319 )
320
321 as
322 ddx_rle_code_tbl okl_vp_jtf_party_name_pvt.rle_code_tbl_type;
323 ddindx binary_integer; indx binary_integer;
324 begin
325
326 -- copy data to the local IN or IN-OUT args, if any
327
328
329 -- here's the delegated call to the old PL/SQL routine
330 okl_vp_jtf_party_name_pvt.get_contract_def_roles(p_chr_id,
331 ddx_rle_code_tbl);
332
333 -- copy data back from the local variables to OUT or IN-OUT args, if any
334
335 okl_vp_jtf_party_name_pvt_w.rosetta_table_copy_out_p3(ddx_rle_code_tbl, p1_a0
336 , p1_a1
337 );
338 end;
339
340 end okl_vp_jtf_party_name_pvt_w;