200:
201: l_api_name CONSTANT VARCHAR2(30) := 'create_cond_hdrs';
202: l_return_status VARCHAR2(1);
203: BEGIN
204: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
205: p_init_msg_list,
206: '_PUB',
207: x_return_status);
208: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
204: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
205: p_init_msg_list,
206: '_PUB',
207: x_return_status);
208: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
209: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
210: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
211: raise OKC_API.G_EXCEPTION_ERROR;
212: END IF;
205: p_init_msg_list,
206: '_PUB',
207: x_return_status);
208: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
209: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
210: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
211: raise OKC_API.G_EXCEPTION_ERROR;
212: END IF;
213: -- Call to Complex API procedure
206: '_PUB',
207: x_return_status);
208: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
209: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
210: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
211: raise OKC_API.G_EXCEPTION_ERROR;
212: END IF;
213: -- Call to Complex API procedure
214: okc_conditions_pvt.create_cond_hdrs(
207: x_return_status);
208: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
209: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
210: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
211: raise OKC_API.G_EXCEPTION_ERROR;
212: END IF;
213: -- Call to Complex API procedure
214: okc_conditions_pvt.create_cond_hdrs(
215: p_api_version,
220: p_cnhv_rec,
221: p_cnlv_tbl,
222: x_cnhv_rec,
223: x_cnlv_tbl);
224: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
225: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
226: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
227: raise OKC_API.G_EXCEPTION_ERROR;
228: END IF;
221: p_cnlv_tbl,
222: x_cnhv_rec,
223: x_cnlv_tbl);
224: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
225: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
226: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
227: raise OKC_API.G_EXCEPTION_ERROR;
228: END IF;
229:
222: x_cnhv_rec,
223: x_cnlv_tbl);
224: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
225: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
226: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
227: raise OKC_API.G_EXCEPTION_ERROR;
228: END IF;
229:
230: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
223: x_cnlv_tbl);
224: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
225: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
226: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
227: raise OKC_API.G_EXCEPTION_ERROR;
228: END IF;
229:
230: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
231: EXCEPTION
226: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
227: raise OKC_API.G_EXCEPTION_ERROR;
228: END IF;
229:
230: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
231: EXCEPTION
232: WHEN OKC_API.G_EXCEPTION_ERROR THEN
233: x_return_status := OKC_API.HANDLE_EXCEPTIONS
234: (l_api_name,
228: END IF;
229:
230: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
231: EXCEPTION
232: WHEN OKC_API.G_EXCEPTION_ERROR THEN
233: x_return_status := OKC_API.HANDLE_EXCEPTIONS
234: (l_api_name,
235: G_PKG_NAME,
236: 'OKC_API.G_RET_STS_ERROR',
229:
230: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
231: EXCEPTION
232: WHEN OKC_API.G_EXCEPTION_ERROR THEN
233: x_return_status := OKC_API.HANDLE_EXCEPTIONS
234: (l_api_name,
235: G_PKG_NAME,
236: 'OKC_API.G_RET_STS_ERROR',
237: x_msg_count,
232: WHEN OKC_API.G_EXCEPTION_ERROR THEN
233: x_return_status := OKC_API.HANDLE_EXCEPTIONS
234: (l_api_name,
235: G_PKG_NAME,
236: 'OKC_API.G_RET_STS_ERROR',
237: x_msg_count,
238: x_msg_data,
239: '_PUB');
240: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
236: 'OKC_API.G_RET_STS_ERROR',
237: x_msg_count,
238: x_msg_data,
239: '_PUB');
240: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
241: x_return_status := OKC_API.HANDLE_EXCEPTIONS
242: (l_api_name,
243: G_PKG_NAME,
244: 'OKC_API.G_RET_STS_UNEXP_ERROR',
237: x_msg_count,
238: x_msg_data,
239: '_PUB');
240: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
241: x_return_status := OKC_API.HANDLE_EXCEPTIONS
242: (l_api_name,
243: G_PKG_NAME,
244: 'OKC_API.G_RET_STS_UNEXP_ERROR',
245: x_msg_count,
240: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
241: x_return_status := OKC_API.HANDLE_EXCEPTIONS
242: (l_api_name,
243: G_PKG_NAME,
244: 'OKC_API.G_RET_STS_UNEXP_ERROR',
245: x_msg_count,
246: x_msg_data,
247: '_PUB');
248: WHEN OTHERS THEN
245: x_msg_count,
246: x_msg_data,
247: '_PUB');
248: WHEN OTHERS THEN
249: x_return_status := OKC_API.HANDLE_EXCEPTIONS
250: (l_api_name,
251: G_PKG_NAME,
252: 'OTHERS',
253: x_msg_count,
268: x_cnlv_tbl OUT NOCOPY cnlv_tbl_type) IS
269:
270: l_api_version CONSTANT NUMBER := 1;
271: l_api_name CONSTANT VARCHAR2(30) := 'V_update_cond_hdrs';
272: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
273:
274: BEGIN
275: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
276: p_init_msg_list,
271: l_api_name CONSTANT VARCHAR2(30) := 'V_update_cond_hdrs';
272: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
273:
274: BEGIN
275: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
276: p_init_msg_list,
277: '_PUB',
278: x_return_status);
279: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
275: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
276: p_init_msg_list,
277: '_PUB',
278: x_return_status);
279: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
280: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
281: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
282: raise OKC_API.G_EXCEPTION_ERROR;
283: END IF;
276: p_init_msg_list,
277: '_PUB',
278: x_return_status);
279: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
280: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
281: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
282: raise OKC_API.G_EXCEPTION_ERROR;
283: END IF;
284:
277: '_PUB',
278: x_return_status);
279: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
280: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
281: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
282: raise OKC_API.G_EXCEPTION_ERROR;
283: END IF;
284:
285: --Call to Complex API procedure
278: x_return_status);
279: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
280: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
281: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
282: raise OKC_API.G_EXCEPTION_ERROR;
283: END IF;
284:
285: --Call to Complex API procedure
286: okc_conditions_pvt.update_cond_hdrs(
292: p_cnhv_rec,
293: p_cnlv_tbl,
294: x_cnhv_rec,
295: x_cnlv_tbl);
296: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
297: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
298: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
299: raise OKC_API.G_EXCEPTION_ERROR;
300: END IF;
293: p_cnlv_tbl,
294: x_cnhv_rec,
295: x_cnlv_tbl);
296: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
297: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
298: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
299: raise OKC_API.G_EXCEPTION_ERROR;
300: END IF;
301:
294: x_cnhv_rec,
295: x_cnlv_tbl);
296: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
297: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
298: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
299: raise OKC_API.G_EXCEPTION_ERROR;
300: END IF;
301:
302: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
295: x_cnlv_tbl);
296: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
297: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
298: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
299: raise OKC_API.G_EXCEPTION_ERROR;
300: END IF;
301:
302: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
303: EXCEPTION
298: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
299: raise OKC_API.G_EXCEPTION_ERROR;
300: END IF;
301:
302: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
303: EXCEPTION
304: WHEN OKC_API.G_EXCEPTION_ERROR THEN
305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
306: (l_api_name,
300: END IF;
301:
302: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
303: EXCEPTION
304: WHEN OKC_API.G_EXCEPTION_ERROR THEN
305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
306: (l_api_name,
307: G_PKG_NAME,
308: 'OKC_API.G_RET_STS_ERROR',
301:
302: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
303: EXCEPTION
304: WHEN OKC_API.G_EXCEPTION_ERROR THEN
305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
306: (l_api_name,
307: G_PKG_NAME,
308: 'OKC_API.G_RET_STS_ERROR',
309: x_msg_count,
304: WHEN OKC_API.G_EXCEPTION_ERROR THEN
305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
306: (l_api_name,
307: G_PKG_NAME,
308: 'OKC_API.G_RET_STS_ERROR',
309: x_msg_count,
310: x_msg_data,
311: '_PUB');
312: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
308: 'OKC_API.G_RET_STS_ERROR',
309: x_msg_count,
310: x_msg_data,
311: '_PUB');
312: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
313: x_return_status := OKC_API.HANDLE_EXCEPTIONS
314: (l_api_name,
315: G_PKG_NAME,
316: 'OKC_API.G_RET_STS_UNEXP_ERROR',
309: x_msg_count,
310: x_msg_data,
311: '_PUB');
312: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
313: x_return_status := OKC_API.HANDLE_EXCEPTIONS
314: (l_api_name,
315: G_PKG_NAME,
316: 'OKC_API.G_RET_STS_UNEXP_ERROR',
317: x_msg_count,
312: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
313: x_return_status := OKC_API.HANDLE_EXCEPTIONS
314: (l_api_name,
315: G_PKG_NAME,
316: 'OKC_API.G_RET_STS_UNEXP_ERROR',
317: x_msg_count,
318: x_msg_data,
319: '_PUB');
320: WHEN OTHERS THEN
317: x_msg_count,
318: x_msg_data,
319: '_PUB');
320: WHEN OTHERS THEN
321: x_return_status := OKC_API.HANDLE_EXCEPTIONS
322: (l_api_name,
323: G_PKG_NAME,
324: 'OTHERS',
325: x_msg_count,
338: p_cnlv_tbl IN cnlv_tbl_type) IS
339:
340: l_api_version CONSTANT NUMBER := 1;
341: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_cond_hdrs';
342: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
343:
344: BEGIN
345: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
346: p_init_msg_list,
341: l_api_name CONSTANT VARCHAR2(30) := 'V_validate_cond_hdrs';
342: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
343:
344: BEGIN
345: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
346: p_init_msg_list,
347: '_PUB',
348: x_return_status);
349: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
345: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
346: p_init_msg_list,
347: '_PUB',
348: x_return_status);
349: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
350: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
351: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
352: raise OKC_API.G_EXCEPTION_ERROR;
353: END IF;
346: p_init_msg_list,
347: '_PUB',
348: x_return_status);
349: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
350: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
351: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
352: raise OKC_API.G_EXCEPTION_ERROR;
353: END IF;
354:
347: '_PUB',
348: x_return_status);
349: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
350: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
351: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
352: raise OKC_API.G_EXCEPTION_ERROR;
353: END IF;
354:
355: okc_conditions_pvt.validate_cond_hdrs(
348: x_return_status);
349: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
350: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
351: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
352: raise OKC_API.G_EXCEPTION_ERROR;
353: END IF;
354:
355: okc_conditions_pvt.validate_cond_hdrs(
356: p_api_version,
359: x_msg_count,
360: x_msg_data,
361: p_cnhv_rec,
362: p_cnlv_tbl);
363: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
364: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
365: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
366: raise OKC_API.G_EXCEPTION_ERROR;
367: END IF;
360: x_msg_data,
361: p_cnhv_rec,
362: p_cnlv_tbl);
363: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
364: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
365: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
366: raise OKC_API.G_EXCEPTION_ERROR;
367: END IF;
368:
361: p_cnhv_rec,
362: p_cnlv_tbl);
363: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
364: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
365: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
366: raise OKC_API.G_EXCEPTION_ERROR;
367: END IF;
368:
369: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
362: p_cnlv_tbl);
363: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
364: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
365: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
366: raise OKC_API.G_EXCEPTION_ERROR;
367: END IF;
368:
369: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
370: EXCEPTION
365: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
366: raise OKC_API.G_EXCEPTION_ERROR;
367: END IF;
368:
369: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
370: EXCEPTION
371: WHEN OKC_API.G_EXCEPTION_ERROR THEN
372: x_return_status := OKC_API.HANDLE_EXCEPTIONS
373: (l_api_name,
367: END IF;
368:
369: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
370: EXCEPTION
371: WHEN OKC_API.G_EXCEPTION_ERROR THEN
372: x_return_status := OKC_API.HANDLE_EXCEPTIONS
373: (l_api_name,
374: G_PKG_NAME,
375: 'OKC_API.G_RET_STS_ERROR',
368:
369: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
370: EXCEPTION
371: WHEN OKC_API.G_EXCEPTION_ERROR THEN
372: x_return_status := OKC_API.HANDLE_EXCEPTIONS
373: (l_api_name,
374: G_PKG_NAME,
375: 'OKC_API.G_RET_STS_ERROR',
376: x_msg_count,
371: WHEN OKC_API.G_EXCEPTION_ERROR THEN
372: x_return_status := OKC_API.HANDLE_EXCEPTIONS
373: (l_api_name,
374: G_PKG_NAME,
375: 'OKC_API.G_RET_STS_ERROR',
376: x_msg_count,
377: x_msg_data,
378: '_PUB');
379: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
375: 'OKC_API.G_RET_STS_ERROR',
376: x_msg_count,
377: x_msg_data,
378: '_PUB');
379: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
380: x_return_status := OKC_API.HANDLE_EXCEPTIONS
381: (l_api_name,
382: G_PKG_NAME,
383: 'OKC_API.G_RET_STS_UNEXP_ERROR',
376: x_msg_count,
377: x_msg_data,
378: '_PUB');
379: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
380: x_return_status := OKC_API.HANDLE_EXCEPTIONS
381: (l_api_name,
382: G_PKG_NAME,
383: 'OKC_API.G_RET_STS_UNEXP_ERROR',
384: x_msg_count,
379: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
380: x_return_status := OKC_API.HANDLE_EXCEPTIONS
381: (l_api_name,
382: G_PKG_NAME,
383: 'OKC_API.G_RET_STS_UNEXP_ERROR',
384: x_msg_count,
385: x_msg_data,
386: '_PUB');
387: WHEN OTHERS THEN
384: x_msg_count,
385: x_msg_data,
386: '_PUB');
387: WHEN OTHERS THEN
388: x_return_status := OKC_API.HANDLE_EXCEPTIONS
389: (l_api_name,
390: G_PKG_NAME,
391: 'OTHERS',
392: x_msg_count,
405: x_cnhv_rec OUT NOCOPY cnhv_rec_type) IS
406:
407: l_api_name CONSTANT VARCHAR2(30) := 'create_cond_hdrs';
408: l_api_version CONSTANT NUMBER := 1.0;
409: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
410: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
411: BEGIN
412: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
413: g_pkg_name,
408: l_api_version CONSTANT NUMBER := 1.0;
409: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
410: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
411: BEGIN
412: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
413: g_pkg_name,
414: p_init_msg_list,
415: l_api_version,
416: p_api_version,
416: p_api_version,
417: '_PUB',
418: x_return_status);
419:
420: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
422: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
423: RAISE OKC_API.G_EXCEPTION_ERROR;
424: END IF;
417: '_PUB',
418: x_return_status);
419:
420: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
422: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
423: RAISE OKC_API.G_EXCEPTION_ERROR;
424: END IF;
425:
418: x_return_status);
419:
420: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
422: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
423: RAISE OKC_API.G_EXCEPTION_ERROR;
424: END IF;
425:
426: -- USER HOOK CALL FOR BEFORE, STARTS
419:
420: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
422: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
423: RAISE OKC_API.G_EXCEPTION_ERROR;
424: END IF;
425:
426: -- USER HOOK CALL FOR BEFORE, STARTS
427: g_cnhv_rec := l_cnhv_rec;
429: okc_util.call_user_hook(x_return_status => x_return_status,
430: p_package_name => g_pkg_name,
431: p_procedure_name => l_api_name,
432: p_before_after => 'B');
433: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
434: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
435: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
436: RAISE OKC_API.G_EXCEPTION_ERROR;
437: END IF;
430: p_package_name => g_pkg_name,
431: p_procedure_name => l_api_name,
432: p_before_after => 'B');
433: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
434: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
435: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
436: RAISE OKC_API.G_EXCEPTION_ERROR;
437: END IF;
438:
431: p_procedure_name => l_api_name,
432: p_before_after => 'B');
433: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
434: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
435: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
436: RAISE OKC_API.G_EXCEPTION_ERROR;
437: END IF;
438:
439: --get values back from hook call
432: p_before_after => 'B');
433: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
434: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
435: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
436: RAISE OKC_API.G_EXCEPTION_ERROR;
437: END IF;
438:
439: --get values back from hook call
440: l_cnhv_rec := migrate_cnhv(l_cnhv_rec, g_cnhv_rec);
446: x_msg_count => x_msg_count,
447: x_msg_data => x_msg_data,
448: p_cnhv_rec => l_cnhv_rec,
449: x_cnhv_rec => x_cnhv_rec);
450: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
451: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
452: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
453: raise OKC_API.G_EXCEPTION_ERROR;
454: END IF;
447: x_msg_data => x_msg_data,
448: p_cnhv_rec => l_cnhv_rec,
449: x_cnhv_rec => x_cnhv_rec);
450: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
451: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
452: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
453: raise OKC_API.G_EXCEPTION_ERROR;
454: END IF;
455:
448: p_cnhv_rec => l_cnhv_rec,
449: x_cnhv_rec => x_cnhv_rec);
450: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
451: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
452: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
453: raise OKC_API.G_EXCEPTION_ERROR;
454: END IF;
455:
456: --USER HOOK CALL FOR AFTER, STARTS
449: x_cnhv_rec => x_cnhv_rec);
450: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
451: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
452: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
453: raise OKC_API.G_EXCEPTION_ERROR;
454: END IF;
455:
456: --USER HOOK CALL FOR AFTER, STARTS
457: g_cnhv_rec := x_cnhv_rec;
460: p_package_name => g_pkg_name,
461: p_procedure_name => l_api_name,
462: p_before_after => 'A');
463:
464: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
466: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
467: RAISE OKC_API.G_EXCEPTION_ERROR;
468: END IF;
461: p_procedure_name => l_api_name,
462: p_before_after => 'A');
463:
464: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
466: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
467: RAISE OKC_API.G_EXCEPTION_ERROR;
468: END IF;
469: --USER HOOK CALL FOR AFTER, ENDS
462: p_before_after => 'A');
463:
464: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
466: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
467: RAISE OKC_API.G_EXCEPTION_ERROR;
468: END IF;
469: --USER HOOK CALL FOR AFTER, ENDS
470:
463:
464: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
466: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
467: RAISE OKC_API.G_EXCEPTION_ERROR;
468: END IF;
469: --USER HOOK CALL FOR AFTER, ENDS
470:
471: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
467: RAISE OKC_API.G_EXCEPTION_ERROR;
468: END IF;
469: --USER HOOK CALL FOR AFTER, ENDS
470:
471: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
472:
473: EXCEPTION
474: WHEN OKC_API.G_EXCEPTION_ERROR THEN
475: x_return_status := OKC_API.HANDLE_EXCEPTIONS
470:
471: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
472:
473: EXCEPTION
474: WHEN OKC_API.G_EXCEPTION_ERROR THEN
475: x_return_status := OKC_API.HANDLE_EXCEPTIONS
476: (
477: l_api_name,
478: G_PKG_NAME,
471: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
472:
473: EXCEPTION
474: WHEN OKC_API.G_EXCEPTION_ERROR THEN
475: x_return_status := OKC_API.HANDLE_EXCEPTIONS
476: (
477: l_api_name,
478: G_PKG_NAME,
479: 'OKC_API.G_RET_STS_ERROR',
475: x_return_status := OKC_API.HANDLE_EXCEPTIONS
476: (
477: l_api_name,
478: G_PKG_NAME,
479: 'OKC_API.G_RET_STS_ERROR',
480: x_msg_count,
481: x_msg_data,
482: '_PUB'
483: );
481: x_msg_data,
482: '_PUB'
483: );
484:
485: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
486: x_return_status := OKC_API.HANDLE_EXCEPTIONS
487: (
488: l_api_name,
489: G_PKG_NAME,
482: '_PUB'
483: );
484:
485: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
486: x_return_status := OKC_API.HANDLE_EXCEPTIONS
487: (
488: l_api_name,
489: G_PKG_NAME,
490: 'OKC_API.G_RET_STS_UNEXP_ERROR',
486: x_return_status := OKC_API.HANDLE_EXCEPTIONS
487: (
488: l_api_name,
489: G_PKG_NAME,
490: 'OKC_API.G_RET_STS_UNEXP_ERROR',
491: x_msg_count,
492: x_msg_data,
493: '_PUB'
494: );
493: '_PUB'
494: );
495:
496: WHEN OTHERS THEN
497: x_return_status := OKC_API.HANDLE_EXCEPTIONS
498: (
499: l_api_name,
500: G_PKG_NAME,
501: 'OTHERS',
512: x_msg_data OUT NOCOPY VARCHAR2,
513: p_cnhv_tbl IN cnhv_tbl_type,
514: x_cnhv_tbl OUT NOCOPY cnhv_tbl_type) IS
515:
516: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
517: i NUMBER := 0;
518: BEGIN
519: --Initialize the return status
520: x_return_status := OKC_API.G_RET_STS_SUCCESS;
516: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
517: i NUMBER := 0;
518: BEGIN
519: --Initialize the return status
520: x_return_status := OKC_API.G_RET_STS_SUCCESS;
521:
522: IF p_cnhv_tbl.COUNT > 0 THEN
523: i := p_cnhv_tbl.FIRST;
524: LOOP
529: x_msg_count,
530: x_msg_data,
531: p_cnhv_tbl(i),
532: x_cnhv_tbl(i));
533: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
534: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
535: x_return_status := l_return_status;
536: raise G_EXCEPTION_HALT_VALIDATION;
537: ELSE
530: x_msg_data,
531: p_cnhv_tbl(i),
532: x_cnhv_tbl(i));
533: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
534: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
535: x_return_status := l_return_status;
536: raise G_EXCEPTION_HALT_VALIDATION;
537: ELSE
538: x_return_status := l_return_status;
546: WHEN G_EXCEPTION_HALT_VALIDATION THEN
547: NULL;
548:
549: WHEN OTHERS THEN
550: OKC_API.set_message(p_app_name => g_app_name,
551: p_msg_name => g_unexpected_error,
552: p_token1 => g_sqlcode_token,
553: p_token1_value => sqlcode,
554: p_token2 => g_sqlerrm_token,
552: p_token1 => g_sqlcode_token,
553: p_token1_value => sqlcode,
554: p_token2 => g_sqlerrm_token,
555: p_token2_value => sqlerrm);
556: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
557: END create_cond_hdrs;
558:
559: PROCEDURE lock_cond_hdrs(p_api_version IN NUMBER,
560: p_init_msg_list IN VARCHAR2 ,
564: p_cnhv_rec IN cnhv_rec_type) IS
565:
566: l_api_name CONSTANT VARCHAR2(30) := 'lock_cond_hdrs';
567: l_api_version CONSTANT NUMBER := 1.0;
568: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
569: BEGIN
570: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
571: g_pkg_name,
572: p_init_msg_list,
566: l_api_name CONSTANT VARCHAR2(30) := 'lock_cond_hdrs';
567: l_api_version CONSTANT NUMBER := 1.0;
568: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
569: BEGIN
570: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
571: g_pkg_name,
572: p_init_msg_list,
573: l_api_version,
574: p_api_version,
574: p_api_version,
575: '_PUB',
576: x_return_status);
577:
578: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
579: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
580: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
581: RAISE OKC_API.G_EXCEPTION_ERROR;
582: END IF;
575: '_PUB',
576: x_return_status);
577:
578: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
579: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
580: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
581: RAISE OKC_API.G_EXCEPTION_ERROR;
582: END IF;
583:
576: x_return_status);
577:
578: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
579: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
580: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
581: RAISE OKC_API.G_EXCEPTION_ERROR;
582: END IF;
583:
584: -- Call to procedure of complex API
577:
578: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
579: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
580: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
581: RAISE OKC_API.G_EXCEPTION_ERROR;
582: END IF;
583:
584: -- Call to procedure of complex API
585: okc_conditions_pvt.lock_cond_hdrs(p_api_version => p_api_version,
587: x_return_status => x_return_status,
588: x_msg_count => x_msg_count,
589: x_msg_data => x_msg_data,
590: p_cnhv_rec => p_cnhv_rec);
591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
594: RAISE OKC_API.G_EXCEPTION_ERROR;
595: END IF;
588: x_msg_count => x_msg_count,
589: x_msg_data => x_msg_data,
590: p_cnhv_rec => p_cnhv_rec);
591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
594: RAISE OKC_API.G_EXCEPTION_ERROR;
595: END IF;
596:
589: x_msg_data => x_msg_data,
590: p_cnhv_rec => p_cnhv_rec);
591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
594: RAISE OKC_API.G_EXCEPTION_ERROR;
595: END IF;
596:
597: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
590: p_cnhv_rec => p_cnhv_rec);
591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
594: RAISE OKC_API.G_EXCEPTION_ERROR;
595: END IF;
596:
597: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
598:
593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
594: RAISE OKC_API.G_EXCEPTION_ERROR;
595: END IF;
596:
597: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
598:
599: EXCEPTION
600: WHEN OKC_API.G_EXCEPTION_ERROR THEN
601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
596:
597: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
598:
599: EXCEPTION
600: WHEN OKC_API.G_EXCEPTION_ERROR THEN
601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
602: (
603: l_api_name,
604: G_PKG_NAME,
597: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
598:
599: EXCEPTION
600: WHEN OKC_API.G_EXCEPTION_ERROR THEN
601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
602: (
603: l_api_name,
604: G_PKG_NAME,
605: 'OKC_API.G_RET_STS_ERROR',
601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
602: (
603: l_api_name,
604: G_PKG_NAME,
605: 'OKC_API.G_RET_STS_ERROR',
606: x_msg_count,
607: x_msg_data,
608: '_PUB'
609: );
607: x_msg_data,
608: '_PUB'
609: );
610:
611: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
612: x_return_status := OKC_API.HANDLE_EXCEPTIONS
613: (
614: l_api_name,
615: G_PKG_NAME,
608: '_PUB'
609: );
610:
611: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
612: x_return_status := OKC_API.HANDLE_EXCEPTIONS
613: (
614: l_api_name,
615: G_PKG_NAME,
616: 'OKC_API.G_RET_STS_UNEXP_ERROR',
612: x_return_status := OKC_API.HANDLE_EXCEPTIONS
613: (
614: l_api_name,
615: G_PKG_NAME,
616: 'OKC_API.G_RET_STS_UNEXP_ERROR',
617: x_msg_count,
618: x_msg_data,
619: '_PUB'
620: );
619: '_PUB'
620: );
621:
622: WHEN OTHERS THEN
623: x_return_status := OKC_API.HANDLE_EXCEPTIONS
624: (
625: l_api_name,
626: G_PKG_NAME,
627: 'OTHERS',
637: x_msg_count OUT NOCOPY NUMBER,
638: x_msg_data OUT NOCOPY VARCHAR2,
639: p_cnhv_tbl IN cnhv_tbl_type) IS
640:
641: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
642: i NUMBER := 0;
643: BEGIN
644: x_return_status := OKC_API.G_RET_STS_SUCCESS;
645: IF p_cnhv_tbl.COUNT > 0 THEN
640:
641: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
642: i NUMBER := 0;
643: BEGIN
644: x_return_status := OKC_API.G_RET_STS_SUCCESS;
645: IF p_cnhv_tbl.COUNT > 0 THEN
646: i := p_cnhv_tbl.FIRST;
647: LOOP
648: lock_cond_hdrs(
651: l_return_status,
652: x_msg_count,
653: x_msg_data,
654: p_cnhv_tbl(i));
655: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
656: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
657: x_return_status := l_return_status;
658: raise G_EXCEPTION_HALT_VALIDATION;
659: ELSE
652: x_msg_count,
653: x_msg_data,
654: p_cnhv_tbl(i));
655: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
656: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
657: x_return_status := l_return_status;
658: raise G_EXCEPTION_HALT_VALIDATION;
659: ELSE
660: x_return_status := l_return_status;
668: WHEN G_EXCEPTION_HALT_VALIDATION THEN
669: NULL;
670:
671: WHEN OTHERS THEN
672: OKC_API.set_message(p_app_name => g_app_name,
673: p_msg_name => g_unexpected_error,
674: p_token1 => g_sqlcode_token,
675: p_token1_value => sqlcode,
676: p_token2 => g_sqlerrm_token,
674: p_token1 => g_sqlcode_token,
675: p_token1_value => sqlcode,
676: p_token2 => g_sqlerrm_token,
677: p_token2_value => sqlerrm);
678: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
679: END lock_cond_hdrs;
680:
681: PROCEDURE update_cond_hdrs(p_api_version IN NUMBER,
682: p_init_msg_list IN VARCHAR2 ,
687: x_cnhv_rec OUT NOCOPY cnhv_rec_type) IS
688:
689: l_api_name CONSTANT VARCHAR2(30) := 'update_cond_hdrs';
690: l_api_version CONSTANT NUMBER := 1.0;
691: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
692: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
693: BEGIN
694: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
695: g_pkg_name,
690: l_api_version CONSTANT NUMBER := 1.0;
691: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
692: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
693: BEGIN
694: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
695: g_pkg_name,
696: p_init_msg_list,
697: l_api_version,
698: p_api_version,
698: p_api_version,
699: '_PUB',
700: x_return_status);
701:
702: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
703: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
704: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
705: RAISE OKC_API.G_EXCEPTION_ERROR;
706: END IF;
699: '_PUB',
700: x_return_status);
701:
702: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
703: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
704: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
705: RAISE OKC_API.G_EXCEPTION_ERROR;
706: END IF;
707:
700: x_return_status);
701:
702: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
703: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
704: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
705: RAISE OKC_API.G_EXCEPTION_ERROR;
706: END IF;
707:
708: -- USER HOOK CALL FOR BEFORE, STARTS
701:
702: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
703: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
704: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
705: RAISE OKC_API.G_EXCEPTION_ERROR;
706: END IF;
707:
708: -- USER HOOK CALL FOR BEFORE, STARTS
709: g_cnhv_rec := l_cnhv_rec;
712: p_package_name => g_pkg_name,
713: p_procedure_name => l_api_name,
714: p_before_after => 'B');
715:
716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
719: RAISE OKC_API.G_EXCEPTION_ERROR;
720: END IF;
713: p_procedure_name => l_api_name,
714: p_before_after => 'B');
715:
716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
719: RAISE OKC_API.G_EXCEPTION_ERROR;
720: END IF;
721:
714: p_before_after => 'B');
715:
716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
719: RAISE OKC_API.G_EXCEPTION_ERROR;
720: END IF;
721:
722: --get values back from hook call
715:
716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
719: RAISE OKC_API.G_EXCEPTION_ERROR;
720: END IF;
721:
722: --get values back from hook call
723: l_cnhv_rec := migrate_cnhv(l_cnhv_rec, g_cnhv_rec);
729: x_msg_count => x_msg_count,
730: x_msg_data => x_msg_data,
731: p_cnhv_rec => l_cnhv_rec,
732: x_cnhv_rec => x_cnhv_rec);
733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
736: RAISE OKC_API.G_EXCEPTION_ERROR;
737: END IF;
730: x_msg_data => x_msg_data,
731: p_cnhv_rec => l_cnhv_rec,
732: x_cnhv_rec => x_cnhv_rec);
733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
736: RAISE OKC_API.G_EXCEPTION_ERROR;
737: END IF;
738:
731: p_cnhv_rec => l_cnhv_rec,
732: x_cnhv_rec => x_cnhv_rec);
733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
736: RAISE OKC_API.G_EXCEPTION_ERROR;
737: END IF;
738:
739: --USER HOOK CALL FOR AFTER, STARTS
732: x_cnhv_rec => x_cnhv_rec);
733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
736: RAISE OKC_API.G_EXCEPTION_ERROR;
737: END IF;
738:
739: --USER HOOK CALL FOR AFTER, STARTS
740: g_cnhv_rec := x_cnhv_rec;
743: p_package_name => g_pkg_name,
744: p_procedure_name => l_api_name,
745: p_before_after => 'A');
746:
747: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
748: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
749: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
750: RAISE OKC_API.G_EXCEPTION_ERROR;
751: END IF;
744: p_procedure_name => l_api_name,
745: p_before_after => 'A');
746:
747: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
748: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
749: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
750: RAISE OKC_API.G_EXCEPTION_ERROR;
751: END IF;
752: --USER HOOK CALL FOR AFTER, ENDS
745: p_before_after => 'A');
746:
747: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
748: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
749: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
750: RAISE OKC_API.G_EXCEPTION_ERROR;
751: END IF;
752: --USER HOOK CALL FOR AFTER, ENDS
753:
746:
747: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
748: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
749: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
750: RAISE OKC_API.G_EXCEPTION_ERROR;
751: END IF;
752: --USER HOOK CALL FOR AFTER, ENDS
753:
754: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
750: RAISE OKC_API.G_EXCEPTION_ERROR;
751: END IF;
752: --USER HOOK CALL FOR AFTER, ENDS
753:
754: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
755:
756: EXCEPTION
757: WHEN OKC_API.G_EXCEPTION_ERROR THEN
758: x_return_status := OKC_API.HANDLE_EXCEPTIONS
753:
754: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
755:
756: EXCEPTION
757: WHEN OKC_API.G_EXCEPTION_ERROR THEN
758: x_return_status := OKC_API.HANDLE_EXCEPTIONS
759: (
760: l_api_name,
761: G_PKG_NAME,
754: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
755:
756: EXCEPTION
757: WHEN OKC_API.G_EXCEPTION_ERROR THEN
758: x_return_status := OKC_API.HANDLE_EXCEPTIONS
759: (
760: l_api_name,
761: G_PKG_NAME,
762: 'OKC_API.G_RET_STS_ERROR',
758: x_return_status := OKC_API.HANDLE_EXCEPTIONS
759: (
760: l_api_name,
761: G_PKG_NAME,
762: 'OKC_API.G_RET_STS_ERROR',
763: x_msg_count,
764: x_msg_data,
765: '_PUB'
766: );
764: x_msg_data,
765: '_PUB'
766: );
767:
768: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
769: x_return_status := OKC_API.HANDLE_EXCEPTIONS
770: (
771: l_api_name,
772: G_PKG_NAME,
765: '_PUB'
766: );
767:
768: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
769: x_return_status := OKC_API.HANDLE_EXCEPTIONS
770: (
771: l_api_name,
772: G_PKG_NAME,
773: 'OKC_API.G_RET_STS_UNEXP_ERROR',
769: x_return_status := OKC_API.HANDLE_EXCEPTIONS
770: (
771: l_api_name,
772: G_PKG_NAME,
773: 'OKC_API.G_RET_STS_UNEXP_ERROR',
774: x_msg_count,
775: x_msg_data,
776: '_PUB'
777: );
776: '_PUB'
777: );
778:
779: WHEN OTHERS THEN
780: x_return_status := OKC_API.HANDLE_EXCEPTIONS
781: (
782: l_api_name,
783: G_PKG_NAME,
784: 'OTHERS',
796: x_msg_data OUT NOCOPY VARCHAR2,
797: p_cnhv_tbl IN cnhv_tbl_type,
798: x_cnhv_tbl OUT NOCOPY cnhv_tbl_type) IS
799:
800: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
801: i NUMBER := 0;
802: BEGIN
803: x_return_status := OKC_API.G_RET_STS_SUCCESS;
804: IF p_cnhv_tbl.COUNT > 0 THEN
799:
800: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
801: i NUMBER := 0;
802: BEGIN
803: x_return_status := OKC_API.G_RET_STS_SUCCESS;
804: IF p_cnhv_tbl.COUNT > 0 THEN
805: i := p_cnhv_tbl.FIRST;
806: LOOP
807: update_cond_hdrs(
811: x_msg_count,
812: x_msg_data,
813: p_cnhv_tbl(i),
814: x_cnhv_tbl(i));
815: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
816: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
817: x_return_status := l_return_status;
818: raise G_EXCEPTION_HALT_VALIDATION;
819: ELSE
812: x_msg_data,
813: p_cnhv_tbl(i),
814: x_cnhv_tbl(i));
815: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
816: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
817: x_return_status := l_return_status;
818: raise G_EXCEPTION_HALT_VALIDATION;
819: ELSE
820: x_return_status := l_return_status;
828: WHEN G_EXCEPTION_HALT_VALIDATION THEN
829: NULL;
830:
831: WHEN OTHERS THEN
832: OKC_API.set_message(p_app_name => g_app_name,
833: p_msg_name => g_unexpected_error,
834: p_token1 => g_sqlcode_token,
835: p_token1_value => sqlcode,
836: p_token2 => g_sqlerrm_token,
834: p_token1 => g_sqlcode_token,
835: p_token1_value => sqlcode,
836: p_token2 => g_sqlerrm_token,
837: p_token2_value => sqlerrm);
838: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
839: END update_cond_hdrs;
840:
841: PROCEDURE delete_cond_hdrs(p_api_version IN NUMBER,
842: p_init_msg_list IN VARCHAR2 ,
846: p_cnhv_rec IN cnhv_rec_type) IS
847:
848: l_api_name CONSTANT VARCHAR2(30) := 'delete_cond_hdrs';
849: l_api_version CONSTANT NUMBER := 1.0;
850: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
851: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
852: BEGIN
853: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
854: g_pkg_name,
849: l_api_version CONSTANT NUMBER := 1.0;
850: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
851: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
852: BEGIN
853: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
854: g_pkg_name,
855: p_init_msg_list,
856: l_api_version,
857: p_api_version,
857: p_api_version,
858: '_PUB',
859: x_return_status);
860:
861: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
862: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
863: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
864: RAISE OKC_API.G_EXCEPTION_ERROR;
865: END IF;
858: '_PUB',
859: x_return_status);
860:
861: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
862: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
863: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
864: RAISE OKC_API.G_EXCEPTION_ERROR;
865: END IF;
866:
859: x_return_status);
860:
861: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
862: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
863: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
864: RAISE OKC_API.G_EXCEPTION_ERROR;
865: END IF;
866:
867: -- USER HOOK CALL FOR BEFORE, STARTS
860:
861: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
862: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
863: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
864: RAISE OKC_API.G_EXCEPTION_ERROR;
865: END IF;
866:
867: -- USER HOOK CALL FOR BEFORE, STARTS
868: g_cnhv_rec := l_cnhv_rec;
870: okc_util.call_user_hook(x_return_status => x_return_status,
871: p_package_name => g_pkg_name,
872: p_procedure_name => l_api_name,
873: p_before_after => 'B');
874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
877: RAISE OKC_API.G_EXCEPTION_ERROR;
878: END IF;
871: p_package_name => g_pkg_name,
872: p_procedure_name => l_api_name,
873: p_before_after => 'B');
874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
877: RAISE OKC_API.G_EXCEPTION_ERROR;
878: END IF;
879:
872: p_procedure_name => l_api_name,
873: p_before_after => 'B');
874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
877: RAISE OKC_API.G_EXCEPTION_ERROR;
878: END IF;
879:
880: --get values back from hook call
873: p_before_after => 'B');
874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
877: RAISE OKC_API.G_EXCEPTION_ERROR;
878: END IF;
879:
880: --get values back from hook call
881: l_cnhv_rec := migrate_cnhv(l_cnhv_rec, g_cnhv_rec);
886: x_return_status => x_return_status,
887: x_msg_count => x_msg_count,
888: x_msg_data => x_msg_data,
889: p_cnhv_rec => l_cnhv_rec);
890: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
891: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
892: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
893: RAISE OKC_API.G_EXCEPTION_ERROR;
894: END IF;
887: x_msg_count => x_msg_count,
888: x_msg_data => x_msg_data,
889: p_cnhv_rec => l_cnhv_rec);
890: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
891: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
892: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
893: RAISE OKC_API.G_EXCEPTION_ERROR;
894: END IF;
895:
888: x_msg_data => x_msg_data,
889: p_cnhv_rec => l_cnhv_rec);
890: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
891: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
892: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
893: RAISE OKC_API.G_EXCEPTION_ERROR;
894: END IF;
895:
896: --USER HOOK CALL FOR AFTER, STARTS
889: p_cnhv_rec => l_cnhv_rec);
890: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
891: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
892: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
893: RAISE OKC_API.G_EXCEPTION_ERROR;
894: END IF;
895:
896: --USER HOOK CALL FOR AFTER, STARTS
897: okc_util.call_user_hook(x_return_status => x_return_status,
898: p_package_name => g_pkg_name,
899: p_procedure_name => l_api_name,
900: p_before_after => 'A');
901:
902: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
903: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
904: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
905: RAISE OKC_API.G_EXCEPTION_ERROR;
906: END IF;
899: p_procedure_name => l_api_name,
900: p_before_after => 'A');
901:
902: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
903: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
904: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
905: RAISE OKC_API.G_EXCEPTION_ERROR;
906: END IF;
907: --USER HOOK CALL FOR AFTER, ENDS
900: p_before_after => 'A');
901:
902: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
903: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
904: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
905: RAISE OKC_API.G_EXCEPTION_ERROR;
906: END IF;
907: --USER HOOK CALL FOR AFTER, ENDS
908:
901:
902: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
903: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
904: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
905: RAISE OKC_API.G_EXCEPTION_ERROR;
906: END IF;
907: --USER HOOK CALL FOR AFTER, ENDS
908:
909: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
905: RAISE OKC_API.G_EXCEPTION_ERROR;
906: END IF;
907: --USER HOOK CALL FOR AFTER, ENDS
908:
909: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
910:
911: EXCEPTION
912: WHEN OKC_API.G_EXCEPTION_ERROR THEN
913: x_return_status := OKC_API.HANDLE_EXCEPTIONS
908:
909: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
910:
911: EXCEPTION
912: WHEN OKC_API.G_EXCEPTION_ERROR THEN
913: x_return_status := OKC_API.HANDLE_EXCEPTIONS
914: (
915: l_api_name,
916: G_PKG_NAME,
909: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
910:
911: EXCEPTION
912: WHEN OKC_API.G_EXCEPTION_ERROR THEN
913: x_return_status := OKC_API.HANDLE_EXCEPTIONS
914: (
915: l_api_name,
916: G_PKG_NAME,
917: 'OKC_API.G_RET_STS_ERROR',
913: x_return_status := OKC_API.HANDLE_EXCEPTIONS
914: (
915: l_api_name,
916: G_PKG_NAME,
917: 'OKC_API.G_RET_STS_ERROR',
918: x_msg_count,
919: x_msg_data,
920: '_PUB'
921: );
919: x_msg_data,
920: '_PUB'
921: );
922:
923: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
924: x_return_status := OKC_API.HANDLE_EXCEPTIONS
925: (
926: l_api_name,
927: G_PKG_NAME,
920: '_PUB'
921: );
922:
923: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
924: x_return_status := OKC_API.HANDLE_EXCEPTIONS
925: (
926: l_api_name,
927: G_PKG_NAME,
928: 'OKC_API.G_RET_STS_UNEXP_ERROR',
924: x_return_status := OKC_API.HANDLE_EXCEPTIONS
925: (
926: l_api_name,
927: G_PKG_NAME,
928: 'OKC_API.G_RET_STS_UNEXP_ERROR',
929: x_msg_count,
930: x_msg_data,
931: '_PUB'
932: );
931: '_PUB'
932: );
933:
934: WHEN OTHERS THEN
935: x_return_status := OKC_API.HANDLE_EXCEPTIONS
936: (
937: l_api_name,
938: G_PKG_NAME,
939: 'OTHERS',
949: x_msg_count OUT NOCOPY NUMBER,
950: x_msg_data OUT NOCOPY VARCHAR2,
951: p_cnhv_tbl IN cnhv_tbl_type) IS
952:
953: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
954: i NUMBER := 0;
955: BEGIN
956: x_return_status := OKC_API.G_RET_STS_SUCCESS;
957: IF p_cnhv_tbl.COUNT > 0 THEN
952:
953: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
954: i NUMBER := 0;
955: BEGIN
956: x_return_status := OKC_API.G_RET_STS_SUCCESS;
957: IF p_cnhv_tbl.COUNT > 0 THEN
958: i := p_cnhv_tbl.FIRST;
959: LOOP
960: delete_cond_hdrs(
963: l_return_status,
964: x_msg_count,
965: x_msg_data,
966: p_cnhv_tbl(i));
967: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
968: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
969: x_return_status := l_return_status;
970: raise G_EXCEPTION_HALT_VALIDATION;
971: ELSE
964: x_msg_count,
965: x_msg_data,
966: p_cnhv_tbl(i));
967: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
968: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
969: x_return_status := l_return_status;
970: raise G_EXCEPTION_HALT_VALIDATION;
971: ELSE
972: x_return_status := l_return_status;
980: WHEN G_EXCEPTION_HALT_VALIDATION THEN
981: NULL;
982:
983: WHEN OTHERS THEN
984: OKC_API.set_message(p_app_name => g_app_name,
985: p_msg_name => g_unexpected_error,
986: p_token1 => g_sqlcode_token,
987: p_token1_value => sqlcode,
988: p_token2 => g_sqlerrm_token,
986: p_token1 => g_sqlcode_token,
987: p_token1_value => sqlcode,
988: p_token2 => g_sqlerrm_token,
989: p_token2_value => sqlerrm);
990: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
991: END delete_cond_hdrs;
992:
993: PROCEDURE validate_cond_hdrs(p_api_version IN NUMBER,
994: p_init_msg_list IN VARCHAR2 ,
998: p_cnhv_rec IN cnhv_rec_type) IS
999:
1000: l_api_name CONSTANT VARCHAR2(30) := 'validate_cond_hdrs';
1001: l_api_version CONSTANT NUMBER := 1.0;
1002: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1003: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
1004: BEGIN
1005: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1006: g_pkg_name,
1001: l_api_version CONSTANT NUMBER := 1.0;
1002: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1003: l_cnhv_rec cnhv_rec_type := p_cnhv_rec;
1004: BEGIN
1005: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1006: g_pkg_name,
1007: p_init_msg_list,
1008: l_api_version,
1009: p_api_version,
1009: p_api_version,
1010: '_PUB',
1011: x_return_status);
1012:
1013: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1014: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1015: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1016: RAISE OKC_API.G_EXCEPTION_ERROR;
1017: END IF;
1010: '_PUB',
1011: x_return_status);
1012:
1013: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1014: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1015: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1016: RAISE OKC_API.G_EXCEPTION_ERROR;
1017: END IF;
1018:
1011: x_return_status);
1012:
1013: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1014: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1015: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1016: RAISE OKC_API.G_EXCEPTION_ERROR;
1017: END IF;
1018:
1019: -- USER HOOK CALL FOR BEFORE, STARTS
1012:
1013: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1014: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1015: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1016: RAISE OKC_API.G_EXCEPTION_ERROR;
1017: END IF;
1018:
1019: -- USER HOOK CALL FOR BEFORE, STARTS
1020: g_cnhv_rec := l_cnhv_rec;
1023: p_package_name => g_pkg_name,
1024: p_procedure_name => l_api_name,
1025: p_before_after => 'B');
1026:
1027: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1028: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1029: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1030: RAISE OKC_API.G_EXCEPTION_ERROR;
1031: END IF;
1024: p_procedure_name => l_api_name,
1025: p_before_after => 'B');
1026:
1027: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1028: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1029: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1030: RAISE OKC_API.G_EXCEPTION_ERROR;
1031: END IF;
1032:
1025: p_before_after => 'B');
1026:
1027: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1028: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1029: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1030: RAISE OKC_API.G_EXCEPTION_ERROR;
1031: END IF;
1032:
1033: --get values back from hook call
1026:
1027: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1028: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1029: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1030: RAISE OKC_API.G_EXCEPTION_ERROR;
1031: END IF;
1032:
1033: --get values back from hook call
1034: l_cnhv_rec := migrate_cnhv(l_cnhv_rec, g_cnhv_rec);
1039: x_return_status => x_return_status,
1040: x_msg_count => x_msg_count,
1041: x_msg_data => x_msg_data,
1042: p_cnhv_rec => l_cnhv_rec);
1043: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1044: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1045: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1046: RAISE OKC_API.G_EXCEPTION_ERROR;
1047: END IF;
1040: x_msg_count => x_msg_count,
1041: x_msg_data => x_msg_data,
1042: p_cnhv_rec => l_cnhv_rec);
1043: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1044: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1045: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1046: RAISE OKC_API.G_EXCEPTION_ERROR;
1047: END IF;
1048:
1041: x_msg_data => x_msg_data,
1042: p_cnhv_rec => l_cnhv_rec);
1043: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1044: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1045: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1046: RAISE OKC_API.G_EXCEPTION_ERROR;
1047: END IF;
1048:
1049: --USER HOOK CALL FOR AFTER, STARTS
1042: p_cnhv_rec => l_cnhv_rec);
1043: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1044: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1045: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1046: RAISE OKC_API.G_EXCEPTION_ERROR;
1047: END IF;
1048:
1049: --USER HOOK CALL FOR AFTER, STARTS
1050:
1052: p_package_name => g_pkg_name,
1053: p_procedure_name => l_api_name,
1054: p_before_after => 'A');
1055:
1056: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1057: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1058: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1059: RAISE OKC_API.G_EXCEPTION_ERROR;
1060: END IF;
1053: p_procedure_name => l_api_name,
1054: p_before_after => 'A');
1055:
1056: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1057: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1058: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1059: RAISE OKC_API.G_EXCEPTION_ERROR;
1060: END IF;
1061: --USER HOOK CALL FOR AFTER, ENDS
1054: p_before_after => 'A');
1055:
1056: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1057: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1058: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1059: RAISE OKC_API.G_EXCEPTION_ERROR;
1060: END IF;
1061: --USER HOOK CALL FOR AFTER, ENDS
1062:
1055:
1056: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1057: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1058: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1059: RAISE OKC_API.G_EXCEPTION_ERROR;
1060: END IF;
1061: --USER HOOK CALL FOR AFTER, ENDS
1062:
1063: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1059: RAISE OKC_API.G_EXCEPTION_ERROR;
1060: END IF;
1061: --USER HOOK CALL FOR AFTER, ENDS
1062:
1063: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1064: EXCEPTION
1065: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1066: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1067: (
1061: --USER HOOK CALL FOR AFTER, ENDS
1062:
1063: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1064: EXCEPTION
1065: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1066: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1067: (
1068: l_api_name,
1069: G_PKG_NAME,
1062:
1063: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1064: EXCEPTION
1065: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1066: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1067: (
1068: l_api_name,
1069: G_PKG_NAME,
1070: 'OKC_API.G_RET_STS_ERROR',
1066: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1067: (
1068: l_api_name,
1069: G_PKG_NAME,
1070: 'OKC_API.G_RET_STS_ERROR',
1071: x_msg_count,
1072: x_msg_data,
1073: '_PUB'
1074: );
1072: x_msg_data,
1073: '_PUB'
1074: );
1075:
1076: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1077: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1078: (
1079: l_api_name,
1080: G_PKG_NAME,
1073: '_PUB'
1074: );
1075:
1076: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1077: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1078: (
1079: l_api_name,
1080: G_PKG_NAME,
1081: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1077: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1078: (
1079: l_api_name,
1080: G_PKG_NAME,
1081: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1082: x_msg_count,
1083: x_msg_data,
1084: '_PUB'
1085: );
1084: '_PUB'
1085: );
1086:
1087: WHEN OTHERS THEN
1088: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1089: (
1090: l_api_name,
1091: G_PKG_NAME,
1092: 'OTHERS',
1101: x_return_status OUT NOCOPY VARCHAR2,
1102: x_msg_count OUT NOCOPY NUMBER,
1103: x_msg_data OUT NOCOPY VARCHAR2,
1104: p_cnhv_tbl IN cnhv_tbl_type) IS
1105: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1106: i NUMBER := 0;
1107: BEGIN
1108: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1109: IF p_cnhv_tbl.COUNT > 0 THEN
1104: p_cnhv_tbl IN cnhv_tbl_type) IS
1105: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1106: i NUMBER := 0;
1107: BEGIN
1108: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1109: IF p_cnhv_tbl.COUNT > 0 THEN
1110: i := p_cnhv_tbl.FIRST;
1111: LOOP
1112: validate_cond_hdrs(
1115: l_return_status,
1116: x_msg_count,
1117: x_msg_data,
1118: p_cnhv_tbl(i));
1119: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1120: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1121: x_return_status := l_return_status;
1122: raise G_EXCEPTION_HALT_VALIDATION;
1123: ELSE
1116: x_msg_count,
1117: x_msg_data,
1118: p_cnhv_tbl(i));
1119: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1120: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1121: x_return_status := l_return_status;
1122: raise G_EXCEPTION_HALT_VALIDATION;
1123: ELSE
1124: x_return_status := l_return_status;
1132: WHEN G_EXCEPTION_HALT_VALIDATION THEN
1133: NULL;
1134:
1135: WHEN OTHERS THEN
1136: OKC_API.set_message(p_app_name => g_app_name,
1137: p_msg_name => g_unexpected_error,
1138: p_token1 => g_sqlcode_token,
1139: p_token1_value => sqlcode,
1140: p_token2 => g_sqlerrm_token,
1138: p_token1 => g_sqlcode_token,
1139: p_token1_value => sqlcode,
1140: p_token2 => g_sqlerrm_token,
1141: p_token2_value => sqlerrm);
1142: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1143: END validate_cond_hdrs;
1144:
1145: --Procedures for condition lines
1146:
1153: x_cnlv_rec OUT NOCOPY cnlv_rec_type) IS
1154:
1155: l_api_name CONSTANT VARCHAR2(30) := 'create_cond_lines';
1156: l_api_version CONSTANT NUMBER := 1.0;
1157: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1158: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1159: BEGIN
1160: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1161: g_pkg_name,
1156: l_api_version CONSTANT NUMBER := 1.0;
1157: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1158: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1159: BEGIN
1160: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1161: g_pkg_name,
1162: p_init_msg_list,
1163: l_api_version,
1164: p_api_version,
1164: p_api_version,
1165: '_PUB',
1166: x_return_status);
1167:
1168: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1169: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1170: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1171: RAISE OKC_API.G_EXCEPTION_ERROR;
1172: END IF;
1165: '_PUB',
1166: x_return_status);
1167:
1168: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1169: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1170: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1171: RAISE OKC_API.G_EXCEPTION_ERROR;
1172: END IF;
1173:
1166: x_return_status);
1167:
1168: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1169: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1170: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1171: RAISE OKC_API.G_EXCEPTION_ERROR;
1172: END IF;
1173:
1174: -- USER HOOK CALL FOR BEFORE, STARTS
1167:
1168: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1169: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1170: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1171: RAISE OKC_API.G_EXCEPTION_ERROR;
1172: END IF;
1173:
1174: -- USER HOOK CALL FOR BEFORE, STARTS
1175: g_cnlv_rec := l_cnlv_rec;
1178: p_package_name => g_pkg_name,
1179: p_procedure_name => l_api_name,
1180: p_before_after => 'B');
1181:
1182: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1183: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1184: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1185: RAISE OKC_API.G_EXCEPTION_ERROR;
1186: END IF;
1179: p_procedure_name => l_api_name,
1180: p_before_after => 'B');
1181:
1182: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1183: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1184: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1185: RAISE OKC_API.G_EXCEPTION_ERROR;
1186: END IF;
1187:
1180: p_before_after => 'B');
1181:
1182: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1183: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1184: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1185: RAISE OKC_API.G_EXCEPTION_ERROR;
1186: END IF;
1187:
1188: --get values back from hook call
1181:
1182: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1183: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1184: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1185: RAISE OKC_API.G_EXCEPTION_ERROR;
1186: END IF;
1187:
1188: --get values back from hook call
1189: l_cnlv_rec := migrate_cnlv(l_cnlv_rec, g_cnlv_rec);
1194: x_msg_count => x_msg_count,
1195: x_msg_data => x_msg_data,
1196: p_cnlv_rec => l_cnlv_rec,
1197: x_cnlv_rec => x_cnlv_rec);
1198: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1199: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1200: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1201: RAISE OKC_API.G_EXCEPTION_ERROR;
1202: END IF;
1195: x_msg_data => x_msg_data,
1196: p_cnlv_rec => l_cnlv_rec,
1197: x_cnlv_rec => x_cnlv_rec);
1198: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1199: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1200: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1201: RAISE OKC_API.G_EXCEPTION_ERROR;
1202: END IF;
1203:
1196: p_cnlv_rec => l_cnlv_rec,
1197: x_cnlv_rec => x_cnlv_rec);
1198: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1199: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1200: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1201: RAISE OKC_API.G_EXCEPTION_ERROR;
1202: END IF;
1203:
1204: --USER HOOK CALL FOR AFTER, STARTS
1197: x_cnlv_rec => x_cnlv_rec);
1198: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1199: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1200: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1201: RAISE OKC_API.G_EXCEPTION_ERROR;
1202: END IF;
1203:
1204: --USER HOOK CALL FOR AFTER, STARTS
1205: g_cnlv_rec := x_cnlv_rec;
1208: p_package_name => g_pkg_name,
1209: p_procedure_name => l_api_name,
1210: p_before_after => 'A');
1211:
1212: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1213: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1215: RAISE OKC_API.G_EXCEPTION_ERROR;
1216: END IF;
1209: p_procedure_name => l_api_name,
1210: p_before_after => 'A');
1211:
1212: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1213: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1215: RAISE OKC_API.G_EXCEPTION_ERROR;
1216: END IF;
1217: --USER HOOK CALL FOR AFTER, ENDS
1210: p_before_after => 'A');
1211:
1212: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1213: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1215: RAISE OKC_API.G_EXCEPTION_ERROR;
1216: END IF;
1217: --USER HOOK CALL FOR AFTER, ENDS
1218:
1211:
1212: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1213: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1214: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1215: RAISE OKC_API.G_EXCEPTION_ERROR;
1216: END IF;
1217: --USER HOOK CALL FOR AFTER, ENDS
1218:
1219: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1215: RAISE OKC_API.G_EXCEPTION_ERROR;
1216: END IF;
1217: --USER HOOK CALL FOR AFTER, ENDS
1218:
1219: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1220:
1221: EXCEPTION
1222: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1223: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1218:
1219: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1220:
1221: EXCEPTION
1222: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1223: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1224: (
1225: l_api_name,
1226: G_PKG_NAME,
1219: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1220:
1221: EXCEPTION
1222: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1223: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1224: (
1225: l_api_name,
1226: G_PKG_NAME,
1227: 'OKC_API.G_RET_STS_ERROR',
1223: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1224: (
1225: l_api_name,
1226: G_PKG_NAME,
1227: 'OKC_API.G_RET_STS_ERROR',
1228: x_msg_count,
1229: x_msg_data,
1230: '_PUB'
1231: );
1229: x_msg_data,
1230: '_PUB'
1231: );
1232:
1233: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1234: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1235: (
1236: l_api_name,
1237: G_PKG_NAME,
1230: '_PUB'
1231: );
1232:
1233: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1234: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1235: (
1236: l_api_name,
1237: G_PKG_NAME,
1238: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1234: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1235: (
1236: l_api_name,
1237: G_PKG_NAME,
1238: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1239: x_msg_count,
1240: x_msg_data,
1241: '_PUB'
1242: );
1241: '_PUB'
1242: );
1243:
1244: WHEN OTHERS THEN
1245: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1246: (
1247: l_api_name,
1248: G_PKG_NAME,
1249: 'OTHERS',
1260: x_msg_data OUT NOCOPY VARCHAR2,
1261: p_cnlv_tbl IN cnlv_tbl_type,
1262: x_cnlv_tbl OUT NOCOPY cnlv_tbl_type) IS
1263:
1264: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1265: i NUMBER := 0;
1266: BEGIN
1267: --Initialize the return status
1268: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1264: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1265: i NUMBER := 0;
1266: BEGIN
1267: --Initialize the return status
1268: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1269:
1270: IF p_cnlv_tbl.COUNT > 0 THEN
1271: i := p_cnlv_tbl.FIRST;
1272: LOOP
1277: x_msg_count,
1278: x_msg_data,
1279: p_cnlv_tbl(i),
1280: x_cnlv_tbl(i));
1281: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1282: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1283: x_return_status := l_return_status;
1284: raise G_EXCEPTION_HALT_VALIDATION;
1285: ELSE
1278: x_msg_data,
1279: p_cnlv_tbl(i),
1280: x_cnlv_tbl(i));
1281: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1282: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1283: x_return_status := l_return_status;
1284: raise G_EXCEPTION_HALT_VALIDATION;
1285: ELSE
1286: x_return_status := l_return_status;
1294: WHEN G_EXCEPTION_HALT_VALIDATION THEN
1295: NULL;
1296:
1297: WHEN OTHERS THEN
1298: OKC_API.set_message(p_app_name => g_app_name,
1299: p_msg_name => g_unexpected_error,
1300: p_token1 => g_sqlcode_token,
1301: p_token1_value => sqlcode,
1302: p_token2 => g_sqlerrm_token,
1300: p_token1 => g_sqlcode_token,
1301: p_token1_value => sqlcode,
1302: p_token2 => g_sqlerrm_token,
1303: p_token2_value => sqlerrm);
1304: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1305: END create_cond_lines;
1306:
1307: PROCEDURE lock_cond_lines(p_api_version IN NUMBER,
1308: p_init_msg_list IN VARCHAR2 ,
1311: x_msg_data OUT NOCOPY VARCHAR2,
1312: p_cnlv_rec IN cnlv_rec_type) IS
1313: l_api_name CONSTANT VARCHAR2(30) := 'lock_cond_lines';
1314: l_api_version CONSTANT NUMBER := 1.0;
1315: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1316: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1317: BEGIN
1318: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1319: g_pkg_name,
1314: l_api_version CONSTANT NUMBER := 1.0;
1315: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1316: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1317: BEGIN
1318: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1319: g_pkg_name,
1320: p_init_msg_list,
1321: l_api_version,
1322: p_api_version,
1322: p_api_version,
1323: '_PUB',
1324: x_return_status);
1325:
1326: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1327: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1328: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1329: RAISE OKC_API.G_EXCEPTION_ERROR;
1330: END IF;
1323: '_PUB',
1324: x_return_status);
1325:
1326: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1327: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1328: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1329: RAISE OKC_API.G_EXCEPTION_ERROR;
1330: END IF;
1331:
1324: x_return_status);
1325:
1326: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1327: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1328: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1329: RAISE OKC_API.G_EXCEPTION_ERROR;
1330: END IF;
1331:
1332: -- Call to procedure of complex API
1325:
1326: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1327: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1328: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1329: RAISE OKC_API.G_EXCEPTION_ERROR;
1330: END IF;
1331:
1332: -- Call to procedure of complex API
1333: okc_conditions_pvt.lock_cond_lines(p_api_version => p_api_version,
1336: x_msg_count => x_msg_count,
1337: x_msg_data => x_msg_data,
1338: p_cnlv_rec => l_cnlv_rec);
1339:
1340: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1341: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1342: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1343: RAISE OKC_API.G_EXCEPTION_ERROR;
1344: END IF;
1337: x_msg_data => x_msg_data,
1338: p_cnlv_rec => l_cnlv_rec);
1339:
1340: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1341: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1342: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1343: RAISE OKC_API.G_EXCEPTION_ERROR;
1344: END IF;
1345:
1338: p_cnlv_rec => l_cnlv_rec);
1339:
1340: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1341: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1342: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1343: RAISE OKC_API.G_EXCEPTION_ERROR;
1344: END IF;
1345:
1346: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1339:
1340: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1341: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1342: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1343: RAISE OKC_API.G_EXCEPTION_ERROR;
1344: END IF;
1345:
1346: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1347:
1342: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1343: RAISE OKC_API.G_EXCEPTION_ERROR;
1344: END IF;
1345:
1346: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1347:
1348: EXCEPTION
1349: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1350: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1345:
1346: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1347:
1348: EXCEPTION
1349: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1350: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1351: (
1352: l_api_name,
1353: G_PKG_NAME,
1346: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1347:
1348: EXCEPTION
1349: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1350: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1351: (
1352: l_api_name,
1353: G_PKG_NAME,
1354: 'OKC_API.G_RET_STS_ERROR',
1350: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1351: (
1352: l_api_name,
1353: G_PKG_NAME,
1354: 'OKC_API.G_RET_STS_ERROR',
1355: x_msg_count,
1356: x_msg_data,
1357: '_PUB'
1358: );
1356: x_msg_data,
1357: '_PUB'
1358: );
1359:
1360: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1362: (
1363: l_api_name,
1364: G_PKG_NAME,
1357: '_PUB'
1358: );
1359:
1360: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1362: (
1363: l_api_name,
1364: G_PKG_NAME,
1365: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1362: (
1363: l_api_name,
1364: G_PKG_NAME,
1365: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1366: x_msg_count,
1367: x_msg_data,
1368: '_PUB'
1369: );
1368: '_PUB'
1369: );
1370:
1371: WHEN OTHERS THEN
1372: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1373: (
1374: l_api_name,
1375: G_PKG_NAME,
1376: 'OTHERS',
1385: x_return_status OUT NOCOPY VARCHAR2,
1386: x_msg_count OUT NOCOPY NUMBER,
1387: x_msg_data OUT NOCOPY VARCHAR2,
1388: p_cnlv_tbl IN cnlv_tbl_type) IS
1389: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1390: i NUMBER := 0;
1391: BEGIN
1392: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1393: IF p_cnlv_tbl.COUNT > 0 THEN
1388: p_cnlv_tbl IN cnlv_tbl_type) IS
1389: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1390: i NUMBER := 0;
1391: BEGIN
1392: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1393: IF p_cnlv_tbl.COUNT > 0 THEN
1394: i := p_cnlv_tbl.FIRST;
1395: LOOP
1396: lock_cond_lines(
1399: l_return_status,
1400: x_msg_count,
1401: x_msg_data,
1402: p_cnlv_tbl(i));
1403: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1404: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1405: x_return_status := l_return_status;
1406: raise G_EXCEPTION_HALT_VALIDATION;
1407: ELSE
1400: x_msg_count,
1401: x_msg_data,
1402: p_cnlv_tbl(i));
1403: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1404: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1405: x_return_status := l_return_status;
1406: raise G_EXCEPTION_HALT_VALIDATION;
1407: ELSE
1408: x_return_status := l_return_status;
1416: WHEN G_EXCEPTION_HALT_VALIDATION THEN
1417: NULL;
1418:
1419: WHEN OTHERS THEN
1420: OKC_API.set_message(p_app_name => g_app_name,
1421: p_msg_name => g_unexpected_error,
1422: p_token1 => g_sqlcode_token,
1423: p_token1_value => sqlcode,
1424: p_token2 => g_sqlerrm_token,
1422: p_token1 => g_sqlcode_token,
1423: p_token1_value => sqlcode,
1424: p_token2 => g_sqlerrm_token,
1425: p_token2_value => sqlerrm);
1426: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1427: End lock_cond_lines;
1428:
1429: PROCEDURE update_cond_lines(p_api_version IN NUMBER,
1430: p_init_msg_list IN VARCHAR2 ,
1435: x_cnlv_rec OUT NOCOPY cnlv_rec_type) IS
1436:
1437: l_api_name CONSTANT VARCHAR2(30) := 'update_cond_lines';
1438: l_api_version CONSTANT NUMBER := 1.0;
1439: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1440: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1441: BEGIN
1442: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1443: g_pkg_name,
1438: l_api_version CONSTANT NUMBER := 1.0;
1439: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1440: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1441: BEGIN
1442: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1443: g_pkg_name,
1444: p_init_msg_list,
1445: l_api_version,
1446: p_api_version,
1445: l_api_version,
1446: p_api_version,
1447: '_PUB',
1448: x_return_status);
1449: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1450: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1451: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1452: RAISE OKC_API.G_EXCEPTION_ERROR;
1453: END IF;
1446: p_api_version,
1447: '_PUB',
1448: x_return_status);
1449: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1450: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1451: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1452: RAISE OKC_API.G_EXCEPTION_ERROR;
1453: END IF;
1454:
1447: '_PUB',
1448: x_return_status);
1449: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1450: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1451: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1452: RAISE OKC_API.G_EXCEPTION_ERROR;
1453: END IF;
1454:
1455: -- USER HOOK CALL FOR BEFORE, STARTS
1448: x_return_status);
1449: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1450: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1451: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1452: RAISE OKC_API.G_EXCEPTION_ERROR;
1453: END IF;
1454:
1455: -- USER HOOK CALL FOR BEFORE, STARTS
1456: g_cnlv_rec := l_cnlv_rec;
1458: okc_util.call_user_hook(x_return_status => x_return_status,
1459: p_package_name => g_pkg_name,
1460: p_procedure_name => l_api_name,
1461: p_before_after => 'B');
1462: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1463: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1464: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1465: RAISE OKC_API.G_EXCEPTION_ERROR;
1466: END IF;
1459: p_package_name => g_pkg_name,
1460: p_procedure_name => l_api_name,
1461: p_before_after => 'B');
1462: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1463: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1464: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1465: RAISE OKC_API.G_EXCEPTION_ERROR;
1466: END IF;
1467:
1460: p_procedure_name => l_api_name,
1461: p_before_after => 'B');
1462: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1463: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1464: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1465: RAISE OKC_API.G_EXCEPTION_ERROR;
1466: END IF;
1467:
1468: --get values back from hook call
1461: p_before_after => 'B');
1462: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1463: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1464: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1465: RAISE OKC_API.G_EXCEPTION_ERROR;
1466: END IF;
1467:
1468: --get values back from hook call
1469: l_cnlv_rec := migrate_cnlv(l_cnlv_rec, g_cnlv_rec);
1476: x_msg_data => x_msg_data,
1477: p_cnlv_rec => l_cnlv_rec,
1478: x_cnlv_rec => x_cnlv_rec);
1479:
1480: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1481: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1482: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1483: RAISE OKC_API.G_EXCEPTION_ERROR;
1484: END IF;
1477: p_cnlv_rec => l_cnlv_rec,
1478: x_cnlv_rec => x_cnlv_rec);
1479:
1480: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1481: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1482: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1483: RAISE OKC_API.G_EXCEPTION_ERROR;
1484: END IF;
1485:
1478: x_cnlv_rec => x_cnlv_rec);
1479:
1480: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1481: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1482: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1483: RAISE OKC_API.G_EXCEPTION_ERROR;
1484: END IF;
1485:
1486: --USER HOOK CALL FOR AFTER, STARTS
1479:
1480: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1481: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1482: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1483: RAISE OKC_API.G_EXCEPTION_ERROR;
1484: END IF;
1485:
1486: --USER HOOK CALL FOR AFTER, STARTS
1487: g_cnlv_rec := x_cnlv_rec;
1489: okc_util.call_user_hook(x_return_status => x_return_status,
1490: p_package_name => g_pkg_name,
1491: p_procedure_name => l_api_name,
1492: p_before_after => 'A');
1493: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1494: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1495: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1496: RAISE OKC_API.G_EXCEPTION_ERROR;
1497: END IF;
1490: p_package_name => g_pkg_name,
1491: p_procedure_name => l_api_name,
1492: p_before_after => 'A');
1493: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1494: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1495: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1496: RAISE OKC_API.G_EXCEPTION_ERROR;
1497: END IF;
1498: --USER HOOK CALL FOR AFTER, ENDS
1491: p_procedure_name => l_api_name,
1492: p_before_after => 'A');
1493: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1494: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1495: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1496: RAISE OKC_API.G_EXCEPTION_ERROR;
1497: END IF;
1498: --USER HOOK CALL FOR AFTER, ENDS
1499:
1492: p_before_after => 'A');
1493: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1494: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1495: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1496: RAISE OKC_API.G_EXCEPTION_ERROR;
1497: END IF;
1498: --USER HOOK CALL FOR AFTER, ENDS
1499:
1500: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1496: RAISE OKC_API.G_EXCEPTION_ERROR;
1497: END IF;
1498: --USER HOOK CALL FOR AFTER, ENDS
1499:
1500: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1501:
1502: EXCEPTION
1503: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1504: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1499:
1500: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1501:
1502: EXCEPTION
1503: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1504: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1505: (
1506: l_api_name,
1507: G_PKG_NAME,
1500: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1501:
1502: EXCEPTION
1503: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1504: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1505: (
1506: l_api_name,
1507: G_PKG_NAME,
1508: 'OKC_API.G_RET_STS_ERROR',
1504: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1505: (
1506: l_api_name,
1507: G_PKG_NAME,
1508: 'OKC_API.G_RET_STS_ERROR',
1509: x_msg_count,
1510: x_msg_data,
1511: '_PUB'
1512: );
1510: x_msg_data,
1511: '_PUB'
1512: );
1513:
1514: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1515: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1516: (
1517: l_api_name,
1518: G_PKG_NAME,
1511: '_PUB'
1512: );
1513:
1514: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1515: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1516: (
1517: l_api_name,
1518: G_PKG_NAME,
1519: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1515: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1516: (
1517: l_api_name,
1518: G_PKG_NAME,
1519: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1520: x_msg_count,
1521: x_msg_data,
1522: '_PUB'
1523: );
1522: '_PUB'
1523: );
1524:
1525: WHEN OTHERS THEN
1526: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1527: (
1528: l_api_name,
1529: G_PKG_NAME,
1530: 'OTHERS',
1541: x_msg_data OUT NOCOPY VARCHAR2,
1542: p_cnlv_tbl IN cnlv_tbl_type,
1543: x_cnlv_tbl OUT NOCOPY cnlv_tbl_type) IS
1544:
1545: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1546: i NUMBER := 0;
1547: BEGIN
1548: --Initialize the return status
1549: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1545: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1546: i NUMBER := 0;
1547: BEGIN
1548: --Initialize the return status
1549: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1550:
1551: IF p_cnlv_tbl.COUNT > 0 THEN
1552: i := p_cnlv_tbl.FIRST;
1553: LOOP
1558: x_msg_count,
1559: x_msg_data,
1560: p_cnlv_tbl(i),
1561: x_cnlv_tbl(i));
1562: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1563: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1564: x_return_status := l_return_status;
1565: raise G_EXCEPTION_HALT_VALIDATION;
1566: ELSE
1559: x_msg_data,
1560: p_cnlv_tbl(i),
1561: x_cnlv_tbl(i));
1562: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1563: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1564: x_return_status := l_return_status;
1565: raise G_EXCEPTION_HALT_VALIDATION;
1566: ELSE
1567: x_return_status := l_return_status;
1575: WHEN G_EXCEPTION_HALT_VALIDATION THEN
1576: NULL;
1577:
1578: WHEN OTHERS THEN
1579: OKC_API.set_message(p_app_name => g_app_name,
1580: p_msg_name => g_unexpected_error,
1581: p_token1 => g_sqlcode_token,
1582: p_token1_value => sqlcode,
1583: p_token2 => g_sqlerrm_token,
1581: p_token1 => g_sqlcode_token,
1582: p_token1_value => sqlcode,
1583: p_token2 => g_sqlerrm_token,
1584: p_token2_value => sqlerrm);
1585: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1586: END update_cond_lines;
1587:
1588: PROCEDURE delete_cond_lines(p_api_version IN NUMBER,
1589: p_init_msg_list IN VARCHAR2 ,
1593: p_cnlv_rec IN cnlv_rec_type) IS
1594:
1595: l_api_name CONSTANT VARCHAR2(30) := 'delete_cond_lines';
1596: l_api_version CONSTANT NUMBER := 1.0;
1597: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1598: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1599: BEGIN
1600: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1601: g_pkg_name,
1596: l_api_version CONSTANT NUMBER := 1.0;
1597: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1598: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1599: BEGIN
1600: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1601: g_pkg_name,
1602: p_init_msg_list,
1603: l_api_version,
1604: p_api_version,
1604: p_api_version,
1605: '_PUB',
1606: x_return_status);
1607:
1608: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1609: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1610: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1611: RAISE OKC_API.G_EXCEPTION_ERROR;
1612: END IF;
1605: '_PUB',
1606: x_return_status);
1607:
1608: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1609: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1610: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1611: RAISE OKC_API.G_EXCEPTION_ERROR;
1612: END IF;
1613:
1606: x_return_status);
1607:
1608: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1609: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1610: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1611: RAISE OKC_API.G_EXCEPTION_ERROR;
1612: END IF;
1613:
1614: -- USER HOOK CALL FOR BEFORE, STARTS
1607:
1608: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1609: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1610: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1611: RAISE OKC_API.G_EXCEPTION_ERROR;
1612: END IF;
1613:
1614: -- USER HOOK CALL FOR BEFORE, STARTS
1615: g_cnlv_rec := l_cnlv_rec;
1617: okc_util.call_user_hook(x_return_status => x_return_status,
1618: p_package_name => g_pkg_name,
1619: p_procedure_name => l_api_name,
1620: p_before_after => 'B');
1621: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1622: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1623: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1624: RAISE OKC_API.G_EXCEPTION_ERROR;
1625: END IF;
1618: p_package_name => g_pkg_name,
1619: p_procedure_name => l_api_name,
1620: p_before_after => 'B');
1621: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1622: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1623: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1624: RAISE OKC_API.G_EXCEPTION_ERROR;
1625: END IF;
1626:
1619: p_procedure_name => l_api_name,
1620: p_before_after => 'B');
1621: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1622: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1623: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1624: RAISE OKC_API.G_EXCEPTION_ERROR;
1625: END IF;
1626:
1627: --get values back from hook call
1620: p_before_after => 'B');
1621: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1622: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1623: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1624: RAISE OKC_API.G_EXCEPTION_ERROR;
1625: END IF;
1626:
1627: --get values back from hook call
1628: l_cnlv_rec := migrate_cnlv(l_cnlv_rec, g_cnlv_rec);
1633: x_return_status => x_return_status,
1634: x_msg_count => x_msg_count,
1635: x_msg_data => x_msg_data,
1636: p_cnlv_rec => l_cnlv_rec);
1637: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1638: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1639: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1640: RAISE OKC_API.G_EXCEPTION_ERROR;
1641: END IF;
1634: x_msg_count => x_msg_count,
1635: x_msg_data => x_msg_data,
1636: p_cnlv_rec => l_cnlv_rec);
1637: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1638: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1639: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1640: RAISE OKC_API.G_EXCEPTION_ERROR;
1641: END IF;
1642:
1635: x_msg_data => x_msg_data,
1636: p_cnlv_rec => l_cnlv_rec);
1637: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1638: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1639: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1640: RAISE OKC_API.G_EXCEPTION_ERROR;
1641: END IF;
1642:
1643: --USER HOOK CALL FOR AFTER, STARTS
1636: p_cnlv_rec => l_cnlv_rec);
1637: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1638: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1639: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1640: RAISE OKC_API.G_EXCEPTION_ERROR;
1641: END IF;
1642:
1643: --USER HOOK CALL FOR AFTER, STARTS
1644: okc_util.call_user_hook(x_return_status => x_return_status,
1645: p_package_name => g_pkg_name,
1646: p_procedure_name => l_api_name,
1647: p_before_after => 'A');
1648:
1649: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1650: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1651: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1652: RAISE OKC_API.G_EXCEPTION_ERROR;
1653: END IF;
1646: p_procedure_name => l_api_name,
1647: p_before_after => 'A');
1648:
1649: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1650: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1651: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1652: RAISE OKC_API.G_EXCEPTION_ERROR;
1653: END IF;
1654: --USER HOOK CALL FOR AFTER, ENDS
1647: p_before_after => 'A');
1648:
1649: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1650: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1651: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1652: RAISE OKC_API.G_EXCEPTION_ERROR;
1653: END IF;
1654: --USER HOOK CALL FOR AFTER, ENDS
1655:
1648:
1649: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1650: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1651: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1652: RAISE OKC_API.G_EXCEPTION_ERROR;
1653: END IF;
1654: --USER HOOK CALL FOR AFTER, ENDS
1655:
1656: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1652: RAISE OKC_API.G_EXCEPTION_ERROR;
1653: END IF;
1654: --USER HOOK CALL FOR AFTER, ENDS
1655:
1656: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1657: EXCEPTION
1658: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1659: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1660: (
1654: --USER HOOK CALL FOR AFTER, ENDS
1655:
1656: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1657: EXCEPTION
1658: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1659: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1660: (
1661: l_api_name,
1662: G_PKG_NAME,
1655:
1656: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1657: EXCEPTION
1658: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1659: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1660: (
1661: l_api_name,
1662: G_PKG_NAME,
1663: 'OKC_API.G_RET_STS_ERROR',
1659: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1660: (
1661: l_api_name,
1662: G_PKG_NAME,
1663: 'OKC_API.G_RET_STS_ERROR',
1664: x_msg_count,
1665: x_msg_data,
1666: '_PUB'
1667: );
1665: x_msg_data,
1666: '_PUB'
1667: );
1668:
1669: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1670: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1671: (
1672: l_api_name,
1673: G_PKG_NAME,
1666: '_PUB'
1667: );
1668:
1669: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1670: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1671: (
1672: l_api_name,
1673: G_PKG_NAME,
1674: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1670: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1671: (
1672: l_api_name,
1673: G_PKG_NAME,
1674: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1675: x_msg_count,
1676: x_msg_data,
1677: '_PUB'
1678: );
1677: '_PUB'
1678: );
1679:
1680: WHEN OTHERS THEN
1681: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1682: (
1683: l_api_name,
1684: G_PKG_NAME,
1685: 'OTHERS',
1695: x_msg_count OUT NOCOPY NUMBER,
1696: x_msg_data OUT NOCOPY VARCHAR2,
1697: p_cnlv_tbl IN cnlv_tbl_type) IS
1698:
1699: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1700: i NUMBER := 0;
1701: BEGIN
1702: --Initialize the return status
1703: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1699: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1700: i NUMBER := 0;
1701: BEGIN
1702: --Initialize the return status
1703: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1704:
1705: IF p_cnlv_tbl.COUNT > 0 THEN
1706: i := p_cnlv_tbl.FIRST;
1707: LOOP
1711: x_return_status,
1712: x_msg_count,
1713: x_msg_data,
1714: p_cnlv_tbl(i));
1715: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
1717: l_return_status := x_return_status;
1718: RAISE G_EXCEPTION_HALT_VALIDATION;
1719: ELSE
1712: x_msg_count,
1713: x_msg_data,
1714: p_cnlv_tbl(i));
1715: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
1717: l_return_status := x_return_status;
1718: RAISE G_EXCEPTION_HALT_VALIDATION;
1719: ELSE
1720: l_return_status := x_return_status; -- record that there was an error
1728: WHEN G_EXCEPTION_HALT_VALIDATION THEN
1729: NULL;
1730:
1731: WHEN OTHERS THEN
1732: OKC_API.set_message(p_app_name => g_app_name,
1733: p_msg_name => g_unexpected_error,
1734: p_token1 => g_sqlcode_token,
1735: p_token1_value => sqlcode,
1736: p_token2 => g_sqlerrm_token,
1734: p_token1 => g_sqlcode_token,
1735: p_token1_value => sqlcode,
1736: p_token2 => g_sqlerrm_token,
1737: p_token2_value => sqlerrm);
1738: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1739: END delete_cond_lines;
1740:
1741: PROCEDURE validate_cond_lines(p_api_version IN NUMBER,
1742: p_init_msg_list IN VARCHAR2 ,
1746: p_cnlv_rec IN cnlv_rec_type) IS
1747:
1748: l_api_name CONSTANT VARCHAR2(30) := 'validate_cond_lines';
1749: l_api_version CONSTANT NUMBER := 1.0;
1750: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1751: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1752: BEGIN
1753: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1754: g_pkg_name,
1749: l_api_version CONSTANT NUMBER := 1.0;
1750: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1751: l_cnlv_rec cnlv_rec_type := p_cnlv_rec;
1752: BEGIN
1753: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1754: g_pkg_name,
1755: p_init_msg_list,
1756: l_api_version,
1757: p_api_version,
1757: p_api_version,
1758: '_PUB',
1759: x_return_status);
1760:
1761: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1762: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1763: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1764: RAISE OKC_API.G_EXCEPTION_ERROR;
1765: END IF;
1758: '_PUB',
1759: x_return_status);
1760:
1761: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1762: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1763: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1764: RAISE OKC_API.G_EXCEPTION_ERROR;
1765: END IF;
1766:
1759: x_return_status);
1760:
1761: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1762: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1763: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1764: RAISE OKC_API.G_EXCEPTION_ERROR;
1765: END IF;
1766:
1767: -- USER HOOK CALL FOR BEFORE, STARTS
1760:
1761: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1762: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1763: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1764: RAISE OKC_API.G_EXCEPTION_ERROR;
1765: END IF;
1766:
1767: -- USER HOOK CALL FOR BEFORE, STARTS
1768: g_cnlv_rec := l_cnlv_rec;
1770: okc_util.call_user_hook(x_return_status => x_return_status,
1771: p_package_name => g_pkg_name,
1772: p_procedure_name => l_api_name,
1773: p_before_after => 'B');
1774: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1775: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1776: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1777: RAISE OKC_API.G_EXCEPTION_ERROR;
1778: END IF;
1771: p_package_name => g_pkg_name,
1772: p_procedure_name => l_api_name,
1773: p_before_after => 'B');
1774: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1775: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1776: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1777: RAISE OKC_API.G_EXCEPTION_ERROR;
1778: END IF;
1779:
1772: p_procedure_name => l_api_name,
1773: p_before_after => 'B');
1774: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1775: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1776: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1777: RAISE OKC_API.G_EXCEPTION_ERROR;
1778: END IF;
1779:
1780: --get values back from hook call
1773: p_before_after => 'B');
1774: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1775: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1776: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1777: RAISE OKC_API.G_EXCEPTION_ERROR;
1778: END IF;
1779:
1780: --get values back from hook call
1781: l_cnlv_rec := migrate_cnlv(l_cnlv_rec, g_cnlv_rec);
1787: x_msg_count => x_msg_count,
1788: x_msg_data => x_msg_data,
1789: p_cnlv_rec => l_cnlv_rec);
1790:
1791: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1792: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1793: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1794: RAISE OKC_API.G_EXCEPTION_ERROR;
1795: END IF;
1788: x_msg_data => x_msg_data,
1789: p_cnlv_rec => l_cnlv_rec);
1790:
1791: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1792: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1793: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1794: RAISE OKC_API.G_EXCEPTION_ERROR;
1795: END IF;
1796:
1789: p_cnlv_rec => l_cnlv_rec);
1790:
1791: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1792: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1793: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1794: RAISE OKC_API.G_EXCEPTION_ERROR;
1795: END IF;
1796:
1797: --USER HOOK CALL FOR AFTER, STARTS
1790:
1791: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1792: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1793: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1794: RAISE OKC_API.G_EXCEPTION_ERROR;
1795: END IF;
1796:
1797: --USER HOOK CALL FOR AFTER, STARTS
1798: okc_util.call_user_hook(x_return_status => x_return_status,
1798: okc_util.call_user_hook(x_return_status => x_return_status,
1799: p_package_name => g_pkg_name,
1800: p_procedure_name => l_api_name,
1801: p_before_after => 'A');
1802: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1803: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1804: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1805: RAISE OKC_API.G_EXCEPTION_ERROR;
1806: END IF;
1799: p_package_name => g_pkg_name,
1800: p_procedure_name => l_api_name,
1801: p_before_after => 'A');
1802: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1803: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1804: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1805: RAISE OKC_API.G_EXCEPTION_ERROR;
1806: END IF;
1807: --USER HOOK CALL FOR AFTER, ENDS
1800: p_procedure_name => l_api_name,
1801: p_before_after => 'A');
1802: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1803: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1804: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1805: RAISE OKC_API.G_EXCEPTION_ERROR;
1806: END IF;
1807: --USER HOOK CALL FOR AFTER, ENDS
1808:
1801: p_before_after => 'A');
1802: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1803: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1804: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1805: RAISE OKC_API.G_EXCEPTION_ERROR;
1806: END IF;
1807: --USER HOOK CALL FOR AFTER, ENDS
1808:
1809: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1805: RAISE OKC_API.G_EXCEPTION_ERROR;
1806: END IF;
1807: --USER HOOK CALL FOR AFTER, ENDS
1808:
1809: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1810:
1811: EXCEPTION
1812: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1813: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1808:
1809: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1810:
1811: EXCEPTION
1812: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1813: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1814: (
1815: l_api_name,
1816: G_PKG_NAME,
1809: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1810:
1811: EXCEPTION
1812: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1813: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1814: (
1815: l_api_name,
1816: G_PKG_NAME,
1817: 'OKC_API.G_RET_STS_ERROR',
1813: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1814: (
1815: l_api_name,
1816: G_PKG_NAME,
1817: 'OKC_API.G_RET_STS_ERROR',
1818: x_msg_count,
1819: x_msg_data,
1820: '_PUB'
1821: );
1819: x_msg_data,
1820: '_PUB'
1821: );
1822:
1823: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1824: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1825: (
1826: l_api_name,
1827: G_PKG_NAME,
1820: '_PUB'
1821: );
1822:
1823: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1824: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1825: (
1826: l_api_name,
1827: G_PKG_NAME,
1828: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1824: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1825: (
1826: l_api_name,
1827: G_PKG_NAME,
1828: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1829: x_msg_count,
1830: x_msg_data,
1831: '_PUB'
1832: );
1831: '_PUB'
1832: );
1833:
1834: WHEN OTHERS THEN
1835: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1836: (
1837: l_api_name,
1838: G_PKG_NAME,
1839: 'OTHERS',
1849: x_msg_count OUT NOCOPY NUMBER,
1850: x_msg_data OUT NOCOPY VARCHAR2,
1851: p_cnlv_tbl IN cnlv_tbl_type) IS
1852:
1853: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1854: i NUMBER := 0;
1855: BEGIN
1856: --Initialize the return status
1857: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1853: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1854: i NUMBER := 0;
1855: BEGIN
1856: --Initialize the return status
1857: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1858:
1859: IF p_cnlv_tbl.COUNT > 0 THEN
1860: i := p_cnlv_tbl.FIRST;
1861: LOOP
1865: l_return_status,
1866: x_msg_count,
1867: x_msg_data,
1868: p_cnlv_tbl(i));
1869: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1870: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1871: x_return_status := l_return_status;
1872: raise G_EXCEPTION_HALT_VALIDATION;
1873: ELSE
1866: x_msg_count,
1867: x_msg_data,
1868: p_cnlv_tbl(i));
1869: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
1870: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1871: x_return_status := l_return_status;
1872: raise G_EXCEPTION_HALT_VALIDATION;
1873: ELSE
1874: x_return_status := l_return_status;
1882: WHEN G_EXCEPTION_HALT_VALIDATION THEN
1883: NULL;
1884:
1885: WHEN OTHERS THEN
1886: OKC_API.set_message(p_app_name => g_app_name,
1887: p_msg_name => g_unexpected_error,
1888: p_token1 => g_sqlcode_token,
1889: p_token1_value => sqlcode,
1890: p_token2 => g_sqlerrm_token,
1888: p_token1 => g_sqlcode_token,
1889: p_token1_value => sqlcode,
1890: p_token2 => g_sqlerrm_token,
1891: p_token2_value => sqlerrm);
1892: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1893: END validate_cond_lines;
1894:
1895: --Procedures for condition occurs
1896:
1903: x_coev_rec OUT NOCOPY coev_rec_type) IS
1904:
1905: l_api_name CONSTANT VARCHAR2(30) := 'create_cond_occurs';
1906: l_api_version CONSTANT NUMBER := 1.0;
1907: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1908: l_coev_rec coev_rec_type := p_coev_rec;
1909: BEGIN
1910: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1911: g_pkg_name,
1906: l_api_version CONSTANT NUMBER := 1.0;
1907: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1908: l_coev_rec coev_rec_type := p_coev_rec;
1909: BEGIN
1910: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1911: g_pkg_name,
1912: p_init_msg_list,
1913: l_api_version,
1914: p_api_version,
1914: p_api_version,
1915: '_PUB',
1916: x_return_status);
1917:
1918: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1919: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1920: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1921: RAISE OKC_API.G_EXCEPTION_ERROR;
1922: END IF;
1915: '_PUB',
1916: x_return_status);
1917:
1918: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1919: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1920: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1921: RAISE OKC_API.G_EXCEPTION_ERROR;
1922: END IF;
1923:
1916: x_return_status);
1917:
1918: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1919: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1920: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1921: RAISE OKC_API.G_EXCEPTION_ERROR;
1922: END IF;
1923:
1924: -- USER HOOK CALL FOR BEFORE, STARTS
1917:
1918: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1919: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1920: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1921: RAISE OKC_API.G_EXCEPTION_ERROR;
1922: END IF;
1923:
1924: -- USER HOOK CALL FOR BEFORE, STARTS
1925: g_coev_rec := l_coev_rec;
1928: p_package_name => g_pkg_name,
1929: p_procedure_name => l_api_name,
1930: p_before_after => 'B');
1931:
1932: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1933: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1934: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1935: RAISE OKC_API.G_EXCEPTION_ERROR;
1936: END IF;
1929: p_procedure_name => l_api_name,
1930: p_before_after => 'B');
1931:
1932: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1933: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1934: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1935: RAISE OKC_API.G_EXCEPTION_ERROR;
1936: END IF;
1937:
1930: p_before_after => 'B');
1931:
1932: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1933: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1934: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1935: RAISE OKC_API.G_EXCEPTION_ERROR;
1936: END IF;
1937:
1938: --get values back from hook call
1931:
1932: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1933: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1934: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1935: RAISE OKC_API.G_EXCEPTION_ERROR;
1936: END IF;
1937:
1938: --get values back from hook call
1939: l_coev_rec := migrate_coev(l_coev_rec, g_coev_rec);
1945: x_msg_count => x_msg_count,
1946: x_msg_data => x_msg_data,
1947: p_coev_rec => l_coev_rec,
1948: x_coev_rec => x_coev_rec);
1949: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1950: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1951: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1952: RAISE OKC_API.G_EXCEPTION_ERROR;
1953: END IF;
1946: x_msg_data => x_msg_data,
1947: p_coev_rec => l_coev_rec,
1948: x_coev_rec => x_coev_rec);
1949: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1950: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1951: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1952: RAISE OKC_API.G_EXCEPTION_ERROR;
1953: END IF;
1954:
1947: p_coev_rec => l_coev_rec,
1948: x_coev_rec => x_coev_rec);
1949: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1950: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1951: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1952: RAISE OKC_API.G_EXCEPTION_ERROR;
1953: END IF;
1954:
1955: --USER HOOK CALL FOR AFTER, STARTS
1948: x_coev_rec => x_coev_rec);
1949: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1950: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1951: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1952: RAISE OKC_API.G_EXCEPTION_ERROR;
1953: END IF;
1954:
1955: --USER HOOK CALL FOR AFTER, STARTS
1956: g_coev_rec := x_coev_rec;
1959: p_package_name => g_pkg_name,
1960: p_procedure_name => l_api_name,
1961: p_before_after => 'A');
1962:
1963: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1964: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1965: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1966: RAISE OKC_API.G_EXCEPTION_ERROR;
1967: END IF;
1960: p_procedure_name => l_api_name,
1961: p_before_after => 'A');
1962:
1963: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1964: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1965: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1966: RAISE OKC_API.G_EXCEPTION_ERROR;
1967: END IF;
1968: --USER HOOK CALL FOR AFTER, ENDS
1961: p_before_after => 'A');
1962:
1963: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1964: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1965: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1966: RAISE OKC_API.G_EXCEPTION_ERROR;
1967: END IF;
1968: --USER HOOK CALL FOR AFTER, ENDS
1969:
1962:
1963: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1964: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1965: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
1966: RAISE OKC_API.G_EXCEPTION_ERROR;
1967: END IF;
1968: --USER HOOK CALL FOR AFTER, ENDS
1969:
1970: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1966: RAISE OKC_API.G_EXCEPTION_ERROR;
1967: END IF;
1968: --USER HOOK CALL FOR AFTER, ENDS
1969:
1970: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1971:
1972: EXCEPTION
1973: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1974: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1969:
1970: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1971:
1972: EXCEPTION
1973: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1974: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1975: (
1976: l_api_name,
1977: G_PKG_NAME,
1970: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1971:
1972: EXCEPTION
1973: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1974: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1975: (
1976: l_api_name,
1977: G_PKG_NAME,
1978: 'OKC_API.G_RET_STS_ERROR',
1974: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1975: (
1976: l_api_name,
1977: G_PKG_NAME,
1978: 'OKC_API.G_RET_STS_ERROR',
1979: x_msg_count,
1980: x_msg_data,
1981: '_PUB'
1982: );
1980: x_msg_data,
1981: '_PUB'
1982: );
1983:
1984: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1985: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1986: (
1987: l_api_name,
1988: G_PKG_NAME,
1981: '_PUB'
1982: );
1983:
1984: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1985: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1986: (
1987: l_api_name,
1988: G_PKG_NAME,
1989: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1985: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1986: (
1987: l_api_name,
1988: G_PKG_NAME,
1989: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1990: x_msg_count,
1991: x_msg_data,
1992: '_PUB'
1993: );
1992: '_PUB'
1993: );
1994:
1995: WHEN OTHERS THEN
1996: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1997: (
1998: l_api_name,
1999: G_PKG_NAME,
2000: 'OTHERS',
2011: x_msg_data OUT NOCOPY VARCHAR2,
2012: p_coev_tbl IN coev_tbl_type,
2013: x_coev_tbl OUT NOCOPY coev_tbl_type) IS
2014:
2015: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2016: i NUMBER := 0;
2017: BEGIN
2018: --Initialize the return status
2019: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2015: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2016: i NUMBER := 0;
2017: BEGIN
2018: --Initialize the return status
2019: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2020:
2021: IF p_coev_tbl.COUNT > 0 THEN
2022: i := p_coev_tbl.FIRST;
2023: LOOP
2028: x_msg_count,
2029: x_msg_data,
2030: p_coev_tbl(i),
2031: x_coev_tbl(i));
2032: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2033: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2034: x_return_status := l_return_status;
2035: raise G_EXCEPTION_HALT_VALIDATION;
2036: ELSE
2029: x_msg_data,
2030: p_coev_tbl(i),
2031: x_coev_tbl(i));
2032: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2033: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2034: x_return_status := l_return_status;
2035: raise G_EXCEPTION_HALT_VALIDATION;
2036: ELSE
2037: x_return_status := l_return_status;
2045: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2046: NULL;
2047:
2048: WHEN OTHERS THEN
2049: OKC_API.set_message(p_app_name => g_app_name,
2050: p_msg_name => g_unexpected_error,
2051: p_token1 => g_sqlcode_token,
2052: p_token1_value => sqlcode,
2053: p_token2 => g_sqlerrm_token,
2051: p_token1 => g_sqlcode_token,
2052: p_token1_value => sqlcode,
2053: p_token2 => g_sqlerrm_token,
2054: p_token2_value => sqlerrm);
2055: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2056: END create_cond_occurs;
2057:
2058:
2059: PROCEDURE delete_cond_occurs(p_api_version IN NUMBER,
2064: p_coev_rec IN coev_rec_type) IS
2065:
2066: l_api_name CONSTANT VARCHAR2(30) := 'delete_cond_occurs';
2067: l_api_version CONSTANT NUMBER := 1.0;
2068: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2069: l_coev_rec coev_rec_type := p_coev_rec;
2070: BEGIN
2071: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2072: g_pkg_name,
2067: l_api_version CONSTANT NUMBER := 1.0;
2068: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2069: l_coev_rec coev_rec_type := p_coev_rec;
2070: BEGIN
2071: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2072: g_pkg_name,
2073: p_init_msg_list,
2074: l_api_version,
2075: p_api_version,
2075: p_api_version,
2076: '_PUB',
2077: x_return_status);
2078:
2079: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2080: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2081: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2082: RAISE OKC_API.G_EXCEPTION_ERROR;
2083: END IF;
2076: '_PUB',
2077: x_return_status);
2078:
2079: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2080: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2081: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2082: RAISE OKC_API.G_EXCEPTION_ERROR;
2083: END IF;
2084:
2077: x_return_status);
2078:
2079: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2080: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2081: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2082: RAISE OKC_API.G_EXCEPTION_ERROR;
2083: END IF;
2084:
2085: -- USER HOOK CALL FOR BEFORE, STARTS
2078:
2079: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2080: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2081: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2082: RAISE OKC_API.G_EXCEPTION_ERROR;
2083: END IF;
2084:
2085: -- USER HOOK CALL FOR BEFORE, STARTS
2086: g_coev_rec := l_coev_rec;
2088: okc_util.call_user_hook(x_return_status => x_return_status,
2089: p_package_name => g_pkg_name,
2090: p_procedure_name => l_api_name,
2091: p_before_after => 'B');
2092: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2093: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2094: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2095: RAISE OKC_API.G_EXCEPTION_ERROR;
2096: END IF;
2089: p_package_name => g_pkg_name,
2090: p_procedure_name => l_api_name,
2091: p_before_after => 'B');
2092: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2093: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2094: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2095: RAISE OKC_API.G_EXCEPTION_ERROR;
2096: END IF;
2097:
2090: p_procedure_name => l_api_name,
2091: p_before_after => 'B');
2092: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2093: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2094: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2095: RAISE OKC_API.G_EXCEPTION_ERROR;
2096: END IF;
2097:
2098: --get values back from hook call
2091: p_before_after => 'B');
2092: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2093: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2094: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2095: RAISE OKC_API.G_EXCEPTION_ERROR;
2096: END IF;
2097:
2098: --get values back from hook call
2099: l_coev_rec := migrate_coev(l_coev_rec, g_coev_rec);
2104: x_return_status => x_return_status,
2105: x_msg_count => x_msg_count,
2106: x_msg_data => x_msg_data,
2107: p_coev_rec => l_coev_rec);
2108: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2109: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2110: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2111: RAISE OKC_API.G_EXCEPTION_ERROR;
2112: END IF;
2105: x_msg_count => x_msg_count,
2106: x_msg_data => x_msg_data,
2107: p_coev_rec => l_coev_rec);
2108: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2109: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2110: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2111: RAISE OKC_API.G_EXCEPTION_ERROR;
2112: END IF;
2113:
2106: x_msg_data => x_msg_data,
2107: p_coev_rec => l_coev_rec);
2108: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2109: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2110: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2111: RAISE OKC_API.G_EXCEPTION_ERROR;
2112: END IF;
2113:
2114: --USER HOOK CALL FOR AFTER, STARTS
2107: p_coev_rec => l_coev_rec);
2108: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2109: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2110: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2111: RAISE OKC_API.G_EXCEPTION_ERROR;
2112: END IF;
2113:
2114: --USER HOOK CALL FOR AFTER, STARTS
2115: okc_util.call_user_hook(x_return_status => x_return_status,
2116: p_package_name => g_pkg_name,
2117: p_procedure_name => l_api_name,
2118: p_before_after => 'A');
2119:
2120: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2121: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2122: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2123: RAISE OKC_API.G_EXCEPTION_ERROR;
2124: END IF;
2117: p_procedure_name => l_api_name,
2118: p_before_after => 'A');
2119:
2120: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2121: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2122: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2123: RAISE OKC_API.G_EXCEPTION_ERROR;
2124: END IF;
2125: --USER HOOK CALL FOR AFTER, ENDS
2118: p_before_after => 'A');
2119:
2120: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2121: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2122: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2123: RAISE OKC_API.G_EXCEPTION_ERROR;
2124: END IF;
2125: --USER HOOK CALL FOR AFTER, ENDS
2126:
2119:
2120: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2121: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2122: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2123: RAISE OKC_API.G_EXCEPTION_ERROR;
2124: END IF;
2125: --USER HOOK CALL FOR AFTER, ENDS
2126:
2127: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2123: RAISE OKC_API.G_EXCEPTION_ERROR;
2124: END IF;
2125: --USER HOOK CALL FOR AFTER, ENDS
2126:
2127: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2128: EXCEPTION
2129: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2130: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2131: (
2125: --USER HOOK CALL FOR AFTER, ENDS
2126:
2127: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2128: EXCEPTION
2129: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2130: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2131: (
2132: l_api_name,
2133: G_PKG_NAME,
2126:
2127: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2128: EXCEPTION
2129: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2130: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2131: (
2132: l_api_name,
2133: G_PKG_NAME,
2134: 'OKC_API.G_RET_STS_ERROR',
2130: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2131: (
2132: l_api_name,
2133: G_PKG_NAME,
2134: 'OKC_API.G_RET_STS_ERROR',
2135: x_msg_count,
2136: x_msg_data,
2137: '_PUB'
2138: );
2136: x_msg_data,
2137: '_PUB'
2138: );
2139:
2140: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2141: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2142: (
2143: l_api_name,
2144: G_PKG_NAME,
2137: '_PUB'
2138: );
2139:
2140: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2141: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2142: (
2143: l_api_name,
2144: G_PKG_NAME,
2145: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2141: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2142: (
2143: l_api_name,
2144: G_PKG_NAME,
2145: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2146: x_msg_count,
2147: x_msg_data,
2148: '_PUB'
2149: );
2148: '_PUB'
2149: );
2150:
2151: WHEN OTHERS THEN
2152: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2153: (
2154: l_api_name,
2155: G_PKG_NAME,
2156: 'OTHERS',
2166: x_msg_count OUT NOCOPY NUMBER,
2167: x_msg_data OUT NOCOPY VARCHAR2,
2168: p_coev_tbl IN coev_tbl_type) IS
2169:
2170: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2171: i NUMBER := 0;
2172: BEGIN
2173: --Initialize the return status
2174: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2170: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2171: i NUMBER := 0;
2172: BEGIN
2173: --Initialize the return status
2174: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2175:
2176: IF p_coev_tbl.COUNT > 0 THEN
2177: i := p_coev_tbl.FIRST;
2178: LOOP
2182: x_return_status,
2183: x_msg_count,
2184: x_msg_data,
2185: p_coev_tbl(i));
2186: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2187: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
2188: l_return_status := x_return_status;
2189: RAISE G_EXCEPTION_HALT_VALIDATION;
2190: ELSE
2183: x_msg_count,
2184: x_msg_data,
2185: p_coev_tbl(i));
2186: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2187: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
2188: l_return_status := x_return_status;
2189: RAISE G_EXCEPTION_HALT_VALIDATION;
2190: ELSE
2191: l_return_status := x_return_status; -- record that there was an error
2199: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2200: NULL;
2201:
2202: WHEN OTHERS THEN
2203: OKC_API.set_message(p_app_name => g_app_name,
2204: p_msg_name => g_unexpected_error,
2205: p_token1 => g_sqlcode_token,
2206: p_token1_value => sqlcode,
2207: p_token2 => g_sqlerrm_token,
2205: p_token1 => g_sqlcode_token,
2206: p_token1_value => sqlcode,
2207: p_token2 => g_sqlerrm_token,
2208: p_token2_value => sqlerrm);
2209: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2210: END delete_cond_occurs;
2211:
2212: PROCEDURE validate_cond_occurs(p_api_version IN NUMBER,
2213: p_init_msg_list IN VARCHAR2 ,
2217: p_coev_rec IN coev_rec_type) IS
2218:
2219: l_api_name CONSTANT VARCHAR2(30) := 'validate_cond_occurs';
2220: l_api_version CONSTANT NUMBER := 1.0;
2221: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2222: l_coev_rec coev_rec_type := p_coev_rec;
2223: BEGIN
2224: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2225: g_pkg_name,
2220: l_api_version CONSTANT NUMBER := 1.0;
2221: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2222: l_coev_rec coev_rec_type := p_coev_rec;
2223: BEGIN
2224: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2225: g_pkg_name,
2226: p_init_msg_list,
2227: l_api_version,
2228: p_api_version,
2228: p_api_version,
2229: '_PUB',
2230: x_return_status);
2231:
2232: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2233: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2234: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2235: RAISE OKC_API.G_EXCEPTION_ERROR;
2236: END IF;
2229: '_PUB',
2230: x_return_status);
2231:
2232: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2233: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2234: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2235: RAISE OKC_API.G_EXCEPTION_ERROR;
2236: END IF;
2237:
2230: x_return_status);
2231:
2232: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2233: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2234: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2235: RAISE OKC_API.G_EXCEPTION_ERROR;
2236: END IF;
2237:
2238: -- USER HOOK CALL FOR BEFORE, STARTS
2231:
2232: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2233: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2234: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2235: RAISE OKC_API.G_EXCEPTION_ERROR;
2236: END IF;
2237:
2238: -- USER HOOK CALL FOR BEFORE, STARTS
2239: g_coev_rec := l_coev_rec;
2241: okc_util.call_user_hook(x_return_status => x_return_status,
2242: p_package_name => g_pkg_name,
2243: p_procedure_name => l_api_name,
2244: p_before_after => 'B');
2245: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2246: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2247: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2248: RAISE OKC_API.G_EXCEPTION_ERROR;
2249: END IF;
2242: p_package_name => g_pkg_name,
2243: p_procedure_name => l_api_name,
2244: p_before_after => 'B');
2245: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2246: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2247: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2248: RAISE OKC_API.G_EXCEPTION_ERROR;
2249: END IF;
2250:
2243: p_procedure_name => l_api_name,
2244: p_before_after => 'B');
2245: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2246: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2247: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2248: RAISE OKC_API.G_EXCEPTION_ERROR;
2249: END IF;
2250:
2251: --get values back from hook call
2244: p_before_after => 'B');
2245: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2246: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2247: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2248: RAISE OKC_API.G_EXCEPTION_ERROR;
2249: END IF;
2250:
2251: --get values back from hook call
2252: l_coev_rec := migrate_coev(l_coev_rec, g_coev_rec);
2258: x_msg_count => x_msg_count,
2259: x_msg_data => x_msg_data,
2260: p_coev_rec => l_coev_rec);
2261:
2262: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2263: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2264: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2265: RAISE OKC_API.G_EXCEPTION_ERROR;
2266: END IF;
2259: x_msg_data => x_msg_data,
2260: p_coev_rec => l_coev_rec);
2261:
2262: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2263: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2264: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2265: RAISE OKC_API.G_EXCEPTION_ERROR;
2266: END IF;
2267:
2260: p_coev_rec => l_coev_rec);
2261:
2262: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2263: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2264: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2265: RAISE OKC_API.G_EXCEPTION_ERROR;
2266: END IF;
2267:
2268: --USER HOOK CALL FOR AFTER, STARTS
2261:
2262: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2263: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2264: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2265: RAISE OKC_API.G_EXCEPTION_ERROR;
2266: END IF;
2267:
2268: --USER HOOK CALL FOR AFTER, STARTS
2269: okc_util.call_user_hook(x_return_status => x_return_status,
2269: okc_util.call_user_hook(x_return_status => x_return_status,
2270: p_package_name => g_pkg_name,
2271: p_procedure_name => l_api_name,
2272: p_before_after => 'A');
2273: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2274: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2275: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2276: RAISE OKC_API.G_EXCEPTION_ERROR;
2277: END IF;
2270: p_package_name => g_pkg_name,
2271: p_procedure_name => l_api_name,
2272: p_before_after => 'A');
2273: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2274: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2275: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2276: RAISE OKC_API.G_EXCEPTION_ERROR;
2277: END IF;
2278: --USER HOOK CALL FOR AFTER, ENDS
2271: p_procedure_name => l_api_name,
2272: p_before_after => 'A');
2273: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2274: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2275: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2276: RAISE OKC_API.G_EXCEPTION_ERROR;
2277: END IF;
2278: --USER HOOK CALL FOR AFTER, ENDS
2279:
2272: p_before_after => 'A');
2273: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2274: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2275: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2276: RAISE OKC_API.G_EXCEPTION_ERROR;
2277: END IF;
2278: --USER HOOK CALL FOR AFTER, ENDS
2279:
2280: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2276: RAISE OKC_API.G_EXCEPTION_ERROR;
2277: END IF;
2278: --USER HOOK CALL FOR AFTER, ENDS
2279:
2280: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2281:
2282: EXCEPTION
2283: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2284: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2279:
2280: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2281:
2282: EXCEPTION
2283: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2284: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2285: (
2286: l_api_name,
2287: G_PKG_NAME,
2280: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2281:
2282: EXCEPTION
2283: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2284: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2285: (
2286: l_api_name,
2287: G_PKG_NAME,
2288: 'OKC_API.G_RET_STS_ERROR',
2284: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2285: (
2286: l_api_name,
2287: G_PKG_NAME,
2288: 'OKC_API.G_RET_STS_ERROR',
2289: x_msg_count,
2290: x_msg_data,
2291: '_PUB'
2292: );
2290: x_msg_data,
2291: '_PUB'
2292: );
2293:
2294: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2295: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2296: (
2297: l_api_name,
2298: G_PKG_NAME,
2291: '_PUB'
2292: );
2293:
2294: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2295: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2296: (
2297: l_api_name,
2298: G_PKG_NAME,
2299: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2295: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2296: (
2297: l_api_name,
2298: G_PKG_NAME,
2299: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2300: x_msg_count,
2301: x_msg_data,
2302: '_PUB'
2303: );
2302: '_PUB'
2303: );
2304:
2305: WHEN OTHERS THEN
2306: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2307: (
2308: l_api_name,
2309: G_PKG_NAME,
2310: 'OTHERS',
2320: x_msg_count OUT NOCOPY NUMBER,
2321: x_msg_data OUT NOCOPY VARCHAR2,
2322: p_coev_tbl IN coev_tbl_type) IS
2323:
2324: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2325: i NUMBER := 0;
2326: BEGIN
2327: --Initialize the return status
2328: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2324: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2325: i NUMBER := 0;
2326: BEGIN
2327: --Initialize the return status
2328: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2329:
2330: IF p_coev_tbl.COUNT > 0 THEN
2331: i := p_coev_tbl.FIRST;
2332: LOOP
2336: l_return_status,
2337: x_msg_count,
2338: x_msg_data,
2339: p_coev_tbl(i));
2340: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2341: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2342: x_return_status := l_return_status;
2343: raise G_EXCEPTION_HALT_VALIDATION;
2344: ELSE
2337: x_msg_count,
2338: x_msg_data,
2339: p_coev_tbl(i));
2340: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2341: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2342: x_return_status := l_return_status;
2343: raise G_EXCEPTION_HALT_VALIDATION;
2344: ELSE
2345: x_return_status := l_return_status;
2353: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2354: NULL;
2355:
2356: WHEN OTHERS THEN
2357: OKC_API.set_message(p_app_name => g_app_name,
2358: p_msg_name => g_unexpected_error,
2359: p_token1 => g_sqlcode_token,
2360: p_token1_value => sqlcode,
2361: p_token2 => g_sqlerrm_token,
2359: p_token1 => g_sqlcode_token,
2360: p_token1_value => sqlcode,
2361: p_token2 => g_sqlerrm_token,
2362: p_token2_value => sqlerrm);
2363: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2364: END validate_cond_occurs;
2365:
2366: --Procedures for action attribute values
2367:
2374: x_aavv_rec OUT NOCOPY aavv_rec_type) IS
2375:
2376: l_api_name CONSTANT VARCHAR2(30) := 'create_act_att_vals';
2377: l_api_version CONSTANT NUMBER := 1.0;
2378: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2379: l_aavv_rec aavv_rec_type := p_aavv_rec;
2380: BEGIN
2381: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2382: g_pkg_name,
2377: l_api_version CONSTANT NUMBER := 1.0;
2378: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2379: l_aavv_rec aavv_rec_type := p_aavv_rec;
2380: BEGIN
2381: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2382: g_pkg_name,
2383: p_init_msg_list,
2384: l_api_version,
2385: p_api_version,
2385: p_api_version,
2386: '_PUB',
2387: x_return_status);
2388:
2389: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2390: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2391: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2392: RAISE OKC_API.G_EXCEPTION_ERROR;
2393: END IF;
2386: '_PUB',
2387: x_return_status);
2388:
2389: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2390: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2391: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2392: RAISE OKC_API.G_EXCEPTION_ERROR;
2393: END IF;
2394:
2387: x_return_status);
2388:
2389: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2390: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2391: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2392: RAISE OKC_API.G_EXCEPTION_ERROR;
2393: END IF;
2394:
2395: -- USER HOOK CALL FOR BEFORE, STARTS
2388:
2389: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2390: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2391: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2392: RAISE OKC_API.G_EXCEPTION_ERROR;
2393: END IF;
2394:
2395: -- USER HOOK CALL FOR BEFORE, STARTS
2396: g_aavv_rec := l_aavv_rec;
2399: p_package_name => g_pkg_name,
2400: p_procedure_name => l_api_name,
2401: p_before_after => 'B');
2402:
2403: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2404: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2405: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2406: RAISE OKC_API.G_EXCEPTION_ERROR;
2407: END IF;
2400: p_procedure_name => l_api_name,
2401: p_before_after => 'B');
2402:
2403: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2404: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2405: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2406: RAISE OKC_API.G_EXCEPTION_ERROR;
2407: END IF;
2408:
2401: p_before_after => 'B');
2402:
2403: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2404: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2405: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2406: RAISE OKC_API.G_EXCEPTION_ERROR;
2407: END IF;
2408:
2409: --get values back from hook call
2402:
2403: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2404: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2405: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2406: RAISE OKC_API.G_EXCEPTION_ERROR;
2407: END IF;
2408:
2409: --get values back from hook call
2410: l_aavv_rec := migrate_aavv(l_aavv_rec, g_aavv_rec);
2416: x_msg_count => x_msg_count,
2417: x_msg_data => x_msg_data,
2418: p_aavv_rec => l_aavv_rec,
2419: x_aavv_rec => x_aavv_rec);
2420: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2422: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2423: RAISE OKC_API.G_EXCEPTION_ERROR;
2424: END IF;
2417: x_msg_data => x_msg_data,
2418: p_aavv_rec => l_aavv_rec,
2419: x_aavv_rec => x_aavv_rec);
2420: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2422: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2423: RAISE OKC_API.G_EXCEPTION_ERROR;
2424: END IF;
2425:
2418: p_aavv_rec => l_aavv_rec,
2419: x_aavv_rec => x_aavv_rec);
2420: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2422: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2423: RAISE OKC_API.G_EXCEPTION_ERROR;
2424: END IF;
2425:
2426: --USER HOOK CALL FOR AFTER, STARTS
2419: x_aavv_rec => x_aavv_rec);
2420: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2421: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2422: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2423: RAISE OKC_API.G_EXCEPTION_ERROR;
2424: END IF;
2425:
2426: --USER HOOK CALL FOR AFTER, STARTS
2427: g_aavv_rec := x_aavv_rec;
2430: p_package_name => g_pkg_name,
2431: p_procedure_name => l_api_name,
2432: p_before_after => 'A');
2433:
2434: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2435: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2436: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2437: RAISE OKC_API.G_EXCEPTION_ERROR;
2438: END IF;
2431: p_procedure_name => l_api_name,
2432: p_before_after => 'A');
2433:
2434: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2435: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2436: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2437: RAISE OKC_API.G_EXCEPTION_ERROR;
2438: END IF;
2439: --USER HOOK CALL FOR AFTER, ENDS
2432: p_before_after => 'A');
2433:
2434: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2435: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2436: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2437: RAISE OKC_API.G_EXCEPTION_ERROR;
2438: END IF;
2439: --USER HOOK CALL FOR AFTER, ENDS
2440:
2433:
2434: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2435: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2436: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2437: RAISE OKC_API.G_EXCEPTION_ERROR;
2438: END IF;
2439: --USER HOOK CALL FOR AFTER, ENDS
2440:
2441: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2437: RAISE OKC_API.G_EXCEPTION_ERROR;
2438: END IF;
2439: --USER HOOK CALL FOR AFTER, ENDS
2440:
2441: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2442:
2443: EXCEPTION
2444: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2445: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2440:
2441: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2442:
2443: EXCEPTION
2444: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2445: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2446: (
2447: l_api_name,
2448: G_PKG_NAME,
2441: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2442:
2443: EXCEPTION
2444: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2445: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2446: (
2447: l_api_name,
2448: G_PKG_NAME,
2449: 'OKC_API.G_RET_STS_ERROR',
2445: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2446: (
2447: l_api_name,
2448: G_PKG_NAME,
2449: 'OKC_API.G_RET_STS_ERROR',
2450: x_msg_count,
2451: x_msg_data,
2452: '_PUB'
2453: );
2451: x_msg_data,
2452: '_PUB'
2453: );
2454:
2455: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2456: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2457: (
2458: l_api_name,
2459: G_PKG_NAME,
2452: '_PUB'
2453: );
2454:
2455: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2456: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2457: (
2458: l_api_name,
2459: G_PKG_NAME,
2460: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2456: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2457: (
2458: l_api_name,
2459: G_PKG_NAME,
2460: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2461: x_msg_count,
2462: x_msg_data,
2463: '_PUB'
2464: );
2463: '_PUB'
2464: );
2465:
2466: WHEN OTHERS THEN
2467: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2468: (
2469: l_api_name,
2470: G_PKG_NAME,
2471: 'OTHERS',
2482: x_msg_data OUT NOCOPY VARCHAR2,
2483: p_aavv_tbl IN aavv_tbl_type,
2484: x_aavv_tbl OUT NOCOPY aavv_tbl_type) IS
2485:
2486: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2487: i NUMBER := 0;
2488: BEGIN
2489: --Initialize the return status
2490: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2486: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2487: i NUMBER := 0;
2488: BEGIN
2489: --Initialize the return status
2490: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2491:
2492: IF p_aavv_tbl.COUNT > 0 THEN
2493: i := p_aavv_tbl.FIRST;
2494: LOOP
2499: x_msg_count,
2500: x_msg_data,
2501: p_aavv_tbl(i),
2502: x_aavv_tbl(i));
2503: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2504: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2505: x_return_status := l_return_status;
2506: raise G_EXCEPTION_HALT_VALIDATION;
2507: ELSE
2500: x_msg_data,
2501: p_aavv_tbl(i),
2502: x_aavv_tbl(i));
2503: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2504: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2505: x_return_status := l_return_status;
2506: raise G_EXCEPTION_HALT_VALIDATION;
2507: ELSE
2508: x_return_status := l_return_status;
2516: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2517: NULL;
2518:
2519: WHEN OTHERS THEN
2520: OKC_API.set_message(p_app_name => g_app_name,
2521: p_msg_name => g_unexpected_error,
2522: p_token1 => g_sqlcode_token,
2523: p_token1_value => sqlcode,
2524: p_token2 => g_sqlerrm_token,
2522: p_token1 => g_sqlcode_token,
2523: p_token1_value => sqlcode,
2524: p_token2 => g_sqlerrm_token,
2525: p_token2_value => sqlerrm);
2526: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2527: END create_act_att_vals;
2528:
2529:
2530: PROCEDURE delete_act_att_vals(p_api_version IN NUMBER,
2535: p_aavv_rec IN aavv_rec_type) IS
2536:
2537: l_api_name CONSTANT VARCHAR2(30) := 'delete_act_att_vals';
2538: l_api_version CONSTANT NUMBER := 1.0;
2539: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2540: l_aavv_rec aavv_rec_type := p_aavv_rec;
2541: BEGIN
2542: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2543: g_pkg_name,
2538: l_api_version CONSTANT NUMBER := 1.0;
2539: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2540: l_aavv_rec aavv_rec_type := p_aavv_rec;
2541: BEGIN
2542: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2543: g_pkg_name,
2544: p_init_msg_list,
2545: l_api_version,
2546: p_api_version,
2546: p_api_version,
2547: '_PUB',
2548: x_return_status);
2549:
2550: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2551: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2552: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2553: RAISE OKC_API.G_EXCEPTION_ERROR;
2554: END IF;
2547: '_PUB',
2548: x_return_status);
2549:
2550: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2551: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2552: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2553: RAISE OKC_API.G_EXCEPTION_ERROR;
2554: END IF;
2555:
2548: x_return_status);
2549:
2550: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2551: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2552: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2553: RAISE OKC_API.G_EXCEPTION_ERROR;
2554: END IF;
2555:
2556: -- USER HOOK CALL FOR BEFORE, STARTS
2549:
2550: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2551: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2552: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2553: RAISE OKC_API.G_EXCEPTION_ERROR;
2554: END IF;
2555:
2556: -- USER HOOK CALL FOR BEFORE, STARTS
2557: g_aavv_rec := l_aavv_rec;
2559: okc_util.call_user_hook(x_return_status => x_return_status,
2560: p_package_name => g_pkg_name,
2561: p_procedure_name => l_api_name,
2562: p_before_after => 'B');
2563: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2564: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2565: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2566: RAISE OKC_API.G_EXCEPTION_ERROR;
2567: END IF;
2560: p_package_name => g_pkg_name,
2561: p_procedure_name => l_api_name,
2562: p_before_after => 'B');
2563: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2564: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2565: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2566: RAISE OKC_API.G_EXCEPTION_ERROR;
2567: END IF;
2568:
2561: p_procedure_name => l_api_name,
2562: p_before_after => 'B');
2563: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2564: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2565: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2566: RAISE OKC_API.G_EXCEPTION_ERROR;
2567: END IF;
2568:
2569: --get values back from hook call
2562: p_before_after => 'B');
2563: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2564: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2565: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2566: RAISE OKC_API.G_EXCEPTION_ERROR;
2567: END IF;
2568:
2569: --get values back from hook call
2570: l_aavv_rec := migrate_aavv(l_aavv_rec, g_aavv_rec);
2575: x_return_status => x_return_status,
2576: x_msg_count => x_msg_count,
2577: x_msg_data => x_msg_data,
2578: p_aavv_rec => l_aavv_rec);
2579: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2580: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2581: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2582: RAISE OKC_API.G_EXCEPTION_ERROR;
2583: END IF;
2576: x_msg_count => x_msg_count,
2577: x_msg_data => x_msg_data,
2578: p_aavv_rec => l_aavv_rec);
2579: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2580: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2581: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2582: RAISE OKC_API.G_EXCEPTION_ERROR;
2583: END IF;
2584:
2577: x_msg_data => x_msg_data,
2578: p_aavv_rec => l_aavv_rec);
2579: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2580: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2581: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2582: RAISE OKC_API.G_EXCEPTION_ERROR;
2583: END IF;
2584:
2585: --USER HOOK CALL FOR AFTER, STARTS
2578: p_aavv_rec => l_aavv_rec);
2579: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2580: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2581: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2582: RAISE OKC_API.G_EXCEPTION_ERROR;
2583: END IF;
2584:
2585: --USER HOOK CALL FOR AFTER, STARTS
2586: okc_util.call_user_hook(x_return_status => x_return_status,
2587: p_package_name => g_pkg_name,
2588: p_procedure_name => l_api_name,
2589: p_before_after => 'A');
2590:
2591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2594: RAISE OKC_API.G_EXCEPTION_ERROR;
2595: END IF;
2588: p_procedure_name => l_api_name,
2589: p_before_after => 'A');
2590:
2591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2594: RAISE OKC_API.G_EXCEPTION_ERROR;
2595: END IF;
2596: --USER HOOK CALL FOR AFTER, ENDS
2589: p_before_after => 'A');
2590:
2591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2594: RAISE OKC_API.G_EXCEPTION_ERROR;
2595: END IF;
2596: --USER HOOK CALL FOR AFTER, ENDS
2597:
2590:
2591: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2592: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2593: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2594: RAISE OKC_API.G_EXCEPTION_ERROR;
2595: END IF;
2596: --USER HOOK CALL FOR AFTER, ENDS
2597:
2598: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2594: RAISE OKC_API.G_EXCEPTION_ERROR;
2595: END IF;
2596: --USER HOOK CALL FOR AFTER, ENDS
2597:
2598: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2599: EXCEPTION
2600: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2602: (
2596: --USER HOOK CALL FOR AFTER, ENDS
2597:
2598: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2599: EXCEPTION
2600: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2602: (
2603: l_api_name,
2604: G_PKG_NAME,
2597:
2598: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2599: EXCEPTION
2600: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2602: (
2603: l_api_name,
2604: G_PKG_NAME,
2605: 'OKC_API.G_RET_STS_ERROR',
2601: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2602: (
2603: l_api_name,
2604: G_PKG_NAME,
2605: 'OKC_API.G_RET_STS_ERROR',
2606: x_msg_count,
2607: x_msg_data,
2608: '_PUB'
2609: );
2607: x_msg_data,
2608: '_PUB'
2609: );
2610:
2611: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2612: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2613: (
2614: l_api_name,
2615: G_PKG_NAME,
2608: '_PUB'
2609: );
2610:
2611: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2612: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2613: (
2614: l_api_name,
2615: G_PKG_NAME,
2616: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2612: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2613: (
2614: l_api_name,
2615: G_PKG_NAME,
2616: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2617: x_msg_count,
2618: x_msg_data,
2619: '_PUB'
2620: );
2619: '_PUB'
2620: );
2621:
2622: WHEN OTHERS THEN
2623: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2624: (
2625: l_api_name,
2626: G_PKG_NAME,
2627: 'OTHERS',
2637: x_msg_count OUT NOCOPY NUMBER,
2638: x_msg_data OUT NOCOPY VARCHAR2,
2639: p_aavv_tbl IN aavv_tbl_type) IS
2640:
2641: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2642: i NUMBER := 0;
2643: BEGIN
2644: --Initialize the return status
2645: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2641: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2642: i NUMBER := 0;
2643: BEGIN
2644: --Initialize the return status
2645: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2646:
2647: IF p_aavv_tbl.COUNT > 0 THEN
2648: i := p_aavv_tbl.FIRST;
2649: LOOP
2653: x_return_status,
2654: x_msg_count,
2655: x_msg_data,
2656: p_aavv_tbl(i));
2657: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2658: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
2659: l_return_status := x_return_status;
2660: RAISE G_EXCEPTION_HALT_VALIDATION;
2661: ELSE
2654: x_msg_count,
2655: x_msg_data,
2656: p_aavv_tbl(i));
2657: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2658: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
2659: l_return_status := x_return_status;
2660: RAISE G_EXCEPTION_HALT_VALIDATION;
2661: ELSE
2662: l_return_status := x_return_status; -- record that there was an error
2670: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2671: NULL;
2672:
2673: WHEN OTHERS THEN
2674: OKC_API.set_message(p_app_name => g_app_name,
2675: p_msg_name => g_unexpected_error,
2676: p_token1 => g_sqlcode_token,
2677: p_token1_value => sqlcode,
2678: p_token2 => g_sqlerrm_token,
2676: p_token1 => g_sqlcode_token,
2677: p_token1_value => sqlcode,
2678: p_token2 => g_sqlerrm_token,
2679: p_token2_value => sqlerrm);
2680: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2681: END delete_act_att_vals;
2682:
2683: PROCEDURE validate_act_att_vals(p_api_version IN NUMBER,
2684: p_init_msg_list IN VARCHAR2 ,
2688: p_aavv_rec IN aavv_rec_type) IS
2689:
2690: l_api_name CONSTANT VARCHAR2(30) := 'validate_act_att_vals';
2691: l_api_version CONSTANT NUMBER := 1.0;
2692: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2693: l_aavv_rec aavv_rec_type := p_aavv_rec;
2694: BEGIN
2695: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2696: g_pkg_name,
2691: l_api_version CONSTANT NUMBER := 1.0;
2692: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2693: l_aavv_rec aavv_rec_type := p_aavv_rec;
2694: BEGIN
2695: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2696: g_pkg_name,
2697: p_init_msg_list,
2698: l_api_version,
2699: p_api_version,
2699: p_api_version,
2700: '_PUB',
2701: x_return_status);
2702:
2703: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2704: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2705: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2706: RAISE OKC_API.G_EXCEPTION_ERROR;
2707: END IF;
2700: '_PUB',
2701: x_return_status);
2702:
2703: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2704: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2705: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2706: RAISE OKC_API.G_EXCEPTION_ERROR;
2707: END IF;
2708:
2701: x_return_status);
2702:
2703: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2704: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2705: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2706: RAISE OKC_API.G_EXCEPTION_ERROR;
2707: END IF;
2708:
2709: -- USER HOOK CALL FOR BEFORE, STARTS
2702:
2703: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2704: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2705: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2706: RAISE OKC_API.G_EXCEPTION_ERROR;
2707: END IF;
2708:
2709: -- USER HOOK CALL FOR BEFORE, STARTS
2710: g_aavv_rec := l_aavv_rec;
2712: okc_util.call_user_hook(x_return_status => x_return_status,
2713: p_package_name => g_pkg_name,
2714: p_procedure_name => l_api_name,
2715: p_before_after => 'B');
2716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2719: RAISE OKC_API.G_EXCEPTION_ERROR;
2720: END IF;
2713: p_package_name => g_pkg_name,
2714: p_procedure_name => l_api_name,
2715: p_before_after => 'B');
2716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2719: RAISE OKC_API.G_EXCEPTION_ERROR;
2720: END IF;
2721:
2714: p_procedure_name => l_api_name,
2715: p_before_after => 'B');
2716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2719: RAISE OKC_API.G_EXCEPTION_ERROR;
2720: END IF;
2721:
2722: --get values back from hook call
2715: p_before_after => 'B');
2716: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2717: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2718: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2719: RAISE OKC_API.G_EXCEPTION_ERROR;
2720: END IF;
2721:
2722: --get values back from hook call
2723: l_aavv_rec := migrate_aavv(l_aavv_rec, g_aavv_rec);
2729: x_msg_count => x_msg_count,
2730: x_msg_data => x_msg_data,
2731: p_aavv_rec => l_aavv_rec);
2732:
2733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2736: RAISE OKC_API.G_EXCEPTION_ERROR;
2737: END IF;
2730: x_msg_data => x_msg_data,
2731: p_aavv_rec => l_aavv_rec);
2732:
2733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2736: RAISE OKC_API.G_EXCEPTION_ERROR;
2737: END IF;
2738:
2731: p_aavv_rec => l_aavv_rec);
2732:
2733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2736: RAISE OKC_API.G_EXCEPTION_ERROR;
2737: END IF;
2738:
2739: --USER HOOK CALL FOR AFTER, STARTS
2732:
2733: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2734: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2735: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2736: RAISE OKC_API.G_EXCEPTION_ERROR;
2737: END IF;
2738:
2739: --USER HOOK CALL FOR AFTER, STARTS
2740: okc_util.call_user_hook(x_return_status => x_return_status,
2740: okc_util.call_user_hook(x_return_status => x_return_status,
2741: p_package_name => g_pkg_name,
2742: p_procedure_name => l_api_name,
2743: p_before_after => 'A');
2744: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2741: p_package_name => g_pkg_name,
2742: p_procedure_name => l_api_name,
2743: p_before_after => 'A');
2744: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749: --USER HOOK CALL FOR AFTER, ENDS
2742: p_procedure_name => l_api_name,
2743: p_before_after => 'A');
2744: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749: --USER HOOK CALL FOR AFTER, ENDS
2750:
2743: p_before_after => 'A');
2744: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749: --USER HOOK CALL FOR AFTER, ENDS
2750:
2751: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749: --USER HOOK CALL FOR AFTER, ENDS
2750:
2751: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2752:
2753: EXCEPTION
2754: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2755: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2750:
2751: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2752:
2753: EXCEPTION
2754: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2755: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2756: (
2757: l_api_name,
2758: G_PKG_NAME,
2751: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2752:
2753: EXCEPTION
2754: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2755: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2756: (
2757: l_api_name,
2758: G_PKG_NAME,
2759: 'OKC_API.G_RET_STS_ERROR',
2755: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2756: (
2757: l_api_name,
2758: G_PKG_NAME,
2759: 'OKC_API.G_RET_STS_ERROR',
2760: x_msg_count,
2761: x_msg_data,
2762: '_PUB'
2763: );
2761: x_msg_data,
2762: '_PUB'
2763: );
2764:
2765: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2766: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2767: (
2768: l_api_name,
2769: G_PKG_NAME,
2762: '_PUB'
2763: );
2764:
2765: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2766: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2767: (
2768: l_api_name,
2769: G_PKG_NAME,
2770: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2766: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2767: (
2768: l_api_name,
2769: G_PKG_NAME,
2770: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2771: x_msg_count,
2772: x_msg_data,
2773: '_PUB'
2774: );
2773: '_PUB'
2774: );
2775:
2776: WHEN OTHERS THEN
2777: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2778: (
2779: l_api_name,
2780: G_PKG_NAME,
2781: 'OTHERS',
2791: x_msg_count OUT NOCOPY NUMBER,
2792: x_msg_data OUT NOCOPY VARCHAR2,
2793: p_aavv_tbl IN aavv_tbl_type) IS
2794:
2795: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2796: i NUMBER := 0;
2797: BEGIN
2798: --Initialize the return status
2799: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2795: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2796: i NUMBER := 0;
2797: BEGIN
2798: --Initialize the return status
2799: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2800:
2801: IF p_aavv_tbl.COUNT > 0 THEN
2802: i := p_aavv_tbl.FIRST;
2803: LOOP
2807: l_return_status,
2808: x_msg_count,
2809: x_msg_data,
2810: p_aavv_tbl(i));
2811: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2812: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2813: x_return_status := l_return_status;
2814: raise G_EXCEPTION_HALT_VALIDATION;
2815: ELSE
2808: x_msg_count,
2809: x_msg_data,
2810: p_aavv_tbl(i));
2811: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2812: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2813: x_return_status := l_return_status;
2814: raise G_EXCEPTION_HALT_VALIDATION;
2815: ELSE
2816: x_return_status := l_return_status;
2824: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2825: NULL;
2826:
2827: WHEN OTHERS THEN
2828: OKC_API.set_message(p_app_name => g_app_name,
2829: p_msg_name => g_unexpected_error,
2830: p_token1 => g_sqlcode_token,
2831: p_token1_value => sqlcode,
2832: p_token2 => g_sqlerrm_token,
2830: p_token1 => g_sqlcode_token,
2831: p_token1_value => sqlcode,
2832: p_token2 => g_sqlerrm_token,
2833: p_token2_value => sqlerrm);
2834: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2835: END validate_act_att_vals;
2836:
2837: --Procedures for Action Attribute Lookups
2838:
2845: x_aalv_rec OUT NOCOPY aalv_rec_type) IS
2846:
2847: l_api_name CONSTANT VARCHAR2(30) := 'create_act_att_lkps';
2848: l_api_version CONSTANT NUMBER := 1.0;
2849: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2850: l_aalv_rec aalv_rec_type := p_aalv_rec;
2851: BEGIN
2852: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2853: g_pkg_name,
2848: l_api_version CONSTANT NUMBER := 1.0;
2849: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2850: l_aalv_rec aalv_rec_type := p_aalv_rec;
2851: BEGIN
2852: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2853: g_pkg_name,
2854: p_init_msg_list,
2855: l_api_version,
2856: p_api_version,
2856: p_api_version,
2857: '_PUB',
2858: x_return_status);
2859:
2860: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2861: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2862: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2863: RAISE OKC_API.G_EXCEPTION_ERROR;
2864: END IF;
2857: '_PUB',
2858: x_return_status);
2859:
2860: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2861: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2862: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2863: RAISE OKC_API.G_EXCEPTION_ERROR;
2864: END IF;
2865:
2858: x_return_status);
2859:
2860: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2861: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2862: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2863: RAISE OKC_API.G_EXCEPTION_ERROR;
2864: END IF;
2865:
2866: -- USER HOOK CALL FOR BEFORE, STARTS
2859:
2860: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2861: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2862: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2863: RAISE OKC_API.G_EXCEPTION_ERROR;
2864: END IF;
2865:
2866: -- USER HOOK CALL FOR BEFORE, STARTS
2867: g_aalv_rec := l_aalv_rec;
2870: p_package_name => g_pkg_name,
2871: p_procedure_name => l_api_name,
2872: p_before_after => 'B');
2873:
2874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2877: RAISE OKC_API.G_EXCEPTION_ERROR;
2878: END IF;
2871: p_procedure_name => l_api_name,
2872: p_before_after => 'B');
2873:
2874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2877: RAISE OKC_API.G_EXCEPTION_ERROR;
2878: END IF;
2879:
2872: p_before_after => 'B');
2873:
2874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2877: RAISE OKC_API.G_EXCEPTION_ERROR;
2878: END IF;
2879:
2880: --get values back from hook call
2873:
2874: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2875: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2876: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2877: RAISE OKC_API.G_EXCEPTION_ERROR;
2878: END IF;
2879:
2880: --get values back from hook call
2881: l_aalv_rec := migrate_aalv(l_aalv_rec, g_aalv_rec);
2887: x_msg_count => x_msg_count,
2888: x_msg_data => x_msg_data,
2889: p_aalv_rec => l_aalv_rec,
2890: x_aalv_rec => x_aalv_rec);
2891: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2892: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2893: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2894: RAISE OKC_API.G_EXCEPTION_ERROR;
2895: END IF;
2888: x_msg_data => x_msg_data,
2889: p_aalv_rec => l_aalv_rec,
2890: x_aalv_rec => x_aalv_rec);
2891: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2892: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2893: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2894: RAISE OKC_API.G_EXCEPTION_ERROR;
2895: END IF;
2896:
2889: p_aalv_rec => l_aalv_rec,
2890: x_aalv_rec => x_aalv_rec);
2891: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2892: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2893: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2894: RAISE OKC_API.G_EXCEPTION_ERROR;
2895: END IF;
2896:
2897: --USER HOOK CALL FOR AFTER, STARTS
2890: x_aalv_rec => x_aalv_rec);
2891: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2892: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2893: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2894: RAISE OKC_API.G_EXCEPTION_ERROR;
2895: END IF;
2896:
2897: --USER HOOK CALL FOR AFTER, STARTS
2898: g_aalv_rec := x_aalv_rec;
2901: p_package_name => g_pkg_name,
2902: p_procedure_name => l_api_name,
2903: p_before_after => 'A');
2904:
2905: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2906: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2907: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2908: RAISE OKC_API.G_EXCEPTION_ERROR;
2909: END IF;
2902: p_procedure_name => l_api_name,
2903: p_before_after => 'A');
2904:
2905: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2906: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2907: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2908: RAISE OKC_API.G_EXCEPTION_ERROR;
2909: END IF;
2910: --USER HOOK CALL FOR AFTER, ENDS
2903: p_before_after => 'A');
2904:
2905: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2906: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2907: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2908: RAISE OKC_API.G_EXCEPTION_ERROR;
2909: END IF;
2910: --USER HOOK CALL FOR AFTER, ENDS
2911:
2904:
2905: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2906: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2907: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
2908: RAISE OKC_API.G_EXCEPTION_ERROR;
2909: END IF;
2910: --USER HOOK CALL FOR AFTER, ENDS
2911:
2912: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2908: RAISE OKC_API.G_EXCEPTION_ERROR;
2909: END IF;
2910: --USER HOOK CALL FOR AFTER, ENDS
2911:
2912: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2913:
2914: EXCEPTION
2915: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2916: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2911:
2912: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2913:
2914: EXCEPTION
2915: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2916: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2917: (
2918: l_api_name,
2919: G_PKG_NAME,
2912: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2913:
2914: EXCEPTION
2915: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2916: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2917: (
2918: l_api_name,
2919: G_PKG_NAME,
2920: 'OKC_API.G_RET_STS_ERROR',
2916: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2917: (
2918: l_api_name,
2919: G_PKG_NAME,
2920: 'OKC_API.G_RET_STS_ERROR',
2921: x_msg_count,
2922: x_msg_data,
2923: '_PUB'
2924: );
2922: x_msg_data,
2923: '_PUB'
2924: );
2925:
2926: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2927: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2928: (
2929: l_api_name,
2930: G_PKG_NAME,
2923: '_PUB'
2924: );
2925:
2926: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2927: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2928: (
2929: l_api_name,
2930: G_PKG_NAME,
2931: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2927: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2928: (
2929: l_api_name,
2930: G_PKG_NAME,
2931: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2932: x_msg_count,
2933: x_msg_data,
2934: '_PUB'
2935: );
2934: '_PUB'
2935: );
2936:
2937: WHEN OTHERS THEN
2938: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2939: (
2940: l_api_name,
2941: G_PKG_NAME,
2942: 'OTHERS',
2953: x_msg_data OUT NOCOPY VARCHAR2,
2954: p_aalv_tbl IN aalv_tbl_type,
2955: x_aalv_tbl OUT NOCOPY aalv_tbl_type) IS
2956:
2957: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2958: i NUMBER := 0;
2959: BEGIN
2960: --Initialize the return status
2961: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2957: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2958: i NUMBER := 0;
2959: BEGIN
2960: --Initialize the return status
2961: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2962:
2963: IF p_aalv_tbl.COUNT > 0 THEN
2964: i := p_aalv_tbl.FIRST;
2965: LOOP
2970: x_msg_count,
2971: x_msg_data,
2972: p_aalv_tbl(i),
2973: x_aalv_tbl(i));
2974: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2975: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2976: x_return_status := l_return_status;
2977: raise G_EXCEPTION_HALT_VALIDATION;
2978: ELSE
2971: x_msg_data,
2972: p_aalv_tbl(i),
2973: x_aalv_tbl(i));
2974: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2975: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2976: x_return_status := l_return_status;
2977: raise G_EXCEPTION_HALT_VALIDATION;
2978: ELSE
2979: x_return_status := l_return_status;
2987: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2988: NULL;
2989:
2990: WHEN OTHERS THEN
2991: OKC_API.set_message(p_app_name => g_app_name,
2992: p_msg_name => g_unexpected_error,
2993: p_token1 => g_sqlcode_token,
2994: p_token1_value => sqlcode,
2995: p_token2 => g_sqlerrm_token,
2993: p_token1 => g_sqlcode_token,
2994: p_token1_value => sqlcode,
2995: p_token2 => g_sqlerrm_token,
2996: p_token2_value => sqlerrm);
2997: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2998: END create_act_att_lkps;
2999:
3000: PROCEDURE lock_act_att_lkps(p_api_version IN NUMBER,
3001: p_init_msg_list IN VARCHAR2 ,
3004: x_msg_data OUT NOCOPY VARCHAR2,
3005: p_aalv_rec IN aalv_rec_type) IS
3006: l_api_name CONSTANT VARCHAR2(30) := 'delete_act_att_lkps';
3007: l_api_version CONSTANT NUMBER := 1.0;
3008: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3009: l_aalv_rec aalv_rec_type := p_aalv_rec;
3010: BEGIN
3011: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3012: g_pkg_name,
3007: l_api_version CONSTANT NUMBER := 1.0;
3008: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3009: l_aalv_rec aalv_rec_type := p_aalv_rec;
3010: BEGIN
3011: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3012: g_pkg_name,
3013: p_init_msg_list,
3014: l_api_version,
3015: p_api_version,
3015: p_api_version,
3016: '_PUB',
3017: x_return_status);
3018:
3019: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3020: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3021: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3022: RAISE OKC_API.G_EXCEPTION_ERROR;
3023: END IF;
3016: '_PUB',
3017: x_return_status);
3018:
3019: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3020: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3021: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3022: RAISE OKC_API.G_EXCEPTION_ERROR;
3023: END IF;
3024:
3017: x_return_status);
3018:
3019: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3020: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3021: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3022: RAISE OKC_API.G_EXCEPTION_ERROR;
3023: END IF;
3024:
3025: -- Call to procedure of complex API
3018:
3019: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3020: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3021: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3022: RAISE OKC_API.G_EXCEPTION_ERROR;
3023: END IF;
3024:
3025: -- Call to procedure of complex API
3026: okc_conditions_pvt.lock_act_att_lkps(p_api_version => p_api_version,
3029: x_msg_count => x_msg_count,
3030: x_msg_data => x_msg_data,
3031: p_aalv_rec => l_aalv_rec);
3032:
3033: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3034: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3035: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3036: RAISE OKC_API.G_EXCEPTION_ERROR;
3037: END IF;
3030: x_msg_data => x_msg_data,
3031: p_aalv_rec => l_aalv_rec);
3032:
3033: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3034: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3035: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3036: RAISE OKC_API.G_EXCEPTION_ERROR;
3037: END IF;
3038:
3031: p_aalv_rec => l_aalv_rec);
3032:
3033: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3034: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3035: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3036: RAISE OKC_API.G_EXCEPTION_ERROR;
3037: END IF;
3038:
3039: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3032:
3033: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3034: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3035: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3036: RAISE OKC_API.G_EXCEPTION_ERROR;
3037: END IF;
3038:
3039: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3040:
3035: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3036: RAISE OKC_API.G_EXCEPTION_ERROR;
3037: END IF;
3038:
3039: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3040:
3041: EXCEPTION
3042: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3043: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3038:
3039: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3040:
3041: EXCEPTION
3042: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3043: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3044: (
3045: l_api_name,
3046: G_PKG_NAME,
3039: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3040:
3041: EXCEPTION
3042: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3043: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3044: (
3045: l_api_name,
3046: G_PKG_NAME,
3047: 'OKC_API.G_RET_STS_ERROR',
3043: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3044: (
3045: l_api_name,
3046: G_PKG_NAME,
3047: 'OKC_API.G_RET_STS_ERROR',
3048: x_msg_count,
3049: x_msg_data,
3050: '_PUB'
3051: );
3049: x_msg_data,
3050: '_PUB'
3051: );
3052:
3053: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3054: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3055: (
3056: l_api_name,
3057: G_PKG_NAME,
3050: '_PUB'
3051: );
3052:
3053: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3054: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3055: (
3056: l_api_name,
3057: G_PKG_NAME,
3058: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3054: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3055: (
3056: l_api_name,
3057: G_PKG_NAME,
3058: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3059: x_msg_count,
3060: x_msg_data,
3061: '_PUB'
3062: );
3061: '_PUB'
3062: );
3063:
3064: WHEN OTHERS THEN
3065: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3066: (
3067: l_api_name,
3068: G_PKG_NAME,
3069: 'OTHERS',
3078: x_return_status OUT NOCOPY VARCHAR2,
3079: x_msg_count OUT NOCOPY NUMBER,
3080: x_msg_data OUT NOCOPY VARCHAR2,
3081: p_aalv_tbl IN aalv_tbl_type) IS
3082: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3083: i NUMBER := 0;
3084: BEGIN
3085: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3086: IF p_aalv_tbl.COUNT > 0 THEN
3081: p_aalv_tbl IN aalv_tbl_type) IS
3082: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3083: i NUMBER := 0;
3084: BEGIN
3085: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3086: IF p_aalv_tbl.COUNT > 0 THEN
3087: i := p_aalv_tbl.FIRST;
3088: LOOP
3089: lock_act_att_lkps(
3092: l_return_status,
3093: x_msg_count,
3094: x_msg_data,
3095: p_aalv_tbl(i));
3096: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3097: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3098: x_return_status := l_return_status;
3099: raise G_EXCEPTION_HALT_VALIDATION;
3100: ELSE
3093: x_msg_count,
3094: x_msg_data,
3095: p_aalv_tbl(i));
3096: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3097: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3098: x_return_status := l_return_status;
3099: raise G_EXCEPTION_HALT_VALIDATION;
3100: ELSE
3101: x_return_status := l_return_status;
3109: WHEN G_EXCEPTION_HALT_VALIDATION THEN
3110: NULL;
3111:
3112: WHEN OTHERS THEN
3113: OKC_API.set_message(p_app_name => g_app_name,
3114: p_msg_name => g_unexpected_error,
3115: p_token1 => g_sqlcode_token,
3116: p_token1_value => sqlcode,
3117: p_token2 => g_sqlerrm_token,
3115: p_token1 => g_sqlcode_token,
3116: p_token1_value => sqlcode,
3117: p_token2 => g_sqlerrm_token,
3118: p_token2_value => sqlerrm);
3119: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3120: End lock_act_att_lkps;
3121:
3122: PROCEDURE update_act_att_lkps(p_api_version IN NUMBER,
3123: p_init_msg_list IN VARCHAR2 ,
3128: x_aalv_rec OUT NOCOPY aalv_rec_type) IS
3129:
3130: l_api_name CONSTANT VARCHAR2(30) := 'update_act_att_lkps';
3131: l_api_version CONSTANT NUMBER := 1.0;
3132: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3133: l_aalv_rec aalv_rec_type := p_aalv_rec;
3134: BEGIN
3135: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3136: g_pkg_name,
3131: l_api_version CONSTANT NUMBER := 1.0;
3132: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3133: l_aalv_rec aalv_rec_type := p_aalv_rec;
3134: BEGIN
3135: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3136: g_pkg_name,
3137: p_init_msg_list,
3138: l_api_version,
3139: p_api_version,
3138: l_api_version,
3139: p_api_version,
3140: '_PUB',
3141: x_return_status);
3142: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3143: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3144: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3145: RAISE OKC_API.G_EXCEPTION_ERROR;
3146: END IF;
3139: p_api_version,
3140: '_PUB',
3141: x_return_status);
3142: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3143: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3144: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3145: RAISE OKC_API.G_EXCEPTION_ERROR;
3146: END IF;
3147:
3140: '_PUB',
3141: x_return_status);
3142: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3143: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3144: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3145: RAISE OKC_API.G_EXCEPTION_ERROR;
3146: END IF;
3147:
3148: -- USER HOOK CALL FOR BEFORE, STARTS
3141: x_return_status);
3142: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3143: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3144: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3145: RAISE OKC_API.G_EXCEPTION_ERROR;
3146: END IF;
3147:
3148: -- USER HOOK CALL FOR BEFORE, STARTS
3149: g_aalv_rec := l_aalv_rec;
3151: okc_util.call_user_hook(x_return_status => x_return_status,
3152: p_package_name => g_pkg_name,
3153: p_procedure_name => l_api_name,
3154: p_before_after => 'B');
3155: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3156: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3157: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3158: RAISE OKC_API.G_EXCEPTION_ERROR;
3159: END IF;
3152: p_package_name => g_pkg_name,
3153: p_procedure_name => l_api_name,
3154: p_before_after => 'B');
3155: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3156: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3157: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3158: RAISE OKC_API.G_EXCEPTION_ERROR;
3159: END IF;
3160:
3153: p_procedure_name => l_api_name,
3154: p_before_after => 'B');
3155: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3156: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3157: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3158: RAISE OKC_API.G_EXCEPTION_ERROR;
3159: END IF;
3160:
3161: --get values back from hook call
3154: p_before_after => 'B');
3155: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3156: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3157: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3158: RAISE OKC_API.G_EXCEPTION_ERROR;
3159: END IF;
3160:
3161: --get values back from hook call
3162: l_aalv_rec := migrate_aalv(l_aalv_rec, g_aalv_rec);
3169: x_msg_data => x_msg_data,
3170: p_aalv_rec => l_aalv_rec,
3171: x_aalv_rec => x_aalv_rec);
3172:
3173: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3174: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3175: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3176: RAISE OKC_API.G_EXCEPTION_ERROR;
3177: END IF;
3170: p_aalv_rec => l_aalv_rec,
3171: x_aalv_rec => x_aalv_rec);
3172:
3173: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3174: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3175: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3176: RAISE OKC_API.G_EXCEPTION_ERROR;
3177: END IF;
3178:
3171: x_aalv_rec => x_aalv_rec);
3172:
3173: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3174: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3175: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3176: RAISE OKC_API.G_EXCEPTION_ERROR;
3177: END IF;
3178:
3179: --USER HOOK CALL FOR AFTER, STARTS
3172:
3173: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3174: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3175: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3176: RAISE OKC_API.G_EXCEPTION_ERROR;
3177: END IF;
3178:
3179: --USER HOOK CALL FOR AFTER, STARTS
3180: g_aalv_rec := x_aalv_rec;
3182: okc_util.call_user_hook(x_return_status => x_return_status,
3183: p_package_name => g_pkg_name,
3184: p_procedure_name => l_api_name,
3185: p_before_after => 'A');
3186: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3187: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3188: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3189: RAISE OKC_API.G_EXCEPTION_ERROR;
3190: END IF;
3183: p_package_name => g_pkg_name,
3184: p_procedure_name => l_api_name,
3185: p_before_after => 'A');
3186: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3187: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3188: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3189: RAISE OKC_API.G_EXCEPTION_ERROR;
3190: END IF;
3191: --USER HOOK CALL FOR AFTER, ENDS
3184: p_procedure_name => l_api_name,
3185: p_before_after => 'A');
3186: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3187: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3188: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3189: RAISE OKC_API.G_EXCEPTION_ERROR;
3190: END IF;
3191: --USER HOOK CALL FOR AFTER, ENDS
3192:
3185: p_before_after => 'A');
3186: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3187: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3188: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3189: RAISE OKC_API.G_EXCEPTION_ERROR;
3190: END IF;
3191: --USER HOOK CALL FOR AFTER, ENDS
3192:
3193: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3189: RAISE OKC_API.G_EXCEPTION_ERROR;
3190: END IF;
3191: --USER HOOK CALL FOR AFTER, ENDS
3192:
3193: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3194:
3195: EXCEPTION
3196: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3197: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3192:
3193: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3194:
3195: EXCEPTION
3196: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3197: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3198: (
3199: l_api_name,
3200: G_PKG_NAME,
3193: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3194:
3195: EXCEPTION
3196: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3197: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3198: (
3199: l_api_name,
3200: G_PKG_NAME,
3201: 'OKC_API.G_RET_STS_ERROR',
3197: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3198: (
3199: l_api_name,
3200: G_PKG_NAME,
3201: 'OKC_API.G_RET_STS_ERROR',
3202: x_msg_count,
3203: x_msg_data,
3204: '_PUB'
3205: );
3203: x_msg_data,
3204: '_PUB'
3205: );
3206:
3207: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3208: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3209: (
3210: l_api_name,
3211: G_PKG_NAME,
3204: '_PUB'
3205: );
3206:
3207: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3208: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3209: (
3210: l_api_name,
3211: G_PKG_NAME,
3212: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3208: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3209: (
3210: l_api_name,
3211: G_PKG_NAME,
3212: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3213: x_msg_count,
3214: x_msg_data,
3215: '_PUB'
3216: );
3215: '_PUB'
3216: );
3217:
3218: WHEN OTHERS THEN
3219: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3220: (
3221: l_api_name,
3222: G_PKG_NAME,
3223: 'OTHERS',
3234: x_msg_data OUT NOCOPY VARCHAR2,
3235: p_aalv_tbl IN aalv_tbl_type,
3236: x_aalv_tbl OUT NOCOPY aalv_tbl_type) IS
3237:
3238: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3239: i NUMBER := 0;
3240: BEGIN
3241: --Initialize the return status
3242: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3238: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3239: i NUMBER := 0;
3240: BEGIN
3241: --Initialize the return status
3242: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3243:
3244: IF p_aalv_tbl.COUNT > 0 THEN
3245: i := p_aalv_tbl.FIRST;
3246: LOOP
3251: x_msg_count,
3252: x_msg_data,
3253: p_aalv_tbl(i),
3254: x_aalv_tbl(i));
3255: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3256: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3257: x_return_status := l_return_status;
3258: raise G_EXCEPTION_HALT_VALIDATION;
3259: ELSE
3252: x_msg_data,
3253: p_aalv_tbl(i),
3254: x_aalv_tbl(i));
3255: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3256: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3257: x_return_status := l_return_status;
3258: raise G_EXCEPTION_HALT_VALIDATION;
3259: ELSE
3260: x_return_status := l_return_status;
3268: WHEN G_EXCEPTION_HALT_VALIDATION THEN
3269: NULL;
3270:
3271: WHEN OTHERS THEN
3272: OKC_API.set_message(p_app_name => g_app_name,
3273: p_msg_name => g_unexpected_error,
3274: p_token1 => g_sqlcode_token,
3275: p_token1_value => sqlcode,
3276: p_token2 => g_sqlerrm_token,
3274: p_token1 => g_sqlcode_token,
3275: p_token1_value => sqlcode,
3276: p_token2 => g_sqlerrm_token,
3277: p_token2_value => sqlerrm);
3278: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3279: END update_act_att_lkps;
3280:
3281: PROCEDURE delete_act_att_lkps(p_api_version IN NUMBER,
3282: p_init_msg_list IN VARCHAR2 ,
3286: p_aalv_rec IN aalv_rec_type) IS
3287:
3288: l_api_name CONSTANT VARCHAR2(30) := 'delete_act_att_lkps';
3289: l_api_version CONSTANT NUMBER := 1.0;
3290: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3291: l_aalv_rec aalv_rec_type := p_aalv_rec;
3292: BEGIN
3293: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3294: g_pkg_name,
3289: l_api_version CONSTANT NUMBER := 1.0;
3290: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3291: l_aalv_rec aalv_rec_type := p_aalv_rec;
3292: BEGIN
3293: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3294: g_pkg_name,
3295: p_init_msg_list,
3296: l_api_version,
3297: p_api_version,
3297: p_api_version,
3298: '_PUB',
3299: x_return_status);
3300:
3301: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3302: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3303: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3304: RAISE OKC_API.G_EXCEPTION_ERROR;
3305: END IF;
3298: '_PUB',
3299: x_return_status);
3300:
3301: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3302: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3303: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3304: RAISE OKC_API.G_EXCEPTION_ERROR;
3305: END IF;
3306:
3299: x_return_status);
3300:
3301: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3302: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3303: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3304: RAISE OKC_API.G_EXCEPTION_ERROR;
3305: END IF;
3306:
3307: -- USER HOOK CALL FOR BEFORE, STARTS
3300:
3301: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3302: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3303: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3304: RAISE OKC_API.G_EXCEPTION_ERROR;
3305: END IF;
3306:
3307: -- USER HOOK CALL FOR BEFORE, STARTS
3308: g_aalv_rec := l_aalv_rec;
3310: okc_util.call_user_hook(x_return_status => x_return_status,
3311: p_package_name => g_pkg_name,
3312: p_procedure_name => l_api_name,
3313: p_before_after => 'B');
3314: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3315: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3316: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3317: RAISE OKC_API.G_EXCEPTION_ERROR;
3318: END IF;
3311: p_package_name => g_pkg_name,
3312: p_procedure_name => l_api_name,
3313: p_before_after => 'B');
3314: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3315: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3316: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3317: RAISE OKC_API.G_EXCEPTION_ERROR;
3318: END IF;
3319:
3312: p_procedure_name => l_api_name,
3313: p_before_after => 'B');
3314: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3315: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3316: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3317: RAISE OKC_API.G_EXCEPTION_ERROR;
3318: END IF;
3319:
3320: --get values back from hook call
3313: p_before_after => 'B');
3314: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3315: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3316: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3317: RAISE OKC_API.G_EXCEPTION_ERROR;
3318: END IF;
3319:
3320: --get values back from hook call
3321: l_aalv_rec := migrate_aalv(l_aalv_rec, g_aalv_rec);
3326: x_return_status => x_return_status,
3327: x_msg_count => x_msg_count,
3328: x_msg_data => x_msg_data,
3329: p_aalv_rec => l_aalv_rec);
3330: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3331: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3332: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3333: RAISE OKC_API.G_EXCEPTION_ERROR;
3334: END IF;
3327: x_msg_count => x_msg_count,
3328: x_msg_data => x_msg_data,
3329: p_aalv_rec => l_aalv_rec);
3330: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3331: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3332: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3333: RAISE OKC_API.G_EXCEPTION_ERROR;
3334: END IF;
3335:
3328: x_msg_data => x_msg_data,
3329: p_aalv_rec => l_aalv_rec);
3330: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3331: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3332: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3333: RAISE OKC_API.G_EXCEPTION_ERROR;
3334: END IF;
3335:
3336: --USER HOOK CALL FOR AFTER, STARTS
3329: p_aalv_rec => l_aalv_rec);
3330: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3331: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3332: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3333: RAISE OKC_API.G_EXCEPTION_ERROR;
3334: END IF;
3335:
3336: --USER HOOK CALL FOR AFTER, STARTS
3337: okc_util.call_user_hook(x_return_status => x_return_status,
3338: p_package_name => g_pkg_name,
3339: p_procedure_name => l_api_name,
3340: p_before_after => 'A');
3341:
3342: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3344: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3339: p_procedure_name => l_api_name,
3340: p_before_after => 'A');
3341:
3342: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3344: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3347: --USER HOOK CALL FOR AFTER, ENDS
3340: p_before_after => 'A');
3341:
3342: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3344: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3347: --USER HOOK CALL FOR AFTER, ENDS
3348:
3341:
3342: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3343: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3344: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3347: --USER HOOK CALL FOR AFTER, ENDS
3348:
3349: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3345: RAISE OKC_API.G_EXCEPTION_ERROR;
3346: END IF;
3347: --USER HOOK CALL FOR AFTER, ENDS
3348:
3349: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3350: EXCEPTION
3351: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3352: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3353: (
3347: --USER HOOK CALL FOR AFTER, ENDS
3348:
3349: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3350: EXCEPTION
3351: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3352: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3353: (
3354: l_api_name,
3355: G_PKG_NAME,
3348:
3349: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3350: EXCEPTION
3351: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3352: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3353: (
3354: l_api_name,
3355: G_PKG_NAME,
3356: 'OKC_API.G_RET_STS_ERROR',
3352: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3353: (
3354: l_api_name,
3355: G_PKG_NAME,
3356: 'OKC_API.G_RET_STS_ERROR',
3357: x_msg_count,
3358: x_msg_data,
3359: '_PUB'
3360: );
3358: x_msg_data,
3359: '_PUB'
3360: );
3361:
3362: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3363: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3364: (
3365: l_api_name,
3366: G_PKG_NAME,
3359: '_PUB'
3360: );
3361:
3362: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3363: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3364: (
3365: l_api_name,
3366: G_PKG_NAME,
3367: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3363: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3364: (
3365: l_api_name,
3366: G_PKG_NAME,
3367: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3368: x_msg_count,
3369: x_msg_data,
3370: '_PUB'
3371: );
3370: '_PUB'
3371: );
3372:
3373: WHEN OTHERS THEN
3374: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3375: (
3376: l_api_name,
3377: G_PKG_NAME,
3378: 'OTHERS',
3388: x_msg_count OUT NOCOPY NUMBER,
3389: x_msg_data OUT NOCOPY VARCHAR2,
3390: p_aalv_tbl IN aalv_tbl_type) IS
3391:
3392: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3393: i NUMBER := 0;
3394: BEGIN
3395: --Initialize the return status
3396: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3392: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3393: i NUMBER := 0;
3394: BEGIN
3395: --Initialize the return status
3396: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3397:
3398: IF p_aalv_tbl.COUNT > 0 THEN
3399: i := p_aalv_tbl.FIRST;
3400: LOOP
3404: x_return_status,
3405: x_msg_count,
3406: x_msg_data,
3407: p_aalv_tbl(i));
3408: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3409: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
3410: l_return_status := x_return_status;
3411: RAISE G_EXCEPTION_HALT_VALIDATION;
3412: ELSE
3405: x_msg_count,
3406: x_msg_data,
3407: p_aalv_tbl(i));
3408: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3409: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
3410: l_return_status := x_return_status;
3411: RAISE G_EXCEPTION_HALT_VALIDATION;
3412: ELSE
3413: l_return_status := x_return_status; -- record that there was an error
3421: WHEN G_EXCEPTION_HALT_VALIDATION THEN
3422: NULL;
3423:
3424: WHEN OTHERS THEN
3425: OKC_API.set_message(p_app_name => g_app_name,
3426: p_msg_name => g_unexpected_error,
3427: p_token1 => g_sqlcode_token,
3428: p_token1_value => sqlcode,
3429: p_token2 => g_sqlerrm_token,
3427: p_token1 => g_sqlcode_token,
3428: p_token1_value => sqlcode,
3429: p_token2 => g_sqlerrm_token,
3430: p_token2_value => sqlerrm);
3431: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3432: END delete_act_att_lkps;
3433:
3434: PROCEDURE validate_act_att_lkps(p_api_version IN NUMBER,
3435: p_init_msg_list IN VARCHAR2 ,
3439: p_aalv_rec IN aalv_rec_type) IS
3440:
3441: l_api_name CONSTANT VARCHAR2(30) := 'validate_act_att_lkps';
3442: l_api_version CONSTANT NUMBER := 1.0;
3443: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3444: l_aalv_rec aalv_rec_type := p_aalv_rec;
3445: BEGIN
3446: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3447: g_pkg_name,
3442: l_api_version CONSTANT NUMBER := 1.0;
3443: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3444: l_aalv_rec aalv_rec_type := p_aalv_rec;
3445: BEGIN
3446: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3447: g_pkg_name,
3448: p_init_msg_list,
3449: l_api_version,
3450: p_api_version,
3450: p_api_version,
3451: '_PUB',
3452: x_return_status);
3453:
3454: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3455: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3456: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3457: RAISE OKC_API.G_EXCEPTION_ERROR;
3458: END IF;
3451: '_PUB',
3452: x_return_status);
3453:
3454: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3455: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3456: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3457: RAISE OKC_API.G_EXCEPTION_ERROR;
3458: END IF;
3459:
3452: x_return_status);
3453:
3454: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3455: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3456: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3457: RAISE OKC_API.G_EXCEPTION_ERROR;
3458: END IF;
3459:
3460: -- USER HOOK CALL FOR BEFORE, STARTS
3453:
3454: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3455: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3456: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3457: RAISE OKC_API.G_EXCEPTION_ERROR;
3458: END IF;
3459:
3460: -- USER HOOK CALL FOR BEFORE, STARTS
3461: g_aalv_rec := l_aalv_rec;
3463: okc_util.call_user_hook(x_return_status => x_return_status,
3464: p_package_name => g_pkg_name,
3465: p_procedure_name => l_api_name,
3466: p_before_after => 'B');
3467: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3468: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3469: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3470: RAISE OKC_API.G_EXCEPTION_ERROR;
3471: END IF;
3464: p_package_name => g_pkg_name,
3465: p_procedure_name => l_api_name,
3466: p_before_after => 'B');
3467: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3468: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3469: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3470: RAISE OKC_API.G_EXCEPTION_ERROR;
3471: END IF;
3472:
3465: p_procedure_name => l_api_name,
3466: p_before_after => 'B');
3467: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3468: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3469: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3470: RAISE OKC_API.G_EXCEPTION_ERROR;
3471: END IF;
3472:
3473: --get values back from hook call
3466: p_before_after => 'B');
3467: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3468: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3469: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3470: RAISE OKC_API.G_EXCEPTION_ERROR;
3471: END IF;
3472:
3473: --get values back from hook call
3474: l_aalv_rec := migrate_aalv(l_aalv_rec, g_aalv_rec);
3480: x_msg_count => x_msg_count,
3481: x_msg_data => x_msg_data,
3482: p_aalv_rec => l_aalv_rec);
3483:
3484: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3485: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3486: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3487: RAISE OKC_API.G_EXCEPTION_ERROR;
3488: END IF;
3481: x_msg_data => x_msg_data,
3482: p_aalv_rec => l_aalv_rec);
3483:
3484: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3485: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3486: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3487: RAISE OKC_API.G_EXCEPTION_ERROR;
3488: END IF;
3489:
3482: p_aalv_rec => l_aalv_rec);
3483:
3484: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3485: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3486: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3487: RAISE OKC_API.G_EXCEPTION_ERROR;
3488: END IF;
3489:
3490: --USER HOOK CALL FOR AFTER, STARTS
3483:
3484: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3485: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3486: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3487: RAISE OKC_API.G_EXCEPTION_ERROR;
3488: END IF;
3489:
3490: --USER HOOK CALL FOR AFTER, STARTS
3491: okc_util.call_user_hook(x_return_status => x_return_status,
3491: okc_util.call_user_hook(x_return_status => x_return_status,
3492: p_package_name => g_pkg_name,
3493: p_procedure_name => l_api_name,
3494: p_before_after => 'A');
3495: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3496: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3497: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3498: RAISE OKC_API.G_EXCEPTION_ERROR;
3499: END IF;
3492: p_package_name => g_pkg_name,
3493: p_procedure_name => l_api_name,
3494: p_before_after => 'A');
3495: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3496: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3497: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3498: RAISE OKC_API.G_EXCEPTION_ERROR;
3499: END IF;
3500: --USER HOOK CALL FOR AFTER, ENDS
3493: p_procedure_name => l_api_name,
3494: p_before_after => 'A');
3495: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3496: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3497: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3498: RAISE OKC_API.G_EXCEPTION_ERROR;
3499: END IF;
3500: --USER HOOK CALL FOR AFTER, ENDS
3501:
3494: p_before_after => 'A');
3495: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3496: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3497: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3498: RAISE OKC_API.G_EXCEPTION_ERROR;
3499: END IF;
3500: --USER HOOK CALL FOR AFTER, ENDS
3501:
3502: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3498: RAISE OKC_API.G_EXCEPTION_ERROR;
3499: END IF;
3500: --USER HOOK CALL FOR AFTER, ENDS
3501:
3502: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3503:
3504: EXCEPTION
3505: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3506: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3501:
3502: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3503:
3504: EXCEPTION
3505: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3506: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3507: (
3508: l_api_name,
3509: G_PKG_NAME,
3502: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3503:
3504: EXCEPTION
3505: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3506: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3507: (
3508: l_api_name,
3509: G_PKG_NAME,
3510: 'OKC_API.G_RET_STS_ERROR',
3506: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3507: (
3508: l_api_name,
3509: G_PKG_NAME,
3510: 'OKC_API.G_RET_STS_ERROR',
3511: x_msg_count,
3512: x_msg_data,
3513: '_PUB'
3514: );
3512: x_msg_data,
3513: '_PUB'
3514: );
3515:
3516: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3517: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3518: (
3519: l_api_name,
3520: G_PKG_NAME,
3513: '_PUB'
3514: );
3515:
3516: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3517: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3518: (
3519: l_api_name,
3520: G_PKG_NAME,
3521: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3517: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3518: (
3519: l_api_name,
3520: G_PKG_NAME,
3521: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3522: x_msg_count,
3523: x_msg_data,
3524: '_PUB'
3525: );
3524: '_PUB'
3525: );
3526:
3527: WHEN OTHERS THEN
3528: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3529: (
3530: l_api_name,
3531: G_PKG_NAME,
3532: 'OTHERS',
3542: x_msg_count OUT NOCOPY NUMBER,
3543: x_msg_data OUT NOCOPY VARCHAR2,
3544: p_aalv_tbl IN aalv_tbl_type) IS
3545:
3546: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3547: i NUMBER := 0;
3548: BEGIN
3549: --Initialize the return status
3550: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3546: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3547: i NUMBER := 0;
3548: BEGIN
3549: --Initialize the return status
3550: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3551:
3552: IF p_aalv_tbl.COUNT > 0 THEN
3553: i := p_aalv_tbl.FIRST;
3554: LOOP
3558: l_return_status,
3559: x_msg_count,
3560: x_msg_data,
3561: p_aalv_tbl(i));
3562: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3563: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3564: x_return_status := l_return_status;
3565: raise G_EXCEPTION_HALT_VALIDATION;
3566: ELSE
3559: x_msg_count,
3560: x_msg_data,
3561: p_aalv_tbl(i));
3562: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3563: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3564: x_return_status := l_return_status;
3565: raise G_EXCEPTION_HALT_VALIDATION;
3566: ELSE
3567: x_return_status := l_return_status;
3575: WHEN G_EXCEPTION_HALT_VALIDATION THEN
3576: NULL;
3577:
3578: WHEN OTHERS THEN
3579: OKC_API.set_message(p_app_name => g_app_name,
3580: p_msg_name => g_unexpected_error,
3581: p_token1 => g_sqlcode_token,
3582: p_token1_value => sqlcode,
3583: p_token2 => g_sqlerrm_token,
3581: p_token1 => g_sqlcode_token,
3582: p_token1_value => sqlcode,
3583: p_token2 => g_sqlerrm_token,
3584: p_token2_value => sqlerrm);
3585: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3586: END validate_act_att_lkps;
3587:
3588: --Procedures for Function Expression Parameters
3589:
3596: x_fepv_rec OUT NOCOPY fepv_rec_type) IS
3597:
3598: l_api_name CONSTANT VARCHAR2(30) := 'create_func_exprs';
3599: l_api_version CONSTANT NUMBER := 1.0;
3600: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3601: l_fepv_rec fepv_rec_type := p_fepv_rec;
3602: BEGIN
3603: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3604: g_pkg_name,
3599: l_api_version CONSTANT NUMBER := 1.0;
3600: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3601: l_fepv_rec fepv_rec_type := p_fepv_rec;
3602: BEGIN
3603: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3604: g_pkg_name,
3605: p_init_msg_list,
3606: l_api_version,
3607: p_api_version,
3607: p_api_version,
3608: '_PUB',
3609: x_return_status);
3610:
3611: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3612: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3613: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3614: RAISE OKC_API.G_EXCEPTION_ERROR;
3615: END IF;
3608: '_PUB',
3609: x_return_status);
3610:
3611: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3612: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3613: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3614: RAISE OKC_API.G_EXCEPTION_ERROR;
3615: END IF;
3616:
3609: x_return_status);
3610:
3611: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3612: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3613: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3614: RAISE OKC_API.G_EXCEPTION_ERROR;
3615: END IF;
3616:
3617: -- USER HOOK CALL FOR BEFORE, STARTS
3610:
3611: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3612: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3613: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3614: RAISE OKC_API.G_EXCEPTION_ERROR;
3615: END IF;
3616:
3617: -- USER HOOK CALL FOR BEFORE, STARTS
3618: g_fepv_rec := l_fepv_rec;
3621: p_package_name => g_pkg_name,
3622: p_procedure_name => l_api_name,
3623: p_before_after => 'B');
3624:
3625: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3626: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3627: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3628: RAISE OKC_API.G_EXCEPTION_ERROR;
3629: END IF;
3622: p_procedure_name => l_api_name,
3623: p_before_after => 'B');
3624:
3625: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3626: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3627: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3628: RAISE OKC_API.G_EXCEPTION_ERROR;
3629: END IF;
3630:
3623: p_before_after => 'B');
3624:
3625: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3626: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3627: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3628: RAISE OKC_API.G_EXCEPTION_ERROR;
3629: END IF;
3630:
3631: --get values back from hook call
3624:
3625: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3626: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3627: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3628: RAISE OKC_API.G_EXCEPTION_ERROR;
3629: END IF;
3630:
3631: --get values back from hook call
3632: l_fepv_rec := migrate_fepv(l_fepv_rec, g_fepv_rec);
3638: x_msg_count => x_msg_count,
3639: x_msg_data => x_msg_data,
3640: p_fepv_rec => l_fepv_rec,
3641: x_fepv_rec => x_fepv_rec);
3642: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3643: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3644: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3645: RAISE OKC_API.G_EXCEPTION_ERROR;
3646: END IF;
3639: x_msg_data => x_msg_data,
3640: p_fepv_rec => l_fepv_rec,
3641: x_fepv_rec => x_fepv_rec);
3642: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3643: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3644: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3645: RAISE OKC_API.G_EXCEPTION_ERROR;
3646: END IF;
3647:
3640: p_fepv_rec => l_fepv_rec,
3641: x_fepv_rec => x_fepv_rec);
3642: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3643: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3644: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3645: RAISE OKC_API.G_EXCEPTION_ERROR;
3646: END IF;
3647:
3648: --USER HOOK CALL FOR AFTER, STARTS
3641: x_fepv_rec => x_fepv_rec);
3642: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3643: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3644: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3645: RAISE OKC_API.G_EXCEPTION_ERROR;
3646: END IF;
3647:
3648: --USER HOOK CALL FOR AFTER, STARTS
3649: g_fepv_rec := x_fepv_rec;
3652: p_package_name => g_pkg_name,
3653: p_procedure_name => l_api_name,
3654: p_before_after => 'A');
3655:
3656: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3657: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3658: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3659: RAISE OKC_API.G_EXCEPTION_ERROR;
3660: END IF;
3653: p_procedure_name => l_api_name,
3654: p_before_after => 'A');
3655:
3656: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3657: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3658: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3659: RAISE OKC_API.G_EXCEPTION_ERROR;
3660: END IF;
3661: --USER HOOK CALL FOR AFTER, ENDS
3654: p_before_after => 'A');
3655:
3656: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3657: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3658: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3659: RAISE OKC_API.G_EXCEPTION_ERROR;
3660: END IF;
3661: --USER HOOK CALL FOR AFTER, ENDS
3662:
3655:
3656: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3657: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3658: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3659: RAISE OKC_API.G_EXCEPTION_ERROR;
3660: END IF;
3661: --USER HOOK CALL FOR AFTER, ENDS
3662:
3663: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3659: RAISE OKC_API.G_EXCEPTION_ERROR;
3660: END IF;
3661: --USER HOOK CALL FOR AFTER, ENDS
3662:
3663: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3664:
3665: EXCEPTION
3666: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3667: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3662:
3663: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3664:
3665: EXCEPTION
3666: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3667: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3668: (
3669: l_api_name,
3670: G_PKG_NAME,
3663: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3664:
3665: EXCEPTION
3666: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3667: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3668: (
3669: l_api_name,
3670: G_PKG_NAME,
3671: 'OKC_API.G_RET_STS_ERROR',
3667: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3668: (
3669: l_api_name,
3670: G_PKG_NAME,
3671: 'OKC_API.G_RET_STS_ERROR',
3672: x_msg_count,
3673: x_msg_data,
3674: '_PUB'
3675: );
3673: x_msg_data,
3674: '_PUB'
3675: );
3676:
3677: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3678: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3679: (
3680: l_api_name,
3681: G_PKG_NAME,
3674: '_PUB'
3675: );
3676:
3677: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3678: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3679: (
3680: l_api_name,
3681: G_PKG_NAME,
3682: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3678: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3679: (
3680: l_api_name,
3681: G_PKG_NAME,
3682: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3683: x_msg_count,
3684: x_msg_data,
3685: '_PUB'
3686: );
3685: '_PUB'
3686: );
3687:
3688: WHEN OTHERS THEN
3689: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3690: (
3691: l_api_name,
3692: G_PKG_NAME,
3693: 'OTHERS',
3704: x_msg_data OUT NOCOPY VARCHAR2,
3705: p_fepv_tbl IN fepv_tbl_type,
3706: x_fepv_tbl OUT NOCOPY fepv_tbl_type) IS
3707:
3708: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3709: i NUMBER := 0;
3710: BEGIN
3711: --Initialize the return status
3712: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3708: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3709: i NUMBER := 0;
3710: BEGIN
3711: --Initialize the return status
3712: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3713:
3714: IF p_fepv_tbl.COUNT > 0 THEN
3715: i := p_fepv_tbl.FIRST;
3716: LOOP
3721: x_msg_count,
3722: x_msg_data,
3723: p_fepv_tbl(i),
3724: x_fepv_tbl(i));
3725: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3726: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3727: x_return_status := l_return_status;
3728: raise G_EXCEPTION_HALT_VALIDATION;
3729: ELSE
3722: x_msg_data,
3723: p_fepv_tbl(i),
3724: x_fepv_tbl(i));
3725: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3726: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3727: x_return_status := l_return_status;
3728: raise G_EXCEPTION_HALT_VALIDATION;
3729: ELSE
3730: x_return_status := l_return_status;
3738: WHEN G_EXCEPTION_HALT_VALIDATION THEN
3739: NULL;
3740:
3741: WHEN OTHERS THEN
3742: OKC_API.set_message(p_app_name => g_app_name,
3743: p_msg_name => g_unexpected_error,
3744: p_token1 => g_sqlcode_token,
3745: p_token1_value => sqlcode,
3746: p_token2 => g_sqlerrm_token,
3744: p_token1 => g_sqlcode_token,
3745: p_token1_value => sqlcode,
3746: p_token2 => g_sqlerrm_token,
3747: p_token2_value => sqlerrm);
3748: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3749: END create_func_exprs;
3750:
3751: PROCEDURE lock_func_exprs(p_api_version IN NUMBER,
3752: p_init_msg_list IN VARCHAR2 ,
3755: x_msg_data OUT NOCOPY VARCHAR2,
3756: p_fepv_rec IN fepv_rec_type) IS
3757: l_api_name CONSTANT VARCHAR2(30) := 'lock_func_exprs';
3758: l_api_version CONSTANT NUMBER := 1.0;
3759: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3760: l_fepv_rec fepv_rec_type := p_fepv_rec;
3761: BEGIN
3762: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3763: g_pkg_name,
3758: l_api_version CONSTANT NUMBER := 1.0;
3759: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3760: l_fepv_rec fepv_rec_type := p_fepv_rec;
3761: BEGIN
3762: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3763: g_pkg_name,
3764: p_init_msg_list,
3765: l_api_version,
3766: p_api_version,
3766: p_api_version,
3767: '_PUB',
3768: x_return_status);
3769:
3770: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3771: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3772: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3773: RAISE OKC_API.G_EXCEPTION_ERROR;
3774: END IF;
3767: '_PUB',
3768: x_return_status);
3769:
3770: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3771: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3772: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3773: RAISE OKC_API.G_EXCEPTION_ERROR;
3774: END IF;
3775:
3768: x_return_status);
3769:
3770: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3771: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3772: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3773: RAISE OKC_API.G_EXCEPTION_ERROR;
3774: END IF;
3775:
3776: -- Call to procedure of complex API
3769:
3770: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3771: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3772: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3773: RAISE OKC_API.G_EXCEPTION_ERROR;
3774: END IF;
3775:
3776: -- Call to procedure of complex API
3777: okc_conditions_pvt.lock_func_exprs(p_api_version => p_api_version,
3780: x_msg_count => x_msg_count,
3781: x_msg_data => x_msg_data,
3782: p_fepv_rec => l_fepv_rec);
3783:
3784: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3785: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3786: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3787: RAISE OKC_API.G_EXCEPTION_ERROR;
3788: END IF;
3781: x_msg_data => x_msg_data,
3782: p_fepv_rec => l_fepv_rec);
3783:
3784: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3785: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3786: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3787: RAISE OKC_API.G_EXCEPTION_ERROR;
3788: END IF;
3789:
3782: p_fepv_rec => l_fepv_rec);
3783:
3784: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3785: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3786: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3787: RAISE OKC_API.G_EXCEPTION_ERROR;
3788: END IF;
3789:
3790: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3783:
3784: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3785: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3786: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3787: RAISE OKC_API.G_EXCEPTION_ERROR;
3788: END IF;
3789:
3790: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3791:
3786: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3787: RAISE OKC_API.G_EXCEPTION_ERROR;
3788: END IF;
3789:
3790: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3791:
3792: EXCEPTION
3793: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3794: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3789:
3790: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3791:
3792: EXCEPTION
3793: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3794: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3795: (
3796: l_api_name,
3797: G_PKG_NAME,
3790: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3791:
3792: EXCEPTION
3793: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3794: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3795: (
3796: l_api_name,
3797: G_PKG_NAME,
3798: 'OKC_API.G_RET_STS_ERROR',
3794: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3795: (
3796: l_api_name,
3797: G_PKG_NAME,
3798: 'OKC_API.G_RET_STS_ERROR',
3799: x_msg_count,
3800: x_msg_data,
3801: '_PUB'
3802: );
3800: x_msg_data,
3801: '_PUB'
3802: );
3803:
3804: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3805: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3806: (
3807: l_api_name,
3808: G_PKG_NAME,
3801: '_PUB'
3802: );
3803:
3804: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3805: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3806: (
3807: l_api_name,
3808: G_PKG_NAME,
3809: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3805: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3806: (
3807: l_api_name,
3808: G_PKG_NAME,
3809: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3810: x_msg_count,
3811: x_msg_data,
3812: '_PUB'
3813: );
3812: '_PUB'
3813: );
3814:
3815: WHEN OTHERS THEN
3816: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3817: (
3818: l_api_name,
3819: G_PKG_NAME,
3820: 'OTHERS',
3829: x_return_status OUT NOCOPY VARCHAR2,
3830: x_msg_count OUT NOCOPY NUMBER,
3831: x_msg_data OUT NOCOPY VARCHAR2,
3832: p_fepv_tbl IN fepv_tbl_type) IS
3833: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3834: i NUMBER := 0;
3835: BEGIN
3836: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3837: IF p_fepv_tbl.COUNT > 0 THEN
3832: p_fepv_tbl IN fepv_tbl_type) IS
3833: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3834: i NUMBER := 0;
3835: BEGIN
3836: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3837: IF p_fepv_tbl.COUNT > 0 THEN
3838: i := p_fepv_tbl.FIRST;
3839: LOOP
3840: lock_func_exprs(
3843: l_return_status,
3844: x_msg_count,
3845: x_msg_data,
3846: p_fepv_tbl(i));
3847: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3848: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3849: x_return_status := l_return_status;
3850: raise G_EXCEPTION_HALT_VALIDATION;
3851: ELSE
3844: x_msg_count,
3845: x_msg_data,
3846: p_fepv_tbl(i));
3847: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
3848: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3849: x_return_status := l_return_status;
3850: raise G_EXCEPTION_HALT_VALIDATION;
3851: ELSE
3852: x_return_status := l_return_status;
3860: WHEN G_EXCEPTION_HALT_VALIDATION THEN
3861: NULL;
3862:
3863: WHEN OTHERS THEN
3864: OKC_API.set_message(p_app_name => g_app_name,
3865: p_msg_name => g_unexpected_error,
3866: p_token1 => g_sqlcode_token,
3867: p_token1_value => sqlcode,
3868: p_token2 => g_sqlerrm_token,
3866: p_token1 => g_sqlcode_token,
3867: p_token1_value => sqlcode,
3868: p_token2 => g_sqlerrm_token,
3869: p_token2_value => sqlerrm);
3870: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3871: End lock_func_exprs;
3872:
3873: PROCEDURE update_func_exprs(p_api_version IN NUMBER,
3874: p_init_msg_list IN VARCHAR2 ,
3879: x_fepv_rec OUT NOCOPY fepv_rec_type) IS
3880:
3881: l_api_name CONSTANT VARCHAR2(30) := 'update_func_exprs';
3882: l_api_version CONSTANT NUMBER := 1.0;
3883: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3884: l_fepv_rec fepv_rec_type := p_fepv_rec;
3885: BEGIN
3886: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3887: g_pkg_name,
3882: l_api_version CONSTANT NUMBER := 1.0;
3883: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3884: l_fepv_rec fepv_rec_type := p_fepv_rec;
3885: BEGIN
3886: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3887: g_pkg_name,
3888: p_init_msg_list,
3889: l_api_version,
3890: p_api_version,
3889: l_api_version,
3890: p_api_version,
3891: '_PUB',
3892: x_return_status);
3893: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3894: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3895: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3896: RAISE OKC_API.G_EXCEPTION_ERROR;
3897: END IF;
3890: p_api_version,
3891: '_PUB',
3892: x_return_status);
3893: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3894: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3895: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3896: RAISE OKC_API.G_EXCEPTION_ERROR;
3897: END IF;
3898:
3891: '_PUB',
3892: x_return_status);
3893: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3894: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3895: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3896: RAISE OKC_API.G_EXCEPTION_ERROR;
3897: END IF;
3898:
3899: -- USER HOOK CALL FOR BEFORE, STARTS
3892: x_return_status);
3893: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3894: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3895: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3896: RAISE OKC_API.G_EXCEPTION_ERROR;
3897: END IF;
3898:
3899: -- USER HOOK CALL FOR BEFORE, STARTS
3900: g_fepv_rec := l_fepv_rec;
3902: okc_util.call_user_hook(x_return_status => x_return_status,
3903: p_package_name => g_pkg_name,
3904: p_procedure_name => l_api_name,
3905: p_before_after => 'B');
3906: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3907: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3908: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3909: RAISE OKC_API.G_EXCEPTION_ERROR;
3910: END IF;
3903: p_package_name => g_pkg_name,
3904: p_procedure_name => l_api_name,
3905: p_before_after => 'B');
3906: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3907: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3908: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3909: RAISE OKC_API.G_EXCEPTION_ERROR;
3910: END IF;
3911:
3904: p_procedure_name => l_api_name,
3905: p_before_after => 'B');
3906: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3907: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3908: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3909: RAISE OKC_API.G_EXCEPTION_ERROR;
3910: END IF;
3911:
3912: --get values back from hook call
3905: p_before_after => 'B');
3906: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3907: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3908: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3909: RAISE OKC_API.G_EXCEPTION_ERROR;
3910: END IF;
3911:
3912: --get values back from hook call
3913: l_fepv_rec := migrate_fepv(l_fepv_rec, g_fepv_rec);
3920: x_msg_data => x_msg_data,
3921: p_fepv_rec => l_fepv_rec,
3922: x_fepv_rec => x_fepv_rec);
3923:
3924: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3925: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3926: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3927: RAISE OKC_API.G_EXCEPTION_ERROR;
3928: END IF;
3921: p_fepv_rec => l_fepv_rec,
3922: x_fepv_rec => x_fepv_rec);
3923:
3924: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3925: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3926: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3927: RAISE OKC_API.G_EXCEPTION_ERROR;
3928: END IF;
3929:
3922: x_fepv_rec => x_fepv_rec);
3923:
3924: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3925: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3926: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3927: RAISE OKC_API.G_EXCEPTION_ERROR;
3928: END IF;
3929:
3930: --USER HOOK CALL FOR AFTER, STARTS
3923:
3924: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3925: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3926: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3927: RAISE OKC_API.G_EXCEPTION_ERROR;
3928: END IF;
3929:
3930: --USER HOOK CALL FOR AFTER, STARTS
3931: g_fepv_rec := x_fepv_rec;
3933: okc_util.call_user_hook(x_return_status => x_return_status,
3934: p_package_name => g_pkg_name,
3935: p_procedure_name => l_api_name,
3936: p_before_after => 'A');
3937: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3938: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3939: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3940: RAISE OKC_API.G_EXCEPTION_ERROR;
3941: END IF;
3934: p_package_name => g_pkg_name,
3935: p_procedure_name => l_api_name,
3936: p_before_after => 'A');
3937: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3938: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3939: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3940: RAISE OKC_API.G_EXCEPTION_ERROR;
3941: END IF;
3942: --USER HOOK CALL FOR AFTER, ENDS
3935: p_procedure_name => l_api_name,
3936: p_before_after => 'A');
3937: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3938: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3939: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3940: RAISE OKC_API.G_EXCEPTION_ERROR;
3941: END IF;
3942: --USER HOOK CALL FOR AFTER, ENDS
3943:
3936: p_before_after => 'A');
3937: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3938: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3939: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
3940: RAISE OKC_API.G_EXCEPTION_ERROR;
3941: END IF;
3942: --USER HOOK CALL FOR AFTER, ENDS
3943:
3944: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3940: RAISE OKC_API.G_EXCEPTION_ERROR;
3941: END IF;
3942: --USER HOOK CALL FOR AFTER, ENDS
3943:
3944: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3945:
3946: EXCEPTION
3947: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3948: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3943:
3944: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3945:
3946: EXCEPTION
3947: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3948: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3949: (
3950: l_api_name,
3951: G_PKG_NAME,
3944: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3945:
3946: EXCEPTION
3947: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3948: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3949: (
3950: l_api_name,
3951: G_PKG_NAME,
3952: 'OKC_API.G_RET_STS_ERROR',
3948: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3949: (
3950: l_api_name,
3951: G_PKG_NAME,
3952: 'OKC_API.G_RET_STS_ERROR',
3953: x_msg_count,
3954: x_msg_data,
3955: '_PUB'
3956: );
3954: x_msg_data,
3955: '_PUB'
3956: );
3957:
3958: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3959: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3960: (
3961: l_api_name,
3962: G_PKG_NAME,
3955: '_PUB'
3956: );
3957:
3958: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3959: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3960: (
3961: l_api_name,
3962: G_PKG_NAME,
3963: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3959: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3960: (
3961: l_api_name,
3962: G_PKG_NAME,
3963: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3964: x_msg_count,
3965: x_msg_data,
3966: '_PUB'
3967: );
3966: '_PUB'
3967: );
3968:
3969: WHEN OTHERS THEN
3970: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3971: (
3972: l_api_name,
3973: G_PKG_NAME,
3974: 'OTHERS',
3985: x_msg_data OUT NOCOPY VARCHAR2,
3986: p_fepv_tbl IN fepv_tbl_type,
3987: x_fepv_tbl OUT NOCOPY fepv_tbl_type) IS
3988:
3989: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3990: i NUMBER := 0;
3991: BEGIN
3992: --Initialize the return status
3993: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3989: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
3990: i NUMBER := 0;
3991: BEGIN
3992: --Initialize the return status
3993: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3994:
3995: IF p_fepv_tbl.COUNT > 0 THEN
3996: i := p_fepv_tbl.FIRST;
3997: LOOP
4002: x_msg_count,
4003: x_msg_data,
4004: p_fepv_tbl(i),
4005: x_fepv_tbl(i));
4006: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
4007: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4008: x_return_status := l_return_status;
4009: raise G_EXCEPTION_HALT_VALIDATION;
4010: ELSE
4003: x_msg_data,
4004: p_fepv_tbl(i),
4005: x_fepv_tbl(i));
4006: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
4007: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4008: x_return_status := l_return_status;
4009: raise G_EXCEPTION_HALT_VALIDATION;
4010: ELSE
4011: x_return_status := l_return_status;
4019: WHEN G_EXCEPTION_HALT_VALIDATION THEN
4020: NULL;
4021:
4022: WHEN OTHERS THEN
4023: OKC_API.set_message(p_app_name => g_app_name,
4024: p_msg_name => g_unexpected_error,
4025: p_token1 => g_sqlcode_token,
4026: p_token1_value => sqlcode,
4027: p_token2 => g_sqlerrm_token,
4025: p_token1 => g_sqlcode_token,
4026: p_token1_value => sqlcode,
4027: p_token2 => g_sqlerrm_token,
4028: p_token2_value => sqlerrm);
4029: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4030: END update_func_exprs;
4031:
4032: PROCEDURE delete_func_exprs(p_api_version IN NUMBER,
4033: p_init_msg_list IN VARCHAR2 ,
4037: p_fepv_rec IN fepv_rec_type) IS
4038:
4039: l_api_name CONSTANT VARCHAR2(30) := 'delete_func_exprs';
4040: l_api_version CONSTANT NUMBER := 1.0;
4041: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4042: l_fepv_rec fepv_rec_type := p_fepv_rec;
4043: BEGIN
4044: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
4045: g_pkg_name,
4040: l_api_version CONSTANT NUMBER := 1.0;
4041: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4042: l_fepv_rec fepv_rec_type := p_fepv_rec;
4043: BEGIN
4044: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
4045: g_pkg_name,
4046: p_init_msg_list,
4047: l_api_version,
4048: p_api_version,
4048: p_api_version,
4049: '_PUB',
4050: x_return_status);
4051:
4052: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4053: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4054: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4055: RAISE OKC_API.G_EXCEPTION_ERROR;
4056: END IF;
4049: '_PUB',
4050: x_return_status);
4051:
4052: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4053: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4054: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4055: RAISE OKC_API.G_EXCEPTION_ERROR;
4056: END IF;
4057:
4050: x_return_status);
4051:
4052: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4053: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4054: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4055: RAISE OKC_API.G_EXCEPTION_ERROR;
4056: END IF;
4057:
4058: -- USER HOOK CALL FOR BEFORE, STARTS
4051:
4052: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4053: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4054: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4055: RAISE OKC_API.G_EXCEPTION_ERROR;
4056: END IF;
4057:
4058: -- USER HOOK CALL FOR BEFORE, STARTS
4059: g_fepv_rec := l_fepv_rec;
4061: okc_util.call_user_hook(x_return_status => x_return_status,
4062: p_package_name => g_pkg_name,
4063: p_procedure_name => l_api_name,
4064: p_before_after => 'B');
4065: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4066: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4067: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4068: RAISE OKC_API.G_EXCEPTION_ERROR;
4069: END IF;
4062: p_package_name => g_pkg_name,
4063: p_procedure_name => l_api_name,
4064: p_before_after => 'B');
4065: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4066: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4067: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4068: RAISE OKC_API.G_EXCEPTION_ERROR;
4069: END IF;
4070:
4063: p_procedure_name => l_api_name,
4064: p_before_after => 'B');
4065: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4066: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4067: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4068: RAISE OKC_API.G_EXCEPTION_ERROR;
4069: END IF;
4070:
4071: --get values back from hook call
4064: p_before_after => 'B');
4065: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4066: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4067: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4068: RAISE OKC_API.G_EXCEPTION_ERROR;
4069: END IF;
4070:
4071: --get values back from hook call
4072: l_fepv_rec := migrate_fepv(l_fepv_rec, g_fepv_rec);
4077: x_return_status => x_return_status,
4078: x_msg_count => x_msg_count,
4079: x_msg_data => x_msg_data,
4080: p_fepv_rec => l_fepv_rec);
4081: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4082: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4083: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4084: RAISE OKC_API.G_EXCEPTION_ERROR;
4085: END IF;
4078: x_msg_count => x_msg_count,
4079: x_msg_data => x_msg_data,
4080: p_fepv_rec => l_fepv_rec);
4081: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4082: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4083: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4084: RAISE OKC_API.G_EXCEPTION_ERROR;
4085: END IF;
4086:
4079: x_msg_data => x_msg_data,
4080: p_fepv_rec => l_fepv_rec);
4081: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4082: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4083: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4084: RAISE OKC_API.G_EXCEPTION_ERROR;
4085: END IF;
4086:
4087: --USER HOOK CALL FOR AFTER, STARTS
4080: p_fepv_rec => l_fepv_rec);
4081: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4082: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4083: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4084: RAISE OKC_API.G_EXCEPTION_ERROR;
4085: END IF;
4086:
4087: --USER HOOK CALL FOR AFTER, STARTS
4088: okc_util.call_user_hook(x_return_status => x_return_status,
4089: p_package_name => g_pkg_name,
4090: p_procedure_name => l_api_name,
4091: p_before_after => 'A');
4092:
4093: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4094: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4095: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4096: RAISE OKC_API.G_EXCEPTION_ERROR;
4097: END IF;
4090: p_procedure_name => l_api_name,
4091: p_before_after => 'A');
4092:
4093: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4094: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4095: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4096: RAISE OKC_API.G_EXCEPTION_ERROR;
4097: END IF;
4098: --USER HOOK CALL FOR AFTER, ENDS
4091: p_before_after => 'A');
4092:
4093: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4094: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4095: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4096: RAISE OKC_API.G_EXCEPTION_ERROR;
4097: END IF;
4098: --USER HOOK CALL FOR AFTER, ENDS
4099:
4092:
4093: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4094: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4095: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4096: RAISE OKC_API.G_EXCEPTION_ERROR;
4097: END IF;
4098: --USER HOOK CALL FOR AFTER, ENDS
4099:
4100: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4096: RAISE OKC_API.G_EXCEPTION_ERROR;
4097: END IF;
4098: --USER HOOK CALL FOR AFTER, ENDS
4099:
4100: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4101: EXCEPTION
4102: WHEN OKC_API.G_EXCEPTION_ERROR THEN
4103: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4104: (
4098: --USER HOOK CALL FOR AFTER, ENDS
4099:
4100: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4101: EXCEPTION
4102: WHEN OKC_API.G_EXCEPTION_ERROR THEN
4103: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4104: (
4105: l_api_name,
4106: G_PKG_NAME,
4099:
4100: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4101: EXCEPTION
4102: WHEN OKC_API.G_EXCEPTION_ERROR THEN
4103: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4104: (
4105: l_api_name,
4106: G_PKG_NAME,
4107: 'OKC_API.G_RET_STS_ERROR',
4103: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4104: (
4105: l_api_name,
4106: G_PKG_NAME,
4107: 'OKC_API.G_RET_STS_ERROR',
4108: x_msg_count,
4109: x_msg_data,
4110: '_PUB'
4111: );
4109: x_msg_data,
4110: '_PUB'
4111: );
4112:
4113: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
4114: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4115: (
4116: l_api_name,
4117: G_PKG_NAME,
4110: '_PUB'
4111: );
4112:
4113: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
4114: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4115: (
4116: l_api_name,
4117: G_PKG_NAME,
4118: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4114: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4115: (
4116: l_api_name,
4117: G_PKG_NAME,
4118: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4119: x_msg_count,
4120: x_msg_data,
4121: '_PUB'
4122: );
4121: '_PUB'
4122: );
4123:
4124: WHEN OTHERS THEN
4125: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4126: (
4127: l_api_name,
4128: G_PKG_NAME,
4129: 'OTHERS',
4139: x_msg_count OUT NOCOPY NUMBER,
4140: x_msg_data OUT NOCOPY VARCHAR2,
4141: p_fepv_tbl IN fepv_tbl_type) IS
4142:
4143: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4144: i NUMBER := 0;
4145: BEGIN
4146: --Initialize the return status
4147: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4143: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4144: i NUMBER := 0;
4145: BEGIN
4146: --Initialize the return status
4147: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4148:
4149: IF p_fepv_tbl.COUNT > 0 THEN
4150: i := p_fepv_tbl.FIRST;
4151: LOOP
4155: x_return_status,
4156: x_msg_count,
4157: x_msg_data,
4158: p_fepv_tbl(i));
4159: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
4160: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
4161: l_return_status := x_return_status;
4162: RAISE G_EXCEPTION_HALT_VALIDATION;
4163: ELSE
4156: x_msg_count,
4157: x_msg_data,
4158: p_fepv_tbl(i));
4159: IF (x_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
4160: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN -- need to leave
4161: l_return_status := x_return_status;
4162: RAISE G_EXCEPTION_HALT_VALIDATION;
4163: ELSE
4164: l_return_status := x_return_status; -- record that there was an error
4172: WHEN G_EXCEPTION_HALT_VALIDATION THEN
4173: NULL;
4174:
4175: WHEN OTHERS THEN
4176: OKC_API.set_message(p_app_name => g_app_name,
4177: p_msg_name => g_unexpected_error,
4178: p_token1 => g_sqlcode_token,
4179: p_token1_value => sqlcode,
4180: p_token2 => g_sqlerrm_token,
4178: p_token1 => g_sqlcode_token,
4179: p_token1_value => sqlcode,
4180: p_token2 => g_sqlerrm_token,
4181: p_token2_value => sqlerrm);
4182: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4183: END delete_func_exprs;
4184:
4185: PROCEDURE validate_func_exprs(p_api_version IN NUMBER,
4186: p_init_msg_list IN VARCHAR2 ,
4190: p_fepv_rec IN fepv_rec_type) IS
4191:
4192: l_api_name CONSTANT VARCHAR2(30) := 'validate_func_exprs';
4193: l_api_version CONSTANT NUMBER := 1.0;
4194: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4195: l_fepv_rec fepv_rec_type := p_fepv_rec;
4196: BEGIN
4197: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
4198: g_pkg_name,
4193: l_api_version CONSTANT NUMBER := 1.0;
4194: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4195: l_fepv_rec fepv_rec_type := p_fepv_rec;
4196: BEGIN
4197: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
4198: g_pkg_name,
4199: p_init_msg_list,
4200: l_api_version,
4201: p_api_version,
4201: p_api_version,
4202: '_PUB',
4203: x_return_status);
4204:
4205: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4206: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4207: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4208: RAISE OKC_API.G_EXCEPTION_ERROR;
4209: END IF;
4202: '_PUB',
4203: x_return_status);
4204:
4205: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4206: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4207: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4208: RAISE OKC_API.G_EXCEPTION_ERROR;
4209: END IF;
4210:
4203: x_return_status);
4204:
4205: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4206: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4207: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4208: RAISE OKC_API.G_EXCEPTION_ERROR;
4209: END IF;
4210:
4211: -- USER HOOK CALL FOR BEFORE, STARTS
4204:
4205: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4206: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4207: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
4208: RAISE OKC_API.G_EXCEPTION_ERROR;
4209: END IF;
4210:
4211: -- USER HOOK CALL FOR BEFORE, STARTS
4212: g_fepv_rec := l_fepv_rec;
4214: okc_util.call_user_hook(x_return_status => x_return_status,
4215: p_package_name => g_pkg_name,
4216: p_procedure_name => l_api_name,
4217: p_before_after => 'B');
4218: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4219: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4220: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4221: RAISE OKC_API.G_EXCEPTION_ERROR;
4222: END IF;
4215: p_package_name => g_pkg_name,
4216: p_procedure_name => l_api_name,
4217: p_before_after => 'B');
4218: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4219: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4220: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4221: RAISE OKC_API.G_EXCEPTION_ERROR;
4222: END IF;
4223:
4216: p_procedure_name => l_api_name,
4217: p_before_after => 'B');
4218: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4219: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4220: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4221: RAISE OKC_API.G_EXCEPTION_ERROR;
4222: END IF;
4223:
4224: --get values back from hook call
4217: p_before_after => 'B');
4218: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4219: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4220: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4221: RAISE OKC_API.G_EXCEPTION_ERROR;
4222: END IF;
4223:
4224: --get values back from hook call
4225: l_fepv_rec := migrate_fepv(l_fepv_rec, g_fepv_rec);
4231: x_msg_count => x_msg_count,
4232: x_msg_data => x_msg_data,
4233: p_fepv_rec => l_fepv_rec);
4234:
4235: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4236: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4237: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4238: RAISE OKC_API.G_EXCEPTION_ERROR;
4239: END IF;
4232: x_msg_data => x_msg_data,
4233: p_fepv_rec => l_fepv_rec);
4234:
4235: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4236: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4237: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4238: RAISE OKC_API.G_EXCEPTION_ERROR;
4239: END IF;
4240:
4233: p_fepv_rec => l_fepv_rec);
4234:
4235: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4236: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4237: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4238: RAISE OKC_API.G_EXCEPTION_ERROR;
4239: END IF;
4240:
4241: --USER HOOK CALL FOR AFTER, STARTS
4234:
4235: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4236: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4237: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4238: RAISE OKC_API.G_EXCEPTION_ERROR;
4239: END IF;
4240:
4241: --USER HOOK CALL FOR AFTER, STARTS
4242: okc_util.call_user_hook(x_return_status => x_return_status,
4242: okc_util.call_user_hook(x_return_status => x_return_status,
4243: p_package_name => g_pkg_name,
4244: p_procedure_name => l_api_name,
4245: p_before_after => 'A');
4246: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4247: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4248: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4249: RAISE OKC_API.G_EXCEPTION_ERROR;
4250: END IF;
4243: p_package_name => g_pkg_name,
4244: p_procedure_name => l_api_name,
4245: p_before_after => 'A');
4246: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4247: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4248: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4249: RAISE OKC_API.G_EXCEPTION_ERROR;
4250: END IF;
4251: --USER HOOK CALL FOR AFTER, ENDS
4244: p_procedure_name => l_api_name,
4245: p_before_after => 'A');
4246: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4247: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4248: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4249: RAISE OKC_API.G_EXCEPTION_ERROR;
4250: END IF;
4251: --USER HOOK CALL FOR AFTER, ENDS
4252:
4245: p_before_after => 'A');
4246: IF (x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4247: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4248: ELSIF (x_return_status = OKC_API.G_RET_STS_ERROR) THEN
4249: RAISE OKC_API.G_EXCEPTION_ERROR;
4250: END IF;
4251: --USER HOOK CALL FOR AFTER, ENDS
4252:
4253: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4249: RAISE OKC_API.G_EXCEPTION_ERROR;
4250: END IF;
4251: --USER HOOK CALL FOR AFTER, ENDS
4252:
4253: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4254:
4255: EXCEPTION
4256: WHEN OKC_API.G_EXCEPTION_ERROR THEN
4257: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4252:
4253: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4254:
4255: EXCEPTION
4256: WHEN OKC_API.G_EXCEPTION_ERROR THEN
4257: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4258: (
4259: l_api_name,
4260: G_PKG_NAME,
4253: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
4254:
4255: EXCEPTION
4256: WHEN OKC_API.G_EXCEPTION_ERROR THEN
4257: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4258: (
4259: l_api_name,
4260: G_PKG_NAME,
4261: 'OKC_API.G_RET_STS_ERROR',
4257: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4258: (
4259: l_api_name,
4260: G_PKG_NAME,
4261: 'OKC_API.G_RET_STS_ERROR',
4262: x_msg_count,
4263: x_msg_data,
4264: '_PUB'
4265: );
4263: x_msg_data,
4264: '_PUB'
4265: );
4266:
4267: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
4268: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4269: (
4270: l_api_name,
4271: G_PKG_NAME,
4264: '_PUB'
4265: );
4266:
4267: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
4268: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4269: (
4270: l_api_name,
4271: G_PKG_NAME,
4272: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4268: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4269: (
4270: l_api_name,
4271: G_PKG_NAME,
4272: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4273: x_msg_count,
4274: x_msg_data,
4275: '_PUB'
4276: );
4275: '_PUB'
4276: );
4277:
4278: WHEN OTHERS THEN
4279: x_return_status := OKC_API.HANDLE_EXCEPTIONS
4280: (
4281: l_api_name,
4282: G_PKG_NAME,
4283: 'OTHERS',
4293: x_msg_count OUT NOCOPY NUMBER,
4294: x_msg_data OUT NOCOPY VARCHAR2,
4295: p_fepv_tbl IN fepv_tbl_type) IS
4296:
4297: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4298: i NUMBER := 0;
4299: BEGIN
4300: --Initialize the return status
4301: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4297: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4298: i NUMBER := 0;
4299: BEGIN
4300: --Initialize the return status
4301: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4302:
4303: IF p_fepv_tbl.COUNT > 0 THEN
4304: i := p_fepv_tbl.FIRST;
4305: LOOP
4309: l_return_status,
4310: x_msg_count,
4311: x_msg_data,
4312: p_fepv_tbl(i));
4313: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
4314: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4315: x_return_status := l_return_status;
4316: raise G_EXCEPTION_HALT_VALIDATION;
4317: ELSE
4310: x_msg_count,
4311: x_msg_data,
4312: p_fepv_tbl(i));
4313: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
4314: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
4315: x_return_status := l_return_status;
4316: raise G_EXCEPTION_HALT_VALIDATION;
4317: ELSE
4318: x_return_status := l_return_status;
4326: WHEN G_EXCEPTION_HALT_VALIDATION THEN
4327: NULL;
4328:
4329: WHEN OTHERS THEN
4330: OKC_API.set_message(p_app_name => g_app_name,
4331: p_msg_name => g_unexpected_error,
4332: p_token1 => g_sqlcode_token,
4333: p_token1_value => sqlcode,
4334: p_token2 => g_sqlerrm_token,
4332: p_token1 => g_sqlcode_token,
4333: p_token1_value => sqlcode,
4334: p_token2 => g_sqlerrm_token,
4335: p_token2_value => sqlerrm);
4336: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4337: END validate_func_exprs;
4338:
4339: PROCEDURE valid_condition_lines(
4340: p_cnh_id IN okc_condition_headers_b.id%TYPE,