DBA Data[Home] [Help]

PACKAGE BODY: APPS.JTF_RS_GROUPS_PUB_W

Source


1 package body jtf_rs_groups_pub_w as
2   /* $Header: jtfrsrob.pls 120.0 2005/05/11 08:21:44 appldev 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   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 create_resource_group(p_api_version  NUMBER
23     , p_init_msg_list  VARCHAR2
24     , p_commit  VARCHAR2
25     , p_group_name  VARCHAR2
26     , p_group_desc  VARCHAR2
27     , p_exclusive_flag  VARCHAR2
28     , p_email_address  VARCHAR2
29     , p_start_date_active  date
30     , p_end_date_active  date
31     , p_accounting_code  VARCHAR2
32     , x_return_status out NOCOPY  VARCHAR2
33     , x_msg_count out NOCOPY  NUMBER
34     , x_msg_data out NOCOPY  VARCHAR2
35     , x_group_id out NOCOPY  NUMBER
36     , x_group_number out NOCOPY  VARCHAR2
37   )
38   as
39     ddp_start_date_active date;
40     ddp_end_date_active date;
41     ddindx binary_integer; indx binary_integer;
42   begin
43 
44     -- copy data to the local IN or IN-OUT args, if any
45 
46 
47 
48 
49 
50 
51 
52     ddp_start_date_active := rosetta_g_miss_date_in_map(p_start_date_active);
53 
54     ddp_end_date_active := rosetta_g_miss_date_in_map(p_end_date_active);
55 
56 
57 
58 
59 
60 
61 
62     -- here's the delegated call to the old PL/SQL routine
63     jtf_rs_groups_pub.create_resource_group(p_api_version,
64       p_init_msg_list,
65       p_commit,
66       p_group_name,
67       p_group_desc,
68       p_exclusive_flag,
69       p_email_address,
70       ddp_start_date_active,
71       ddp_end_date_active,
72       p_accounting_code,
73       x_return_status,
74       x_msg_count,
75       x_msg_data,
76       x_group_id,
77       x_group_number);
78 
79     -- copy data back from the local OUT or IN-OUT args, if any
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94   end;
95 
96   procedure create_resource_group_migrate(p_api_version  NUMBER
97     , p_init_msg_list  VARCHAR2
98     , p_commit  VARCHAR2
99     , p_group_name  VARCHAR2
100     , p_group_desc  VARCHAR2
101     , p_exclusive_flag  VARCHAR2
102     , p_email_address  VARCHAR2
103     , p_start_date_active  date
104     , p_end_date_active  date
105     , p_accounting_code  VARCHAR2
106     , p_group_id  NUMBER
107     , p_attribute1  VARCHAR2
108     , p_attribute2  VARCHAR2
109     , p_attribute3  VARCHAR2
110     , p_attribute4  VARCHAR2
111     , p_attribute5  VARCHAR2
112     , p_attribute6  VARCHAR2
113     , p_attribute7  VARCHAR2
114     , p_attribute8  VARCHAR2
115     , p_attribute9  VARCHAR2
116     , p_attribute10  VARCHAR2
117     , p_attribute11  VARCHAR2
118     , p_attribute12  VARCHAR2
119     , p_attribute13  VARCHAR2
120     , p_attribute14  VARCHAR2
121     , p_attribute15  VARCHAR2
122     , p_attribute_category  VARCHAR2
123     , x_return_status out NOCOPY  VARCHAR2
124     , x_msg_count out NOCOPY  NUMBER
125     , x_msg_data out NOCOPY  VARCHAR2
126     , x_group_id out NOCOPY  NUMBER
127     , x_group_number out NOCOPY  VARCHAR2
128   )
129   as
130     ddp_start_date_active date;
131     ddp_end_date_active date;
132     ddindx binary_integer; indx binary_integer;
133   begin
134 
135     -- copy data to the local IN or IN-OUT args, if any
136 
137 
138 
139 
140 
141 
142 
143     ddp_start_date_active := rosetta_g_miss_date_in_map(p_start_date_active);
144 
145     ddp_end_date_active := rosetta_g_miss_date_in_map(p_end_date_active);
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170     -- here's the delegated call to the old PL/SQL routine
171     jtf_rs_groups_pub.create_resource_group_migrate(p_api_version,
172       p_init_msg_list,
173       p_commit,
174       p_group_name,
175       p_group_desc,
176       p_exclusive_flag,
177       p_email_address,
178       ddp_start_date_active,
179       ddp_end_date_active,
180       p_accounting_code,
181       p_group_id,
182       p_attribute1,
183       p_attribute2,
184       p_attribute3,
185       p_attribute4,
186       p_attribute5,
187       p_attribute6,
188       p_attribute7,
189       p_attribute8,
190       p_attribute9,
191       p_attribute10,
192       p_attribute11,
193       p_attribute12,
194       p_attribute13,
195       p_attribute14,
196       p_attribute15,
197       p_attribute_category,
198       x_return_status,
199       x_msg_count,
200       x_msg_data,
201       x_group_id,
202       x_group_number);
203 
204     -- copy data back from the local OUT or IN-OUT args, if any
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236   end;
237 
238   procedure update_resource_group(p_api_version  NUMBER
239     , p_init_msg_list  VARCHAR2
240     , p_commit  VARCHAR2
241     , p_group_id  NUMBER
242     , p_group_number  VARCHAR2
243     , p_group_name  VARCHAR2
244     , p_group_desc  VARCHAR2
245     , p_exclusive_flag  VARCHAR2
246     , p_email_address  VARCHAR2
247     , p_start_date_active  date
248     , p_end_date_active  date
249     , p_accounting_code  VARCHAR2
250     , p_object_version_num in out NOCOPY  NUMBER
251     , x_return_status out NOCOPY  VARCHAR2
252     , x_msg_count out NOCOPY  NUMBER
253     , x_msg_data out NOCOPY  VARCHAR2
254   )
255   as
256     ddp_start_date_active date;
257     ddp_end_date_active date;
258     ddindx binary_integer; indx binary_integer;
259   begin
260 
261     -- copy data to the local IN or IN-OUT args, if any
262 
263 
264 
265 
266 
267 
268 
269 
270 
271     ddp_start_date_active := rosetta_g_miss_date_in_map(p_start_date_active);
272 
273     ddp_end_date_active := rosetta_g_miss_date_in_map(p_end_date_active);
274 
275 
276 
277 
278 
279 
280     -- here's the delegated call to the old PL/SQL routine
281     jtf_rs_groups_pub.update_resource_group(p_api_version,
282       p_init_msg_list,
283       p_commit,
284       p_group_id,
285       p_group_number,
286       p_group_name,
287       p_group_desc,
288       p_exclusive_flag,
289       p_email_address,
290       ddp_start_date_active,
291       ddp_end_date_active,
292       p_accounting_code,
293       p_object_version_num,
294       x_return_status,
295       x_msg_count,
296       x_msg_data);
297 
298     -- copy data back from the local OUT or IN-OUT args, if any
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
314   end;
315 
316 end jtf_rs_groups_pub_w;