DBA Data[Home] [Help]

PACKAGE BODY: APPS.AHL_WARRANTY_UTILS_PVT_W

Source


1 package body ahl_warranty_utils_pvt_w as
2   /* $Header: AHLWSWUB.pls 120.1.12020000.2 2012/12/14 06:46:52 shnatu ship $ */
3   procedure rosetta_table_copy_in_p0(t out nocopy ahl_warranty_utils_pvt.warranty_contract_id_tbl_type, a0 JTF_NUMBER_TABLE) as
4     ddindx binary_integer; indx binary_integer;
5   begin
6   if a0 is not null and a0.count > 0 then
7       if a0.count > 0 then
8         indx := a0.first;
9         ddindx := 1;
10         while true loop
11           t(ddindx) := a0(indx);
12           ddindx := ddindx+1;
13           if a0.last =indx
14             then exit;
15           end if;
16           indx := a0.next(indx);
17         end loop;
18       end if;
19    end if;
20   end rosetta_table_copy_in_p0;
21   procedure rosetta_table_copy_out_p0(t ahl_warranty_utils_pvt.warranty_contract_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
22     ddindx binary_integer; indx binary_integer;
23   begin
24   if t is null or t.count = 0 then
25     a0 := JTF_NUMBER_TABLE();
26   else
27       a0 := JTF_NUMBER_TABLE();
28       if t.count > 0 then
29         a0.extend(t.count);
30         ddindx := t.first;
31         indx := 1;
32         while true loop
33           a0(indx) := t(ddindx);
34           indx := indx+1;
35           if t.last =ddindx
36             then exit;
37           end if;
38           ddindx := t.next(ddindx);
39         end loop;
40       end if;
41    end if;
42   end rosetta_table_copy_out_p0;
43 
44   procedure rosetta_table_copy_in_p1(t out nocopy ahl_warranty_utils_pvt.warranty_vendor_id_tbl_type, a0 JTF_NUMBER_TABLE) as
45     ddindx binary_integer; indx binary_integer;
46   begin
47   if a0 is not null and a0.count > 0 then
48       if a0.count > 0 then
49         indx := a0.first;
50         ddindx := 1;
51         while true loop
52           t(ddindx) := a0(indx);
53           ddindx := ddindx+1;
54           if a0.last =indx
55             then exit;
56           end if;
57           indx := a0.next(indx);
58         end loop;
59       end if;
60    end if;
61   end rosetta_table_copy_in_p1;
62   procedure rosetta_table_copy_out_p1(t ahl_warranty_utils_pvt.warranty_vendor_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
63     ddindx binary_integer; indx binary_integer;
64   begin
65   if t is null or t.count = 0 then
66     a0 := JTF_NUMBER_TABLE();
67   else
68       a0 := JTF_NUMBER_TABLE();
69       if t.count > 0 then
70         a0.extend(t.count);
71         ddindx := t.first;
72         indx := 1;
73         while true loop
74           a0(indx) := t(ddindx);
75           indx := indx+1;
76           if t.last =ddindx
77             then exit;
78           end if;
79           ddindx := t.next(ddindx);
80         end loop;
81       end if;
82    end if;
83   end rosetta_table_copy_out_p1;
84 
85   procedure rosetta_table_copy_in_p3(t out nocopy ahl_warranty_utils_pvt.turnover_notes_tbl_type, a0 JTF_NUMBER_TABLE
86     , a1 JTF_NUMBER_TABLE
87     , a2 JTF_VARCHAR2_TABLE_100
88     , a3 JTF_VARCHAR2_TABLE_2000
89     , a4 JTF_NUMBER_TABLE
90     , a5 JTF_VARCHAR2_TABLE_300
91     , a6 JTF_DATE_TABLE
92     ) as
93     ddindx binary_integer; indx binary_integer;
94   begin
95   if a0 is not null and a0.count > 0 then
96       if a0.count > 0 then
97         indx := a0.first;
98         ddindx := 1;
99         while true loop
100           t(ddindx).jtf_note_id := a0(indx);
101           t(ddindx).source_object_id := a1(indx);
102           t(ddindx).source_object_code := a2(indx);
103           t(ddindx).notes := a3(indx);
104           t(ddindx).user_id := a4(indx);
105           t(ddindx).employee_name := a5(indx);
106           t(ddindx).entered_date := a6(indx);
107           ddindx := ddindx+1;
108           if a0.last =indx
109             then exit;
110           end if;
111           indx := a0.next(indx);
112         end loop;
113       end if;
114    end if;
115   end rosetta_table_copy_in_p3;
116   procedure rosetta_table_copy_out_p3(t ahl_warranty_utils_pvt.turnover_notes_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
117     , a1 out nocopy JTF_NUMBER_TABLE
118     , a2 out nocopy JTF_VARCHAR2_TABLE_100
119     , a3 out nocopy JTF_VARCHAR2_TABLE_2000
120     , a4 out nocopy JTF_NUMBER_TABLE
121     , a5 out nocopy JTF_VARCHAR2_TABLE_300
122     , a6 out nocopy JTF_DATE_TABLE
123     ) as
124     ddindx binary_integer; indx binary_integer;
125   begin
126   if t is null or t.count = 0 then
127     a0 := JTF_NUMBER_TABLE();
128     a1 := JTF_NUMBER_TABLE();
129     a2 := JTF_VARCHAR2_TABLE_100();
130     a3 := JTF_VARCHAR2_TABLE_2000();
131     a4 := JTF_NUMBER_TABLE();
132     a5 := JTF_VARCHAR2_TABLE_300();
133     a6 := JTF_DATE_TABLE();
134   else
135       a0 := JTF_NUMBER_TABLE();
136       a1 := JTF_NUMBER_TABLE();
137       a2 := JTF_VARCHAR2_TABLE_100();
138       a3 := JTF_VARCHAR2_TABLE_2000();
139       a4 := JTF_NUMBER_TABLE();
140       a5 := JTF_VARCHAR2_TABLE_300();
141       a6 := JTF_DATE_TABLE();
142       if t.count > 0 then
143         a0.extend(t.count);
144         a1.extend(t.count);
145         a2.extend(t.count);
146         a3.extend(t.count);
147         a4.extend(t.count);
148         a5.extend(t.count);
149         a6.extend(t.count);
150         ddindx := t.first;
151         indx := 1;
152         while true loop
153           a0(indx) := t(ddindx).jtf_note_id;
154           a1(indx) := t(ddindx).source_object_id;
155           a2(indx) := t(ddindx).source_object_code;
156           a3(indx) := t(ddindx).notes;
157           a4(indx) := t(ddindx).user_id;
158           a5(indx) := t(ddindx).employee_name;
159           a6(indx) := t(ddindx).entered_date;
160           indx := indx+1;
161           if t.last =ddindx
162             then exit;
163           end if;
164           ddindx := t.next(ddindx);
165         end loop;
166       end if;
167    end if;
168   end rosetta_table_copy_out_p3;
169 
170   procedure calc_contract_exp_date(p_api_version  NUMBER
171     , p_init_msg_list  VARCHAR2
172     , p_commit  VARCHAR2
173     , p_validation_level  NUMBER
174     , p_module_type  VARCHAR2
175     , p_warranty_contract_id_tbl JTF_NUMBER_TABLE
176     , x_return_status out nocopy  VARCHAR2
177     , x_msg_count out nocopy  NUMBER
178     , x_msg_data out nocopy  VARCHAR2
179   )
180 
181   as
182     ddp_warranty_contract_id_tbl ahl_warranty_utils_pvt.warranty_contract_id_tbl_type;
183     ddindx binary_integer; indx binary_integer;
184   begin
185 
186     -- copy data to the local IN or IN-OUT args, if any
187 
188 
189 
190 
191 
192     ahl_warranty_utils_pvt_w.rosetta_table_copy_in_p0(ddp_warranty_contract_id_tbl, p_warranty_contract_id_tbl);
193 
194 
195 
196 
197     -- here's the delegated call to the old PL/SQL routine
198     ahl_warranty_utils_pvt.calc_contract_exp_date(p_api_version,
199       p_init_msg_list,
200       p_commit,
201       p_validation_level,
202       p_module_type,
203       ddp_warranty_contract_id_tbl,
204       x_return_status,
205       x_msg_count,
206       x_msg_data);
207 
208     -- copy data back from the local variables to OUT or IN-OUT args, if any
209 
210 
211 
212 
213 
214 
215 
216 
217   end;
218 
219   procedure disable_templates_for_vendor(p_api_version  NUMBER
220     , p_init_msg_list  VARCHAR2
221     , p_commit  VARCHAR2
222     , p_validation_level  NUMBER
223     , p_module_type  VARCHAR2
224     , p_warranty_vendor_id_tbl JTF_NUMBER_TABLE
225     , x_return_status out nocopy  VARCHAR2
226     , x_msg_count out nocopy  NUMBER
227     , x_msg_data out nocopy  VARCHAR2
228   )
229 
230   as
231     ddp_warranty_vendor_id_tbl ahl_warranty_utils_pvt.warranty_vendor_id_tbl_type;
232     ddindx binary_integer; indx binary_integer;
233   begin
234 
235     -- copy data to the local IN or IN-OUT args, if any
236 
237 
238 
239 
240 
241     ahl_warranty_utils_pvt_w.rosetta_table_copy_in_p1(ddp_warranty_vendor_id_tbl, p_warranty_vendor_id_tbl);
242 
243 
244 
245 
246     -- here's the delegated call to the old PL/SQL routine
247     ahl_warranty_utils_pvt.disable_templates_for_vendor(p_api_version,
248       p_init_msg_list,
249       p_commit,
250       p_validation_level,
251       p_module_type,
252       ddp_warranty_vendor_id_tbl,
253       x_return_status,
254       x_msg_count,
255       x_msg_data);
256 
257     -- copy data back from the local variables to OUT or IN-OUT args, if any
258 
259 
260 
261 
262 
263 
264 
265 
266   end;
267 
268   procedure insert_turnover_notes(p_api_version  NUMBER
269     , p_init_msg_list  VARCHAR2
270     , p_commit  VARCHAR2
271     , p_validation_level  NUMBER
272     , p_default  VARCHAR2
273     , p_module_type  VARCHAR2
274     , x_return_status out nocopy  VARCHAR2
275     , x_msg_count out nocopy  NUMBER
276     , x_msg_data out nocopy  VARCHAR2
277     , p9_a0 in out nocopy JTF_NUMBER_TABLE
278     , p9_a1 in out nocopy JTF_NUMBER_TABLE
279     , p9_a2 in out nocopy JTF_VARCHAR2_TABLE_100
280     , p9_a3 in out nocopy JTF_VARCHAR2_TABLE_2000
281     , p9_a4 in out nocopy JTF_NUMBER_TABLE
282     , p9_a5 in out nocopy JTF_VARCHAR2_TABLE_300
283     , p9_a6 in out nocopy JTF_DATE_TABLE
284   )
285 
286   as
287     ddp_trunover_notes_tbl ahl_warranty_utils_pvt.turnover_notes_tbl_type;
288     ddindx binary_integer; indx binary_integer;
289   begin
290 
291     -- copy data to the local IN or IN-OUT args, if any
292 
293 
294 
295 
296 
297 
298 
299 
300 
301     ahl_warranty_utils_pvt_w.rosetta_table_copy_in_p3(ddp_trunover_notes_tbl, p9_a0
302       , p9_a1
303       , p9_a2
304       , p9_a3
305       , p9_a4
306       , p9_a5
307       , p9_a6
308       );
309 
310     -- here's the delegated call to the old PL/SQL routine
311     ahl_warranty_utils_pvt.insert_turnover_notes(p_api_version,
312       p_init_msg_list,
313       p_commit,
314       p_validation_level,
315       p_default,
316       p_module_type,
317       x_return_status,
318       x_msg_count,
319       x_msg_data,
320       ddp_trunover_notes_tbl);
321 
322     -- copy data back from the local variables to OUT or IN-OUT args, if any
323 
324 
325 
326 
327 
328 
329 
330 
331 
332     ahl_warranty_utils_pvt_w.rosetta_table_copy_out_p3(ddp_trunover_notes_tbl, p9_a0
333       , p9_a1
334       , p9_a2
335       , p9_a3
336       , p9_a4
337       , p9_a5
338       , p9_a6
339       );
340   end;
341 
342 end ahl_warranty_utils_pvt_w;