[Home] [Help]
PACKAGE BODY: APPS.AHL_PC_HEADER_PUB_W
Source
1 package body ahl_pc_header_pub_w as
2 /* $Header: AHLWPCHB.pls 120.1.12020000.2 2012/12/13 06:45:51 shnatu ship $ */
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 rosetta_g_mistake_date_high date := to_date('01/01/+4710', 'MM/DD/SYYYY');
6 rosetta_g_mistake_date_low date := to_date('01/01/-4710', 'MM/DD/SYYYY');
7
8 -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
9 function rosetta_g_miss_date_in_map(d date) return date as
10 begin
11 if d > rosetta_g_mistake_date_high then return fnd_api.g_miss_date; end if;
12 if d < rosetta_g_mistake_date_low then return fnd_api.g_miss_date; end if;
13 return d;
14 end;
15
16 procedure rosetta_table_copy_in_p0(t out nocopy ahl_pc_header_pub.warn_tbl_type, a0 JTF_VARCHAR2_TABLE_2000) as
17 ddindx binary_integer; indx binary_integer;
18 begin
19 if a0 is not null and a0.count > 0 then
20 if a0.count > 0 then
21 indx := a0.first;
22 ddindx := 1;
23 while true loop
24 t(ddindx) := a0(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_p0;
34 procedure rosetta_table_copy_out_p0(t ahl_pc_header_pub.warn_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_2000) as
35 ddindx binary_integer; indx binary_integer;
36 begin
37 if t is null or t.count = 0 then
38 a0 := JTF_VARCHAR2_TABLE_2000();
39 else
40 a0 := JTF_VARCHAR2_TABLE_2000();
41 if t.count > 0 then
42 a0.extend(t.count);
43 ddindx := t.first;
44 indx := 1;
45 while true loop
46 a0(indx) := t(ddindx);
47 indx := indx+1;
48 if t.last =ddindx
49 then exit;
50 end if;
51 ddindx := t.next(ddindx);
52 end loop;
53 end if;
54 end if;
55 end rosetta_table_copy_out_p0;
56
57 procedure process_pc_header(p_api_version NUMBER
58 , p_init_msg_list VARCHAR2
59 , p_commit VARCHAR2
60 , p_validation_level NUMBER
61 , p_module_type VARCHAR2
62 , p5_a0 in out nocopy NUMBER
63 , p5_a1 in out nocopy VARCHAR2
64 , p5_a2 in out nocopy VARCHAR2
65 , p5_a3 in out nocopy VARCHAR2
66 , p5_a4 in out nocopy VARCHAR2
67 , p5_a5 in out nocopy VARCHAR2
68 , p5_a6 in out nocopy VARCHAR2
69 , p5_a7 in out nocopy VARCHAR2
70 , p5_a8 in out nocopy VARCHAR2
71 , p5_a9 in out nocopy VARCHAR2
72 , p5_a10 in out nocopy VARCHAR2
73 , p5_a11 in out nocopy VARCHAR2
74 , p5_a12 in out nocopy VARCHAR2
75 , p5_a13 in out nocopy NUMBER
76 , p5_a14 in out nocopy NUMBER
77 , p5_a15 in out nocopy VARCHAR2
78 , p5_a16 in out nocopy VARCHAR2
79 , p5_a17 in out nocopy VARCHAR2
80 , p5_a18 in out nocopy VARCHAR2
81 , p5_a19 in out nocopy VARCHAR2
82 , p5_a20 in out nocopy VARCHAR2
83 , p5_a21 in out nocopy VARCHAR2
84 , p5_a22 in out nocopy VARCHAR2
85 , p5_a23 in out nocopy VARCHAR2
86 , p5_a24 in out nocopy VARCHAR2
87 , p5_a25 in out nocopy VARCHAR2
88 , p5_a26 in out nocopy VARCHAR2
89 , p5_a27 in out nocopy VARCHAR2
90 , p5_a28 in out nocopy VARCHAR2
91 , p5_a29 in out nocopy VARCHAR2
92 , p5_a30 in out nocopy VARCHAR2
93 , p5_a31 in out nocopy VARCHAR2
94 , p5_a32 in out nocopy VARCHAR2
95 , p5_a33 in out nocopy VARCHAR2
96 , x_return_status out nocopy VARCHAR2
97 , x_msg_count out nocopy NUMBER
98 , x_msg_data out nocopy VARCHAR2
99 , x_warning_msg_data out nocopy JTF_VARCHAR2_TABLE_2000
100 )
101
102 as
103 ddp_x_pc_header_rec ahl_pc_header_pub.pc_header_rec;
104 ddx_warning_msg_data ahl_pc_header_pub.warn_tbl_type;
105 ddindx binary_integer; indx binary_integer;
106 begin
107
108 -- copy data to the local IN or IN-OUT args, if any
109
110
111
112
113
114 ddp_x_pc_header_rec.pc_header_id := p5_a0;
115 ddp_x_pc_header_rec.name := p5_a1;
116 ddp_x_pc_header_rec.description := p5_a2;
117 ddp_x_pc_header_rec.status := p5_a3;
118 ddp_x_pc_header_rec.status_desc := p5_a4;
119 ddp_x_pc_header_rec.product_type_code := p5_a5;
120 ddp_x_pc_header_rec.product_type_desc := p5_a6;
121 ddp_x_pc_header_rec.primary_flag := p5_a7;
122 ddp_x_pc_header_rec.bue_flag := p5_a8;
123 ddp_x_pc_header_rec.primary_flag_desc := p5_a9;
124 ddp_x_pc_header_rec.association_type_flag := p5_a10;
125 ddp_x_pc_header_rec.association_type_desc := p5_a11;
126 ddp_x_pc_header_rec.draft_flag := p5_a12;
127 ddp_x_pc_header_rec.link_to_pc_id := p5_a13;
128 ddp_x_pc_header_rec.object_version_number := p5_a14;
129 ddp_x_pc_header_rec.attribute_category := p5_a15;
130 ddp_x_pc_header_rec.attribute1 := p5_a16;
131 ddp_x_pc_header_rec.attribute2 := p5_a17;
132 ddp_x_pc_header_rec.attribute3 := p5_a18;
133 ddp_x_pc_header_rec.attribute4 := p5_a19;
134 ddp_x_pc_header_rec.attribute5 := p5_a20;
135 ddp_x_pc_header_rec.attribute6 := p5_a21;
136 ddp_x_pc_header_rec.attribute7 := p5_a22;
137 ddp_x_pc_header_rec.attribute8 := p5_a23;
138 ddp_x_pc_header_rec.attribute9 := p5_a24;
139 ddp_x_pc_header_rec.attribute10 := p5_a25;
140 ddp_x_pc_header_rec.attribute11 := p5_a26;
141 ddp_x_pc_header_rec.attribute12 := p5_a27;
142 ddp_x_pc_header_rec.attribute13 := p5_a28;
143 ddp_x_pc_header_rec.attribute14 := p5_a29;
144 ddp_x_pc_header_rec.attribute15 := p5_a30;
145 ddp_x_pc_header_rec.operation_flag := p5_a31;
146 ddp_x_pc_header_rec.copy_assos_flag := p5_a32;
147 ddp_x_pc_header_rec.copy_docs_flag := p5_a33;
148
149
150
151
152
153 -- here's the delegated call to the old PL/SQL routine
154 ahl_pc_header_pub.process_pc_header(p_api_version,
155 p_init_msg_list,
156 p_commit,
157 p_validation_level,
158 p_module_type,
159 ddp_x_pc_header_rec,
160 x_return_status,
161 x_msg_count,
162 x_msg_data,
163 ddx_warning_msg_data);
164
165 -- copy data back from the local variables to OUT or IN-OUT args, if any
166
167
168
169
170
171 p5_a0 := ddp_x_pc_header_rec.pc_header_id;
172 p5_a1 := ddp_x_pc_header_rec.name;
173 p5_a2 := ddp_x_pc_header_rec.description;
174 p5_a3 := ddp_x_pc_header_rec.status;
175 p5_a4 := ddp_x_pc_header_rec.status_desc;
176 p5_a5 := ddp_x_pc_header_rec.product_type_code;
177 p5_a6 := ddp_x_pc_header_rec.product_type_desc;
178 p5_a7 := ddp_x_pc_header_rec.primary_flag;
179 p5_a8 := ddp_x_pc_header_rec.bue_flag;
180 p5_a9 := ddp_x_pc_header_rec.primary_flag_desc;
181 p5_a10 := ddp_x_pc_header_rec.association_type_flag;
182 p5_a11 := ddp_x_pc_header_rec.association_type_desc;
183 p5_a12 := ddp_x_pc_header_rec.draft_flag;
184 p5_a13 := ddp_x_pc_header_rec.link_to_pc_id;
185 p5_a14 := ddp_x_pc_header_rec.object_version_number;
186 p5_a15 := ddp_x_pc_header_rec.attribute_category;
187 p5_a16 := ddp_x_pc_header_rec.attribute1;
188 p5_a17 := ddp_x_pc_header_rec.attribute2;
189 p5_a18 := ddp_x_pc_header_rec.attribute3;
190 p5_a19 := ddp_x_pc_header_rec.attribute4;
191 p5_a20 := ddp_x_pc_header_rec.attribute5;
192 p5_a21 := ddp_x_pc_header_rec.attribute6;
193 p5_a22 := ddp_x_pc_header_rec.attribute7;
194 p5_a23 := ddp_x_pc_header_rec.attribute8;
195 p5_a24 := ddp_x_pc_header_rec.attribute9;
196 p5_a25 := ddp_x_pc_header_rec.attribute10;
197 p5_a26 := ddp_x_pc_header_rec.attribute11;
198 p5_a27 := ddp_x_pc_header_rec.attribute12;
199 p5_a28 := ddp_x_pc_header_rec.attribute13;
200 p5_a29 := ddp_x_pc_header_rec.attribute14;
201 p5_a30 := ddp_x_pc_header_rec.attribute15;
202 p5_a31 := ddp_x_pc_header_rec.operation_flag;
203 p5_a32 := ddp_x_pc_header_rec.copy_assos_flag;
204 p5_a33 := ddp_x_pc_header_rec.copy_docs_flag;
205
206
207
208
209 ahl_pc_header_pub_w.rosetta_table_copy_out_p0(ddx_warning_msg_data, x_warning_msg_data);
210 end;
211
212 end ahl_pc_header_pub_w;