1 package body okl_rev_loss_prov_pub_w as
2 /* $Header: OKLURPVB.pls 120.3 2005/10/30 04:49:39 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 -- 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 reverse_loss_provisions(p_api_version NUMBER
23 , p_init_msg_list VARCHAR2
24 , x_msg_count out nocopy NUMBER
25 , x_msg_data out nocopy VARCHAR2
26 , x_return_status out nocopy VARCHAR2
27 , p5_a0 VARCHAR2 := fnd_api.g_miss_char
28 , p5_a1 VARCHAR2 := fnd_api.g_miss_char
29 , p5_a2 DATE := fnd_api.g_miss_date
30 )
31
32 as
33 ddp_lprv_rec okl_rev_loss_prov_pub.lprv_rec_type;
34 ddindx binary_integer; indx binary_integer;
35 begin
36
37 -- copy data to the local IN or IN-OUT args, if any
38
39
40
41
42
43 ddp_lprv_rec.cntrct_num := p5_a0;
44 ddp_lprv_rec.reversal_type := p5_a1;
45 ddp_lprv_rec.reversal_date := rosetta_g_miss_date_in_map(p5_a2);
46
47 -- here's the delegated call to the old PL/SQL routine
48 okl_rev_loss_prov_pub.reverse_loss_provisions(p_api_version,
49 p_init_msg_list,
50 x_msg_count,
51 x_msg_data,
52 x_return_status,
53 ddp_lprv_rec);
54
55 -- copy data back from the local variables to OUT or IN-OUT args, if any
56
57
58
59
60
61 end;
62
63 procedure reverse_loss_provisions(p_api_version NUMBER
64 , p_init_msg_list VARCHAR2
65 , x_msg_count out nocopy NUMBER
66 , x_msg_data out nocopy VARCHAR2
67 , x_return_status out nocopy VARCHAR2
68 , p5_a0 JTF_VARCHAR2_TABLE_200
69 , p5_a1 JTF_VARCHAR2_TABLE_100
70 , p5_a2 JTF_DATE_TABLE
71 )
72
73 as
74 ddp_lprv_tbl okl_rev_loss_prov_pub.lprv_tbl_type;
75 ddindx binary_integer; indx binary_integer;
76 begin
77
78 -- copy data to the local IN or IN-OUT args, if any
79
80
81
82
83
84 okl_rev_loss_prov_pvt_w.rosetta_table_copy_in_p1(ddp_lprv_tbl, p5_a0
85 , p5_a1
86 , p5_a2
87 );
88
89 -- here's the delegated call to the old PL/SQL routine
90 okl_rev_loss_prov_pub.reverse_loss_provisions(p_api_version,
91 p_init_msg_list,
92 x_msg_count,
93 x_msg_data,
94 x_return_status,
95 ddp_lprv_tbl);
96
97 -- copy data back from the local variables to OUT or IN-OUT args, if any
98
99
100
101
102
103 end;
104
105 end okl_rev_loss_prov_pub_w;