[Home] [Help]
PACKAGE BODY: APPS.CN_SF_PARAMS_PVT_W
Source
1 package body cn_sf_params_pvt_w as
2 /* $Header: cnwprmsb.pls 115.4 2002/12/04 05:05:17 fmburu ship $ */
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_p1(t out nocopy cn_sf_params_pvt.sf_repositories_tbl_type, a0 JTF_NUMBER_TABLE
14 , a1 JTF_VARCHAR2_TABLE_100
15 , a2 JTF_VARCHAR2_TABLE_2000
16 , a3 JTF_VARCHAR2_TABLE_1000
17 , a4 JTF_VARCHAR2_TABLE_100
18 , a5 JTF_VARCHAR2_TABLE_100
19 , a6 JTF_VARCHAR2_TABLE_100
20 , a7 JTF_NUMBER_TABLE
21 , a8 JTF_VARCHAR2_TABLE_100
22 , a9 JTF_NUMBER_TABLE
23 , a10 JTF_NUMBER_TABLE
24 ) as
25 ddindx binary_integer; indx binary_integer;
26 begin
27 if a0 is not null and a0.count > 0 then
28 if a0.count > 0 then
29 indx := a0.first;
30 ddindx := 1;
31 while true loop
32 t(ddindx).repository_id := a0(indx);
33 t(ddindx).contract_title := a1(indx);
34 t(ddindx).terms_and_conditions := a2(indx);
35 t(ddindx).club_qual_text := a3(indx);
36 t(ddindx).approver_name := a4(indx);
37 t(ddindx).approver_title := a5(indx);
38 t(ddindx).approver_org_name := a6(indx);
39 t(ddindx).file_id := a7(indx);
40 t(ddindx).formu_activated_flag := a8(indx);
41 t(ddindx).transaction_calendar_id := a9(indx);
42 t(ddindx).object_version_number := a10(indx);
43 ddindx := ddindx+1;
44 if a0.last =indx
45 then exit;
46 end if;
47 indx := a0.next(indx);
48 end loop;
49 end if;
50 end if;
51 end rosetta_table_copy_in_p1;
52 procedure rosetta_table_copy_out_p1(t cn_sf_params_pvt.sf_repositories_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
53 , a1 out nocopy JTF_VARCHAR2_TABLE_100
54 , a2 out nocopy JTF_VARCHAR2_TABLE_2000
55 , a3 out nocopy JTF_VARCHAR2_TABLE_1000
56 , a4 out nocopy JTF_VARCHAR2_TABLE_100
57 , a5 out nocopy JTF_VARCHAR2_TABLE_100
58 , a6 out nocopy JTF_VARCHAR2_TABLE_100
59 , a7 out nocopy JTF_NUMBER_TABLE
60 , a8 out nocopy JTF_VARCHAR2_TABLE_100
61 , a9 out nocopy JTF_NUMBER_TABLE
62 , a10 out nocopy JTF_NUMBER_TABLE
63 ) as
64 ddindx binary_integer; indx binary_integer;
65 begin
66 if t is null or t.count = 0 then
67 a0 := JTF_NUMBER_TABLE();
68 a1 := JTF_VARCHAR2_TABLE_100();
69 a2 := JTF_VARCHAR2_TABLE_2000();
70 a3 := JTF_VARCHAR2_TABLE_1000();
71 a4 := JTF_VARCHAR2_TABLE_100();
72 a5 := JTF_VARCHAR2_TABLE_100();
73 a6 := JTF_VARCHAR2_TABLE_100();
74 a7 := JTF_NUMBER_TABLE();
75 a8 := JTF_VARCHAR2_TABLE_100();
76 a9 := JTF_NUMBER_TABLE();
77 a10 := JTF_NUMBER_TABLE();
78 else
79 a0 := JTF_NUMBER_TABLE();
80 a1 := JTF_VARCHAR2_TABLE_100();
81 a2 := JTF_VARCHAR2_TABLE_2000();
82 a3 := JTF_VARCHAR2_TABLE_1000();
83 a4 := JTF_VARCHAR2_TABLE_100();
84 a5 := JTF_VARCHAR2_TABLE_100();
85 a6 := JTF_VARCHAR2_TABLE_100();
86 a7 := JTF_NUMBER_TABLE();
87 a8 := JTF_VARCHAR2_TABLE_100();
88 a9 := JTF_NUMBER_TABLE();
89 a10 := JTF_NUMBER_TABLE();
90 if t.count > 0 then
91 a0.extend(t.count);
92 a1.extend(t.count);
93 a2.extend(t.count);
94 a3.extend(t.count);
95 a4.extend(t.count);
96 a5.extend(t.count);
97 a6.extend(t.count);
98 a7.extend(t.count);
99 a8.extend(t.count);
100 a9.extend(t.count);
101 a10.extend(t.count);
102 ddindx := t.first;
103 indx := 1;
104 while true loop
105 a0(indx) := t(ddindx).repository_id;
106 a1(indx) := t(ddindx).contract_title;
107 a2(indx) := t(ddindx).terms_and_conditions;
108 a3(indx) := t(ddindx).club_qual_text;
109 a4(indx) := t(ddindx).approver_name;
110 a5(indx) := t(ddindx).approver_title;
111 a6(indx) := t(ddindx).approver_org_name;
112 a7(indx) := t(ddindx).file_id;
113 a8(indx) := t(ddindx).formu_activated_flag;
114 a9(indx) := t(ddindx).transaction_calendar_id;
115 a10(indx) := t(ddindx).object_version_number;
116 indx := indx+1;
117 if t.last =ddindx
118 then exit;
119 end if;
120 ddindx := t.next(ddindx);
121 end loop;
122 end if;
123 end if;
124 end rosetta_table_copy_out_p1;
125
126 procedure get_sf_parameters(p_api_version NUMBER
127 , p_init_msg_list VARCHAR2
128 , p_commit VARCHAR2
129 , p_validation_level NUMBER
130 , p4_a0 out nocopy NUMBER
131 , p4_a1 out nocopy VARCHAR2
132 , p4_a2 out nocopy VARCHAR2
133 , p4_a3 out nocopy VARCHAR2
134 , p4_a4 out nocopy VARCHAR2
135 , p4_a5 out nocopy VARCHAR2
136 , p4_a6 out nocopy VARCHAR2
137 , p4_a7 out nocopy NUMBER
138 , p4_a8 out nocopy VARCHAR2
139 , p4_a9 out nocopy NUMBER
140 , p4_a10 out nocopy NUMBER
141 , x_return_status out nocopy VARCHAR2
142 , x_msg_count out nocopy NUMBER
143 , x_msg_data out nocopy VARCHAR2
144 )
145
146 as
147 ddp_sf_param_rec cn_sf_params_pvt.cn_sf_repositories_rec_type;
148 ddindx binary_integer; indx binary_integer;
149 begin
150
151 -- copy data to the local IN or IN-OUT args, if any
152
153
154
155
156
157
158
159
160 -- here's the delegated call to the old PL/SQL routine
161 cn_sf_params_pvt.get_sf_parameters(p_api_version,
162 p_init_msg_list,
163 p_commit,
164 p_validation_level,
165 ddp_sf_param_rec,
166 x_return_status,
167 x_msg_count,
168 x_msg_data);
169
170 -- copy data back from the local variables to OUT or IN-OUT args, if any
171
172
173
174
175 p4_a0 := ddp_sf_param_rec.repository_id;
176 p4_a1 := ddp_sf_param_rec.contract_title;
177 p4_a2 := ddp_sf_param_rec.terms_and_conditions;
178 p4_a3 := ddp_sf_param_rec.club_qual_text;
179 p4_a4 := ddp_sf_param_rec.approver_name;
180 p4_a5 := ddp_sf_param_rec.approver_title;
181 p4_a6 := ddp_sf_param_rec.approver_org_name;
182 p4_a7 := ddp_sf_param_rec.file_id;
183 p4_a8 := ddp_sf_param_rec.formu_activated_flag;
184 p4_a9 := ddp_sf_param_rec.transaction_calendar_id;
185 p4_a10 := ddp_sf_param_rec.object_version_number;
186
187
188
189 end;
190
191 procedure update_sf_parameters(p_api_version NUMBER
192 , p_init_msg_list VARCHAR2
193 , p_commit VARCHAR2
194 , p_validation_level NUMBER
195 , p4_a0 NUMBER
196 , p4_a1 VARCHAR2
197 , p4_a2 VARCHAR2
198 , p4_a3 VARCHAR2
199 , p4_a4 VARCHAR2
200 , p4_a5 VARCHAR2
201 , p4_a6 VARCHAR2
202 , p4_a7 NUMBER
203 , p4_a8 VARCHAR2
204 , p4_a9 NUMBER
205 , p4_a10 NUMBER
206 , x_return_status out nocopy VARCHAR2
207 , x_msg_count out nocopy NUMBER
208 , x_msg_data out nocopy VARCHAR2
209 )
210
211 as
212 ddp_sf_repositories_rec cn_sf_params_pvt.cn_sf_repositories_rec_type;
213 ddindx binary_integer; indx binary_integer;
214 begin
215
216 -- copy data to the local IN or IN-OUT args, if any
217
218
219
220
221 ddp_sf_repositories_rec.repository_id := p4_a0;
222 ddp_sf_repositories_rec.contract_title := p4_a1;
223 ddp_sf_repositories_rec.terms_and_conditions := p4_a2;
224 ddp_sf_repositories_rec.club_qual_text := p4_a3;
225 ddp_sf_repositories_rec.approver_name := p4_a4;
226 ddp_sf_repositories_rec.approver_title := p4_a5;
227 ddp_sf_repositories_rec.approver_org_name := p4_a6;
228 ddp_sf_repositories_rec.file_id := p4_a7;
229 ddp_sf_repositories_rec.formu_activated_flag := p4_a8;
230 ddp_sf_repositories_rec.transaction_calendar_id := p4_a9;
231 ddp_sf_repositories_rec.object_version_number := p4_a10;
232
233
234
235
236 -- here's the delegated call to the old PL/SQL routine
237 cn_sf_params_pvt.update_sf_parameters(p_api_version,
238 p_init_msg_list,
239 p_commit,
240 p_validation_level,
241 ddp_sf_repositories_rec,
242 x_return_status,
243 x_msg_count,
244 x_msg_data);
245
246 -- copy data back from the local variables to OUT or IN-OUT args, if any
247
248
249
250
251
252
253
254 end;
255
256 procedure insert_sf_parameters(p_api_version NUMBER
257 , p_init_msg_list VARCHAR2
258 , p_commit VARCHAR2
259 , p_validation_level NUMBER
260 , p4_a0 NUMBER
261 , p4_a1 VARCHAR2
262 , p4_a2 VARCHAR2
263 , p4_a3 VARCHAR2
264 , p4_a4 VARCHAR2
265 , p4_a5 VARCHAR2
266 , p4_a6 VARCHAR2
267 , p4_a7 NUMBER
268 , p4_a8 VARCHAR2
269 , p4_a9 NUMBER
270 , p4_a10 NUMBER
271 , x_return_status out nocopy VARCHAR2
272 , x_msg_count out nocopy NUMBER
273 , x_msg_data out nocopy VARCHAR2
274 )
275
276 as
277 ddp_sf_repositories_rec cn_sf_params_pvt.cn_sf_repositories_rec_type;
278 ddindx binary_integer; indx binary_integer;
279 begin
280
281 -- copy data to the local IN or IN-OUT args, if any
282
283
284
285
286 ddp_sf_repositories_rec.repository_id := p4_a0;
287 ddp_sf_repositories_rec.contract_title := p4_a1;
288 ddp_sf_repositories_rec.terms_and_conditions := p4_a2;
289 ddp_sf_repositories_rec.club_qual_text := p4_a3;
290 ddp_sf_repositories_rec.approver_name := p4_a4;
291 ddp_sf_repositories_rec.approver_title := p4_a5;
292 ddp_sf_repositories_rec.approver_org_name := p4_a6;
293 ddp_sf_repositories_rec.file_id := p4_a7;
294 ddp_sf_repositories_rec.formu_activated_flag := p4_a8;
295 ddp_sf_repositories_rec.transaction_calendar_id := p4_a9;
296 ddp_sf_repositories_rec.object_version_number := p4_a10;
297
298
299
300
301 -- here's the delegated call to the old PL/SQL routine
302 cn_sf_params_pvt.insert_sf_parameters(p_api_version,
303 p_init_msg_list,
304 p_commit,
305 p_validation_level,
306 ddp_sf_repositories_rec,
307 x_return_status,
308 x_msg_count,
309 x_msg_data);
310
311 -- copy data back from the local variables to OUT or IN-OUT args, if any
312
313
314
315
316
317
318
319 end;
320
321 end cn_sf_params_pvt_w;