1 package body cn_credit_type_conv_pvt_w as
2 /* $Header: cnwctcnb.pls 115.3 2002/11/25 14:44:57 rarajara 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 procedure create_conversion(p_api_version NUMBER
14 , p_init_msg_list VARCHAR2
15 , p_commit VARCHAR2
16 , p_validation_level NUMBER
17 , p_from_credit_type NUMBER
18 , p_to_credit_type NUMBER
19 , p_conv_factor NUMBER
20 , p_start_date date
21 , p_end_date date
22 , x_return_status out nocopy VARCHAR2
23 , x_msg_count out nocopy NUMBER
24 , x_msg_data out nocopy VARCHAR2
25 )
26
27 as
28 ddp_start_date date;
29 ddp_end_date date;
30 ddindx binary_integer; indx binary_integer;
31 begin
32
33 -- copy data to the local IN or IN-OUT args, if any
34
35
36
37
38
39
40
41 ddp_start_date := rosetta_g_miss_date_in_map(p_start_date);
42
43 ddp_end_date := rosetta_g_miss_date_in_map(p_end_date);
44
45
46
47
48 -- here's the delegated call to the old PL/SQL routine
49 cn_credit_type_conv_pvt.create_conversion(p_api_version,
50 p_init_msg_list,
51 p_commit,
52 p_validation_level,
53 p_from_credit_type,
54 p_to_credit_type,
55 p_conv_factor,
56 ddp_start_date,
57 ddp_end_date,
58 x_return_status,
59 x_msg_count,
60 x_msg_data);
61
62 -- copy data back from the local variables to OUT or IN-OUT args, if any
63
64
65
66
67
68
69
70
71
72
73
74 end;
75
76 procedure update_conversion(p_api_version NUMBER
77 , p_init_msg_list VARCHAR2
78 , p_commit VARCHAR2
79 , p_validation_level NUMBER
80 , p_object_version NUMBER
81 , p_conv_id NUMBER
82 , p_from_credit_type NUMBER
83 , p_to_credit_type NUMBER
84 , p_conv_factor NUMBER
85 , p_start_date date
86 , p_end_date date
87 , x_return_status out nocopy VARCHAR2
88 , x_msg_count out nocopy NUMBER
89 , x_msg_data out nocopy VARCHAR2
90 )
91
92 as
93 ddp_start_date date;
94 ddp_end_date date;
95 ddindx binary_integer; indx binary_integer;
96 begin
97
98 -- copy data to the local IN or IN-OUT args, if any
99
100
101
102
103
104
105
106
107
108 ddp_start_date := rosetta_g_miss_date_in_map(p_start_date);
109
110 ddp_end_date := rosetta_g_miss_date_in_map(p_end_date);
111
112
113
114
115 -- here's the delegated call to the old PL/SQL routine
116 cn_credit_type_conv_pvt.update_conversion(p_api_version,
117 p_init_msg_list,
118 p_commit,
119 p_validation_level,
120 p_object_version,
121 p_conv_id,
122 p_from_credit_type,
123 p_to_credit_type,
124 p_conv_factor,
125 ddp_start_date,
126 ddp_end_date,
127 x_return_status,
128 x_msg_count,
129 x_msg_data);
130
131 -- copy data back from the local variables to OUT or IN-OUT args, if any
132
133
134
135
136
137
138
139
140
141
142
143
144
145 end;
146
147 end cn_credit_type_conv_pvt_w;