DBA Data[Home] [Help]

PACKAGE BODY: APPS.QP_UTIL_OA

Source


1 package body qp_util_oa as
2   /* $Header: ozfaqpub.pls 115.0 2003/11/07 18:45:30 gramanat noship $ */
3   procedure rosetta_table_copy_in_p1(t out nocopy qp_util.v_segs_upg_tab, a0 JTF_VARCHAR2_TABLE_100
4     , a1 JTF_VARCHAR2_TABLE_100
5     , a2 JTF_NUMBER_TABLE
6     , a3 JTF_VARCHAR2_TABLE_100
7     ) as
8     ddindx binary_integer; indx binary_integer;
9   begin
10   if a0 is not null and a0.count > 0 then
11       if a0.count > 0 then
12         indx := a0.first;
13         ddindx := 1;
14         while true loop
15           t(ddindx).context_code := a0(indx);
16           t(ddindx).segment_name := a1(indx);
17           t(ddindx).sequence := a2(indx);
18           t(ddindx).datatype := a3(indx);
19           ddindx := ddindx+1;
20           if a0.last =indx
21             then exit;
22           end if;
23           indx := a0.next(indx);
24         end loop;
25       end if;
26    end if;
27   end rosetta_table_copy_in_p1;
28   procedure rosetta_table_copy_out_p1(t qp_util.v_segs_upg_tab, a0 out nocopy JTF_VARCHAR2_TABLE_100
29     , a1 out nocopy JTF_VARCHAR2_TABLE_100
30     , a2 out nocopy JTF_NUMBER_TABLE
31     , a3 out nocopy JTF_VARCHAR2_TABLE_100
32     ) as
33     ddindx binary_integer; indx binary_integer;
34   begin
35   if t is null or t.count = 0 then
36     a0 := JTF_VARCHAR2_TABLE_100();
37     a1 := JTF_VARCHAR2_TABLE_100();
38     a2 := JTF_NUMBER_TABLE();
39     a3 := JTF_VARCHAR2_TABLE_100();
40   else
41       a0 := JTF_VARCHAR2_TABLE_100();
42       a1 := JTF_VARCHAR2_TABLE_100();
43       a2 := JTF_NUMBER_TABLE();
44       a3 := JTF_VARCHAR2_TABLE_100();
45       if t.count > 0 then
46         a0.extend(t.count);
47         a1.extend(t.count);
48         a2.extend(t.count);
49         a3.extend(t.count);
50         ddindx := t.first;
51         indx := 1;
52         while true loop
53           a0(indx) := t(ddindx).context_code;
54           a1(indx) := t(ddindx).segment_name;
55           a2(indx) := t(ddindx).sequence;
56           a3(indx) := t(ddindx).datatype;
57           indx := indx+1;
58           if t.last =ddindx
59             then exit;
60           end if;
61           ddindx := t.next(ddindx);
62         end loop;
63       end if;
64    end if;
65   end rosetta_table_copy_out_p1;
66 
67   procedure rosetta_table_copy_in_p39(t out nocopy qp_util.create_context_out_tbl, a0 JTF_VARCHAR2_TABLE_100
68     , a1 JTF_VARCHAR2_TABLE_300
69     ) as
70     ddindx binary_integer; indx binary_integer;
71   begin
72   if a0 is not null and a0.count > 0 then
73       if a0.count > 0 then
74         indx := a0.first;
75         ddindx := 1;
76         while true loop
77           t(ddindx).context_code := a0(indx);
78           t(ddindx).context_name := a1(indx);
79           ddindx := ddindx+1;
80           if a0.last =indx
81             then exit;
82           end if;
83           indx := a0.next(indx);
84         end loop;
85       end if;
86    end if;
87   end rosetta_table_copy_in_p39;
88   procedure rosetta_table_copy_out_p39(t qp_util.create_context_out_tbl, a0 out nocopy JTF_VARCHAR2_TABLE_100
89     , a1 out nocopy JTF_VARCHAR2_TABLE_300
90     ) as
91     ddindx binary_integer; indx binary_integer;
92   begin
93   if t is null or t.count = 0 then
94     a0 := JTF_VARCHAR2_TABLE_100();
95     a1 := JTF_VARCHAR2_TABLE_300();
96   else
97       a0 := JTF_VARCHAR2_TABLE_100();
98       a1 := JTF_VARCHAR2_TABLE_300();
99       if t.count > 0 then
100         a0.extend(t.count);
101         a1.extend(t.count);
102         ddindx := t.first;
103         indx := 1;
104         while true loop
105           a0(indx) := t(ddindx).context_code;
106           a1(indx) := t(ddindx).context_name;
107           indx := indx+1;
108           if t.last =ddindx
109             then exit;
110           end if;
111           ddindx := t.next(ddindx);
112         end loop;
113       end if;
114    end if;
115   end rosetta_table_copy_out_p39;
116 
117   procedure rosetta_table_copy_in_p41(t out nocopy qp_util.create_attribute_out_tbl, a0 JTF_VARCHAR2_TABLE_100
118     , a1 JTF_VARCHAR2_TABLE_300
119     , a2 JTF_VARCHAR2_TABLE_100
120     , a3 JTF_NUMBER_TABLE
121     , a4 JTF_NUMBER_TABLE
122     ) as
123     ddindx binary_integer; indx binary_integer;
124   begin
125   if a0 is not null and a0.count > 0 then
126       if a0.count > 0 then
127         indx := a0.first;
128         ddindx := 1;
129         while true loop
130           t(ddindx).segment_mapping_column := a0(indx);
131           t(ddindx).segment_name := a1(indx);
132           t(ddindx).segment_code := a2(indx);
133           t(ddindx).precedence := a3(indx);
134           t(ddindx).valueset_id := a4(indx);
135           ddindx := ddindx+1;
136           if a0.last =indx
137             then exit;
138           end if;
139           indx := a0.next(indx);
140         end loop;
141       end if;
142    end if;
143   end rosetta_table_copy_in_p41;
144   procedure rosetta_table_copy_out_p41(t qp_util.create_attribute_out_tbl, a0 out nocopy JTF_VARCHAR2_TABLE_100
145     , a1 out nocopy JTF_VARCHAR2_TABLE_300
146     , a2 out nocopy JTF_VARCHAR2_TABLE_100
147     , a3 out nocopy JTF_NUMBER_TABLE
148     , a4 out nocopy JTF_NUMBER_TABLE
149     ) as
150     ddindx binary_integer; indx binary_integer;
151   begin
152   if t is null or t.count = 0 then
153     a0 := JTF_VARCHAR2_TABLE_100();
154     a1 := JTF_VARCHAR2_TABLE_300();
155     a2 := JTF_VARCHAR2_TABLE_100();
156     a3 := JTF_NUMBER_TABLE();
157     a4 := JTF_NUMBER_TABLE();
158   else
159       a0 := JTF_VARCHAR2_TABLE_100();
160       a1 := JTF_VARCHAR2_TABLE_300();
161       a2 := JTF_VARCHAR2_TABLE_100();
162       a3 := JTF_NUMBER_TABLE();
163       a4 := JTF_NUMBER_TABLE();
164       if t.count > 0 then
165         a0.extend(t.count);
166         a1.extend(t.count);
167         a2.extend(t.count);
168         a3.extend(t.count);
169         a4.extend(t.count);
170         ddindx := t.first;
171         indx := 1;
172         while true loop
173           a0(indx) := t(ddindx).segment_mapping_column;
174           a1(indx) := t(ddindx).segment_name;
175           a2(indx) := t(ddindx).segment_code;
176           a3(indx) := t(ddindx).precedence;
177           a4(indx) := t(ddindx).valueset_id;
178           indx := indx+1;
179           if t.last =ddindx
180             then exit;
181           end if;
182           ddindx := t.next(ddindx);
183         end loop;
184       end if;
185    end if;
186   end rosetta_table_copy_out_p41;
187 
188   procedure validate_qp_flexfield(flexfield_name  VARCHAR2
189     , context  VARCHAR2
190     , attribute  VARCHAR2
191     , value  VARCHAR2
192     , application_short_name  VARCHAR2
193     , context_flag out nocopy  VARCHAR2
194     , attribute_flag out nocopy  VARCHAR2
195     , value_flag out nocopy  VARCHAR2
196     , datatype out nocopy  VARCHAR2
197     , precedence out nocopy  VARCHAR2
198     , error_code out nocopy  NUMBER
199     , check_enabled  number
200   )
201 
202   as
203     ddcheck_enabled boolean;
204     ddindx binary_integer; indx binary_integer;
205   begin
206 
207     -- copy data to the local IN or IN-OUT args, if any
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219     if check_enabled is null
220       then ddcheck_enabled := null;
221     elsif check_enabled = 0
222       then ddcheck_enabled := false;
223     else ddcheck_enabled := true;
224     end if;
225 
226     -- here's the delegated call to the old PL/SQL routine
227     qp_util.validate_qp_flexfield(flexfield_name,
228       context,
229       attribute,
230       value,
231       application_short_name,
232       context_flag,
233       attribute_flag,
234       value_flag,
235       datatype,
236       precedence,
237       error_code,
238       ddcheck_enabled);
239 
240     -- copy data back from the local variables to OUT or IN-OUT args, if any
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252   end;
253 
254   procedure get_segs_for_flex(flexfield_name  VARCHAR2
255     , application_short_name  VARCHAR2
256     , p2_a0 out nocopy JTF_VARCHAR2_TABLE_100
257     , p2_a1 out nocopy JTF_VARCHAR2_TABLE_100
258     , p2_a2 out nocopy JTF_NUMBER_TABLE
259     , p2_a3 out nocopy JTF_VARCHAR2_TABLE_100
260     , error_code out nocopy  NUMBER
261   )
262 
263   as
264     ddx_segs_upg_t qp_util.v_segs_upg_tab;
265     ddindx binary_integer; indx binary_integer;
266   begin
267 
268     -- copy data to the local IN or IN-OUT args, if any
269 
270 
271 
272 
273     -- here's the delegated call to the old PL/SQL routine
274     qp_util.get_segs_for_flex(flexfield_name,
275       application_short_name,
276       ddx_segs_upg_t,
277       error_code);
278 
279     -- copy data back from the local variables to OUT or IN-OUT args, if any
280 
281 
282     qp_util_oa.rosetta_table_copy_out_p1(ddx_segs_upg_t, p2_a0
283       , p2_a1
284       , p2_a2
285       , p2_a3
286       );
287 
288   end;
289 
290   procedure get_segs_flex_precedence(p0_a0 JTF_VARCHAR2_TABLE_100
291     , p0_a1 JTF_VARCHAR2_TABLE_100
292     , p0_a2 JTF_NUMBER_TABLE
293     , p0_a3 JTF_VARCHAR2_TABLE_100
294     , p_context  VARCHAR2
295     , p_attribute  VARCHAR2
296     , x_precedence out nocopy  NUMBER
297     , x_datatype out nocopy  VARCHAR2
298   )
299 
300   as
301     ddp_segs_upg_t qp_util.v_segs_upg_tab;
302     ddindx binary_integer; indx binary_integer;
303   begin
304 
305     -- copy data to the local IN or IN-OUT args, if any
306     qp_util_oa.rosetta_table_copy_in_p1(ddp_segs_upg_t, p0_a0
307       , p0_a1
308       , p0_a2
309       , p0_a3
310       );
311 
312 
313 
314 
315 
316     -- here's the delegated call to the old PL/SQL routine
317     qp_util.get_segs_flex_precedence(ddp_segs_upg_t,
318       p_context,
319       p_attribute,
320       x_precedence,
321       x_datatype);
322 
323     -- copy data back from the local variables to OUT or IN-OUT args, if any
324 
325 
326 
327 
328   end;
329 
330   procedure web_create_context_lov(p_field_context  VARCHAR2
331     , p_context_type  VARCHAR2
332     , p_check_enabled  VARCHAR2
333     , p_limits  VARCHAR2
334     , p_list_line_type_code  VARCHAR2
335     , x_return_status out nocopy  VARCHAR2
336     , p6_a0 out nocopy JTF_VARCHAR2_TABLE_100
337     , p6_a1 out nocopy JTF_VARCHAR2_TABLE_300
338   )
339 
340   as
341     ddx_context_out_tbl qp_util.create_context_out_tbl;
342     ddindx binary_integer; indx binary_integer;
343   begin
344 
345     -- copy data to the local IN or IN-OUT args, if any
346 
347 
348 
349 
350 
351 
352 
353     -- here's the delegated call to the old PL/SQL routine
354     qp_util.web_create_context_lov(p_field_context,
355       p_context_type,
356       p_check_enabled,
357       p_limits,
358       p_list_line_type_code,
359       x_return_status,
360       ddx_context_out_tbl);
361 
362     -- copy data back from the local variables to OUT or IN-OUT args, if any
363 
364 
365 
366 
367 
368 
369     qp_util_oa.rosetta_table_copy_out_p39(ddx_context_out_tbl, p6_a0
370       , p6_a1
371       );
372   end;
373 
374   procedure web_create_attribute_lov(p_context_code  VARCHAR2
375     , p_context_type  VARCHAR2
376     , p_check_enabled  VARCHAR2
377     , p_limits  VARCHAR2
378     , p_list_line_type_code  VARCHAR2
379     , p_segment_level  NUMBER
380     , p_field_context  VARCHAR2
381     , x_return_status out nocopy  VARCHAR2
382     , p8_a0 out nocopy JTF_VARCHAR2_TABLE_100
383     , p8_a1 out nocopy JTF_VARCHAR2_TABLE_300
384     , p8_a2 out nocopy JTF_VARCHAR2_TABLE_100
385     , p8_a3 out nocopy JTF_NUMBER_TABLE
386     , p8_a4 out nocopy JTF_NUMBER_TABLE
387   )
388 
389   as
390     ddx_attribute_out_tbl qp_util.create_attribute_out_tbl;
391     ddindx binary_integer; indx binary_integer;
392   begin
393 
394     -- copy data to the local IN or IN-OUT args, if any
395 
396 
397 
398 
399 
400 
401 
402 
403 
404     -- here's the delegated call to the old PL/SQL routine
405     qp_util.web_create_attribute_lov(p_context_code,
406       p_context_type,
407       p_check_enabled,
408       p_limits,
409       p_list_line_type_code,
410       p_segment_level,
411       p_field_context,
412       x_return_status,
413       ddx_attribute_out_tbl);
414 
415     -- copy data back from the local variables to OUT or IN-OUT args, if any
416 
417 
418 
419 
420 
421 
422 
423 
424     qp_util_oa.rosetta_table_copy_out_p41(ddx_attribute_out_tbl, p8_a0
425       , p8_a1
426       , p8_a2
427       , p8_a3
428       , p8_a4
429       );
430   end;
431 
432 end qp_util_oa;