DBA Data[Home] [Help]

PACKAGE BODY: APPS.IEX_OPEN_INT_HST_PUB

Source


1 PACKAGE BODY IEX_OPEN_INT_HST_PUB AS
2 /* $Header: IEXPIOHB.pls 120.4 2005/11/17 20:38:33 jsanju ship $ */
3 
4 PG_DEBUG NUMBER(2);
5 
6 PROCEDURE insert_open_int_hst(
7      p_api_version           IN  NUMBER
8     ,p_init_msg_list         IN  VARCHAR2
9     ,x_return_status         OUT  NOCOPY VARCHAR2
10     ,x_msg_count             OUT  NOCOPY NUMBER
11     ,x_msg_data              OUT  NOCOPY VARCHAR2
12     ,p_iohv_rec              IN  iohv_rec_type
13     ,x_iohv_rec              OUT  NOCOPY iohv_rec_type) AS
14 
15 
16 l_api_version NUMBER ;
17 l_init_msg_list VARCHAR2(1) ;
18 l_return_status VARCHAR2(1);
19 l_msg_count NUMBER ;
20 l_msg_data VARCHAR2(2000);
21 lp_iohv_rec  iohv_rec_type;
22 lx_iohv_rec  iohv_rec_type;
23 
24 BEGIN
25 
26 SAVEPOINT open_int_hst_insert;
27 
28 
29 l_api_version := p_api_version ;
30 l_init_msg_list := p_init_msg_list ;
31 l_return_status := x_return_status ;
32 l_msg_count := x_msg_count ;
33 l_msg_data := x_msg_data ;
34 lp_iohv_rec :=  p_iohv_rec;
35 lx_iohv_rec :=  x_iohv_rec;
36 
37 /*
38 --Customer pre-processing user hook call start
39 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'B', 'C')) THEN
40 	iex_open_int_hst_cuhk.insert_open_int_hst_pre (
41 	                                            p_init_msg_list => l_init_msg_list
42 	                                           ,x_msg_data => l_msg_data
43 	                                           ,x_msg_count => l_msg_count
44 	                                           ,x_return_status => l_return_status
45 	                                           ,p_iohv_rec => lp_iohv_rec
46 	                                           ,x_iohv_rec => lx_iohv_rec) ;
47 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
48 		RAISE FND_API.G_EXC_ERROR;
49 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
50 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
51 	END IF;
52 
53 	--Copy value of OUT NOCOPY record type variable in the IN record type
54 	lp_iohv_rec := lx_iohv_rec;
55 
56 END IF;
57 --Customer pre-processing user hook call end
58 
59 
60 
61 --Vertical pre-processing user hook call start
62 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'B', 'V')) THEN
63 	iex_open_int_hst_vuhk.insert_open_int_hst_pre (
64 	                                              p_init_msg_list => l_init_msg_list
65 	                                             ,x_msg_data => l_msg_data
66 	                                             ,x_msg_count => l_msg_count
67 	                                             ,x_return_status => l_return_status
68 	                                             ,p_iohv_rec => lp_iohv_rec
69 	                                             ,x_iohv_rec => lx_iohv_rec );
70 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
71 		RAISE FND_API.G_EXC_ERROR;
72 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
73 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
74 	END IF;
75 
76 	--Copy value of OUT NOCOPY variable in the IN record type
77 	lp_iohv_rec := lx_iohv_rec;
78 
79 END IF;
80 --Vertical pre-processing user hook call end
81 */
82 iex_ioh_pvt.insert_row(
83                           l_api_version
84                          ,l_init_msg_list
85                          ,l_return_status
86                          ,l_msg_count
87                          ,l_msg_data
88                          ,lp_iohv_rec
89                          ,lx_iohv_rec);
90 
91 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
92 	RAISE FND_API.G_EXC_ERROR;
93 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
94 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
95 END IF;
96 
97 --Copy value of OUT NOCOPY variable in the IN record type
98 lp_iohv_rec := lx_iohv_rec;
99 /*
100 --Vertical post processing user hook call start
101 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'A', 'V')) THEN
102 	iex_open_int_hst_vuhk.insert_open_int_hst_post(
103 	                                               p_init_msg_list => l_init_msg_list
104 	                                              ,x_msg_data => l_msg_data
105 	                                              ,x_msg_count => l_msg_count
106 	                                              ,x_return_status => l_return_status
107 	                                              ,p_iohv_rec => lp_iohv_rec);
108 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
109 		RAISE FND_API.G_EXC_ERROR;
110 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
111 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
112 	END IF;
113 END IF;
114 --Vertical post processing user hook call end
115 
116 
117 --Customer post processing user hook call start
118 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'A', 'C')) THEN
119 	iex_open_int_hst_cuhk.insert_open_int_hst_post(
120 	                                               p_init_msg_list => l_init_msg_list
121 	                                              ,x_msg_data => l_msg_data
122 	                                              ,x_msg_count => l_msg_count
123 	                                              ,x_return_status => l_return_status
124 	                                              ,p_iohv_rec => lp_iohv_rec);
125 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
126 		RAISE FND_API.G_EXC_ERROR;
127 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
128 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
129 	END IF;
130 END IF;
131 --Customer post processing user hook call end
132 
133 */
134 --Assign value to OUT NOCOPY variables
135 x_iohv_rec  := lx_iohv_rec;
136 x_return_status := l_return_status ;
137 x_msg_count := l_msg_count ;
138 x_msg_data := l_msg_data ;
139 
140 EXCEPTION
141 
142     WHEN FND_API.G_EXC_ERROR THEN
143       ROLLBACK TO open_int_hst_insert;
144       x_return_status := FND_API.G_RET_STS_ERROR;
145       x_msg_count := l_msg_count ;
146       x_msg_data := l_msg_data ;
147       FND_MSG_PUB.count_and_get(
148              p_count   => x_msg_count
149             ,p_data    => x_msg_data);
150     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
151       ROLLBACK TO open_int_hst_insert;
152       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
153       x_msg_count := l_msg_count ;
154       x_msg_data := l_msg_data ;
155       FND_MSG_PUB.count_and_get(
156              p_count   => x_msg_count
157             ,p_data    => x_msg_data);
158     WHEN OTHERS THEN
159       ROLLBACK TO open_int_hst_insert;
160       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
161       x_msg_count := l_msg_count ;
162       x_msg_data := l_msg_data ;
163       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','insert_open_int_hst');
164       FND_MSG_PUB.count_and_get(
165              p_count   => x_msg_count
166             ,p_data    => x_msg_data);
167 END insert_open_int_hst;
168 
169 PROCEDURE insert_open_int_hst(
170      p_api_version           IN  NUMBER
171     ,p_init_msg_list         IN  VARCHAR2
172     ,x_return_status         OUT  NOCOPY VARCHAR2
173     ,x_msg_count             OUT  NOCOPY NUMBER
174     ,x_msg_data              OUT  NOCOPY VARCHAR2
175     ,p_iohv_tbl              IN  iohv_tbl_type
176     ,x_iohv_tbl              OUT  NOCOPY iohv_tbl_type) AS
177 
178 l_api_version NUMBER;
179 l_init_msg_list VARCHAR2(1) ;
180 l_msg_data VARCHAR2(2000);
181 l_msg_count NUMBER ;
182 l_return_status VARCHAR2(1);
183 lp_iohv_tbl  iohv_tbl_type;
184 lx_iohv_tbl  iohv_tbl_type;
185 
186 BEGIN
187 
188 SAVEPOINT open_int_hst_insert;
189 
190 
191 l_api_version := p_api_version ;
192 l_init_msg_list := p_init_msg_list ;
193 l_return_status := x_return_status ;
194 l_msg_count := x_msg_count ;
195 l_msg_data := x_msg_data ;
196 lp_iohv_tbl :=  p_iohv_tbl;
197 lx_iohv_tbl :=  x_iohv_tbl;
198 /*
199 --Customer pre-processing user hook call start
200 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'B', 'C')) THEN
201 	iex_open_int_hst_cuhk.insert_open_int_hst_pre(
202 	                                            p_init_msg_list => l_init_msg_list
203 	                                           ,x_msg_data => l_msg_data
204 	                                           ,x_msg_count => l_msg_count
205 	                                           ,x_return_status => l_return_status
206 	                                           ,p_iohv_tbl => lp_iohv_tbl
207 	                                           ,x_iohv_tbl => lx_iohv_tbl);
208 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
209 		RAISE FND_API.G_EXC_ERROR;
210 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
211 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
212 	END IF;
213 
214 	--Copy value of OUT NOCOPY variable in the IN record type
215 	lp_iohv_tbl := lx_iohv_tbl;
216 
217 END IF;
218 --Customer pre-processing user hook call end
219 
220 --Vertical pre-processing user hook call start
221 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'B', 'V')) THEN
222 	iex_open_int_hst_vuhk.insert_open_int_hst_pre(
223 	                                            p_init_msg_list => l_init_msg_list
224 	                                           ,x_msg_data => l_msg_data
225 	                                           ,x_msg_count => l_msg_count
226 	                                           ,x_return_status => l_return_status
227 	                                           ,p_iohv_tbl => lp_iohv_tbl
228 	                                           ,x_iohv_tbl => lx_iohv_tbl);
229 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
230 		RAISE FND_API.G_EXC_ERROR;
231 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
232 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
233 	END IF;
234 
235 	--Copy value of OUT NOCOPY variable in the IN record type
236 	lp_iohv_tbl := lx_iohv_tbl;
237 
238 END IF;
239 --Vertical pre-processing user hook call end
240 */
241 iex_ioh_pvt.insert_row(
242                           l_api_version
243                          ,l_init_msg_list
244                          ,l_return_status
245                          ,l_msg_count
246                          ,l_msg_data
247                          ,lp_iohv_tbl
248                          ,lx_iohv_tbl);
249 
250 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
251 	RAISE FND_API.G_EXC_ERROR;
252 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
253 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
254 END IF;
255 
256 --Copy value of OUT NOCOPY variable in the IN record type
257 lp_iohv_tbl := lx_iohv_tbl;
258 /*
259 --Vertical post-processing user hook call start
260 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'A', 'V')) THEN
261 	iex_open_int_hst_vuhk.insert_open_int_hst_post (
262 	                                            p_init_msg_list => l_init_msg_list
263 	                                           ,x_msg_data => l_msg_data
264 	                                           ,x_msg_count => l_msg_count
265 	                                           ,x_return_status => l_return_status
266 	                                           ,p_iohv_tbl => lp_iohv_tbl) ;
267 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
268 		RAISE FND_API.G_EXC_ERROR;
269 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
270 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
271 	END IF;
272 END IF;
273 --Vertical post-processing user hook call end
274 
275 --Customer post-processing user hook call start
276 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'insert_open_int_hst', 'A', 'C')) THEN
277 	iex_open_int_hst_cuhk.insert_open_int_hst_post (
278 	                                            p_init_msg_list => l_init_msg_list
279 	                                           ,x_msg_data => l_msg_data
280 	                                           ,x_msg_count => l_msg_count
281 	                                           ,x_return_status => l_return_status
282 	                                           ,p_iohv_tbl  => lp_iohv_tbl) ;
283 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
284 		RAISE FND_API.G_EXC_ERROR;
285 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
286 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
287 	END IF;
288 END IF;
289 --Customer post-processing user hook call end
290 */
291 --Assign value to OUT NOCOPY variables
292 x_iohv_tbl  := lx_iohv_tbl;
293 x_return_status := l_return_status ;
294 x_msg_count := l_msg_count ;
295 x_msg_data := l_msg_data ;
296 
297 
298 EXCEPTION
299 
300     WHEN FND_API.G_EXC_ERROR THEN
301       ROLLBACK TO open_int_hst_insert;
302       x_return_status := FND_API.G_RET_STS_ERROR;
303       x_msg_count := l_msg_count ;
304       x_msg_data := l_msg_data ;
305       FND_MSG_PUB.count_and_get(
306              p_count   => x_msg_count
307             ,p_data    => x_msg_data);
308     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
309       ROLLBACK TO open_int_hst_insert;
310       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
311       x_msg_count := l_msg_count ;
312       x_msg_data := l_msg_data ;
313       FND_MSG_PUB.count_and_get(
314              p_count   => x_msg_count
315             ,p_data    => x_msg_data);
316     WHEN OTHERS THEN
317       ROLLBACK TO open_int_hst_insert;
318       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
319       x_msg_count := l_msg_count ;
320       x_msg_data := l_msg_data ;
321       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','insert_open_int_hst');
322       FND_MSG_PUB.count_and_get(
323              p_count   => x_msg_count
324             ,p_data    => x_msg_data);
325 END insert_open_int_hst;
326 
327 PROCEDURE lock_open_int_hst(
328      p_api_version           IN NUMBER
329     ,p_init_msg_list         IN VARCHAR2
330     ,x_return_status         OUT NOCOPY VARCHAR2
331     ,x_msg_count             OUT NOCOPY NUMBER
332     ,x_msg_data              OUT NOCOPY VARCHAR2
333     ,p_iohv_rec              IN iohv_rec_type) AS
334 
335 BEGIN
336     iex_ioh_pvt.lock_row(
337 		    p_api_version,
338 		    p_init_msg_list,
339 		    x_return_status,
340 		    x_msg_count,
341 		    x_msg_data,
342 		    p_iohv_rec);
343 
344 IF ( x_return_status = FND_API.G_RET_STS_ERROR )  THEN
345 	RAISE FND_API.G_EXC_ERROR;
346 ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
347 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
348 END IF;
349 
350 
351 EXCEPTION
352 
353     WHEN FND_API.G_EXC_ERROR THEN
354       FND_MSG_PUB.count_and_get(
355              p_count   => x_msg_count
356             ,p_data    => x_msg_data);
357     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
358       FND_MSG_PUB.count_and_get(
359              p_count   => x_msg_count
360             ,p_data    => x_msg_data);
361     WHEN OTHERS THEN
362       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
363       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','lock_open_int_hst');
364       FND_MSG_PUB.count_and_get(
365              p_count   => x_msg_count
366             ,p_data    => x_msg_data);
367 END lock_open_int_hst;
368 
369 PROCEDURE lock_open_int_hst(
370      p_api_version           IN  NUMBER
371     ,p_init_msg_list         IN  VARCHAR2
372     ,x_return_status         OUT  NOCOPY VARCHAR2
373     ,x_msg_count             OUT  NOCOPY NUMBER
374     ,x_msg_data              OUT  NOCOPY VARCHAR2
375     ,p_iohv_tbl              IN  iohv_tbl_type) AS
376 
377 BEGIN
378     iex_ioh_pvt.lock_row(
379 		    p_api_version,
380 		    p_init_msg_list,
381 		    x_return_status,
382 		    x_msg_count,
383 		    x_msg_data,
384 		    p_iohv_tbl);
385 
386 IF ( x_return_status = FND_API.G_RET_STS_ERROR )  THEN
387 	RAISE FND_API.G_EXC_ERROR;
388 ELSIF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
389 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
390 END IF;
391 
392 
393 EXCEPTION
394 
395     WHEN FND_API.G_EXC_ERROR THEN
396       FND_MSG_PUB.count_and_get(
397              p_count   => x_msg_count
398             ,p_data    => x_msg_data);
399     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
400       FND_MSG_PUB.count_and_get(
401              p_count   => x_msg_count
402             ,p_data    => x_msg_data);
403     WHEN OTHERS THEN
404       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
405       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','lock_open_int_hst');
406       FND_MSG_PUB.count_and_get(
407              p_count   => x_msg_count
408             ,p_data    => x_msg_data);
409 END lock_open_int_hst;
410 
411 PROCEDURE update_open_int_hst(
412      p_api_version           IN  NUMBER
413     ,p_init_msg_list         IN  VARCHAR2
414     ,x_return_status         OUT  NOCOPY VARCHAR2
415     ,x_msg_count             OUT  NOCOPY NUMBER
416     ,x_msg_data              OUT  NOCOPY VARCHAR2
417     ,p_iohv_rec              IN  iohv_rec_type
418     ,x_iohv_rec              OUT  NOCOPY iohv_rec_type) AS
419 
420 l_api_version NUMBER ;
421 l_init_msg_list VARCHAR2(1) ;
422 l_return_status VARCHAR2(1);
423 l_msg_count NUMBER ;
424 l_msg_data VARCHAR2(2000);
425 lp_iohv_rec  iohv_rec_type;
426 lx_iohv_rec  iohv_rec_type;
427 
428 BEGIN
429 
430 SAVEPOINT open_int_hst_update;
431 
432 
433 l_api_version := p_api_version ;
434 l_init_msg_list := p_init_msg_list ;
435 l_return_status := x_return_status ;
436 l_msg_count := x_msg_count ;
437 l_msg_data := x_msg_data ;
438 lp_iohv_rec :=  p_iohv_rec;
439 lx_iohv_rec :=  x_iohv_rec;
440 
441 /*
442 --Customer pre-processing user hook call start
443 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'B', 'C')) THEN
444 	iex_open_int_hst_cuhk.update_open_int_hst_pre (
445 	                                            p_init_msg_list => l_init_msg_list
446 	                                           ,x_msg_data => l_msg_data
447 	                                           ,x_msg_count => l_msg_count
448 	                                           ,x_return_status => l_return_status
449 	                                           ,p_iohv_rec => lp_iohv_rec
450 	                                           ,x_iohv_rec => lx_iohv_rec) ;
451 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
452 		RAISE FND_API.G_EXC_ERROR;
453 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
454 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
455 	END IF;
456 
457 	--Copy value of OUT NOCOPY variable in the IN record type
458 	lp_iohv_rec := lx_iohv_rec;
459 
460 END IF;
461 --Customer pre-processing user hook call end
462 
463 
464 --Vertical pre-processing user hook call start
465 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'B', 'V')) THEN
466 	iex_open_int_hst_vuhk.update_open_int_hst_pre (
467 	                                           p_init_msg_list => l_init_msg_list
468 	                                           ,x_msg_data => l_msg_data
469 	                                           ,x_msg_count => l_msg_count
470 	                                           ,x_return_status => l_return_status
471 	                                           ,p_iohv_rec => lp_iohv_rec
472 	                                           ,x_iohv_rec => lx_iohv_rec) ;
473 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
474 		RAISE FND_API.G_EXC_ERROR;
475 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
476 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
477 	END IF;
478 
479 	--Copy value of OUT NOCOPY variable in the IN record type
480 	lp_iohv_rec := lx_iohv_rec;
481 
482 END IF;
483 --Vertical pre-processing user hook call end
484 */
485     iex_ioh_pvt.update_row(
486                               l_api_version
487                              ,l_init_msg_list
488                              ,l_return_status
489                              ,l_msg_count
490                              ,l_msg_data
491                              ,lp_iohv_rec
492                              ,lx_iohv_rec);
493 
494 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
495 	RAISE FND_API.G_EXC_ERROR;
496 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
497 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
498 END IF;
499 
500 --Copy value of OUT NOCOPY variable in the IN record type
501 lp_iohv_rec := lx_iohv_rec;
502 /*
503 --Vertical post-processing user hook call start
504 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'A', 'V')) THEN
505 	iex_open_int_hst_vuhk.update_open_int_hst_post (
506 	                                           p_init_msg_list => l_init_msg_list
507 	                                           ,x_msg_data => l_msg_data
508 	                                           ,x_msg_count => l_msg_count
509 	                                           ,x_return_status => l_return_status
510 	                                           ,p_iohv_rec => lp_iohv_rec) ;
511 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
512 		RAISE FND_API.G_EXC_ERROR;
513 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
514 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
515 	END IF;
516 END IF;
517 --Vertical post-processing user hook call end
518 
519 
520 --Customer post-processing user hook call start
521 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'A', 'C')) THEN
522 	iex_open_int_hst_cuhk.update_open_int_hst_post (
523 	                                           p_init_msg_list=>l_init_msg_list
524 	                                           ,x_msg_data => l_msg_data
525 	                                           ,x_msg_count => l_msg_count
526 	                                           ,x_return_status => l_return_status
527 	                                           ,p_iohv_rec => lp_iohv_rec) ;
528 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
529 		RAISE FND_API.G_EXC_ERROR;
530 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
531 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
532 	END IF;
533 END IF;
534 --Customer post-processing user hook call end
535 */
536 --Assign value to OUT NOCOPY variables
537 x_iohv_rec  := lx_iohv_rec;
538 x_return_status := l_return_status ;
539 x_msg_count := l_msg_count ;
540 x_msg_data := l_msg_data ;
541 
542 
543 EXCEPTION
544 
545     WHEN FND_API.G_EXC_ERROR THEN
546       ROLLBACK TO open_int_hst_update;
547       x_return_status := FND_API.G_RET_STS_ERROR;
548       x_msg_count := l_msg_count ;
549       x_msg_data := l_msg_data ;
550       FND_MSG_PUB.count_and_get(
551              p_count   => x_msg_count
552             ,p_data    => x_msg_data);
553     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
554       ROLLBACK TO open_int_hst_update;
555       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
556       x_msg_count := l_msg_count ;
557       x_msg_data := l_msg_data ;
558       FND_MSG_PUB.count_and_get(
559              p_count   => x_msg_count
560             ,p_data    => x_msg_data);
561     WHEN OTHERS THEN
562       ROLLBACK TO open_int_hst_update;
563       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
564       x_msg_count := l_msg_count ;
565       x_msg_data := l_msg_data ;
566       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','update_open_int_hst');
567       FND_MSG_PUB.count_and_get(
568              p_count   => x_msg_count
569             ,p_data    => x_msg_data);
570 END update_open_int_hst;
571 
572 PROCEDURE update_open_int_hst(
573      p_api_version           IN  NUMBER
574     ,p_init_msg_list         IN  VARCHAR2
575     ,x_return_status         OUT  NOCOPY VARCHAR2
576     ,x_msg_count             OUT  NOCOPY NUMBER
577     ,x_msg_data              OUT  NOCOPY VARCHAR2
578     ,p_iohv_tbl              IN  iohv_tbl_type
579     ,x_iohv_tbl              OUT  NOCOPY iohv_tbl_type) AS
580 
581 l_api_version NUMBER;
582 l_init_msg_list VARCHAR2(200);
583 l_msg_data VARCHAR2(100);
584 l_msg_count NUMBER ;
585 l_return_status VARCHAR2(1);
586 lp_iohv_tbl  iohv_tbl_type;
587 lx_iohv_tbl  iohv_tbl_type;
588 
589 BEGIN
590 
591 SAVEPOINT open_int_hst_update;
592 
593 
594 lp_iohv_tbl :=  p_iohv_tbl;
595 lx_iohv_tbl :=  x_iohv_tbl;
596 l_api_version := p_api_version ;
597 l_init_msg_list := p_init_msg_list ;
598 l_msg_data := x_msg_data ;
599 l_msg_count := x_msg_count ;
600 
601 /*
602 --Customer pre-processing user hook call start
603 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'B', 'C')) THEN
604 	iex_open_int_hst_cuhk.update_open_int_hst_pre (
605 	                                              p_init_msg_list => l_init_msg_list
606 	                                             ,x_msg_data => l_msg_data
607 	                                             ,x_msg_count => l_msg_count
608 	                                             ,x_return_status => l_return_status
609 	                                             ,p_iohv_tbl => lp_iohv_tbl
610 	                                             ,x_iohv_tbl => lx_iohv_tbl) ;
611 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
612 		RAISE FND_API.G_EXC_ERROR;
613 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
614 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
615 	END IF;
616 
617 	--Copy value of OUT NOCOPY variable in the IN record type
618 	lp_iohv_tbl := lx_iohv_tbl;
619 
620 END IF;
621 --Customer pre-processing user hook call end
622 
623 
624 --Vertical pre-processing user hook call start
625 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'B', 'V')) THEN
626 	iex_open_int_hst_vuhk.update_open_int_hst_pre (
627 	                                              p_init_msg_list => l_init_msg_list
628 	                                             ,x_msg_data => l_msg_data
629 	                                             ,x_msg_count => l_msg_count
630 	                                             ,x_return_status => l_return_status
631 	                                             ,p_iohv_tbl => lp_iohv_tbl
632 	                                             ,x_iohv_tbl => lx_iohv_tbl) ;
633 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
634 		RAISE FND_API.G_EXC_ERROR;
635 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
636 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
637 	END IF;
638 
639 	--Copy value of OUT NOCOPY variable in the IN record type
640 	lp_iohv_tbl := lx_iohv_tbl;
641 
642 END IF;
643 --Vertical pre-processing user hook call end
644 */
645     iex_ioh_pvt.update_row(
646                               l_api_version
647                              ,l_init_msg_list
648                              ,l_return_status
649                              ,l_msg_count
650                              ,l_msg_data
651                              ,lp_iohv_tbl
652                              ,lx_iohv_tbl);
653 
654 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
655 	RAISE FND_API.G_EXC_ERROR;
656 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
657 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
658 END IF;
659 
660 --Copy value of OUT NOCOPY variable in the IN record type
661 lp_iohv_tbl := lx_iohv_tbl;
662 /*
663 --Vertical post-processing user hook call start
664 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'A', 'V')) THEN
665 	iex_open_int_hst_vuhk.update_open_int_hst_post (
666 	                                              p_init_msg_list => l_init_msg_list
667 	                                             ,x_msg_data => l_msg_data
668 	                                             ,x_msg_count => l_msg_count
669 	                                             ,x_return_status => l_return_status
670 	                                             ,p_iohv_tbl => lp_iohv_tbl) ;
671 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
672 		RAISE FND_API.G_EXC_ERROR;
673 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
674 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
675 	END IF;
676 END IF;
677 --Vertical post-processing user hook call end
678 
679 --Customer post-processing user hook call start
680 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'update_open_int_hst', 'A', 'C')) THEN
681 	iex_open_int_hst_cuhk.update_open_int_hst_post (
682 	                                              p_init_msg_list => l_init_msg_list
683 	                                             ,x_msg_data => l_msg_data
684 	                                             ,x_msg_count => l_msg_count
685 	                                             ,x_return_status => l_return_status
686 	                                             ,p_iohv_tbl => lp_iohv_tbl) ;
687 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
688 		RAISE FND_API.G_EXC_ERROR;
689 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
690 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
691 	END IF;
692 END IF;
693 --Customer post-processing user hook call end
694 */
695 
696 --Assign value to OUT NOCOPY variables
697 x_iohv_tbl  := lx_iohv_tbl;
698 x_return_status := l_return_status ;
699 x_msg_count := l_msg_count ;
700 x_msg_data := l_msg_data ;
701 
702 
703 EXCEPTION
704 
705     WHEN FND_API.G_EXC_ERROR THEN
706       ROLLBACK TO open_int_hst_update;
707       x_return_status := FND_API.G_RET_STS_ERROR;
708       x_msg_count := l_msg_count ;
709       x_msg_data := l_msg_data ;
710       FND_MSG_PUB.count_and_get(
711              p_count   => x_msg_count
712             ,p_data    => x_msg_data);
713     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
714       ROLLBACK TO open_int_hst_update;
715       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
716       x_msg_count := l_msg_count ;
717       x_msg_data := l_msg_data ;
718       FND_MSG_PUB.count_and_get(
719              p_count   => x_msg_count
720             ,p_data    => x_msg_data);
721     WHEN OTHERS THEN
722       ROLLBACK TO open_int_hst_update;
723       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
724       x_msg_count := l_msg_count ;
725       x_msg_data := l_msg_data ;
726       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','update_open_int_hst');
727       FND_MSG_PUB.count_and_get(
728              p_count   => x_msg_count
729             ,p_data    => x_msg_data);
730 END update_open_int_hst;
731 
732 --Put custom code for cascade delete by developer
733 PROCEDURE delete_open_int_hst(
734      p_api_version           IN  NUMBER
735     ,p_init_msg_list         IN  VARCHAR2
736     ,x_return_status         OUT  NOCOPY VARCHAR2
737     ,x_msg_count             OUT  NOCOPY NUMBER
738     ,x_msg_data              OUT  NOCOPY VARCHAR2
739     ,p_iohv_rec              IN iohv_rec_type) AS
740 
741 i	                    NUMBER;
742 l_return_status 	    VARCHAR2(1);
743 l_api_version NUMBER ;
744 l_init_msg_list    VARCHAR2(1) ;
745 l_msg_data VARCHAR2(2000);
746 l_msg_count NUMBER ;
747 lp_iohv_rec  iohv_rec_type;
748 lx_iohv_rec  iohv_rec_type;
749 
750 BEGIN
751 
752 SAVEPOINT open_int_hst_delete_rec;
753 
754 i:=0;
755 l_return_status := OKC_API.G_RET_STS_SUCCESS;
756 l_api_version := p_api_version ;
757 l_init_msg_list := p_init_msg_list ;
758 l_msg_data :=  x_msg_data;
759 l_msg_count := x_msg_count ;
760 lp_iohv_rec :=  p_iohv_rec;
761 lx_iohv_rec :=  p_iohv_rec;
762 /*
763 --Customer pre-processing user hook call start
764 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'B', 'C')) THEN
765 	iex_open_int_hst_cuhk.delete_open_int_hst_pre (
766 	                                              p_init_msg_list => l_init_msg_list
767 	                                             ,x_msg_data => l_msg_data
768 	                                             ,x_msg_count => l_msg_count
769 	                                             ,x_return_status => l_return_status
770 	                                             ,p_iohv_rec => lp_iohv_rec
771 	                                             ,x_iohv_rec => lx_iohv_rec) ;
772 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
773 		RAISE FND_API.G_EXC_ERROR;
774 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
775 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
776 	END IF;
777 
778 	--Copy value of OUT NOCOPY variable in the IN record type
779 	lp_iohv_rec := lx_iohv_rec;
780 
781 END IF;
782 --Customer pre-processing user hook call end
783 
784 
785 --Vertical pre-processing user hook call start
786 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'B', 'V')) THEN
787 	iex_open_int_hst_vuhk.delete_open_int_hst_pre (
788 	                                              p_init_msg_list => l_init_msg_list
789 	                                             ,x_msg_data => l_msg_data
790 	                                             ,x_msg_count => l_msg_count
791 	                                             ,x_return_status => l_return_status
792 	                                             ,p_iohv_rec => lp_iohv_rec
793 	                                             ,x_iohv_rec => lx_iohv_rec) ;
794 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
795 		RAISE FND_API.G_EXC_ERROR;
796 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
797 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
798 	END IF;
799 
800 	--Copy value of OUT NOCOPY variable in the IN record type
801 	lp_iohv_rec := lx_iohv_rec;
802 
803 END IF;
804 --Vertical pre-processing user hook call end
805 */
806 --Delete the Master
807 iex_ioh_pvt.delete_row(
808                           l_api_version
809                          ,l_init_msg_list
810                          ,l_return_status
811                          ,l_msg_count
812                          ,l_msg_data
813                          ,lp_iohv_rec);
814 
815 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
816 	RAISE FND_API.G_EXC_ERROR;
817 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
818 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
819 END IF;
820 
821 /*
822 --Vertical post-processing user hook call start
823 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'A', 'V')) THEN
824 iex_open_int_hst_vuhk.delete_open_int_hst_post (
825                                               p_init_msg_list => l_init_msg_list
826                                              ,x_msg_data => l_msg_data
827                                              ,x_msg_count => l_msg_count
828                                              ,x_return_status => l_return_status
829                                              ,p_iohv_rec => lp_iohv_rec) ;
830 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
831 		RAISE FND_API.G_EXC_ERROR;
832 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
833 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
834 	END IF;
835 END IF;
836 --Vertical post-processing user hook call end
837 
838 
839 --Customer post-processing user hook call start
840 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'A', 'C')) THEN
841 iex_open_int_hst_cuhk.delete_open_int_hst_post (
842                                               p_init_msg_list => l_init_msg_list
843                                              ,x_msg_data => l_msg_data
844                                              ,x_msg_count => l_msg_count
845                                              ,x_return_status => l_return_status
846                                              ,p_iohv_rec => lp_iohv_rec) ;
847 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
848 		RAISE FND_API.G_EXC_ERROR;
849 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
850 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
851 	END IF;
852 END IF;
853 --Customer post-processing user hook call end
854 */
855 --Assign value to OUT NOCOPY variables
856 x_msg_count := l_msg_count ;
857 x_msg_data := l_msg_data ;
858 x_return_status := l_return_status ;
859 
860 EXCEPTION
861 
862     WHEN FND_API.G_EXC_ERROR THEN
863       ROLLBACK TO open_int_hst_delete_rec;
864       x_return_status := FND_API.G_RET_STS_ERROR;
865       x_msg_count := l_msg_count ;
866       x_msg_data := l_msg_data ;
867       FND_MSG_PUB.count_and_get(
868              p_count   => x_msg_count
869             ,p_data    => x_msg_data);
870     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
871       ROLLBACK TO open_int_hst_delete_rec;
872       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
873       x_msg_count := l_msg_count ;
874       x_msg_data := l_msg_data ;
875       FND_MSG_PUB.count_and_get(
876              p_count   => x_msg_count
877             ,p_data    => x_msg_data);
878     WHEN OTHERS THEN
879       ROLLBACK TO open_int_hst_delete_rec;
880       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
881       x_msg_count := l_msg_count ;
882       x_msg_data := l_msg_data ;
883       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','delete_open_int_hst');
884       FND_MSG_PUB.count_and_get(
885              p_count   => x_msg_count
886             ,p_data    => x_msg_data);
887 END delete_open_int_hst;
888 
889 PROCEDURE delete_open_int_hst(
890      p_api_version        IN NUMBER
891     ,p_init_msg_list      IN VARCHAR2
892     ,x_return_status      OUT NOCOPY VARCHAR2
893     ,x_msg_count          OUT NOCOPY NUMBER
894     ,x_msg_data           OUT NOCOPY VARCHAR2
895     ,p_iohv_tbl           IN iohv_tbl_type) AS
896 
897 i NUMBER := 0;
898 l_return_status VARCHAR2(1);
899 l_api_version NUMBER;
900 l_init_msg_list VARCHAR2(1);
901 l_msg_data VARCHAR2(2000);
902 l_msg_count NUMBER ;
903 lp_iohv_tbl  iohv_tbl_type;
904 lx_iohv_tbl  iohv_tbl_type;
905 
906 BEGIN
907 
908 SAVEPOINT open_int_hst_delete_tbl;
909 
910 
911 l_return_status := OKC_API.G_RET_STS_SUCCESS;
912 l_api_version := p_api_version ;
913 l_init_msg_list := p_init_msg_list ;
914 l_msg_data :=  x_msg_data;
915 l_msg_count := x_msg_count ;
916 lp_iohv_tbl :=  p_iohv_tbl;
917 lx_iohv_tbl :=  p_iohv_tbl;
918 
919 /*
920 --Customer pre-processing user hook call start
921 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'B', 'C')) THEN
922 iex_open_int_hst_cuhk.delete_open_int_hst_pre (
923                                               p_init_msg_list => l_init_msg_list
924                                              ,x_msg_data => l_msg_data
925                                              ,x_msg_count => l_msg_count
926                                              ,x_return_status => l_return_status
927                                              ,p_iohv_tbl => lp_iohv_tbl
928                                              ,x_iohv_tbl => lx_iohv_tbl) ;
929 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
930 		RAISE FND_API.G_EXC_ERROR;
931 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
932 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
933 	END IF;
934 
935 	--Copy value of OUT NOCOPY variable in the IN record type
936 	lp_iohv_tbl := lx_iohv_tbl;
937 
938 END IF;
939 --Customer pre-processing user hook call end
940 
941 
942 --Vertical pre-processing user hook call start
943 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'B', 'V')) THEN
944 iex_open_int_hst_vuhk.delete_open_int_hst_pre (
945                                               p_init_msg_list => l_init_msg_list
946                                              ,x_msg_data => l_msg_data
947                                              ,x_msg_count => l_msg_count
948                                              ,x_return_status => l_return_status
949                                              ,p_iohv_tbl => lp_iohv_tbl
950                                              ,x_iohv_tbl => lx_iohv_tbl) ;
951 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
952 		RAISE FND_API.G_EXC_ERROR;
953 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
954 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
955 	END IF;
956 
957 	--Copy value of OUT NOCOPY variable in the IN record type
958 	lp_iohv_tbl := lx_iohv_tbl;
959 
960 END IF;
961 --Vertical pre-processing user hook call end
962 */
963 
964 BEGIN
965       --Initialize the return status
966       l_return_status := OKC_API.G_RET_STS_SUCCESS;
967 
968       IF (lp_iohv_tbl.COUNT > 0) THEN
969        	  i := p_iohv_tbl.FIRST;
970        LOOP
971           delete_open_int_hst(
972                                l_api_version
973                               ,l_init_msg_list
974                               ,l_return_status
975                               ,l_msg_count
976                               ,l_msg_data
977                               ,lp_iohv_tbl(i));
978           EXIT WHEN (i = lp_iohv_tbl.LAST);
979           i := p_iohv_tbl.NEXT(i);
980        END LOOP;
981       END IF;
982 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
983 	RAISE FND_API.G_EXC_ERROR;
984 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
985 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
986 END IF;
987 
988 END;
989 
990 /*
991 --Vertical post-processing user hook call start
992 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'A', 'V')) THEN
993 iex_open_int_hst_vuhk.delete_open_int_hst_post (
994                                               p_init_msg_list => l_init_msg_list
995                                              ,x_msg_data => l_msg_data
996                                              ,x_msg_count => l_msg_count
997                                              ,x_return_status => l_return_status
998                                              ,p_iohv_tbl => lp_iohv_tbl) ;
999 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1000 		RAISE FND_API.G_EXC_ERROR;
1001 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1002 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1003 	END IF;
1004 END IF;
1005 --Vertical post-processing user hook call end
1006 
1007 
1008 --Customer post-processing user hook call start
1009 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'delete_open_int_hst', 'A', 'C')) THEN
1010 iex_open_int_hst_cuhk.delete_open_int_hst_post (
1011                                               p_init_msg_list => l_init_msg_list
1012                                              ,x_msg_data => l_msg_data
1013                                              ,x_msg_count => l_msg_count
1014                                              ,x_return_status => l_return_status
1015                                              ,p_iohv_tbl => lp_iohv_tbl) ;
1016 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1017 		RAISE FND_API.G_EXC_ERROR;
1018 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1019 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1020 	END IF;
1021 END IF;
1022 --Customer post-processing user hook call end
1023 */
1024 --Assign value to OUT NOCOPY variables
1025 x_msg_count := l_msg_count ;
1026 x_msg_data := l_msg_data ;
1027 
1028 x_return_status := l_return_status ;
1029 
1030 EXCEPTION
1031 
1032     WHEN FND_API.G_EXC_ERROR THEN
1033       ROLLBACK TO open_int_hst_delete_tbl;
1034       x_return_status := FND_API.G_RET_STS_ERROR;
1035       x_msg_count := l_msg_count ;
1036       x_msg_data := l_msg_data ;
1037       FND_MSG_PUB.count_and_get(
1038              p_count   => x_msg_count
1039             ,p_data    => x_msg_data);
1040     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1041       ROLLBACK TO open_int_hst_delete_tbl;
1042       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1043       x_msg_count := l_msg_count ;
1044       x_msg_data := l_msg_data ;
1045       FND_MSG_PUB.count_and_get(
1046              p_count   => x_msg_count
1047             ,p_data    => x_msg_data);
1048     WHEN OTHERS THEN
1049       ROLLBACK TO open_int_hst_delete_tbl;
1050       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1051       x_msg_count := l_msg_count ;
1052       x_msg_data := l_msg_data ;
1053       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','delete_open_int_hst');
1054       FND_MSG_PUB.count_and_get(
1055              p_count   => x_msg_count
1056             ,p_data    => x_msg_data);
1057 END delete_open_int_hst;
1058 
1059 PROCEDURE validate_open_int_hst(
1060      p_api_version      IN  NUMBER
1061     ,p_init_msg_list    IN  VARCHAR2
1062     ,x_return_status    OUT  NOCOPY VARCHAR2
1063     ,x_msg_count        OUT  NOCOPY NUMBER
1064     ,x_msg_data         OUT  NOCOPY VARCHAR2
1065     ,p_iohv_rec         IN  iohv_rec_type) AS
1066 
1067 l_api_version NUMBER ;
1068 l_init_msg_list    VARCHAR2(1) ;
1069 l_msg_data VARCHAR2(2000);
1070 l_msg_count NUMBER ;
1071 lp_iohv_rec  iohv_rec_type;
1072 lx_iohv_rec  iohv_rec_type;
1073 l_return_status VARCHAR2(1);
1074 
1075 BEGIN
1076 
1077 SAVEPOINT open_int_hst_validate;
1078 
1079 
1080 l_api_version := p_api_version ;
1081 l_init_msg_list := p_init_msg_list ;
1082 l_msg_data :=  x_msg_data;
1083 l_msg_count := x_msg_count ;
1084 lp_iohv_rec :=  p_iohv_rec;
1085 lx_iohv_rec :=  p_iohv_rec;
1086 /*
1087 --Customer pre-processing user hook call start
1088 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'B', 'C')) THEN
1089 iex_open_int_hst_cuhk.validate_open_int_hst_pre (
1090                                               p_init_msg_list => l_init_msg_list
1091                                              ,x_msg_data => l_msg_data
1092                                              ,x_msg_count => l_msg_count
1093                                              ,x_return_status => l_return_status
1094                                              ,p_iohv_rec => lp_iohv_rec
1095                                              ,x_iohv_rec => lx_iohv_rec) ;
1096 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1097 		RAISE FND_API.G_EXC_ERROR;
1098 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1099 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1100 	END IF;
1101 
1102 	--Copy value of OUT NOCOPY variable in the IN record type
1103 	lp_iohv_rec := lx_iohv_rec;
1104 
1105 END IF;
1106 --Customer pre-processing user hook call end
1107 
1108 
1109 --Vertical pre-processing user hook call start
1110 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'B', 'V')) THEN
1111 iex_open_int_hst_vuhk.validate_open_int_hst_pre (
1112                                               p_init_msg_list => l_init_msg_list
1113                                              ,x_msg_data => l_msg_data
1114                                              ,x_msg_count => l_msg_count
1115                                              ,x_return_status => l_return_status
1116                                              ,p_iohv_rec => lp_iohv_rec
1117                                              ,x_iohv_rec => lx_iohv_rec) ;
1118 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1119 		RAISE FND_API.G_EXC_ERROR;
1120 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1121 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1122 	END IF;
1123 
1124 	--Copy value of OUT NOCOPY variable in the IN record type
1125 	lp_iohv_rec := lx_iohv_rec;
1126 
1127 END IF;
1128 --Vertical pre-processing user hook call end
1129 */
1130 iex_ioh_pvt.validate_row(
1131                             l_api_version
1132                            ,l_init_msg_list
1133                            ,l_return_status
1134                            ,l_msg_count
1135                            ,l_msg_data
1136                            ,lp_iohv_rec);
1137 
1138 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1139 	RAISE FND_API.G_EXC_ERROR;
1140 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1141 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1142 END IF;
1143 
1144 --Copy value of OUT NOCOPY variable in the IN record type
1145 lp_iohv_rec := lx_iohv_rec;
1146 
1147 /*
1148 --Vertical post-processing user hook call start
1149 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'A', 'V')) THEN
1150 iex_open_int_hst_vuhk.validate_open_int_hst_post (
1151                                               p_init_msg_list => l_init_msg_list
1152                                              ,x_msg_data => l_msg_data
1153                                              ,x_msg_count => l_msg_count
1154                                              ,x_return_status => l_return_status
1155                                              ,p_iohv_rec => lp_iohv_rec) ;
1156 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1157 		RAISE FND_API.G_EXC_ERROR;
1158 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1159 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1160 	END IF;
1161 END IF;
1162 
1163 
1164 
1165 --Vertical post-processing user hook call end
1166 
1167 
1168 --Customer post-processing user hook call start
1169 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'A', 'C')) THEN
1170 iex_open_int_hst_cuhk.validate_open_int_hst_post (
1171                                               p_init_msg_list => l_init_msg_list
1172                                              ,x_msg_data => l_msg_data
1173                                              ,x_msg_count => l_msg_count
1174                                              ,x_return_status => l_return_status
1175                                              ,p_iohv_rec => lp_iohv_rec) ;
1176 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1177 		RAISE FND_API.G_EXC_ERROR;
1178 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1179 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1180 	END IF;
1181 END IF;
1182 --Customer post-processing user hook call end
1183 */
1184 --Assign value to OUT NOCOPY variables
1185 x_msg_count := l_msg_count ;
1186 x_msg_data := l_msg_data ;
1187 
1188 x_return_status := l_return_status ;
1189 
1190 EXCEPTION
1191 
1192     WHEN FND_API.G_EXC_ERROR THEN
1193       ROLLBACK TO open_int_hst_validate;
1194       x_return_status := FND_API.G_RET_STS_ERROR;
1195       x_msg_count := l_msg_count ;
1196       x_msg_data := l_msg_data ;
1197       FND_MSG_PUB.count_and_get(
1198              p_count   => x_msg_count
1199             ,p_data    => x_msg_data);
1200     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1201       ROLLBACK TO open_int_hst_validate;
1202       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1203       x_msg_count := l_msg_count ;
1204       x_msg_data := l_msg_data ;
1205       FND_MSG_PUB.count_and_get(
1206              p_count   => x_msg_count
1207             ,p_data    => x_msg_data);
1208     WHEN OTHERS THEN
1209       ROLLBACK TO open_int_hst_validate;
1210       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1211       x_msg_count := l_msg_count ;
1212       x_msg_data := l_msg_data ;
1213       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','validate_open_int_hst');
1214       FND_MSG_PUB.count_and_get(
1215              p_count   => x_msg_count
1216             ,p_data    => x_msg_data);
1217 END validate_open_int_hst;
1218 
1219 PROCEDURE validate_open_int_hst(
1220     p_api_version       IN  NUMBER,
1221     p_init_msg_list     IN  VARCHAR2 ,
1222     x_return_status     OUT  NOCOPY VARCHAR2,
1223     x_msg_count         OUT  NOCOPY NUMBER,
1224     x_msg_data          OUT  NOCOPY VARCHAR2,
1225     p_iohv_tbl          IN  iohv_tbl_type) AS
1226 l_api_version NUMBER ;
1227 l_init_msg_list    VARCHAR2(1) ;
1228 l_msg_data VARCHAR2(2000);
1229 l_msg_count NUMBER ;
1230 lp_iohv_tbl  iohv_tbl_type;
1231 lx_iohv_tbl  iohv_tbl_type;
1232 l_return_status VARCHAR2(1);
1233 
1234 BEGIN
1235 
1236 SAVEPOINT open_int_hst_validate;
1237 
1238 
1239 l_api_version := p_api_version ;
1240 l_init_msg_list := p_init_msg_list ;
1241 l_msg_data :=  x_msg_data;
1242 l_msg_count := x_msg_count ;
1243 lp_iohv_tbl :=  p_iohv_tbl;
1244 lx_iohv_tbl :=  p_iohv_tbl;
1245 /*
1246 --Customer pre-processing user hook call start
1247 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'B', 'C')) THEN
1248 iex_open_int_hst_cuhk.validate_open_int_hst_pre (
1249                                               p_init_msg_list => l_init_msg_list
1250                                              ,x_msg_data => l_msg_data
1251                                              ,x_msg_count => l_msg_count
1252                                              ,x_return_status => l_return_status
1253                                              ,p_iohv_tbl => lp_iohv_tbl
1254                                              ,x_iohv_tbl => lx_iohv_tbl) ;
1255 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1256 		RAISE FND_API.G_EXC_ERROR;
1257 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1258 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1259 	END IF;
1260 
1261 	--Copy value of OUT NOCOPY variable in the IN record type
1262 	lp_iohv_tbl := lx_iohv_tbl;
1263 
1264 END IF;
1265 --Customer pre-processing user hook call end
1266 
1267 --Vertical pre-processing user hook call start
1268 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'B', 'V')) THEN
1269 iex_open_int_hst_vuhk.validate_open_int_hst_pre (
1270                                               p_init_msg_list => l_init_msg_list
1271                                              ,x_msg_data => l_msg_data
1272                                              ,x_msg_count => l_msg_count
1273                                              ,x_return_status => l_return_status
1274                                              ,p_iohv_tbl => lp_iohv_tbl
1275                                              ,x_iohv_tbl => lx_iohv_tbl) ;
1276 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1277 		RAISE FND_API.G_EXC_ERROR;
1278 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1279 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1280 	END IF;
1281 
1282 	--Copy value of OUT NOCOPY variable in the IN record type
1283 	lp_iohv_tbl := lx_iohv_tbl;
1284 
1285 END IF;
1286 --Vertical pre-processing user hook call end
1287 */
1288 iex_ioh_pvt.validate_row(
1289                             p_api_version
1290                            ,p_init_msg_list
1291                            ,x_return_status
1292                            ,x_msg_count
1293                            ,x_msg_data
1294                            ,lp_iohv_tbl);
1295 
1296 IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1297 	RAISE FND_API.G_EXC_ERROR;
1298 ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1299 	RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1300 END IF;
1301 
1302 --Copy value of OUT NOCOPY variable in the IN record type
1303 lp_iohv_tbl := lx_iohv_tbl;
1304 /*
1305 --Vertical post-processing user hook call start
1306 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'A', 'V')) THEN
1307 iex_open_int_hst_vuhk.validate_open_int_hst_post (
1308                                               p_init_msg_list => l_init_msg_list
1309                                              ,x_msg_data => l_msg_data
1310                                              ,x_msg_count => l_msg_count
1311                                              ,x_return_status => l_return_status
1312                                              ,p_iohv_tbl => lp_iohv_tbl) ;
1313 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1314 		RAISE FND_API.G_EXC_ERROR;
1315 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1316 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1317 	END IF;
1318 END IF;
1319 --Vertical post-processing user hook call end
1320 --Customer post-processing user hook call start
1321 IF (JTF_USR_HKS.Ok_to_execute(G_PKG_NAME, 'validate_open_int_hst', 'A', 'C')) THEN
1322 iex_open_int_hst_cuhk.validate_open_int_hst_post (
1323                                               p_init_msg_list => l_init_msg_list
1324                                              ,x_msg_data => l_msg_data
1325                                              ,x_msg_count => l_msg_count
1326                                              ,x_return_status => l_return_status
1327                                              ,p_iohv_tbl => lp_iohv_tbl) ;
1328 	IF ( l_return_status = FND_API.G_RET_STS_ERROR )  THEN
1329 		RAISE FND_API.G_EXC_ERROR;
1330 	ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1331 		RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1332 	END IF;
1333 END IF;
1334 
1335 
1336 */
1337 --Customer post-processing user hook call end
1338 
1339 --Assign value to OUT NOCOPY variables
1340 x_msg_count := l_msg_count ;
1341 x_msg_data := l_msg_data ;
1342 
1343 x_return_status := l_return_status ;
1344 
1345 EXCEPTION
1346 
1347     WHEN FND_API.G_EXC_ERROR THEN
1348       ROLLBACK TO open_int_hst_validate;
1349       x_return_status := FND_API.G_RET_STS_ERROR;
1350       x_msg_count := l_msg_count ;
1351       x_msg_data := l_msg_data ;
1352       FND_MSG_PUB.count_and_get(
1353              p_count   => x_msg_count
1354             ,p_data    => x_msg_data);
1355     WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1356       ROLLBACK TO open_int_hst_validate;
1357       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1358       x_msg_count := l_msg_count ;
1359       x_msg_data := l_msg_data ;
1360       FND_MSG_PUB.count_and_get(
1361              p_count   => x_msg_count
1362             ,p_data    => x_msg_data);
1363     WHEN OTHERS THEN
1364       ROLLBACK TO open_int_hst_validate;
1365       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1366       x_msg_count := l_msg_count ;
1367       x_msg_data := l_msg_data ;
1368       FND_MSG_PUB.ADD_EXC_MSG('IEX_OPEN_INT_HST_PUB','validate_open_int_hst');
1369       FND_MSG_PUB.count_and_get(
1370              p_count   => x_msg_count
1371             ,p_data    => x_msg_data);
1372 END validate_open_int_hst;
1373 BEGIN
1374 PG_DEBUG := TO_NUMBER(NVL(FND_PROFILE.value('IEX_DEBUG_LEVEL'), '20'));
1375 END IEX_OPEN_INT_HST_PUB;