DBA Data[Home] [Help]

PACKAGE BODY: APPS.HZ_UI_UTIL_PKG_W

Source


1 package body hz_ui_util_pkg_w as
2   /* $Header: ARHPUIJB.pls 115.1 2003/02/25 00:54:26 chsaulit 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_p0(t out nocopy HZ_MIXNM_UTILITY.indexvarchar30list, a0 JTF_VARCHAR2_TABLE_100) as
23     ddindx binary_integer; indx binary_integer;
24   begin
25   if a0 is not null and a0.count > 0 then
26       if a0.count > 0 then
27         indx := a0.first;
28         ddindx := 1;
29         while true loop
30           t(ddindx) := a0(indx);
31           ddindx := ddindx+1;
32           if a0.last =indx
33             then exit;
34           end if;
35           indx := a0.next(indx);
36         end loop;
37       end if;
38    end if;
39   end rosetta_table_copy_in_p0;
40   procedure rosetta_table_copy_out_p0(t HZ_MIXNM_UTILITY.indexvarchar30list, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
41     ddindx binary_integer; indx binary_integer;
42   begin
43   if t is null or t.count = 0 then
44     a0 := JTF_VARCHAR2_TABLE_100();
45   else
46       a0 := JTF_VARCHAR2_TABLE_100();
47       if t.count > 0 then
48         a0.extend(t.count);
49         ddindx := t.first;
50         indx := 1;
51         while true loop
52           a0(indx) := t(ddindx);
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_p0;
62 
63   procedure rosetta_table_copy_in_p1(t out nocopy HZ_MIXNM_UTILITY.indexvarchar1list, a0 JTF_VARCHAR2_TABLE_100) as
64     ddindx binary_integer; indx binary_integer;
65   begin
66   if a0 is not null and a0.count > 0 then
67       if a0.count > 0 then
68         indx := a0.first;
69         ddindx := 1;
70         while true loop
71           t(ddindx) := a0(indx);
72           ddindx := ddindx+1;
73           if a0.last =indx
74             then exit;
75           end if;
76           indx := a0.next(indx);
77         end loop;
78       end if;
79    end if;
80   end rosetta_table_copy_in_p1;
81   procedure rosetta_table_copy_out_p1(t HZ_MIXNM_UTILITY.indexvarchar1list, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
82     ddindx binary_integer; indx binary_integer;
83   begin
84   if t is null or t.count = 0 then
85     a0 := JTF_VARCHAR2_TABLE_100();
86   else
87       a0 := JTF_VARCHAR2_TABLE_100();
88       if t.count > 0 then
89         a0.extend(t.count);
90         ddindx := t.first;
91         indx := 1;
92         while true loop
93           a0(indx) := t(ddindx);
94           indx := indx+1;
95           if t.last =ddindx
96             then exit;
97           end if;
98           ddindx := t.next(ddindx);
99         end loop;
100       end if;
101    end if;
102   end rosetta_table_copy_out_p1;
103 
104   procedure check_columns(p_entity_name  VARCHAR2
105     , p_data_source  VARCHAR2
106     , p_entity_pk1  VARCHAR2
107     , p_entity_pk2  VARCHAR2
108     , p_party_id  NUMBER
109     , p_function_name  VARCHAR2
110     , p_attribute_list JTF_VARCHAR2_TABLE_100
111     , p_value_is_null_list JTF_VARCHAR2_TABLE_100
112     , x_viewable_list out nocopy JTF_VARCHAR2_TABLE_100
113     , x_updateable_list out nocopy JTF_VARCHAR2_TABLE_100
114   )
115 
116   as
117     ddp_attribute_list HZ_MIXNM_UTILITY.indexvarchar30list;
118     ddp_value_is_null_list HZ_MIXNM_UTILITY.indexvarchar1list;
119     ddx_viewable_list HZ_MIXNM_UTILITY.indexvarchar1list;
120     ddx_updateable_list HZ_MIXNM_UTILITY.indexvarchar1list;
121     ddindx binary_integer; indx binary_integer;
122   begin
123 
124     -- copy data to the local IN or IN-OUT args, if any
125 
126 
127 
128 
129 
130 
131     hz_ui_util_pkg_w.rosetta_table_copy_in_p0(ddp_attribute_list, p_attribute_list);
132 
133     hz_ui_util_pkg_w.rosetta_table_copy_in_p1(ddp_value_is_null_list, p_value_is_null_list);
134 
135 
136 
137     -- here's the delegated call to the old PL/SQL routine
138     hz_ui_util_pkg.check_columns(p_entity_name,
139       p_data_source,
140       p_entity_pk1,
141       p_entity_pk2,
142       p_party_id,
143       p_function_name,
144       ddp_attribute_list,
145       ddp_value_is_null_list,
146       ddx_viewable_list,
147       ddx_updateable_list);
148 
149     -- copy data back from the local variables to OUT or IN-OUT args, if any
150 
151 
152 
153 
154 
155 
156 
157 
158     hz_ui_util_pkg_w.rosetta_table_copy_out_p1(ddx_viewable_list, x_viewable_list);
159 
160     hz_ui_util_pkg_w.rosetta_table_copy_out_p1(ddx_updateable_list, x_updateable_list);
161   end;
162 
163 end hz_ui_util_pkg_w;