DBA Data[Home] [Help]

PACKAGE BODY: APPS.AHL_APPR_DEPT_SHIFTS_PUB_W

Source


1 package body ahl_appr_dept_shifts_pub_w as
2   /* $Header: AHLWDSHB.pls 120.2 2007/12/24 22:41:55 rbhavsar 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   rosetta_g_mistake_date_high date := to_date('01/01/+4710', 'MM/DD/SYYYY');
6   rosetta_g_mistake_date_low date := to_date('01/01/-4710', 'MM/DD/SYYYY');
7 
8   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
9   function rosetta_g_miss_date_in_map(d date) return date as
10   begin
11     if d > rosetta_g_mistake_date_high then return fnd_api.g_miss_date; end if;
12     if d < rosetta_g_mistake_date_low then return fnd_api.g_miss_date; end if;
13     return d;
14   end;
15 
16   procedure create_appr_dept_shifts(p_api_version  NUMBER
17     , p_init_msg_list  VARCHAR2
18     , p_commit  VARCHAR2
19     , p_validation_level  NUMBER
20     , p_default  VARCHAR2
21     , p_module_type  VARCHAR2
22     , x_return_status out nocopy  VARCHAR2
23     , x_msg_count out nocopy  NUMBER
24     , x_msg_data out nocopy  VARCHAR2
25     , p9_a0 in out nocopy  NUMBER
26     , p9_a1 in out nocopy  NUMBER
27     , p9_a2 in out nocopy  VARCHAR2
28     , p9_a3 in out nocopy  NUMBER
29     , p9_a4 in out nocopy  DATE
30     , p9_a5 in out nocopy  NUMBER
31     , p9_a6 in out nocopy  DATE
32     , p9_a7 in out nocopy  NUMBER
33     , p9_a8 in out nocopy  NUMBER
34     , p9_a9 in out nocopy  NUMBER
35     , p9_a10 in out nocopy  VARCHAR2
36     , p9_a11 in out nocopy  VARCHAR2
37     , p9_a12 in out nocopy  VARCHAR2
38     , p9_a13 in out nocopy  NUMBER
39     , p9_a14 in out nocopy  NUMBER
40     , p9_a15 in out nocopy  NUMBER
41     , p9_a16 in out nocopy  VARCHAR2
42     , p9_a17 in out nocopy  VARCHAR2
43     , p9_a18 in out nocopy  NUMBER
44     , p9_a19 in out nocopy  VARCHAR2
45     , p9_a20 in out nocopy  VARCHAR2
46     , p9_a21 in out nocopy  VARCHAR2
47     , p9_a22 in out nocopy  VARCHAR2
48     , p9_a23 in out nocopy  VARCHAR2
49     , p9_a24 in out nocopy  VARCHAR2
50     , p9_a25 in out nocopy  VARCHAR2
51     , p9_a26 in out nocopy  VARCHAR2
52     , p9_a27 in out nocopy  VARCHAR2
53     , p9_a28 in out nocopy  VARCHAR2
54     , p9_a29 in out nocopy  VARCHAR2
55     , p9_a30 in out nocopy  VARCHAR2
56     , p9_a31 in out nocopy  VARCHAR2
57     , p9_a32 in out nocopy  VARCHAR2
58     , p9_a33 in out nocopy  VARCHAR2
59     , p9_a34 in out nocopy  VARCHAR2
60     , p9_a35 in out nocopy  VARCHAR2
61     , p9_a36 in out nocopy  VARCHAR2
62   )
63 
64   as
65     ddp_x_appr_deptshift_rec ahl_appr_dept_shifts_pub.appr_deptshift_rec;
66     ddindx binary_integer; indx binary_integer;
67   begin
68 
69     -- copy data to the local IN or IN-OUT args, if any
70 
71 
72 
73 
74 
75 
76 
77 
78 
79     ddp_x_appr_deptshift_rec.ahl_department_shifts_id := p9_a0;
80     ddp_x_appr_deptshift_rec.organization_id := p9_a1;
81     ddp_x_appr_deptshift_rec.organization_name := p9_a2;
82     ddp_x_appr_deptshift_rec.object_version_number := p9_a3;
83     ddp_x_appr_deptshift_rec.last_update_date := rosetta_g_miss_date_in_map(p9_a4);
84     ddp_x_appr_deptshift_rec.last_updated_by := p9_a5;
85     ddp_x_appr_deptshift_rec.creation_date := rosetta_g_miss_date_in_map(p9_a6);
86     ddp_x_appr_deptshift_rec.created_by := p9_a7;
87     ddp_x_appr_deptshift_rec.last_update_login := p9_a8;
88     ddp_x_appr_deptshift_rec.department_id := p9_a9;
89     ddp_x_appr_deptshift_rec.dept_description := p9_a10;
90     ddp_x_appr_deptshift_rec.calendar_code := p9_a11;
91     ddp_x_appr_deptshift_rec.calendar_description := p9_a12;
92     ddp_x_appr_deptshift_rec.bom_workday_patterns_id := p9_a13;
93     ddp_x_appr_deptshift_rec.shift_num := p9_a14;
94     ddp_x_appr_deptshift_rec.seq_num := p9_a15;
95     ddp_x_appr_deptshift_rec.seq_name := p9_a16;
96     ddp_x_appr_deptshift_rec.subinventory := p9_a17;
97     ddp_x_appr_deptshift_rec.inv_locator_id := p9_a18;
98     ddp_x_appr_deptshift_rec.locator_segments := p9_a19;
99     ddp_x_appr_deptshift_rec.attribute_category := p9_a20;
100     ddp_x_appr_deptshift_rec.attribute1 := p9_a21;
101     ddp_x_appr_deptshift_rec.attribute2 := p9_a22;
102     ddp_x_appr_deptshift_rec.attribute3 := p9_a23;
103     ddp_x_appr_deptshift_rec.attribute4 := p9_a24;
104     ddp_x_appr_deptshift_rec.attribute5 := p9_a25;
105     ddp_x_appr_deptshift_rec.attribute6 := p9_a26;
106     ddp_x_appr_deptshift_rec.attribute7 := p9_a27;
107     ddp_x_appr_deptshift_rec.attribute8 := p9_a28;
108     ddp_x_appr_deptshift_rec.attribute9 := p9_a29;
109     ddp_x_appr_deptshift_rec.attribute10 := p9_a30;
110     ddp_x_appr_deptshift_rec.attribute11 := p9_a31;
111     ddp_x_appr_deptshift_rec.attribute12 := p9_a32;
112     ddp_x_appr_deptshift_rec.attribute13 := p9_a33;
113     ddp_x_appr_deptshift_rec.attribute14 := p9_a34;
114     ddp_x_appr_deptshift_rec.attribute15 := p9_a35;
115     ddp_x_appr_deptshift_rec.dml_operation := p9_a36;
116 
117     -- here's the delegated call to the old PL/SQL routine
118     ahl_appr_dept_shifts_pub.create_appr_dept_shifts(p_api_version,
119       p_init_msg_list,
120       p_commit,
121       p_validation_level,
122       p_default,
123       p_module_type,
124       x_return_status,
125       x_msg_count,
126       x_msg_data,
127       ddp_x_appr_deptshift_rec);
128 
129     -- copy data back from the local variables to OUT or IN-OUT args, if any
130 
131 
132 
133 
134 
135 
136 
137 
138 
139     p9_a0 := ddp_x_appr_deptshift_rec.ahl_department_shifts_id;
140     p9_a1 := ddp_x_appr_deptshift_rec.organization_id;
141     p9_a2 := ddp_x_appr_deptshift_rec.organization_name;
142     p9_a3 := ddp_x_appr_deptshift_rec.object_version_number;
143     p9_a4 := ddp_x_appr_deptshift_rec.last_update_date;
144     p9_a5 := ddp_x_appr_deptshift_rec.last_updated_by;
145     p9_a6 := ddp_x_appr_deptshift_rec.creation_date;
146     p9_a7 := ddp_x_appr_deptshift_rec.created_by;
147     p9_a8 := ddp_x_appr_deptshift_rec.last_update_login;
148     p9_a9 := ddp_x_appr_deptshift_rec.department_id;
149     p9_a10 := ddp_x_appr_deptshift_rec.dept_description;
150     p9_a11 := ddp_x_appr_deptshift_rec.calendar_code;
151     p9_a12 := ddp_x_appr_deptshift_rec.calendar_description;
152     p9_a13 := ddp_x_appr_deptshift_rec.bom_workday_patterns_id;
153     p9_a14 := ddp_x_appr_deptshift_rec.shift_num;
154     p9_a15 := ddp_x_appr_deptshift_rec.seq_num;
155     p9_a16 := ddp_x_appr_deptshift_rec.seq_name;
156     p9_a17 := ddp_x_appr_deptshift_rec.subinventory;
157     p9_a18 := ddp_x_appr_deptshift_rec.inv_locator_id;
158     p9_a19 := ddp_x_appr_deptshift_rec.locator_segments;
159     p9_a20 := ddp_x_appr_deptshift_rec.attribute_category;
160     p9_a21 := ddp_x_appr_deptshift_rec.attribute1;
161     p9_a22 := ddp_x_appr_deptshift_rec.attribute2;
162     p9_a23 := ddp_x_appr_deptshift_rec.attribute3;
163     p9_a24 := ddp_x_appr_deptshift_rec.attribute4;
164     p9_a25 := ddp_x_appr_deptshift_rec.attribute5;
165     p9_a26 := ddp_x_appr_deptshift_rec.attribute6;
166     p9_a27 := ddp_x_appr_deptshift_rec.attribute7;
167     p9_a28 := ddp_x_appr_deptshift_rec.attribute8;
168     p9_a29 := ddp_x_appr_deptshift_rec.attribute9;
169     p9_a30 := ddp_x_appr_deptshift_rec.attribute10;
170     p9_a31 := ddp_x_appr_deptshift_rec.attribute11;
171     p9_a32 := ddp_x_appr_deptshift_rec.attribute12;
172     p9_a33 := ddp_x_appr_deptshift_rec.attribute13;
173     p9_a34 := ddp_x_appr_deptshift_rec.attribute14;
174     p9_a35 := ddp_x_appr_deptshift_rec.attribute15;
175     p9_a36 := ddp_x_appr_deptshift_rec.dml_operation;
176   end;
177 
178   procedure delete_appr_dept_shifts(p_api_version  NUMBER
179     , p_init_msg_list  VARCHAR2
180     , p_commit  VARCHAR2
181     , p_validation_level  NUMBER
182     , p_default  VARCHAR2
183     , p_module_type  VARCHAR2
184     , x_return_status out nocopy  VARCHAR2
185     , x_msg_count out nocopy  NUMBER
186     , x_msg_data out nocopy  VARCHAR2
187     , p9_a0 in out nocopy  NUMBER
188     , p9_a1 in out nocopy  NUMBER
189     , p9_a2 in out nocopy  VARCHAR2
190     , p9_a3 in out nocopy  NUMBER
191     , p9_a4 in out nocopy  DATE
192     , p9_a5 in out nocopy  NUMBER
193     , p9_a6 in out nocopy  DATE
194     , p9_a7 in out nocopy  NUMBER
195     , p9_a8 in out nocopy  NUMBER
196     , p9_a9 in out nocopy  NUMBER
197     , p9_a10 in out nocopy  VARCHAR2
198     , p9_a11 in out nocopy  VARCHAR2
199     , p9_a12 in out nocopy  VARCHAR2
200     , p9_a13 in out nocopy  NUMBER
201     , p9_a14 in out nocopy  NUMBER
202     , p9_a15 in out nocopy  NUMBER
203     , p9_a16 in out nocopy  VARCHAR2
204     , p9_a17 in out nocopy  VARCHAR2
205     , p9_a18 in out nocopy  NUMBER
206     , p9_a19 in out nocopy  VARCHAR2
207     , p9_a20 in out nocopy  VARCHAR2
208     , p9_a21 in out nocopy  VARCHAR2
209     , p9_a22 in out nocopy  VARCHAR2
210     , p9_a23 in out nocopy  VARCHAR2
211     , p9_a24 in out nocopy  VARCHAR2
212     , p9_a25 in out nocopy  VARCHAR2
213     , p9_a26 in out nocopy  VARCHAR2
214     , p9_a27 in out nocopy  VARCHAR2
215     , p9_a28 in out nocopy  VARCHAR2
216     , p9_a29 in out nocopy  VARCHAR2
217     , p9_a30 in out nocopy  VARCHAR2
218     , p9_a31 in out nocopy  VARCHAR2
219     , p9_a32 in out nocopy  VARCHAR2
220     , p9_a33 in out nocopy  VARCHAR2
221     , p9_a34 in out nocopy  VARCHAR2
222     , p9_a35 in out nocopy  VARCHAR2
223     , p9_a36 in out nocopy  VARCHAR2
224   )
225 
226   as
227     ddp_x_appr_deptshift_rec ahl_appr_dept_shifts_pub.appr_deptshift_rec;
228     ddindx binary_integer; indx binary_integer;
229   begin
230 
231     -- copy data to the local IN or IN-OUT args, if any
232 
233 
234 
235 
236 
237 
238 
239 
240 
241     ddp_x_appr_deptshift_rec.ahl_department_shifts_id := p9_a0;
242     ddp_x_appr_deptshift_rec.organization_id := p9_a1;
243     ddp_x_appr_deptshift_rec.organization_name := p9_a2;
244     ddp_x_appr_deptshift_rec.object_version_number := p9_a3;
245     ddp_x_appr_deptshift_rec.last_update_date := rosetta_g_miss_date_in_map(p9_a4);
246     ddp_x_appr_deptshift_rec.last_updated_by := p9_a5;
247     ddp_x_appr_deptshift_rec.creation_date := rosetta_g_miss_date_in_map(p9_a6);
248     ddp_x_appr_deptshift_rec.created_by := p9_a7;
249     ddp_x_appr_deptshift_rec.last_update_login := p9_a8;
250     ddp_x_appr_deptshift_rec.department_id := p9_a9;
251     ddp_x_appr_deptshift_rec.dept_description := p9_a10;
252     ddp_x_appr_deptshift_rec.calendar_code := p9_a11;
253     ddp_x_appr_deptshift_rec.calendar_description := p9_a12;
254     ddp_x_appr_deptshift_rec.bom_workday_patterns_id := p9_a13;
255     ddp_x_appr_deptshift_rec.shift_num := p9_a14;
256     ddp_x_appr_deptshift_rec.seq_num := p9_a15;
257     ddp_x_appr_deptshift_rec.seq_name := p9_a16;
258     ddp_x_appr_deptshift_rec.subinventory := p9_a17;
259     ddp_x_appr_deptshift_rec.inv_locator_id := p9_a18;
260     ddp_x_appr_deptshift_rec.locator_segments := p9_a19;
261     ddp_x_appr_deptshift_rec.attribute_category := p9_a20;
262     ddp_x_appr_deptshift_rec.attribute1 := p9_a21;
263     ddp_x_appr_deptshift_rec.attribute2 := p9_a22;
264     ddp_x_appr_deptshift_rec.attribute3 := p9_a23;
265     ddp_x_appr_deptshift_rec.attribute4 := p9_a24;
266     ddp_x_appr_deptshift_rec.attribute5 := p9_a25;
267     ddp_x_appr_deptshift_rec.attribute6 := p9_a26;
268     ddp_x_appr_deptshift_rec.attribute7 := p9_a27;
269     ddp_x_appr_deptshift_rec.attribute8 := p9_a28;
270     ddp_x_appr_deptshift_rec.attribute9 := p9_a29;
271     ddp_x_appr_deptshift_rec.attribute10 := p9_a30;
272     ddp_x_appr_deptshift_rec.attribute11 := p9_a31;
273     ddp_x_appr_deptshift_rec.attribute12 := p9_a32;
274     ddp_x_appr_deptshift_rec.attribute13 := p9_a33;
275     ddp_x_appr_deptshift_rec.attribute14 := p9_a34;
276     ddp_x_appr_deptshift_rec.attribute15 := p9_a35;
277     ddp_x_appr_deptshift_rec.dml_operation := p9_a36;
278 
279     -- here's the delegated call to the old PL/SQL routine
280     ahl_appr_dept_shifts_pub.delete_appr_dept_shifts(p_api_version,
281       p_init_msg_list,
282       p_commit,
283       p_validation_level,
284       p_default,
285       p_module_type,
286       x_return_status,
287       x_msg_count,
288       x_msg_data,
289       ddp_x_appr_deptshift_rec);
290 
291     -- copy data back from the local variables to OUT or IN-OUT args, if any
292 
293 
294 
295 
296 
297 
298 
299 
300 
301     p9_a0 := ddp_x_appr_deptshift_rec.ahl_department_shifts_id;
302     p9_a1 := ddp_x_appr_deptshift_rec.organization_id;
303     p9_a2 := ddp_x_appr_deptshift_rec.organization_name;
304     p9_a3 := ddp_x_appr_deptshift_rec.object_version_number;
305     p9_a4 := ddp_x_appr_deptshift_rec.last_update_date;
306     p9_a5 := ddp_x_appr_deptshift_rec.last_updated_by;
307     p9_a6 := ddp_x_appr_deptshift_rec.creation_date;
308     p9_a7 := ddp_x_appr_deptshift_rec.created_by;
309     p9_a8 := ddp_x_appr_deptshift_rec.last_update_login;
310     p9_a9 := ddp_x_appr_deptshift_rec.department_id;
311     p9_a10 := ddp_x_appr_deptshift_rec.dept_description;
312     p9_a11 := ddp_x_appr_deptshift_rec.calendar_code;
313     p9_a12 := ddp_x_appr_deptshift_rec.calendar_description;
314     p9_a13 := ddp_x_appr_deptshift_rec.bom_workday_patterns_id;
315     p9_a14 := ddp_x_appr_deptshift_rec.shift_num;
316     p9_a15 := ddp_x_appr_deptshift_rec.seq_num;
317     p9_a16 := ddp_x_appr_deptshift_rec.seq_name;
318     p9_a17 := ddp_x_appr_deptshift_rec.subinventory;
319     p9_a18 := ddp_x_appr_deptshift_rec.inv_locator_id;
320     p9_a19 := ddp_x_appr_deptshift_rec.locator_segments;
321     p9_a20 := ddp_x_appr_deptshift_rec.attribute_category;
322     p9_a21 := ddp_x_appr_deptshift_rec.attribute1;
323     p9_a22 := ddp_x_appr_deptshift_rec.attribute2;
324     p9_a23 := ddp_x_appr_deptshift_rec.attribute3;
325     p9_a24 := ddp_x_appr_deptshift_rec.attribute4;
326     p9_a25 := ddp_x_appr_deptshift_rec.attribute5;
327     p9_a26 := ddp_x_appr_deptshift_rec.attribute6;
328     p9_a27 := ddp_x_appr_deptshift_rec.attribute7;
329     p9_a28 := ddp_x_appr_deptshift_rec.attribute8;
330     p9_a29 := ddp_x_appr_deptshift_rec.attribute9;
331     p9_a30 := ddp_x_appr_deptshift_rec.attribute10;
332     p9_a31 := ddp_x_appr_deptshift_rec.attribute11;
333     p9_a32 := ddp_x_appr_deptshift_rec.attribute12;
334     p9_a33 := ddp_x_appr_deptshift_rec.attribute13;
335     p9_a34 := ddp_x_appr_deptshift_rec.attribute14;
336     p9_a35 := ddp_x_appr_deptshift_rec.attribute15;
337     p9_a36 := ddp_x_appr_deptshift_rec.dml_operation;
338   end;
339 
340 end ahl_appr_dept_shifts_pub_w;