1 package body ahl_uc_validation_pub_w as
2 /* $Header: AHLWUCVB.pls 115.0 2003/08/11 21:36:11 cxcheng 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_p0(t out nocopy ahl_uc_validation_pub.error_tbl_type, a0 JTF_VARCHAR2_TABLE_2000) as
14 ddindx binary_integer; indx binary_integer;
15 begin
16 if a0 is not null and a0.count > 0 then
17 if a0.count > 0 then
18 indx := a0.first;
19 ddindx := 1;
20 while true loop
21 t(ddindx) := a0(indx);
22 ddindx := ddindx+1;
23 if a0.last =indx
24 then exit;
25 end if;
26 indx := a0.next(indx);
27 end loop;
28 end if;
29 end if;
30 end rosetta_table_copy_in_p0;
31 procedure rosetta_table_copy_out_p0(t ahl_uc_validation_pub.error_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_2000) as
32 ddindx binary_integer; indx binary_integer;
33 begin
34 if t is null or t.count = 0 then
35 a0 := JTF_VARCHAR2_TABLE_2000();
36 else
37 a0 := JTF_VARCHAR2_TABLE_2000();
38 if t.count > 0 then
39 a0.extend(t.count);
40 ddindx := t.first;
41 indx := 1;
42 while true loop
43 a0(indx) := t(ddindx);
44 indx := indx+1;
45 if t.last =ddindx
46 then exit;
47 end if;
48 ddindx := t.next(ddindx);
49 end loop;
50 end if;
51 end if;
52 end rosetta_table_copy_out_p0;
53
54 procedure validate_completeness(p_api_version NUMBER
55 , p_init_msg_list VARCHAR2
56 , p_commit VARCHAR2
57 , p_validation_level NUMBER
58 , x_return_status out nocopy VARCHAR2
59 , x_msg_count out nocopy NUMBER
60 , x_msg_data out nocopy VARCHAR2
61 , p_unit_header_id NUMBER
62 , x_error_tbl out nocopy JTF_VARCHAR2_TABLE_2000
63 )
64
65 as
66 ddx_error_tbl ahl_uc_validation_pub.error_tbl_type;
67 ddindx binary_integer; indx binary_integer;
68 begin
69
70 -- copy data to the local IN or IN-OUT args, if any
71
72
73
74
75
76
77
78
79
80 -- here's the delegated call to the old PL/SQL routine
81 ahl_uc_validation_pub.validate_completeness(p_api_version,
82 p_init_msg_list,
83 p_commit,
84 p_validation_level,
85 x_return_status,
86 x_msg_count,
87 x_msg_data,
88 p_unit_header_id,
89 ddx_error_tbl);
90
91 -- copy data back from the local variables to OUT or IN-OUT args, if any
92
93
94
95
96
97
98
99
100 ahl_uc_validation_pub_w.rosetta_table_copy_out_p0(ddx_error_tbl, x_error_tbl);
101 end;
102
103 procedure validate_complete_for_pos(p_api_version NUMBER
104 , p_init_msg_list VARCHAR2
105 , p_commit VARCHAR2
106 , p_validation_level NUMBER
107 , x_return_status out nocopy VARCHAR2
108 , x_msg_count out nocopy NUMBER
109 , x_msg_data out nocopy VARCHAR2
110 , p_csi_instance_id NUMBER
111 , x_error_tbl out nocopy JTF_VARCHAR2_TABLE_2000
112 )
113
114 as
115 ddx_error_tbl ahl_uc_validation_pub.error_tbl_type;
116 ddindx binary_integer; indx binary_integer;
117 begin
118
119 -- copy data to the local IN or IN-OUT args, if any
120
121
122
123
124
125
126
127
128
129 -- here's the delegated call to the old PL/SQL routine
130 ahl_uc_validation_pub.validate_complete_for_pos(p_api_version,
131 p_init_msg_list,
132 p_commit,
133 p_validation_level,
134 x_return_status,
135 x_msg_count,
136 x_msg_data,
137 p_csi_instance_id,
138 ddx_error_tbl);
139
140 -- copy data back from the local variables to OUT or IN-OUT args, if any
141
142
143
144
145
146
147
148
149 ahl_uc_validation_pub_w.rosetta_table_copy_out_p0(ddx_error_tbl, x_error_tbl);
150 end;
151
152 end ahl_uc_validation_pub_w;