DBA Data[Home] [Help]

PACKAGE BODY: APPS.IEM_AMV_PVT_W

Source


1 package body iem_amv_pvt_w as
2   /* $Header: IEMPAMVB.pls 120.0 2005/06/02 14:15:47 appldev 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 rosetta_table_copy_in_p1(t out nocopy iem_amv_pvt.category_tbl, a0 JTF_NUMBER_TABLE
14     , a1 JTF_VARCHAR2_TABLE_100
15     ) as
16     ddindx binary_integer; indx binary_integer;
17   begin
18   if a0 is not null and a0.count > 0 then
19       if a0.count > 0 then
20         indx := a0.first;
21         ddindx := 1;
22         while true loop
23           t(ddindx).category_id := a0(indx);
24           t(ddindx).category_name := a1(indx);
25           ddindx := ddindx+1;
26           if a0.last =indx
27             then exit;
28           end if;
29           indx := a0.next(indx);
30         end loop;
31       end if;
32    end if;
33   end rosetta_table_copy_in_p1;
34   procedure rosetta_table_copy_out_p1(t iem_amv_pvt.category_tbl, a0 out nocopy JTF_NUMBER_TABLE
35     , a1 out nocopy JTF_VARCHAR2_TABLE_100
36     ) as
37     ddindx binary_integer; indx binary_integer;
38   begin
39   if t is null or t.count = 0 then
40     a0 := JTF_NUMBER_TABLE();
41     a1 := JTF_VARCHAR2_TABLE_100();
42   else
43       a0 := JTF_NUMBER_TABLE();
44       a1 := JTF_VARCHAR2_TABLE_100();
45       if t.count > 0 then
46         a0.extend(t.count);
47         a1.extend(t.count);
48         ddindx := t.first;
49         indx := 1;
50         while true loop
51           a0(indx) := t(ddindx).category_id;
52           a1(indx) := t(ddindx).category_name;
53           indx := indx+1;
54           if t.last =ddindx
55             then exit;
56           end if;
57           ddindx := t.next(ddindx);
58         end loop;
59       end if;
60    end if;
61   end rosetta_table_copy_out_p1;
62 
63   procedure get_categories(p_api_version_number  NUMBER
64     , p_init_msg_list  VARCHAR2
65     , p_commit  VARCHAR2
66     , p3_a0 out nocopy JTF_NUMBER_TABLE
67     , p3_a1 out nocopy JTF_VARCHAR2_TABLE_100
68     , x_return_status out nocopy  VARCHAR2
69     , x_msg_count out nocopy  NUMBER
70     , x_msg_data out nocopy  VARCHAR2
71   )
72 
73   as
74     ddx_category_tbl iem_amv_pvt.category_tbl;
75     ddindx binary_integer; indx binary_integer;
76   begin
77 
78     -- copy data to the local IN or IN-OUT args, if any
79 
80 
81 
82 
83 
84 
85 
86     -- here's the delegated call to the old PL/SQL routine
87     iem_amv_pvt.get_categories(p_api_version_number,
88       p_init_msg_list,
89       p_commit,
90       ddx_category_tbl,
91       x_return_status,
92       x_msg_count,
93       x_msg_data);
94 
95     -- copy data back from the local variables to OUT or IN-OUT args, if any
96 
97 
98 
99     iem_amv_pvt_w.rosetta_table_copy_out_p1(ddx_category_tbl, p3_a0
100       , p3_a1
101       );
102 
103 
104 
105   end;
106 
107 end iem_amv_pvt_w;