1 package body ieu_frm_pvt_w as
2 /* $Header: ieufmpvtb.pls 120.0.12020000.1 2013/03/23 11:17:57 spamujul 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 rosetta_g_mistake_date_high date := to_date('01/01/+4710', 'MM/DD/SYYYY');
6 rosetta_g_mistake_date_low date := to_date('01/01/-4710', 'MM/DD/SYYYY');
7
8 -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
9 function rosetta_g_miss_date_in_map(d date) return date as
10 begin
11 if d > rosetta_g_mistake_date_high then return fnd_api.g_miss_date; end if;
12 if d < rosetta_g_mistake_date_low then return fnd_api.g_miss_date; end if;
13 return d;
14 end;
15
16 procedure rosetta_table_copy_in_p1(t out nocopy ieu_frm_pvt.t_ieu_media_data, a0 JTF_VARCHAR2_TABLE_4000
17 , a1 JTF_VARCHAR2_TABLE_4000
18 , a2 JTF_VARCHAR2_TABLE_4000
19 ) as
20 ddindx binary_integer; indx binary_integer;
21 begin
22 if a0 is not null and a0.count > 0 then
23 if a0.count > 0 then
24 indx := a0.first;
25 ddindx := 1;
26 while true loop
27 t(ddindx).param_name := a0(indx);
28 t(ddindx).param_value := a1(indx);
29 t(ddindx).param_type := a2(indx);
30 ddindx := ddindx+1;
31 if a0.last =indx
32 then exit;
33 end if;
34 indx := a0.next(indx);
35 end loop;
36 end if;
37 end if;
38 end rosetta_table_copy_in_p1;
39 procedure rosetta_table_copy_out_p1(t ieu_frm_pvt.t_ieu_media_data, a0 out nocopy JTF_VARCHAR2_TABLE_4000
40 , a1 out nocopy JTF_VARCHAR2_TABLE_4000
41 , a2 out nocopy JTF_VARCHAR2_TABLE_4000
42 ) as
43 ddindx binary_integer; indx binary_integer;
44 begin
45 if t is null or t.count = 0 then
46 a0 := JTF_VARCHAR2_TABLE_4000();
47 a1 := JTF_VARCHAR2_TABLE_4000();
48 a2 := JTF_VARCHAR2_TABLE_4000();
49 else
50 a0 := JTF_VARCHAR2_TABLE_4000();
51 a1 := JTF_VARCHAR2_TABLE_4000();
52 a2 := JTF_VARCHAR2_TABLE_4000();
53 if t.count > 0 then
54 a0.extend(t.count);
55 a1.extend(t.count);
56 a2.extend(t.count);
57 ddindx := t.first;
58 indx := 1;
59 while true loop
60 a0(indx) := t(ddindx).param_name;
61 a1(indx) := t(ddindx).param_value;
62 a2(indx) := t(ddindx).param_type;
63 indx := indx+1;
64 if t.last =ddindx
65 then exit;
66 end if;
67 ddindx := t.next(ddindx);
68 end loop;
69 end if;
70 end if;
71 end rosetta_table_copy_out_p1;
72
73 procedure uwq_get_media_func(p_apps_proc VARCHAR2
74 , p1_a0 JTF_VARCHAR2_TABLE_4000
75 , p1_a1 JTF_VARCHAR2_TABLE_4000
76 , p1_a2 JTF_VARCHAR2_TABLE_4000
77 , p_action_type out nocopy NUMBER
78 , p_action_name out nocopy VARCHAR2
79 , p_action_param out nocopy VARCHAR2
80 )
81
82 as
83 ddp_ieu_media_data ieu_frm_pvt.t_ieu_media_data;
84 ddindx binary_integer; indx binary_integer;
85 begin
86
87 -- copy data to the local IN or IN-OUT args, if any
88
89 ieu_frm_pvt_w.rosetta_table_copy_in_p1(ddp_ieu_media_data, p1_a0
90 , p1_a1
91 , p1_a2
92 );
93
94
95
96
97 -- here's the delegated call to the old PL/SQL routine
98 ieu_frm_pvt.uwq_get_media_func(p_apps_proc,
99 ddp_ieu_media_data,
100 p_action_type,
101 p_action_name,
102 p_action_param);
103
104 -- copy data back from the local variables to OUT or IN-OUT args, if any
105
106
107
108
109 end;
110
111 procedure uwq_get_action_func(p_apps_proc VARCHAR2
112 , p1_a0 JTF_VARCHAR2_TABLE_4000
113 , p1_a1 JTF_VARCHAR2_TABLE_4000
114 , p1_a2 JTF_VARCHAR2_TABLE_4000
115 , p_action_type out nocopy NUMBER
116 , p_action_name out nocopy VARCHAR2
117 , p_action_param out nocopy VARCHAR2
118 , p_msg_name out nocopy VARCHAR2
119 , p_msg_param out nocopy VARCHAR2
120 , p_dialog_style out nocopy NUMBER
121 , p_msg_appl_short_name out nocopy VARCHAR2
122 )
123
124 as
125 ddp_ieu_action_data ieu_frm_pvt.t_ieu_media_data;
126 ddindx binary_integer; indx binary_integer;
127 begin
128
129 -- copy data to the local IN or IN-OUT args, if any
130
131 ieu_frm_pvt_w.rosetta_table_copy_in_p1(ddp_ieu_action_data, p1_a0
132 , p1_a1
133 , p1_a2
134 );
135
136
137
138
139
140
141
142
143 -- here's the delegated call to the old PL/SQL routine
144 ieu_frm_pvt.uwq_get_action_func(p_apps_proc,
145 ddp_ieu_action_data,
146 p_action_type,
147 p_action_name,
148 p_action_param,
149 p_msg_name,
150 p_msg_param,
151 p_dialog_style,
152 p_msg_appl_short_name);
153
154 -- copy data back from the local variables to OUT or IN-OUT args, if any
155
156
157
158
159
160
161
162
163 end;
164
165 end ieu_frm_pvt_w;