DBA Data[Home] [Help]

PACKAGE BODY: APPS.IEX_EXCLUSION_HIST_PUB

Source


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