1 package body cn_sfp_srp_util_pvt_w as
2 /* $Header: cnwsfsrb.pls 115.0 2002/12/12 02:42:48 sbadami 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 procedure rosetta_table_copy_in_p0(t out nocopy cn_sfp_srp_util_pvt.string_tabletype, a0 JTF_VARCHAR2_TABLE_100) as
14 ddindx binary_integer; indx binary_integer;
15 begin
16 if a0 is not null and a0.count > 0 then
17 if a0.count > 0 then
18 indx := a0.first;
19 ddindx := 1;
20 while true loop
21 t(ddindx) := a0(indx);
22 ddindx := ddindx+1;
23 if a0.last =indx
24 then exit;
25 end if;
26 indx := a0.next(indx);
27 end loop;
28 end if;
29 end if;
30 end rosetta_table_copy_in_p0;
31 procedure rosetta_table_copy_out_p0(t cn_sfp_srp_util_pvt.string_tabletype, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
32 ddindx binary_integer; indx binary_integer;
33 begin
34 if t is null or t.count = 0 then
35 a0 := JTF_VARCHAR2_TABLE_100();
36 else
37 a0 := JTF_VARCHAR2_TABLE_100();
38 if t.count > 0 then
39 a0.extend(t.count);
40 ddindx := t.first;
41 indx := 1;
42 while true loop
43 a0(indx) := t(ddindx);
44 indx := indx+1;
45 if t.last =ddindx
46 then exit;
47 end if;
48 ddindx := t.next(ddindx);
49 end loop;
50 end if;
51 end if;
52 end rosetta_table_copy_out_p0;
53
54 procedure get_valid_plan_statuses(p_api_version NUMBER
55 , p_init_msg_list VARCHAR2
56 , p_commit VARCHAR2
57 , p_validation_level NUMBER
58 , p_default_all VARCHAR2
59 , p_type VARCHAR2
60 , x_values_tab out nocopy JTF_VARCHAR2_TABLE_100
61 , x_meanings_tab out nocopy JTF_VARCHAR2_TABLE_100
62 , x_return_status out nocopy VARCHAR2
63 , x_msg_count out nocopy NUMBER
64 , x_msg_data out nocopy VARCHAR2
65 )
66
67 as
68 ddx_values_tab cn_sfp_srp_util_pvt.string_tabletype;
69 ddx_meanings_tab cn_sfp_srp_util_pvt.string_tabletype;
70 ddindx binary_integer; indx binary_integer;
71 begin
72
73 -- copy data to the local IN or IN-OUT args, if any
74
75
76
77
78
79
80
81
82
83
84
85 -- here's the delegated call to the old PL/SQL routine
86 cn_sfp_srp_util_pvt.get_valid_plan_statuses(p_api_version,
87 p_init_msg_list,
88 p_commit,
89 p_validation_level,
90 p_default_all,
91 p_type,
92 ddx_values_tab,
93 ddx_meanings_tab,
94 x_return_status,
95 x_msg_count,
96 x_msg_data);
97
98 -- copy data back from the local variables to OUT or IN-OUT args, if any
99
100
101
102
103
104
105 cn_sfp_srp_util_pvt_w.rosetta_table_copy_out_p0(ddx_values_tab, x_values_tab);
106
107 cn_sfp_srp_util_pvt_w.rosetta_table_copy_out_p0(ddx_meanings_tab, x_meanings_tab);
108
109
110
111 end;
112
113 end cn_sfp_srp_util_pvt_w;