[Home] [Help]
PACKAGE BODY: APPS.AML_TIMEFRAME_PUB_W
Source
1 package body aml_timeframe_pub_w as
2 /* $Header: amlwtfrb.pls 115.1 2003/01/03 18:45:19 chchandr 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_p3(t out nocopy aml_timeframe_pub.timeframe_tbl_type, a0 JTF_NUMBER_TABLE
23 , a1 JTF_VARCHAR2_TABLE_100
24 , a2 JTF_NUMBER_TABLE
25 , a3 JTF_DATE_TABLE
26 , a4 JTF_NUMBER_TABLE
27 , a5 JTF_NUMBER_TABLE
28 , a6 JTF_DATE_TABLE
29 , a7 JTF_NUMBER_TABLE
30 , a8 JTF_VARCHAR2_TABLE_100
31 ) as
32 ddindx binary_integer; indx binary_integer;
33 begin
34 if a0 is not null and a0.count > 0 then
35 if a0.count > 0 then
36 indx := a0.first;
37 ddindx := 1;
38 while true loop
39 t(ddindx).timeframe_id := rosetta_g_miss_num_map(a0(indx));
40 t(ddindx).decision_timeframe_code := a1(indx);
41 t(ddindx).timeframe_days := rosetta_g_miss_num_map(a2(indx));
42 t(ddindx).last_update_date := rosetta_g_miss_date_in_map(a3(indx));
43 t(ddindx).last_update_login := rosetta_g_miss_num_map(a4(indx));
44 t(ddindx).created_by := rosetta_g_miss_num_map(a5(indx));
45 t(ddindx).creation_date := rosetta_g_miss_date_in_map(a6(indx));
46 t(ddindx).last_updated_by := rosetta_g_miss_num_map(a7(indx));
47 t(ddindx).enabled_flag := a8(indx);
48 ddindx := ddindx+1;
49 if a0.last =indx
50 then exit;
51 end if;
52 indx := a0.next(indx);
53 end loop;
54 end if;
55 end if;
56 end rosetta_table_copy_in_p3;
57 procedure rosetta_table_copy_out_p3(t aml_timeframe_pub.timeframe_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
58 , a1 out nocopy JTF_VARCHAR2_TABLE_100
59 , a2 out nocopy JTF_NUMBER_TABLE
60 , a3 out nocopy JTF_DATE_TABLE
61 , a4 out nocopy JTF_NUMBER_TABLE
62 , a5 out nocopy JTF_NUMBER_TABLE
63 , a6 out nocopy JTF_DATE_TABLE
64 , a7 out nocopy JTF_NUMBER_TABLE
65 , a8 out nocopy JTF_VARCHAR2_TABLE_100
66 ) as
67 ddindx binary_integer; indx binary_integer;
68 begin
69 if t is null or t.count = 0 then
70 a0 := JTF_NUMBER_TABLE();
71 a1 := JTF_VARCHAR2_TABLE_100();
72 a2 := JTF_NUMBER_TABLE();
73 a3 := JTF_DATE_TABLE();
74 a4 := JTF_NUMBER_TABLE();
75 a5 := JTF_NUMBER_TABLE();
76 a6 := JTF_DATE_TABLE();
77 a7 := JTF_NUMBER_TABLE();
78 a8 := JTF_VARCHAR2_TABLE_100();
79 else
80 a0 := JTF_NUMBER_TABLE();
81 a1 := JTF_VARCHAR2_TABLE_100();
82 a2 := JTF_NUMBER_TABLE();
83 a3 := JTF_DATE_TABLE();
84 a4 := JTF_NUMBER_TABLE();
85 a5 := JTF_NUMBER_TABLE();
86 a6 := JTF_DATE_TABLE();
87 a7 := JTF_NUMBER_TABLE();
88 a8 := JTF_VARCHAR2_TABLE_100();
89 if t.count > 0 then
90 a0.extend(t.count);
91 a1.extend(t.count);
92 a2.extend(t.count);
93 a3.extend(t.count);
94 a4.extend(t.count);
95 a5.extend(t.count);
96 a6.extend(t.count);
97 a7.extend(t.count);
98 a8.extend(t.count);
99 ddindx := t.first;
100 indx := 1;
101 while true loop
102 a0(indx) := rosetta_g_miss_num_map(t(ddindx).timeframe_id);
103 a1(indx) := t(ddindx).decision_timeframe_code;
104 a2(indx) := rosetta_g_miss_num_map(t(ddindx).timeframe_days);
105 a3(indx) := t(ddindx).last_update_date;
106 a4(indx) := rosetta_g_miss_num_map(t(ddindx).last_update_login);
107 a5(indx) := rosetta_g_miss_num_map(t(ddindx).created_by);
108 a6(indx) := t(ddindx).creation_date;
109 a7(indx) := rosetta_g_miss_num_map(t(ddindx).last_updated_by);
110 a8(indx) := t(ddindx).enabled_flag;
111 indx := indx+1;
112 if t.last =ddindx
113 then exit;
114 end if;
115 ddindx := t.next(ddindx);
116 end loop;
117 end if;
118 end if;
119 end rosetta_table_copy_out_p3;
120
121 procedure create_timeframe(p_api_version_number NUMBER
122 , p_init_msg_list VARCHAR2
123 , p_commit VARCHAR2
124 , p_validation_level NUMBER
125 , p_check_access_flag VARCHAR2
126 , p_admin_flag VARCHAR2
127 , p_admin_group_id NUMBER
128 , p_identity_salesforce_id NUMBER
129 , p8_a0 JTF_VARCHAR2_TABLE_100
130 , p8_a1 JTF_VARCHAR2_TABLE_300
131 , x_timeframe_id out nocopy NUMBER
132 , x_return_status out nocopy VARCHAR2
133 , x_msg_count out nocopy NUMBER
134 , x_msg_data out nocopy VARCHAR2
135 , p9_a0 NUMBER := 0-1962.0724
136 , p9_a1 VARCHAR2 := fnd_api.g_miss_char
137 , p9_a2 NUMBER := 0-1962.0724
138 , p9_a3 DATE := fnd_api.g_miss_date
139 , p9_a4 NUMBER := 0-1962.0724
140 , p9_a5 NUMBER := 0-1962.0724
141 , p9_a6 DATE := fnd_api.g_miss_date
142 , p9_a7 NUMBER := 0-1962.0724
143 , p9_a8 VARCHAR2 := fnd_api.g_miss_char
144 )
145
146 as
147 ddp_profile_tbl as_utility_pub.profile_tbl_type;
148 ddp_timeframe_rec aml_timeframe_pub.timeframe_rec_type;
149 ddindx binary_integer; indx binary_integer;
150 begin
151
152 -- copy data to the local IN or IN-OUT args, if any
153
154
155
156
157
158
159
160
161 as_utility_pub_w.rosetta_table_copy_in_p6(ddp_profile_tbl, p8_a0
162 , p8_a1
163 );
164
165 ddp_timeframe_rec.timeframe_id := rosetta_g_miss_num_map(p9_a0);
166 ddp_timeframe_rec.decision_timeframe_code := p9_a1;
167 ddp_timeframe_rec.timeframe_days := rosetta_g_miss_num_map(p9_a2);
168 ddp_timeframe_rec.last_update_date := rosetta_g_miss_date_in_map(p9_a3);
169 ddp_timeframe_rec.last_update_login := rosetta_g_miss_num_map(p9_a4);
170 ddp_timeframe_rec.created_by := rosetta_g_miss_num_map(p9_a5);
171 ddp_timeframe_rec.creation_date := rosetta_g_miss_date_in_map(p9_a6);
172 ddp_timeframe_rec.last_updated_by := rosetta_g_miss_num_map(p9_a7);
173 ddp_timeframe_rec.enabled_flag := p9_a8;
174
175
176
177
178
179 -- here's the delegated call to the old PL/SQL routine
180 aml_timeframe_pub.create_timeframe(p_api_version_number,
181 p_init_msg_list,
182 p_commit,
183 p_validation_level,
184 p_check_access_flag,
185 p_admin_flag,
186 p_admin_group_id,
187 p_identity_salesforce_id,
188 ddp_profile_tbl,
189 ddp_timeframe_rec,
190 x_timeframe_id,
191 x_return_status,
192 x_msg_count,
193 x_msg_data);
194
195 -- copy data back from the local variables to OUT or IN-OUT args, if any
196
197
198
199
200
201
202
203
204
205
206
207
208
209 end;
210
211 procedure update_timeframe(p_api_version_number NUMBER
212 , p_init_msg_list VARCHAR2
213 , p_commit VARCHAR2
214 , p_validation_level NUMBER
215 , p_check_access_flag VARCHAR2
216 , p_admin_flag VARCHAR2
217 , p_admin_group_id NUMBER
218 , p_identity_salesforce_id NUMBER
219 , p8_a0 JTF_VARCHAR2_TABLE_100
220 , p8_a1 JTF_VARCHAR2_TABLE_300
221 , x_return_status out nocopy VARCHAR2
222 , x_msg_count out nocopy NUMBER
223 , x_msg_data out nocopy VARCHAR2
224 , p9_a0 NUMBER := 0-1962.0724
225 , p9_a1 VARCHAR2 := fnd_api.g_miss_char
226 , p9_a2 NUMBER := 0-1962.0724
227 , p9_a3 DATE := fnd_api.g_miss_date
228 , p9_a4 NUMBER := 0-1962.0724
229 , p9_a5 NUMBER := 0-1962.0724
230 , p9_a6 DATE := fnd_api.g_miss_date
231 , p9_a7 NUMBER := 0-1962.0724
232 , p9_a8 VARCHAR2 := fnd_api.g_miss_char
233 )
234
235 as
236 ddp_profile_tbl as_utility_pub.profile_tbl_type;
237 ddp_timeframe_rec aml_timeframe_pub.timeframe_rec_type;
238 ddindx binary_integer; indx binary_integer;
239 begin
240
241 -- copy data to the local IN or IN-OUT args, if any
242
243
244
245
246
247
248
249
250 as_utility_pub_w.rosetta_table_copy_in_p6(ddp_profile_tbl, p8_a0
251 , p8_a1
252 );
253
254 ddp_timeframe_rec.timeframe_id := rosetta_g_miss_num_map(p9_a0);
255 ddp_timeframe_rec.decision_timeframe_code := p9_a1;
256 ddp_timeframe_rec.timeframe_days := rosetta_g_miss_num_map(p9_a2);
257 ddp_timeframe_rec.last_update_date := rosetta_g_miss_date_in_map(p9_a3);
258 ddp_timeframe_rec.last_update_login := rosetta_g_miss_num_map(p9_a4);
259 ddp_timeframe_rec.created_by := rosetta_g_miss_num_map(p9_a5);
260 ddp_timeframe_rec.creation_date := rosetta_g_miss_date_in_map(p9_a6);
261 ddp_timeframe_rec.last_updated_by := rosetta_g_miss_num_map(p9_a7);
262 ddp_timeframe_rec.enabled_flag := p9_a8;
263
264
265
266
267 -- here's the delegated call to the old PL/SQL routine
268 aml_timeframe_pub.update_timeframe(p_api_version_number,
269 p_init_msg_list,
270 p_commit,
271 p_validation_level,
272 p_check_access_flag,
273 p_admin_flag,
274 p_admin_group_id,
275 p_identity_salesforce_id,
276 ddp_profile_tbl,
277 ddp_timeframe_rec,
278 x_return_status,
279 x_msg_count,
280 x_msg_data);
281
282 -- copy data back from the local variables to OUT or IN-OUT args, if any
283
284
285
286
287
288
289
290
291
292
293
294
295 end;
296
297 procedure delete_timeframe(p_api_version_number NUMBER
298 , p_init_msg_list VARCHAR2
299 , p_commit VARCHAR2
300 , p_validation_level NUMBER
301 , p_check_access_flag VARCHAR2
302 , p_admin_flag VARCHAR2
303 , p_admin_group_id NUMBER
304 , p_identity_salesforce_id NUMBER
305 , p8_a0 JTF_VARCHAR2_TABLE_100
306 , p8_a1 JTF_VARCHAR2_TABLE_300
307 , x_return_status out nocopy VARCHAR2
308 , x_msg_count out nocopy NUMBER
309 , x_msg_data out nocopy VARCHAR2
310 , p9_a0 NUMBER := 0-1962.0724
311 , p9_a1 VARCHAR2 := fnd_api.g_miss_char
312 , p9_a2 NUMBER := 0-1962.0724
313 , p9_a3 DATE := fnd_api.g_miss_date
314 , p9_a4 NUMBER := 0-1962.0724
315 , p9_a5 NUMBER := 0-1962.0724
316 , p9_a6 DATE := fnd_api.g_miss_date
317 , p9_a7 NUMBER := 0-1962.0724
318 , p9_a8 VARCHAR2 := fnd_api.g_miss_char
319 )
320
321 as
322 ddp_profile_tbl as_utility_pub.profile_tbl_type;
323 ddp_timeframe_rec aml_timeframe_pub.timeframe_rec_type;
324 ddindx binary_integer; indx binary_integer;
325 begin
326
330
327 -- copy data to the local IN or IN-OUT args, if any
328
329
331
332
333
334
335
336 as_utility_pub_w.rosetta_table_copy_in_p6(ddp_profile_tbl, p8_a0
337 , p8_a1
338 );
339
340 ddp_timeframe_rec.timeframe_id := rosetta_g_miss_num_map(p9_a0);
341 ddp_timeframe_rec.decision_timeframe_code := p9_a1;
342 ddp_timeframe_rec.timeframe_days := rosetta_g_miss_num_map(p9_a2);
343 ddp_timeframe_rec.last_update_date := rosetta_g_miss_date_in_map(p9_a3);
344 ddp_timeframe_rec.last_update_login := rosetta_g_miss_num_map(p9_a4);
345 ddp_timeframe_rec.created_by := rosetta_g_miss_num_map(p9_a5);
346 ddp_timeframe_rec.creation_date := rosetta_g_miss_date_in_map(p9_a6);
347 ddp_timeframe_rec.last_updated_by := rosetta_g_miss_num_map(p9_a7);
348 ddp_timeframe_rec.enabled_flag := p9_a8;
349
350
351
352
353 -- here's the delegated call to the old PL/SQL routine
354 aml_timeframe_pub.delete_timeframe(p_api_version_number,
355 p_init_msg_list,
356 p_commit,
357 p_validation_level,
358 p_check_access_flag,
359 p_admin_flag,
360 p_admin_group_id,
361 p_identity_salesforce_id,
362 ddp_profile_tbl,
363 ddp_timeframe_rec,
364 x_return_status,
365 x_msg_count,
366 x_msg_data);
367
368 -- copy data back from the local variables to OUT or IN-OUT args, if any
369
370
371
372
373
374
375
376
377
378
379
380
381 end;
382
383 end aml_timeframe_pub_w;