DBA Data[Home] [Help]

PACKAGE BODY: APPS.PV_PRGM_PMT_MODE_PVT_W

Source


1 package body pv_prgm_pmt_mode_pvt_w as
2   /* $Header: pvxwppmb.pls 120.0 2005/05/27 16:03:16 appldev 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   function rosetta_g_miss_num_map(n number) return number as
7     a number := fnd_api.g_miss_num;
8     b number := 0-1962.0724;
9   begin
10     if n=a then return b; end if;
11     if n=b then return a; end if;
12     return n;
13   end;
14 
15   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
16   function rosetta_g_miss_date_in_map(d date) return date as
17   begin
18     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
19     return d;
20   end;
21 
22   procedure rosetta_table_copy_in_p2(t OUT NOCOPY pv_prgm_pmt_mode_pvt.prgm_pmt_mode_tbl_type, a0 JTF_NUMBER_TABLE
23     , a1 JTF_NUMBER_TABLE
24     , a2 JTF_NUMBER_TABLE
25     , a3 JTF_VARCHAR2_TABLE_100
26     , a4 JTF_DATE_TABLE
27     , a5 JTF_NUMBER_TABLE
28     , a6 JTF_DATE_TABLE
29     , a7 JTF_NUMBER_TABLE
30     , a8 JTF_NUMBER_TABLE
31     , a9 JTF_NUMBER_TABLE
32     , a10 JTF_VARCHAR2_TABLE_100
33     ) as
34     ddindx binary_integer; indx binary_integer;
35   begin
36   if a0 is not null and a0.count > 0 then
37       if a0.count > 0 then
38         indx := a0.first;
39         ddindx := 1;
40         while true loop
41           t(ddindx).program_payment_mode_id := a0(indx);
42           t(ddindx).program_id := a1(indx);
43           t(ddindx).geo_hierarchy_id := a2(indx);
44           t(ddindx).mode_of_payment := a3(indx);
45           t(ddindx).last_update_date := rosetta_g_miss_date_in_map(a4(indx));
46           t(ddindx).last_updated_by := a5(indx);
47           t(ddindx).creation_date := rosetta_g_miss_date_in_map(a6(indx));
48           t(ddindx).created_by := a7(indx);
49           t(ddindx).last_update_login := a8(indx);
50           t(ddindx).object_version_number := a9(indx);
51           t(ddindx).mode_type := a10(indx);
52           ddindx := ddindx+1;
53           if a0.last =indx
54             then exit;
55           end if;
56           indx := a0.next(indx);
57         end loop;
58       end if;
59    end if;
60   end rosetta_table_copy_in_p2;
61   procedure rosetta_table_copy_out_p2(t pv_prgm_pmt_mode_pvt.prgm_pmt_mode_tbl_type, a0 OUT NOCOPY JTF_NUMBER_TABLE
62     , a1 OUT NOCOPY JTF_NUMBER_TABLE
63     , a2 OUT NOCOPY JTF_NUMBER_TABLE
64     , a3 OUT NOCOPY JTF_VARCHAR2_TABLE_100
65     , a4 OUT NOCOPY JTF_DATE_TABLE
66     , a5 OUT NOCOPY JTF_NUMBER_TABLE
67     , a6 OUT NOCOPY JTF_DATE_TABLE
68     , a7 OUT NOCOPY JTF_NUMBER_TABLE
69     , a8 OUT NOCOPY JTF_NUMBER_TABLE
70     , a9 OUT NOCOPY JTF_NUMBER_TABLE
71     , a10 OUT NOCOPY JTF_VARCHAR2_TABLE_100
72     ) as
73     ddindx binary_integer; indx binary_integer;
74   begin
75   if t is null or t.count = 0 then
76     a0 := JTF_NUMBER_TABLE();
77     a1 := JTF_NUMBER_TABLE();
78     a2 := JTF_NUMBER_TABLE();
79     a3 := JTF_VARCHAR2_TABLE_100();
80     a4 := JTF_DATE_TABLE();
81     a5 := JTF_NUMBER_TABLE();
82     a6 := JTF_DATE_TABLE();
83     a7 := JTF_NUMBER_TABLE();
84     a8 := JTF_NUMBER_TABLE();
85     a9 := JTF_NUMBER_TABLE();
86     a10 := JTF_VARCHAR2_TABLE_100();
87   else
88       a0 := JTF_NUMBER_TABLE();
89       a1 := JTF_NUMBER_TABLE();
90       a2 := JTF_NUMBER_TABLE();
91       a3 := JTF_VARCHAR2_TABLE_100();
92       a4 := JTF_DATE_TABLE();
93       a5 := JTF_NUMBER_TABLE();
94       a6 := JTF_DATE_TABLE();
95       a7 := JTF_NUMBER_TABLE();
96       a8 := JTF_NUMBER_TABLE();
97       a9 := JTF_NUMBER_TABLE();
98       a10 := JTF_VARCHAR2_TABLE_100();
99       if t.count > 0 then
100         a0.extend(t.count);
101         a1.extend(t.count);
102         a2.extend(t.count);
103         a3.extend(t.count);
104         a4.extend(t.count);
105         a5.extend(t.count);
106         a6.extend(t.count);
107         a7.extend(t.count);
108         a8.extend(t.count);
109         a9.extend(t.count);
110         a10.extend(t.count);
111         ddindx := t.first;
112         indx := 1;
113         while true loop
114           a0(indx) := t(ddindx).program_payment_mode_id;
115           a1(indx) := t(ddindx).program_id;
116           a2(indx) := t(ddindx).geo_hierarchy_id;
117           a3(indx) := t(ddindx).mode_of_payment;
118           a4(indx) := t(ddindx).last_update_date;
119           a5(indx) := t(ddindx).last_updated_by;
120           a6(indx) := t(ddindx).creation_date;
121           a7(indx) := t(ddindx).created_by;
122           a8(indx) := t(ddindx).last_update_login;
123           a9(indx) := t(ddindx).object_version_number;
124           a10(indx) := t(ddindx).mode_type;
125           indx := indx+1;
126           if t.last =ddindx
127             then exit;
128           end if;
129           ddindx := t.next(ddindx);
130         end loop;
131       end if;
132    end if;
133   end rosetta_table_copy_out_p2;
134 
135   procedure create_prgm_pmt_mode(p_api_version_number  NUMBER
136     , p_init_msg_list  VARCHAR2
137     , p_commit  VARCHAR2
138     , p_validation_level  NUMBER
139     , x_return_status OUT NOCOPY  VARCHAR2
140     , x_msg_count OUT NOCOPY  NUMBER
141     , x_msg_data OUT NOCOPY  VARCHAR2
142     , p7_a0  NUMBER
143     , p7_a1  NUMBER
144     , p7_a2  NUMBER
145     , p7_a3  VARCHAR2
146     , p7_a4  DATE
147     , p7_a5  NUMBER
148     , p7_a6  DATE
149     , p7_a7  NUMBER
150     , p7_a8  NUMBER
151     , p7_a9  NUMBER
152     , p7_a10  VARCHAR2
153     , x_program_payment_mode_id OUT NOCOPY  NUMBER
154   )
155 
156   as
157     ddp_prgm_pmt_mode_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
158     ddindx binary_integer; indx binary_integer;
159   begin
160 
161     -- copy data to the local IN or IN-OUT args, if any
162 
163 
164 
165 
166 
167 
168 
169     ddp_prgm_pmt_mode_rec.program_payment_mode_id := p7_a0;
170     ddp_prgm_pmt_mode_rec.program_id := p7_a1;
171     ddp_prgm_pmt_mode_rec.geo_hierarchy_id := p7_a2;
172     ddp_prgm_pmt_mode_rec.mode_of_payment := p7_a3;
173     ddp_prgm_pmt_mode_rec.last_update_date := rosetta_g_miss_date_in_map(p7_a4);
174     ddp_prgm_pmt_mode_rec.last_updated_by := p7_a5;
175     ddp_prgm_pmt_mode_rec.creation_date := rosetta_g_miss_date_in_map(p7_a6);
176     ddp_prgm_pmt_mode_rec.created_by := p7_a7;
177     ddp_prgm_pmt_mode_rec.last_update_login := p7_a8;
178     ddp_prgm_pmt_mode_rec.object_version_number := p7_a9;
179     ddp_prgm_pmt_mode_rec.mode_type := p7_a10;
180 
181 
182     -- here's the delegated call to the old PL/SQL routine
183     pv_prgm_pmt_mode_pvt.create_prgm_pmt_mode(p_api_version_number,
184       p_init_msg_list,
185       p_commit,
186       p_validation_level,
187       x_return_status,
188       x_msg_count,
189       x_msg_data,
190       ddp_prgm_pmt_mode_rec,
191       x_program_payment_mode_id);
192 
193     -- copy data back from the local variables to OUT or IN-OUT args, if any
194 
195 
196 
197 
198 
199 
200 
201 
202   end;
203 
204   procedure update_prgm_pmt_mode(p_api_version_number  NUMBER
205     , p_init_msg_list  VARCHAR2
206     , p_commit  VARCHAR2
207     , p_validation_level  NUMBER
208     , x_return_status OUT NOCOPY  VARCHAR2
209     , x_msg_count OUT NOCOPY  NUMBER
210     , x_msg_data OUT NOCOPY  VARCHAR2
211     , p7_a0  NUMBER
212     , p7_a1  NUMBER
213     , p7_a2  NUMBER
214     , p7_a3  VARCHAR2
215     , p7_a4  DATE
216     , p7_a5  NUMBER
217     , p7_a6  DATE
218     , p7_a7  NUMBER
219     , p7_a8  NUMBER
220     , p7_a9  NUMBER
221     , p7_a10  VARCHAR2
222   )
223 
224   as
225     ddp_prgm_pmt_mode_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
226     ddindx binary_integer; indx binary_integer;
227   begin
228 
229     -- copy data to the local IN or IN-OUT args, if any
230 
231 
232 
233 
234 
235 
236 
237     ddp_prgm_pmt_mode_rec.program_payment_mode_id := p7_a0;
238     ddp_prgm_pmt_mode_rec.program_id := p7_a1;
239     ddp_prgm_pmt_mode_rec.geo_hierarchy_id := p7_a2;
240     ddp_prgm_pmt_mode_rec.mode_of_payment := p7_a3;
241     ddp_prgm_pmt_mode_rec.last_update_date := rosetta_g_miss_date_in_map(p7_a4);
242     ddp_prgm_pmt_mode_rec.last_updated_by := p7_a5;
243     ddp_prgm_pmt_mode_rec.creation_date := rosetta_g_miss_date_in_map(p7_a6);
244     ddp_prgm_pmt_mode_rec.created_by := p7_a7;
245     ddp_prgm_pmt_mode_rec.last_update_login := p7_a8;
246     ddp_prgm_pmt_mode_rec.object_version_number := p7_a9;
247     ddp_prgm_pmt_mode_rec.mode_type := p7_a10;
248 
249     -- here's the delegated call to the old PL/SQL routine
250     pv_prgm_pmt_mode_pvt.update_prgm_pmt_mode(p_api_version_number,
251       p_init_msg_list,
252       p_commit,
253       p_validation_level,
254       x_return_status,
255       x_msg_count,
256       x_msg_data,
257       ddp_prgm_pmt_mode_rec);
258 
259     -- copy data back from the local variables to OUT or IN-OUT args, if any
260 
261 
262 
263 
264 
265 
266 
267   end;
268 
269   procedure validate_prgm_pmt_mode(p_api_version_number  NUMBER
270     , p_init_msg_list  VARCHAR2
271     , p_validation_level  NUMBER
272     , p3_a0  NUMBER
273     , p3_a1  NUMBER
274     , p3_a2  NUMBER
275     , p3_a3  VARCHAR2
276     , p3_a4  DATE
277     , p3_a5  NUMBER
278     , p3_a6  DATE
279     , p3_a7  NUMBER
280     , p3_a8  NUMBER
281     , p3_a9  NUMBER
282     , p3_a10  VARCHAR2
283     , p_validation_mode  VARCHAR2
284     , x_return_status OUT NOCOPY  VARCHAR2
285     , x_msg_count OUT NOCOPY  NUMBER
286     , x_msg_data OUT NOCOPY  VARCHAR2
287   )
288 
289   as
290     ddp_prgm_pmt_mode_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
291     ddindx binary_integer; indx binary_integer;
292   begin
293 
294     -- copy data to the local IN or IN-OUT args, if any
295 
296 
297 
298     ddp_prgm_pmt_mode_rec.program_payment_mode_id := p3_a0;
299     ddp_prgm_pmt_mode_rec.program_id := p3_a1;
300     ddp_prgm_pmt_mode_rec.geo_hierarchy_id := p3_a2;
301     ddp_prgm_pmt_mode_rec.mode_of_payment := p3_a3;
302     ddp_prgm_pmt_mode_rec.last_update_date := rosetta_g_miss_date_in_map(p3_a4);
303     ddp_prgm_pmt_mode_rec.last_updated_by := p3_a5;
304     ddp_prgm_pmt_mode_rec.creation_date := rosetta_g_miss_date_in_map(p3_a6);
305     ddp_prgm_pmt_mode_rec.created_by := p3_a7;
306     ddp_prgm_pmt_mode_rec.last_update_login := p3_a8;
307     ddp_prgm_pmt_mode_rec.object_version_number := p3_a9;
308     ddp_prgm_pmt_mode_rec.mode_type := p3_a10;
309 
310 
311 
312 
313 
314     -- here's the delegated call to the old PL/SQL routine
315     pv_prgm_pmt_mode_pvt.validate_prgm_pmt_mode(p_api_version_number,
316       p_init_msg_list,
317       p_validation_level,
318       ddp_prgm_pmt_mode_rec,
319       p_validation_mode,
320       x_return_status,
321       x_msg_count,
322       x_msg_data);
323 
324     -- copy data back from the local variables to OUT or IN-OUT args, if any
325 
326 
327 
328 
329 
330 
331 
332   end;
333 
334   procedure check_items(p0_a0  NUMBER
335     , p0_a1  NUMBER
336     , p0_a2  NUMBER
337     , p0_a3  VARCHAR2
338     , p0_a4  DATE
339     , p0_a5  NUMBER
340     , p0_a6  DATE
341     , p0_a7  NUMBER
342     , p0_a8  NUMBER
343     , p0_a9  NUMBER
344     , p0_a10  VARCHAR2
345     , p_validation_mode  VARCHAR2
346     , x_return_status OUT NOCOPY  VARCHAR2
347   )
348 
349   as
350     ddp_prgm_pmt_mode_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
351     ddindx binary_integer; indx binary_integer;
352   begin
353 
354     -- copy data to the local IN or IN-OUT args, if any
355     ddp_prgm_pmt_mode_rec.program_payment_mode_id := p0_a0;
356     ddp_prgm_pmt_mode_rec.program_id := p0_a1;
357     ddp_prgm_pmt_mode_rec.geo_hierarchy_id := p0_a2;
358     ddp_prgm_pmt_mode_rec.mode_of_payment := p0_a3;
359     ddp_prgm_pmt_mode_rec.last_update_date := rosetta_g_miss_date_in_map(p0_a4);
360     ddp_prgm_pmt_mode_rec.last_updated_by := p0_a5;
361     ddp_prgm_pmt_mode_rec.creation_date := rosetta_g_miss_date_in_map(p0_a6);
362     ddp_prgm_pmt_mode_rec.created_by := p0_a7;
363     ddp_prgm_pmt_mode_rec.last_update_login := p0_a8;
364     ddp_prgm_pmt_mode_rec.object_version_number := p0_a9;
365     ddp_prgm_pmt_mode_rec.mode_type := p0_a10;
366 
367 
368 
369     -- here's the delegated call to the old PL/SQL routine
370     pv_prgm_pmt_mode_pvt.check_items(ddp_prgm_pmt_mode_rec,
371       p_validation_mode,
372       x_return_status);
373 
374     -- copy data back from the local variables to OUT or IN-OUT args, if any
375 
376 
377   end;
378 
379   procedure validate_rec(p_api_version_number  NUMBER
380     , p_init_msg_list  VARCHAR2
381     , x_return_status OUT NOCOPY  VARCHAR2
382     , x_msg_count OUT NOCOPY  NUMBER
383     , x_msg_data OUT NOCOPY  VARCHAR2
384     , p5_a0  NUMBER
385     , p5_a1  NUMBER
386     , p5_a2  NUMBER
387     , p5_a3  VARCHAR2
388     , p5_a4  DATE
389     , p5_a5  NUMBER
390     , p5_a6  DATE
391     , p5_a7  NUMBER
392     , p5_a8  NUMBER
393     , p5_a9  NUMBER
394     , p5_a10  VARCHAR2
395     , p_validation_mode  VARCHAR2
396   )
397 
398   as
399     ddp_prgm_pmt_mode_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
400     ddindx binary_integer; indx binary_integer;
401   begin
402 
403     -- copy data to the local IN or IN-OUT args, if any
404 
405 
406 
407 
408 
409     ddp_prgm_pmt_mode_rec.program_payment_mode_id := p5_a0;
410     ddp_prgm_pmt_mode_rec.program_id := p5_a1;
411     ddp_prgm_pmt_mode_rec.geo_hierarchy_id := p5_a2;
412     ddp_prgm_pmt_mode_rec.mode_of_payment := p5_a3;
413     ddp_prgm_pmt_mode_rec.last_update_date := rosetta_g_miss_date_in_map(p5_a4);
414     ddp_prgm_pmt_mode_rec.last_updated_by := p5_a5;
415     ddp_prgm_pmt_mode_rec.creation_date := rosetta_g_miss_date_in_map(p5_a6);
416     ddp_prgm_pmt_mode_rec.created_by := p5_a7;
417     ddp_prgm_pmt_mode_rec.last_update_login := p5_a8;
418     ddp_prgm_pmt_mode_rec.object_version_number := p5_a9;
419     ddp_prgm_pmt_mode_rec.mode_type := p5_a10;
420 
421 
422     -- here's the delegated call to the old PL/SQL routine
423     pv_prgm_pmt_mode_pvt.validate_rec(p_api_version_number,
424       p_init_msg_list,
425       x_return_status,
426       x_msg_count,
427       x_msg_data,
428       ddp_prgm_pmt_mode_rec,
429       p_validation_mode);
430 
431     -- copy data back from the local variables to OUT or IN-OUT args, if any
432 
433 
434 
435 
436 
437 
438   end;
439 
440   procedure complete_rec(p0_a0  NUMBER
441     , p0_a1  NUMBER
442     , p0_a2  NUMBER
443     , p0_a3  VARCHAR2
444     , p0_a4  DATE
445     , p0_a5  NUMBER
446     , p0_a6  DATE
447     , p0_a7  NUMBER
448     , p0_a8  NUMBER
449     , p0_a9  NUMBER
450     , p0_a10  VARCHAR2
451     , p1_a0 OUT NOCOPY  NUMBER
452     , p1_a1 OUT NOCOPY  NUMBER
453     , p1_a2 OUT NOCOPY  NUMBER
454     , p1_a3 OUT NOCOPY  VARCHAR2
455     , p1_a4 OUT NOCOPY  DATE
456     , p1_a5 OUT NOCOPY  NUMBER
457     , p1_a6 OUT NOCOPY  DATE
458     , p1_a7 OUT NOCOPY  NUMBER
459     , p1_a8 OUT NOCOPY  NUMBER
460     , p1_a9 OUT NOCOPY  NUMBER
461     , p1_a10 OUT NOCOPY  VARCHAR2
462   )
463 
464   as
465     ddp_prgm_pmt_mode_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
466     ddx_complete_rec pv_prgm_pmt_mode_pvt.prgm_pmt_mode_rec_type;
467     ddindx binary_integer; indx binary_integer;
468   begin
469 
470     -- copy data to the local IN or IN-OUT args, if any
471     ddp_prgm_pmt_mode_rec.program_payment_mode_id := p0_a0;
472     ddp_prgm_pmt_mode_rec.program_id := p0_a1;
473     ddp_prgm_pmt_mode_rec.geo_hierarchy_id := p0_a2;
474     ddp_prgm_pmt_mode_rec.mode_of_payment := p0_a3;
475     ddp_prgm_pmt_mode_rec.last_update_date := rosetta_g_miss_date_in_map(p0_a4);
476     ddp_prgm_pmt_mode_rec.last_updated_by := p0_a5;
477     ddp_prgm_pmt_mode_rec.creation_date := rosetta_g_miss_date_in_map(p0_a6);
478     ddp_prgm_pmt_mode_rec.created_by := p0_a7;
479     ddp_prgm_pmt_mode_rec.last_update_login := p0_a8;
480     ddp_prgm_pmt_mode_rec.object_version_number := p0_a9;
481     ddp_prgm_pmt_mode_rec.mode_type := p0_a10;
482 
483 
484     -- here's the delegated call to the old PL/SQL routine
485     pv_prgm_pmt_mode_pvt.complete_rec(ddp_prgm_pmt_mode_rec,
486       ddx_complete_rec);
487 
488     -- copy data back from the local variables to OUT or IN-OUT args, if any
489 
490     p1_a0 := ddx_complete_rec.program_payment_mode_id;
491     p1_a1 := ddx_complete_rec.program_id;
492     p1_a2 := ddx_complete_rec.geo_hierarchy_id;
493     p1_a3 := ddx_complete_rec.mode_of_payment;
494     p1_a4 := ddx_complete_rec.last_update_date;
495     p1_a5 := ddx_complete_rec.last_updated_by;
496     p1_a6 := ddx_complete_rec.creation_date;
497     p1_a7 := ddx_complete_rec.created_by;
498     p1_a8 := ddx_complete_rec.last_update_login;
499     p1_a9 := ddx_complete_rec.object_version_number;
500     p1_a10 := ddx_complete_rec.mode_type;
501   end;
502 
503 end pv_prgm_pmt_mode_pvt_w;