DBA Data[Home] [Help]

PACKAGE BODY: APPS.OKL_INV_LINE_TYPE_DELETE_PVT_W

Source


1 package body okl_inv_line_type_delete_pvt_w as
2   /* $Header: OKLEILRB.pls 120.1 2005/07/11 12:50:27 dkagrawa 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 rosetta_table_copy_in_p1(t out nocopy okl_inv_line_type_delete_pvt.ilt_del_tbl_type, a0 JTF_NUMBER_TABLE
23     , a1 JTF_NUMBER_TABLE
24     , a2 JTF_NUMBER_TABLE
25     , a3 JTF_VARCHAR2_TABLE_200
26     , a4 JTF_VARCHAR2_TABLE_2000
27     ) as
28     ddindx binary_integer; indx binary_integer;
29   begin
30   if a0 is not null and a0.count > 0 then
31       if a0.count > 0 then
32         indx := a0.first;
33         ddindx := 1;
34         while true loop
35           t(ddindx).id := rosetta_g_miss_num_map(a0(indx));
36           t(ddindx).ity_id := rosetta_g_miss_num_map(a1(indx));
37           t(ddindx).sequence_number := rosetta_g_miss_num_map(a2(indx));
38           t(ddindx).name := a3(indx);
39           t(ddindx).description := a4(indx);
40           ddindx := ddindx+1;
41           if a0.last =indx
42             then exit;
43           end if;
44           indx := a0.next(indx);
45         end loop;
46       end if;
47    end if;
48   end rosetta_table_copy_in_p1;
49   procedure rosetta_table_copy_out_p1(t okl_inv_line_type_delete_pvt.ilt_del_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
50     , a1 out nocopy JTF_NUMBER_TABLE
51     , a2 out nocopy JTF_NUMBER_TABLE
52     , a3 out nocopy JTF_VARCHAR2_TABLE_200
53     , a4 out nocopy JTF_VARCHAR2_TABLE_2000
54     ) as
55     ddindx binary_integer; indx binary_integer;
56   begin
57   if t is null or t.count = 0 then
58     a0 := JTF_NUMBER_TABLE();
59     a1 := JTF_NUMBER_TABLE();
60     a2 := JTF_NUMBER_TABLE();
61     a3 := JTF_VARCHAR2_TABLE_200();
62     a4 := JTF_VARCHAR2_TABLE_2000();
63   else
64       a0 := JTF_NUMBER_TABLE();
65       a1 := JTF_NUMBER_TABLE();
66       a2 := JTF_NUMBER_TABLE();
67       a3 := JTF_VARCHAR2_TABLE_200();
68       a4 := JTF_VARCHAR2_TABLE_2000();
69       if t.count > 0 then
70         a0.extend(t.count);
71         a1.extend(t.count);
72         a2.extend(t.count);
73         a3.extend(t.count);
74         a4.extend(t.count);
75         ddindx := t.first;
76         indx := 1;
77         while true loop
78           a0(indx) := rosetta_g_miss_num_map(t(ddindx).id);
79           a1(indx) := rosetta_g_miss_num_map(t(ddindx).ity_id);
80           a2(indx) := rosetta_g_miss_num_map(t(ddindx).sequence_number);
81           a3(indx) := t(ddindx).name;
82           a4(indx) := t(ddindx).description;
83           indx := indx+1;
84           if t.last =ddindx
85             then exit;
86           end if;
87           ddindx := t.next(ddindx);
88         end loop;
89       end if;
90    end if;
91   end rosetta_table_copy_out_p1;
92 
93   procedure delete_line_type(p_api_version  NUMBER
94     , p_init_msg_list  VARCHAR2
95     , x_return_status out nocopy  VARCHAR2
96     , x_msg_count out nocopy  NUMBER
97     , x_msg_data out nocopy  VARCHAR2
98     , p5_a0  NUMBER := 0-1962.0724
99     , p5_a1  NUMBER := 0-1962.0724
100     , p5_a2  NUMBER := 0-1962.0724
101     , p5_a3  VARCHAR2 := fnd_api.g_miss_char
102     , p5_a4  VARCHAR2 := fnd_api.g_miss_char
103   )
104 
105   as
106     ddp_ilt_del_rec okl_inv_line_type_delete_pvt.ilt_del_rec_type;
107     ddindx binary_integer; indx binary_integer;
108   begin
109 
110     -- copy data to the local IN or IN-OUT args, if any
111 
112 
113 
114 
115 
116     ddp_ilt_del_rec.id := rosetta_g_miss_num_map(p5_a0);
117     ddp_ilt_del_rec.ity_id := rosetta_g_miss_num_map(p5_a1);
118     ddp_ilt_del_rec.sequence_number := rosetta_g_miss_num_map(p5_a2);
119     ddp_ilt_del_rec.name := p5_a3;
120     ddp_ilt_del_rec.description := p5_a4;
121 
122     -- here's the delegated call to the old PL/SQL routine
123     okl_inv_line_type_delete_pvt.delete_line_type(p_api_version,
124       p_init_msg_list,
125       x_return_status,
126       x_msg_count,
127       x_msg_data,
128       ddp_ilt_del_rec);
129 
130     -- copy data back from the local variables to OUT or IN-OUT args, if any
131 
132 
133 
134 
135 
136   end;
137 
138   procedure delete_line_type(p_api_version  NUMBER
139     , p_init_msg_list  VARCHAR2
140     , x_return_status out nocopy  VARCHAR2
141     , x_msg_count out nocopy  NUMBER
142     , x_msg_data out nocopy  VARCHAR2
143     , p5_a0 JTF_NUMBER_TABLE
144     , p5_a1 JTF_NUMBER_TABLE
145     , p5_a2 JTF_NUMBER_TABLE
146     , p5_a3 JTF_VARCHAR2_TABLE_200
147     , p5_a4 JTF_VARCHAR2_TABLE_2000
148   )
149 
150   as
151     ddp_ilt_del_tbl okl_inv_line_type_delete_pvt.ilt_del_tbl_type;
152     ddindx binary_integer; indx binary_integer;
153   begin
154 
155     -- copy data to the local IN or IN-OUT args, if any
156 
157 
158 
159 
160 
161     okl_inv_line_type_delete_pvt_w.rosetta_table_copy_in_p1(ddp_ilt_del_tbl, p5_a0
162       , p5_a1
163       , p5_a2
164       , p5_a3
165       , p5_a4
166       );
167 
168     -- here's the delegated call to the old PL/SQL routine
169     okl_inv_line_type_delete_pvt.delete_line_type(p_api_version,
170       p_init_msg_list,
171       x_return_status,
172       x_msg_count,
173       x_msg_data,
174       ddp_ilt_del_tbl);
175 
176     -- copy data back from the local variables to OUT or IN-OUT args, if any
177 
178 
179 
180 
181 
182   end;
183 
184 end okl_inv_line_type_delete_pvt_w;