342: p_tryv_rec in tryv_rec_type
343: ) return tryv_rec_type is
344: l_tryv_rec tryv_rec_type := p_tryv_rec;
345: begin
346: if (l_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM) then
347: l_tryv_rec.object_version_number := null;
348: end if;
349: if (l_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR) then
350: l_tryv_rec.sfwt_flag := null;
345: begin
346: if (l_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM) then
347: l_tryv_rec.object_version_number := null;
348: end if;
349: if (l_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR) then
350: l_tryv_rec.sfwt_flag := null;
351: end if;
352: if (l_tryv_rec.aep_code = Okc_Api.G_MISS_CHAR) then
353: l_tryv_rec.aep_code := null;
348: end if;
349: if (l_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR) then
350: l_tryv_rec.sfwt_flag := null;
351: end if;
352: if (l_tryv_rec.aep_code = Okc_Api.G_MISS_CHAR) then
353: l_tryv_rec.aep_code := null;
354: end if;
355: if (l_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM) then
356: l_tryv_rec.ilc_id := null;
351: end if;
352: if (l_tryv_rec.aep_code = Okc_Api.G_MISS_CHAR) then
353: l_tryv_rec.aep_code := null;
354: end if;
355: if (l_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM) then
356: l_tryv_rec.ilc_id := null;
357: end if;
358: if (l_tryv_rec.try_id = Okc_Api.G_MISS_NUM) then
359: l_tryv_rec.try_id := null;
354: end if;
355: if (l_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM) then
356: l_tryv_rec.ilc_id := null;
357: end if;
358: if (l_tryv_rec.try_id = Okc_Api.G_MISS_NUM) then
359: l_tryv_rec.try_id := null;
360: end if;
361: if (l_tryv_rec.try_id_for = Okc_Api.G_MISS_NUM) then
362: l_tryv_rec.try_id_for := null;
357: end if;
358: if (l_tryv_rec.try_id = Okc_Api.G_MISS_NUM) then
359: l_tryv_rec.try_id := null;
360: end if;
361: if (l_tryv_rec.try_id_for = Okc_Api.G_MISS_NUM) then
362: l_tryv_rec.try_id_for := null;
363: end if;
364: if (l_tryv_rec.try_type = Okc_Api.G_MISS_CHAR) then
365: l_tryv_rec.try_type := null;
360: end if;
361: if (l_tryv_rec.try_id_for = Okc_Api.G_MISS_NUM) then
362: l_tryv_rec.try_id_for := null;
363: end if;
364: if (l_tryv_rec.try_type = Okc_Api.G_MISS_CHAR) then
365: l_tryv_rec.try_type := null;
366: end if;
367: if (l_tryv_rec.name = Okc_Api.G_MISS_CHAR) then
368: l_tryv_rec.name := null;
363: end if;
364: if (l_tryv_rec.try_type = Okc_Api.G_MISS_CHAR) then
365: l_tryv_rec.try_type := null;
366: end if;
367: if (l_tryv_rec.name = Okc_Api.G_MISS_CHAR) then
368: l_tryv_rec.name := null;
369: end if;
370: if (l_tryv_rec.description = Okc_Api.G_MISS_CHAR) then
371: l_tryv_rec.description := null;
366: end if;
367: if (l_tryv_rec.name = Okc_Api.G_MISS_CHAR) then
368: l_tryv_rec.name := null;
369: end if;
370: if (l_tryv_rec.description = Okc_Api.G_MISS_CHAR) then
371: l_tryv_rec.description := null;
372: end if;
373: if (l_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR) then
374: l_tryv_rec.contract_header_line_flag := null;
369: end if;
370: if (l_tryv_rec.description = Okc_Api.G_MISS_CHAR) then
371: l_tryv_rec.description := null;
372: end if;
373: if (l_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR) then
374: l_tryv_rec.contract_header_line_flag := null;
375: end if;
376: if (l_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR) then
377: l_tryv_rec.transaction_header_line_detail := null;
372: end if;
373: if (l_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR) then
374: l_tryv_rec.contract_header_line_flag := null;
375: end if;
376: if (l_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR) then
377: l_tryv_rec.transaction_header_line_detail := null;
378: end if;
379: if (l_tryv_rec.org_id = Okc_Api.G_MISS_NUM) then
380: l_tryv_rec.org_id := null;
375: end if;
376: if (l_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR) then
377: l_tryv_rec.transaction_header_line_detail := null;
378: end if;
379: if (l_tryv_rec.org_id = Okc_Api.G_MISS_NUM) then
380: l_tryv_rec.org_id := null;
381: end if;
382: if (l_tryv_rec.created_by = Okc_Api.G_MISS_NUM) then
383: l_tryv_rec.created_by := null;
378: end if;
379: if (l_tryv_rec.org_id = Okc_Api.G_MISS_NUM) then
380: l_tryv_rec.org_id := null;
381: end if;
382: if (l_tryv_rec.created_by = Okc_Api.G_MISS_NUM) then
383: l_tryv_rec.created_by := null;
384: end if;
385: if (l_tryv_rec.creation_date = Okc_Api.G_MISS_DATE) then
386: l_tryv_rec.creation_date := null;
381: end if;
382: if (l_tryv_rec.created_by = Okc_Api.G_MISS_NUM) then
383: l_tryv_rec.created_by := null;
384: end if;
385: if (l_tryv_rec.creation_date = Okc_Api.G_MISS_DATE) then
386: l_tryv_rec.creation_date := null;
387: end if;
388: if (l_tryv_rec.last_updated_by = Okc_Api.G_MISS_NUM) then
389: l_tryv_rec.last_updated_by := null;
384: end if;
385: if (l_tryv_rec.creation_date = Okc_Api.G_MISS_DATE) then
386: l_tryv_rec.creation_date := null;
387: end if;
388: if (l_tryv_rec.last_updated_by = Okc_Api.G_MISS_NUM) then
389: l_tryv_rec.last_updated_by := null;
390: end if;
391: if (l_tryv_rec.last_update_date = Okc_Api.G_MISS_DATE) then
392: l_tryv_rec.last_update_date := null;
387: end if;
388: if (l_tryv_rec.last_updated_by = Okc_Api.G_MISS_NUM) then
389: l_tryv_rec.last_updated_by := null;
390: end if;
391: if (l_tryv_rec.last_update_date = Okc_Api.G_MISS_DATE) then
392: l_tryv_rec.last_update_date := null;
393: end if;
394: if (l_tryv_rec.last_update_login = Okc_Api.G_MISS_NUM) then
395: l_tryv_rec.last_update_login := null;
390: end if;
391: if (l_tryv_rec.last_update_date = Okc_Api.G_MISS_DATE) then
392: l_tryv_rec.last_update_date := null;
393: end if;
394: if (l_tryv_rec.last_update_login = Okc_Api.G_MISS_NUM) then
395: l_tryv_rec.last_update_login := null;
396: end if;
397: if (l_tryv_rec.trx_type_class = Okc_Api.G_MISS_CHAR) then
398: l_tryv_rec.trx_type_class := null;
393: end if;
394: if (l_tryv_rec.last_update_login = Okc_Api.G_MISS_NUM) then
395: l_tryv_rec.last_update_login := null;
396: end if;
397: if (l_tryv_rec.trx_type_class = Okc_Api.G_MISS_CHAR) then
398: l_tryv_rec.trx_type_class := null;
399: end if;
400: --Added by kthiruva on 04-May-2005 for Tax Enhancements
401: --Bug 4386433 - Start of Changes
398: l_tryv_rec.trx_type_class := null;
399: end if;
400: --Added by kthiruva on 04-May-2005 for Tax Enhancements
401: --Bug 4386433 - Start of Changes
402: if (l_tryv_rec.tax_upfront_yn = Okc_Api.G_MISS_CHAR) then
403: l_tryv_rec.tax_upfront_yn := null;
404: end if;
405: if (l_tryv_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR) then
406: l_tryv_rec.tax_invoice_yn := null;
401: --Bug 4386433 - Start of Changes
402: if (l_tryv_rec.tax_upfront_yn = Okc_Api.G_MISS_CHAR) then
403: l_tryv_rec.tax_upfront_yn := null;
404: end if;
405: if (l_tryv_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR) then
406: l_tryv_rec.tax_invoice_yn := null;
407: end if;
408: if (l_tryv_rec.tax_schedule_yn = Okc_Api.G_MISS_CHAR) then
409: l_tryv_rec.tax_schedule_yn := null;
404: end if;
405: if (l_tryv_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR) then
406: l_tryv_rec.tax_invoice_yn := null;
407: end if;
408: if (l_tryv_rec.tax_schedule_yn = Okc_Api.G_MISS_CHAR) then
409: l_tryv_rec.tax_schedule_yn := null;
410: end if;
411: --Bug 4386433 - End of Changes
412: --Bug 5707866 dpsingh
428: ---------------------------------------------
429: function Validate_Attributes (
430: p_tryv_rec in tryv_rec_type
431: ) return varchar2 is
432: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
433: begin
434: if p_tryv_rec.id = OKC_API.G_MISS_NUM or
435: p_tryv_rec.id is null
436: then
430: p_tryv_rec in tryv_rec_type
431: ) return varchar2 is
432: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
433: begin
434: if p_tryv_rec.id = OKC_API.G_MISS_NUM or
435: p_tryv_rec.id is null
436: then
437: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'id');
438: l_return_status := OKC_API.G_RET_STS_ERROR;
433: begin
434: if p_tryv_rec.id = OKC_API.G_MISS_NUM or
435: p_tryv_rec.id is null
436: then
437: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'id');
438: l_return_status := OKC_API.G_RET_STS_ERROR;
439: elsif p_tryv_rec.object_version_number = OKC_API.G_MISS_NUM or
440: p_tryv_rec.object_version_number is null
441: then
434: if p_tryv_rec.id = OKC_API.G_MISS_NUM or
435: p_tryv_rec.id is null
436: then
437: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'id');
438: l_return_status := OKC_API.G_RET_STS_ERROR;
439: elsif p_tryv_rec.object_version_number = OKC_API.G_MISS_NUM or
440: p_tryv_rec.object_version_number is null
441: then
442: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'object_version_number');
435: p_tryv_rec.id is null
436: then
437: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'id');
438: l_return_status := OKC_API.G_RET_STS_ERROR;
439: elsif p_tryv_rec.object_version_number = OKC_API.G_MISS_NUM or
440: p_tryv_rec.object_version_number is null
441: then
442: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'object_version_number');
443: l_return_status := OKC_API.G_RET_STS_ERROR;
438: l_return_status := OKC_API.G_RET_STS_ERROR;
439: elsif p_tryv_rec.object_version_number = OKC_API.G_MISS_NUM or
440: p_tryv_rec.object_version_number is null
441: then
442: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'object_version_number');
443: l_return_status := OKC_API.G_RET_STS_ERROR;
444: elsif p_tryv_rec.aep_code = OKC_API.G_MISS_CHAR or
445: p_tryv_rec.aep_code is null
446: then
439: elsif p_tryv_rec.object_version_number = OKC_API.G_MISS_NUM or
440: p_tryv_rec.object_version_number is null
441: then
442: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'object_version_number');
443: l_return_status := OKC_API.G_RET_STS_ERROR;
444: elsif p_tryv_rec.aep_code = OKC_API.G_MISS_CHAR or
445: p_tryv_rec.aep_code is null
446: then
447: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'aep_code');
440: p_tryv_rec.object_version_number is null
441: then
442: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'object_version_number');
443: l_return_status := OKC_API.G_RET_STS_ERROR;
444: elsif p_tryv_rec.aep_code = OKC_API.G_MISS_CHAR or
445: p_tryv_rec.aep_code is null
446: then
447: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'aep_code');
448: l_return_status := OKC_API.G_RET_STS_ERROR;
443: l_return_status := OKC_API.G_RET_STS_ERROR;
444: elsif p_tryv_rec.aep_code = OKC_API.G_MISS_CHAR or
445: p_tryv_rec.aep_code is null
446: then
447: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'aep_code');
448: l_return_status := OKC_API.G_RET_STS_ERROR;
449: elsif p_tryv_rec.ilc_id = OKC_API.G_MISS_NUM or
450: p_tryv_rec.ilc_id is null
451: then
444: elsif p_tryv_rec.aep_code = OKC_API.G_MISS_CHAR or
445: p_tryv_rec.aep_code is null
446: then
447: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'aep_code');
448: l_return_status := OKC_API.G_RET_STS_ERROR;
449: elsif p_tryv_rec.ilc_id = OKC_API.G_MISS_NUM or
450: p_tryv_rec.ilc_id is null
451: then
452: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'ilc_id');
445: p_tryv_rec.aep_code is null
446: then
447: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'aep_code');
448: l_return_status := OKC_API.G_RET_STS_ERROR;
449: elsif p_tryv_rec.ilc_id = OKC_API.G_MISS_NUM or
450: p_tryv_rec.ilc_id is null
451: then
452: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'ilc_id');
453: l_return_status := OKC_API.G_RET_STS_ERROR;
448: l_return_status := OKC_API.G_RET_STS_ERROR;
449: elsif p_tryv_rec.ilc_id = OKC_API.G_MISS_NUM or
450: p_tryv_rec.ilc_id is null
451: then
452: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'ilc_id');
453: l_return_status := OKC_API.G_RET_STS_ERROR;
454: elsif p_tryv_rec.try_type = OKC_API.G_MISS_CHAR or
455: p_tryv_rec.try_type is null
456: then
449: elsif p_tryv_rec.ilc_id = OKC_API.G_MISS_NUM or
450: p_tryv_rec.ilc_id is null
451: then
452: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'ilc_id');
453: l_return_status := OKC_API.G_RET_STS_ERROR;
454: elsif p_tryv_rec.try_type = OKC_API.G_MISS_CHAR or
455: p_tryv_rec.try_type is null
456: then
457: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'try_type');
450: p_tryv_rec.ilc_id is null
451: then
452: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'ilc_id');
453: l_return_status := OKC_API.G_RET_STS_ERROR;
454: elsif p_tryv_rec.try_type = OKC_API.G_MISS_CHAR or
455: p_tryv_rec.try_type is null
456: then
457: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'try_type');
458: l_return_status := OKC_API.G_RET_STS_ERROR;
453: l_return_status := OKC_API.G_RET_STS_ERROR;
454: elsif p_tryv_rec.try_type = OKC_API.G_MISS_CHAR or
455: p_tryv_rec.try_type is null
456: then
457: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'try_type');
458: l_return_status := OKC_API.G_RET_STS_ERROR;
459: elsif p_tryv_rec.name = OKC_API.G_MISS_CHAR or
460: p_tryv_rec.name is null
461: then
454: elsif p_tryv_rec.try_type = OKC_API.G_MISS_CHAR or
455: p_tryv_rec.try_type is null
456: then
457: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'try_type');
458: l_return_status := OKC_API.G_RET_STS_ERROR;
459: elsif p_tryv_rec.name = OKC_API.G_MISS_CHAR or
460: p_tryv_rec.name is null
461: then
462: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'name');
455: p_tryv_rec.try_type is null
456: then
457: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'try_type');
458: l_return_status := OKC_API.G_RET_STS_ERROR;
459: elsif p_tryv_rec.name = OKC_API.G_MISS_CHAR or
460: p_tryv_rec.name is null
461: then
462: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'name');
463: l_return_status := OKC_API.G_RET_STS_ERROR;
458: l_return_status := OKC_API.G_RET_STS_ERROR;
459: elsif p_tryv_rec.name = OKC_API.G_MISS_CHAR or
460: p_tryv_rec.name is null
461: then
462: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'name');
463: l_return_status := OKC_API.G_RET_STS_ERROR;
464: elsif p_tryv_rec.contract_header_line_flag = OKC_API.G_MISS_CHAR or
465: p_tryv_rec.contract_header_line_flag is null
466: then
459: elsif p_tryv_rec.name = OKC_API.G_MISS_CHAR or
460: p_tryv_rec.name is null
461: then
462: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'name');
463: l_return_status := OKC_API.G_RET_STS_ERROR;
464: elsif p_tryv_rec.contract_header_line_flag = OKC_API.G_MISS_CHAR or
465: p_tryv_rec.contract_header_line_flag is null
466: then
467: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'contract_header_line_flag');
460: p_tryv_rec.name is null
461: then
462: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'name');
463: l_return_status := OKC_API.G_RET_STS_ERROR;
464: elsif p_tryv_rec.contract_header_line_flag = OKC_API.G_MISS_CHAR or
465: p_tryv_rec.contract_header_line_flag is null
466: then
467: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'contract_header_line_flag');
468: l_return_status := OKC_API.G_RET_STS_ERROR;
463: l_return_status := OKC_API.G_RET_STS_ERROR;
464: elsif p_tryv_rec.contract_header_line_flag = OKC_API.G_MISS_CHAR or
465: p_tryv_rec.contract_header_line_flag is null
466: then
467: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'contract_header_line_flag');
468: l_return_status := OKC_API.G_RET_STS_ERROR;
469: elsif p_tryv_rec.transaction_header_line_detail = OKC_API.G_MISS_CHAR or
470: p_tryv_rec.transaction_header_line_detail is null
471: then
464: elsif p_tryv_rec.contract_header_line_flag = OKC_API.G_MISS_CHAR or
465: p_tryv_rec.contract_header_line_flag is null
466: then
467: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'contract_header_line_flag');
468: l_return_status := OKC_API.G_RET_STS_ERROR;
469: elsif p_tryv_rec.transaction_header_line_detail = OKC_API.G_MISS_CHAR or
470: p_tryv_rec.transaction_header_line_detail is null
471: then
472: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'transaction_header_line_detail');
465: p_tryv_rec.contract_header_line_flag is null
466: then
467: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'contract_header_line_flag');
468: l_return_status := OKC_API.G_RET_STS_ERROR;
469: elsif p_tryv_rec.transaction_header_line_detail = OKC_API.G_MISS_CHAR or
470: p_tryv_rec.transaction_header_line_detail is null
471: then
472: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'transaction_header_line_detail');
473: l_return_status := OKC_API.G_RET_STS_ERROR;
468: l_return_status := OKC_API.G_RET_STS_ERROR;
469: elsif p_tryv_rec.transaction_header_line_detail = OKC_API.G_MISS_CHAR or
470: p_tryv_rec.transaction_header_line_detail is null
471: then
472: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'transaction_header_line_detail');
473: l_return_status := OKC_API.G_RET_STS_ERROR;
474: end if;
475: return(l_return_status);
476: end Validate_Attributes;
469: elsif p_tryv_rec.transaction_header_line_detail = OKC_API.G_MISS_CHAR or
470: p_tryv_rec.transaction_header_line_detail is null
471: then
472: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE,G_COL_NAME_TOKEN,'transaction_header_line_detail');
473: l_return_status := OKC_API.G_RET_STS_ERROR;
474: end if;
475: return(l_return_status);
476: end Validate_Attributes;
477:
483: -----------------------------------------
484: function Validate_Record (
485: p_tryv_rec in tryv_rec_type
486: ) return varchar2 is
487: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
488: begin
489: return (l_return_status);
490: end Validate_Record;
491:
506: procedure Validate_Id (x_return_status out NOCOPY varchar2
507: ,p_tryv_rec in tryv_rec_type )
508: is
509:
510: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
511:
512: begin
513: -- initialize return status
514: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
510: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
511:
512: begin
513: -- initialize return status
514: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
515: -- check for data before processing
516: if (p_tryv_rec.id is null) or
517: (p_tryv_rec.id = Okc_Api.G_MISS_NUM) then
518: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
513: -- initialize return status
514: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
515: -- check for data before processing
516: if (p_tryv_rec.id is null) or
517: (p_tryv_rec.id = Okc_Api.G_MISS_NUM) then
518: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
519: ,p_msg_name => g_required_value
520: ,p_token1 => g_col_name_token
521: ,p_token1_value => 'id');
514: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
515: -- check for data before processing
516: if (p_tryv_rec.id is null) or
517: (p_tryv_rec.id = Okc_Api.G_MISS_NUM) then
518: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
519: ,p_msg_name => g_required_value
520: ,p_token1 => g_col_name_token
521: ,p_token1_value => 'id');
522: x_return_status := Okc_Api.G_RET_STS_ERROR;
518: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
519: ,p_msg_name => g_required_value
520: ,p_token1 => g_col_name_token
521: ,p_token1_value => 'id');
522: x_return_status := Okc_Api.G_RET_STS_ERROR;
523: raise G_EXCEPTION_HALT_VALIDATION;
524: end if;
525:
526: exception
530: null;
531:
532: when OTHERS then
533: -- store SQL error message on message stack for caller
534: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
535: p_msg_name => g_unexpected_error,
536: p_token1 => g_sqlcode_token,
537: p_token1_value => SQLCODE,
538: p_token2 => g_sqlerrm_token,
538: p_token2 => g_sqlerrm_token,
539: p_token2_value => SQLERRM);
540:
541: -- notify caller of an UNEXPECTED error
542: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
543:
544: end Validate_Id;
545:
546: ---------------------------------------------------------------------------
558: procedure Validate_Object_Version_Number(x_return_status out NOCOPY varchar2
559: ,p_tryv_rec in tryv_rec_type )
560: is
561:
562: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
563:
564: begin
565: -- initialize return status
566: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
562: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
563:
564: begin
565: -- initialize return status
566: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
567: -- check for data before processing
568: if (p_tryv_rec.object_version_number is null) or
569: (p_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM) then
570: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
565: -- initialize return status
566: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
567: -- check for data before processing
568: if (p_tryv_rec.object_version_number is null) or
569: (p_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM) then
570: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
571: ,p_msg_name => g_required_value
572: ,p_token1 => g_col_name_token
573: ,p_token1_value => 'object_version_number');
566: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
567: -- check for data before processing
568: if (p_tryv_rec.object_version_number is null) or
569: (p_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM) then
570: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
571: ,p_msg_name => g_required_value
572: ,p_token1 => g_col_name_token
573: ,p_token1_value => 'object_version_number');
574: x_return_status := Okc_Api.G_RET_STS_ERROR;
570: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
571: ,p_msg_name => g_required_value
572: ,p_token1 => g_col_name_token
573: ,p_token1_value => 'object_version_number');
574: x_return_status := Okc_Api.G_RET_STS_ERROR;
575: raise G_EXCEPTION_HALT_VALIDATION;
576: end if;
577:
578: exception
582: null;
583:
584: when OTHERS then
585: -- store SQL error message on message stack for caller
586: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
587: p_msg_name => g_unexpected_error,
588: p_token1 => g_sqlcode_token,
589: p_token1_value => SQLCODE,
590: p_token2 => g_sqlerrm_token,
590: p_token2 => g_sqlerrm_token,
591: p_token2_value => SQLERRM);
592:
593: -- notify caller of an UNEXPECTED error
594: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
595:
596: end Validate_Object_Version_Number;
597:
598:
611: procedure Validate_Sfwt_Flag(x_return_status out NOCOPY varchar2
612: ,p_tryv_rec in tryv_rec_type)
613: is
614:
615: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
616: l_dummy varchar2(1) := '?';
617:
618: begin
619: -- initialize return status
616: l_dummy varchar2(1) := '?';
617:
618: begin
619: -- initialize return status
620: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
621:
622: -- check for data before processing
623: if (p_tryv_rec.sfwt_flag is null) or
624: (p_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR) then
620: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
621:
622: -- check for data before processing
623: if (p_tryv_rec.sfwt_flag is null) or
624: (p_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR) then
625: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
626: ,p_msg_name => g_required_value
627: ,p_token1 => g_col_name_token
628: ,p_token1_value => 'sfwt_flag');
621:
622: -- check for data before processing
623: if (p_tryv_rec.sfwt_flag is null) or
624: (p_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR) then
625: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
626: ,p_msg_name => g_required_value
627: ,p_token1 => g_col_name_token
628: ,p_token1_value => 'sfwt_flag');
629: x_return_status := Okc_Api.G_RET_STS_ERROR;
625: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
626: ,p_msg_name => g_required_value
627: ,p_token1 => g_col_name_token
628: ,p_token1_value => 'sfwt_flag');
629: x_return_status := Okc_Api.G_RET_STS_ERROR;
630: raise G_EXCEPTION_HALT_VALIDATION;
631: -- check if sfwt_flag is in uppercase
632: elsif (p_tryv_rec.sfwt_flag) <> UPPER(p_tryv_rec.sfwt_flag) then
633: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
629: x_return_status := Okc_Api.G_RET_STS_ERROR;
630: raise G_EXCEPTION_HALT_VALIDATION;
631: -- check if sfwt_flag is in uppercase
632: elsif (p_tryv_rec.sfwt_flag) <> UPPER(p_tryv_rec.sfwt_flag) then
633: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
634: ,p_msg_name => g_uppercase_required
635: ,p_token1 => g_col_name_token
636: ,p_token1_value => 'sfwt_flag');
637: x_return_status := Okc_Api.G_RET_STS_ERROR;
633: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
634: ,p_msg_name => g_uppercase_required
635: ,p_token1 => g_col_name_token
636: ,p_token1_value => 'sfwt_flag');
637: x_return_status := Okc_Api.G_RET_STS_ERROR;
638: raise G_EXCEPTION_HALT_VALIDATION;
639: -- check if sfwt_flag is Y or N
640: elsif p_tryv_rec.sfwt_flag is not null then
641: --Check if sfwt_flag exists in the fnd_common_lookups or not
643: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
644: p_lookup_code => p_tryv_rec.sfwt_flag,
645: p_app_id => 0,
646: p_view_app_id => 0);
647: if l_dummy = OKC_API.G_FALSE then
648: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
649: p_msg_name => g_invalid_value,
650: p_token1 => g_col_name_token,
651: p_token1_value => 'sfwt_flag');
644: p_lookup_code => p_tryv_rec.sfwt_flag,
645: p_app_id => 0,
646: p_view_app_id => 0);
647: if l_dummy = OKC_API.G_FALSE then
648: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
649: p_msg_name => g_invalid_value,
650: p_token1 => g_col_name_token,
651: p_token1_value => 'sfwt_flag');
652: x_return_status := Okc_Api.G_RET_STS_ERROR;
648: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
649: p_msg_name => g_invalid_value,
650: p_token1 => g_col_name_token,
651: p_token1_value => 'sfwt_flag');
652: x_return_status := Okc_Api.G_RET_STS_ERROR;
653: raise G_EXCEPTION_HALT_VALIDATION;
654: end if;
655: end if;
656:
661: null;
662:
663: when OTHERS then
664: -- store SQL error message on message stack for caller
665: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
666: p_msg_name => g_unexpected_error,
667: p_token1 => g_sqlcode_token,
668: p_token1_value => SQLCODE,
669: p_token2 => g_sqlerrm_token,
669: p_token2 => g_sqlerrm_token,
670: p_token2_value => SQLERRM);
671:
672: -- notify caller of an UNEXPECTED error
673: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
674:
675: end Validate_Sfwt_Flag;
676:
677: ---------------------------------------------------------------------------
690: procedure Validate_Aep_Code(
691: x_return_status out NOCOPY varchar2
692: ,p_tryv_rec in tryv_rec_type ) is
693:
694: l_dummy varchar2(1) := OKC_API.G_FALSE;
695:
696: begin
697: -- initialize return status
698: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
694: l_dummy varchar2(1) := OKC_API.G_FALSE;
695:
696: begin
697: -- initialize return status
698: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
699: -- check for data before processing
700:
701: if (p_tryv_rec.aep_code is not null) and
702: (p_tryv_rec.aep_code <> Okc_Api.G_MISS_CHAR) then
698: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
699: -- check for data before processing
700:
701: if (p_tryv_rec.aep_code is not null) and
702: (p_tryv_rec.aep_code <> Okc_Api.G_MISS_CHAR) then
703: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
704: (p_lookup_type => 'OKL_ACCOUNTING_EVENT_TYPE',
705: p_lookup_code => p_tryv_rec.aep_code);
706:
703: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
704: (p_lookup_type => 'OKL_ACCOUNTING_EVENT_TYPE',
705: p_lookup_code => p_tryv_rec.aep_code);
706:
707: if l_dummy = OKC_API.G_FALSE then
708: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
709: p_msg_name => g_invalid_value,
710: p_token1 => g_col_name_token,
711: p_token1_value => 'aep_code');
704: (p_lookup_type => 'OKL_ACCOUNTING_EVENT_TYPE',
705: p_lookup_code => p_tryv_rec.aep_code);
706:
707: if l_dummy = OKC_API.G_FALSE then
708: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
709: p_msg_name => g_invalid_value,
710: p_token1 => g_col_name_token,
711: p_token1_value => 'aep_code');
712: x_return_status := Okc_Api.G_RET_STS_ERROR;
708: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
709: p_msg_name => g_invalid_value,
710: p_token1 => g_col_name_token,
711: p_token1_value => 'aep_code');
712: x_return_status := Okc_Api.G_RET_STS_ERROR;
713: raise G_EXCEPTION_HALT_VALIDATION;
714: end if;
715: end if;
716:
721: null;
722:
723: when OTHERS then
724: -- store SQL error message on message stack for caller
725: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
726: p_msg_name => g_unexpected_error,
727: p_token1 => g_sqlcode_token,
728: p_token1_value => SQLCODE,
729: p_token2 => g_sqlerrm_token,
728: p_token1_value => SQLCODE,
729: p_token2 => g_sqlerrm_token,
730: p_token2_value => SQLERRM);
731: -- notify caller of an UNEXPECTED error
732: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
733: end Validate_Aep_Code;
734:
735: ---------------------------------------------------------------------------
736: -- PROCEDURE Validate_Name
747: procedure Validate_Name(x_return_status out NOCOPY varchar2
748: ,p_tryv_rec in tryv_rec_type )
749: is
750:
751: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
752:
753: begin
754: -- initialize return status
755: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
751: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
752:
753: begin
754: -- initialize return status
755: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
756: -- check for data before processing
757: if (p_tryv_rec.name is null) or
758: (p_tryv_rec.name = Okc_Api.G_MISS_CHAR) then
759: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
754: -- initialize return status
755: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
756: -- check for data before processing
757: if (p_tryv_rec.name is null) or
758: (p_tryv_rec.name = Okc_Api.G_MISS_CHAR) then
759: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
760: ,p_msg_name => g_required_value
761: ,p_token1 => g_col_name_token
762: ,p_token1_value => 'name');
755: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
756: -- check for data before processing
757: if (p_tryv_rec.name is null) or
758: (p_tryv_rec.name = Okc_Api.G_MISS_CHAR) then
759: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
760: ,p_msg_name => g_required_value
761: ,p_token1 => g_col_name_token
762: ,p_token1_value => 'name');
763: x_return_status := Okc_Api.G_RET_STS_ERROR;
759: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
760: ,p_msg_name => g_required_value
761: ,p_token1 => g_col_name_token
762: ,p_token1_value => 'name');
763: x_return_status := Okc_Api.G_RET_STS_ERROR;
764: raise G_EXCEPTION_HALT_VALIDATION;
765: end if;
766:
767: exception
771: null;
772:
773: when OTHERS then
774: -- store SQL error message on message stack for caller
775: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
776: p_msg_name => g_unexpected_error,
777: p_token1 => g_sqlcode_token,
778: p_token1_value => SQLCODE,
779: p_token2 => g_sqlerrm_token,
779: p_token2 => g_sqlerrm_token,
780: p_token2_value => SQLERRM);
781:
782: -- notify caller of an UNEXPECTED error
783: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
784:
785: end Validate_Name;
786:
787: ---------------------------------------------------------------------------
800: procedure Validate_Ilc_Id(x_return_status out NOCOPY varchar2
801: ,p_tryv_rec in tryv_rec_type ) is
802: begin
803: -- initialize return status
804: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
805: -- check for data before processing
806:
807: if (p_tryv_rec.ilc_id is null) or
808: (p_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM) then
804: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
805: -- check for data before processing
806:
807: if (p_tryv_rec.ilc_id is null) or
808: (p_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM) then
809: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
810: ,p_msg_name => g_required_value
811: ,p_token1 => g_col_name_token
812: ,p_token1_value => 'ilc_id');
805: -- check for data before processing
806:
807: if (p_tryv_rec.ilc_id is null) or
808: (p_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM) then
809: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
810: ,p_msg_name => g_required_value
811: ,p_token1 => g_col_name_token
812: ,p_token1_value => 'ilc_id');
813: x_return_status := Okc_Api.G_RET_STS_ERROR;
809: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
810: ,p_msg_name => g_required_value
811: ,p_token1 => g_col_name_token
812: ,p_token1_value => 'ilc_id');
813: x_return_status := Okc_Api.G_RET_STS_ERROR;
814: raise G_EXCEPTION_HALT_VALIDATION;
815: end if;
816:
817: exception
821: null;
822:
823: when OTHERS then
824: -- store SQL error message on message stack for caller
825: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
826: p_msg_name => g_unexpected_error,
827: p_token1 => g_sqlcode_token,
828: p_token1_value => SQLCODE,
829: p_token2 => g_sqlerrm_token,
828: p_token1_value => SQLCODE,
829: p_token2 => g_sqlerrm_token,
830: p_token2_value => SQLERRM);
831: -- notify caller of an UNEXPECTED error
832: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
833: end Validate_Ilc_Id;
834:
835: ---------------------------------------------------------------------------
836: -- PROCEDURE Validate_Try_Id
856: l_dummy varchar2(1) := '?';
857:
858: begin
859: -- initialize return status
860: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
861:
862: if (p_tryv_rec.try_id is not null) and
863: (p_tryv_rec.try_id <> OKC_API.G_MISS_NUM) then
864: open try_id_csr(p_tryv_rec.try_id);
859: -- initialize return status
860: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
861:
862: if (p_tryv_rec.try_id is not null) and
863: (p_tryv_rec.try_id <> OKC_API.G_MISS_NUM) then
864: open try_id_csr(p_tryv_rec.try_id);
865: fetch try_id_csr into l_dummy;
866: if (try_id_csr%notfound) then
867: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
863: (p_tryv_rec.try_id <> OKC_API.G_MISS_NUM) then
864: open try_id_csr(p_tryv_rec.try_id);
865: fetch try_id_csr into l_dummy;
866: if (try_id_csr%notfound) then
867: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
868: p_msg_name => g_invalid_value,
869: p_token1 => g_col_name_token,
870: p_token1_value => 'try_id');
871: x_return_status := Okc_Api.G_RET_STS_ERROR;
867: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
868: p_msg_name => g_invalid_value,
869: p_token1 => g_col_name_token,
870: p_token1_value => 'try_id');
871: x_return_status := Okc_Api.G_RET_STS_ERROR;
872: close try_id_csr;
873: raise G_EXCEPTION_HALT_VALIDATION;
874: end if;
875: close try_id_csr ;
882: null;
883:
884: when OTHERS then
885: -- store SQL error message on message stack for caller
886: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
887: p_msg_name => g_unexpected_error,
888: p_token1 => g_sqlcode_token,
889: p_token1_value => SQLCODE,
890: p_token2 => g_sqlerrm_token,
889: p_token1_value => SQLCODE,
890: p_token2 => g_sqlerrm_token,
891: p_token2_value => SQLERRM);
892: -- notify caller of an UNEXPECTED error
893: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
894: end Validate_Try_Id;
895:
896: ---------------------------------------------------------------------------
897: -- PROCEDURE Validate_Try_Id_For
917: l_dummy varchar2(1) := '?';
918:
919: begin
920: -- initialize return status
921: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
922:
923: if (p_tryv_rec.try_id_for is not null) and
924: (p_tryv_rec.try_id_for <> OKC_API.G_MISS_NUM) then
925:
920: -- initialize return status
921: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
922:
923: if (p_tryv_rec.try_id_for is not null) and
924: (p_tryv_rec.try_id_for <> OKC_API.G_MISS_NUM) then
925:
926: open try_id_for_csr(p_tryv_rec.try_id_for);
927: fetch try_id_for_csr into l_dummy;
928: if (try_id_for_csr%notfound) then
925:
926: open try_id_for_csr(p_tryv_rec.try_id_for);
927: fetch try_id_for_csr into l_dummy;
928: if (try_id_for_csr%notfound) then
929: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
930: p_msg_name => g_invalid_value,
931: p_token1 => g_col_name_token,
932: p_token1_value => 'try_id_for');
933: x_return_status := Okc_Api.G_RET_STS_ERROR;
929: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
930: p_msg_name => g_invalid_value,
931: p_token1 => g_col_name_token,
932: p_token1_value => 'try_id_for');
933: x_return_status := Okc_Api.G_RET_STS_ERROR;
934: close try_id_for_csr ;
935: raise G_EXCEPTION_HALT_VALIDATION;
936: end if;
937: close try_id_for_csr ;
944: null;
945:
946: when OTHERS then
947: -- store SQL error message on message stack for caller
948: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
949: p_msg_name => g_unexpected_error,
950: p_token1 => g_sqlcode_token,
951: p_token1_value => SQLCODE,
952: p_token2 => g_sqlerrm_token,
951: p_token1_value => SQLCODE,
952: p_token2 => g_sqlerrm_token,
953: p_token2_value => SQLERRM);
954: -- notify caller of an UNEXPECTED error
955: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
956: end Validate_Try_Id_For;
957:
958: ---------------------------------------------------------------------------
959: -- PROCEDURE Validate_Try_Type
971: procedure Validate_Try_Type(
972: x_return_status out NOCOPY varchar2
973: ,p_tryv_rec in tryv_rec_type ) is
974:
975: l_dummy varchar2(1) := OKC_API.G_FALSE;
976:
977: begin
978: -- initialize return status
979: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
975: l_dummy varchar2(1) := OKC_API.G_FALSE;
976:
977: begin
978: -- initialize return status
979: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
980: -- check for data before processing
981:
982: if (p_tryv_rec.try_type is null) or
983: (p_tryv_rec.try_type = Okc_Api.G_MISS_CHAR) then
979: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
980: -- check for data before processing
981:
982: if (p_tryv_rec.try_type is null) or
983: (p_tryv_rec.try_type = Okc_Api.G_MISS_CHAR) then
984: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
985: ,p_msg_name => g_required_value
986: ,p_token1 => g_col_name_token
987: ,p_token1_value => 'try_type');
980: -- check for data before processing
981:
982: if (p_tryv_rec.try_type is null) or
983: (p_tryv_rec.try_type = Okc_Api.G_MISS_CHAR) then
984: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
985: ,p_msg_name => g_required_value
986: ,p_token1 => g_col_name_token
987: ,p_token1_value => 'try_type');
988: x_return_status := Okc_Api.G_RET_STS_ERROR;
984: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
985: ,p_msg_name => g_required_value
986: ,p_token1 => g_col_name_token
987: ,p_token1_value => 'try_type');
988: x_return_status := Okc_Api.G_RET_STS_ERROR;
989: raise G_EXCEPTION_HALT_VALIDATION;
990: end if;
991: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
992: (p_lookup_type => 'OKL_TRANSACTION_TYPE_CATEGORY',
991: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
992: (p_lookup_type => 'OKL_TRANSACTION_TYPE_CATEGORY',
993: p_lookup_code => p_tryv_rec.try_type);
994:
995: if (l_dummy = OKC_API.G_FALSE) then
996: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
997: p_msg_name => g_invalid_value,
998: p_token1 => g_col_name_token,
999: p_token1_value => 'try_type');
992: (p_lookup_type => 'OKL_TRANSACTION_TYPE_CATEGORY',
993: p_lookup_code => p_tryv_rec.try_type);
994:
995: if (l_dummy = OKC_API.G_FALSE) then
996: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
997: p_msg_name => g_invalid_value,
998: p_token1 => g_col_name_token,
999: p_token1_value => 'try_type');
1000: x_return_status := Okc_Api.G_RET_STS_ERROR;
996: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
997: p_msg_name => g_invalid_value,
998: p_token1 => g_col_name_token,
999: p_token1_value => 'try_type');
1000: x_return_status := Okc_Api.G_RET_STS_ERROR;
1001: raise G_EXCEPTION_HALT_VALIDATION;
1002: end if;
1003:
1004: exception
1008: null;
1009:
1010: when OTHERS then
1011: -- store SQL error message on message stack for caller
1012: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1013: p_msg_name => g_unexpected_error,
1014: p_token1 => g_sqlcode_token,
1015: p_token1_value => SQLCODE,
1016: p_token2 => g_sqlerrm_token,
1015: p_token1_value => SQLCODE,
1016: p_token2 => g_sqlerrm_token,
1017: p_token2_value => SQLERRM);
1018: -- notify caller of an UNEXPECTED error
1019: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1020: end Validate_Try_Type;
1021:
1022: ---------------------------------------------------------------------------
1023: -- PROCEDURE Validate_Chl_Flag
1034: procedure Validate_Chl_Flag(x_return_status out NOCOPY varchar2
1035: ,p_tryv_rec in tryv_rec_type)
1036: is
1037:
1038: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1039: l_dummy varchar2(1) := OKC_API.G_FALSE;
1040: l_app_id number := 0;
1041: l_view_app_id number := 0;
1042:
1035: ,p_tryv_rec in tryv_rec_type)
1036: is
1037:
1038: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1039: l_dummy varchar2(1) := OKC_API.G_FALSE;
1040: l_app_id number := 0;
1041: l_view_app_id number := 0;
1042:
1043: begin
1041: l_view_app_id number := 0;
1042:
1043: begin
1044: -- initialize return status
1045: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1046:
1047: -- check for data before processing
1048: if (p_tryv_rec.contract_header_line_flag is null) or
1049: (p_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR) then
1045: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1046:
1047: -- check for data before processing
1048: if (p_tryv_rec.contract_header_line_flag is null) or
1049: (p_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR) then
1050: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1051: ,p_msg_name => g_required_value
1052: ,p_token1 => g_col_name_token
1053: ,p_token1_value => 'contract_header_line_flag');
1046:
1047: -- check for data before processing
1048: if (p_tryv_rec.contract_header_line_flag is null) or
1049: (p_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR) then
1050: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1051: ,p_msg_name => g_required_value
1052: ,p_token1 => g_col_name_token
1053: ,p_token1_value => 'contract_header_line_flag');
1054: x_return_status := Okc_Api.G_RET_STS_ERROR;
1050: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1051: ,p_msg_name => g_required_value
1052: ,p_token1 => g_col_name_token
1053: ,p_token1_value => 'contract_header_line_flag');
1054: x_return_status := Okc_Api.G_RET_STS_ERROR;
1055: raise G_EXCEPTION_HALT_VALIDATION;
1056: -- check if contract_header_line_flag is in uppercase
1057: elsif (p_tryv_rec.contract_header_line_flag) <> UPPER(p_tryv_rec.contract_header_line_flag) then
1058: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1054: x_return_status := Okc_Api.G_RET_STS_ERROR;
1055: raise G_EXCEPTION_HALT_VALIDATION;
1056: -- check if contract_header_line_flag is in uppercase
1057: elsif (p_tryv_rec.contract_header_line_flag) <> UPPER(p_tryv_rec.contract_header_line_flag) then
1058: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1059: ,p_msg_name => g_uppercase_required
1060: ,p_token1 => g_col_name_token
1061: ,p_token1_value => 'contract_header_line_flag');
1062: x_return_status := Okc_Api.G_RET_STS_ERROR;
1058: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1059: ,p_msg_name => g_uppercase_required
1060: ,p_token1 => g_col_name_token
1061: ,p_token1_value => 'contract_header_line_flag');
1062: x_return_status := Okc_Api.G_RET_STS_ERROR;
1063: raise G_EXCEPTION_HALT_VALIDATION;
1064: -- check if contract_header_line_flag is Y or N
1065: else
1066: --Check if contract_header_line_flag exists in the fnd_common_lookups or not
1068: (p_lookup_type => 'YES_NO',
1069: p_lookup_code => p_tryv_rec.contract_header_line_flag,
1070: p_app_id => l_app_id,
1071: p_view_app_id => l_view_app_id);
1072: if l_dummy = OKC_API.G_FALSE then
1073: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1074: p_msg_name => g_invalid_value,
1075: p_token1 => g_col_name_token,
1076: p_token1_value => 'contract_header_line_flag');
1069: p_lookup_code => p_tryv_rec.contract_header_line_flag,
1070: p_app_id => l_app_id,
1071: p_view_app_id => l_view_app_id);
1072: if l_dummy = OKC_API.G_FALSE then
1073: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1074: p_msg_name => g_invalid_value,
1075: p_token1 => g_col_name_token,
1076: p_token1_value => 'contract_header_line_flag');
1077: x_return_status := Okc_Api.G_RET_STS_ERROR;
1073: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1074: p_msg_name => g_invalid_value,
1075: p_token1 => g_col_name_token,
1076: p_token1_value => 'contract_header_line_flag');
1077: x_return_status := Okc_Api.G_RET_STS_ERROR;
1078: raise G_EXCEPTION_HALT_VALIDATION;
1079: end if;
1080: end if;
1081:
1086: null;
1087:
1088: when OTHERS then
1089: -- store SQL error message on message stack for caller
1090: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1091: p_msg_name => g_unexpected_error,
1092: p_token1 => g_sqlcode_token,
1093: p_token1_value => SQLCODE,
1094: p_token2 => g_sqlerrm_token,
1094: p_token2 => g_sqlerrm_token,
1095: p_token2_value => SQLERRM);
1096:
1097: -- notify caller of an UNEXPECTED error
1098: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1099:
1100: end Validate_Chl_Flag;
1101:
1102: ---------------------------------------------------------------------------
1114: procedure Validate_Thl_Detail(x_return_status out NOCOPY varchar2
1115: ,p_tryv_rec in tryv_rec_type)
1116: is
1117:
1118: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1119: l_dummy varchar2(1) := OKC_API.G_FALSE;
1120: l_app_id number := 0;
1121: l_view_app_id number := 0;
1122:
1115: ,p_tryv_rec in tryv_rec_type)
1116: is
1117:
1118: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1119: l_dummy varchar2(1) := OKC_API.G_FALSE;
1120: l_app_id number := 0;
1121: l_view_app_id number := 0;
1122:
1123: begin
1121: l_view_app_id number := 0;
1122:
1123: begin
1124: -- initialize return status
1125: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1126:
1127: -- check for data before processing
1128: if (p_tryv_rec.transaction_header_line_detail is null) or
1129: (p_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR) then
1125: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1126:
1127: -- check for data before processing
1128: if (p_tryv_rec.transaction_header_line_detail is null) or
1129: (p_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR) then
1130: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1131: ,p_msg_name => g_required_value
1132: ,p_token1 => g_col_name_token
1133: ,p_token1_value => 'transaction_header_line_detail');
1126:
1127: -- check for data before processing
1128: if (p_tryv_rec.transaction_header_line_detail is null) or
1129: (p_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR) then
1130: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1131: ,p_msg_name => g_required_value
1132: ,p_token1 => g_col_name_token
1133: ,p_token1_value => 'transaction_header_line_detail');
1134: x_return_status := Okc_Api.G_RET_STS_ERROR;
1130: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1131: ,p_msg_name => g_required_value
1132: ,p_token1 => g_col_name_token
1133: ,p_token1_value => 'transaction_header_line_detail');
1134: x_return_status := Okc_Api.G_RET_STS_ERROR;
1135: raise G_EXCEPTION_HALT_VALIDATION;
1136: -- check if transaction_header_line_detail is in uppercase
1137: elsif (p_tryv_rec.transaction_header_line_detail) <> UPPER(p_tryv_rec.transaction_header_line_detail) then
1138: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1134: x_return_status := Okc_Api.G_RET_STS_ERROR;
1135: raise G_EXCEPTION_HALT_VALIDATION;
1136: -- check if transaction_header_line_detail is in uppercase
1137: elsif (p_tryv_rec.transaction_header_line_detail) <> UPPER(p_tryv_rec.transaction_header_line_detail) then
1138: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1139: ,p_msg_name => g_uppercase_required
1140: ,p_token1 => g_col_name_token
1141: ,p_token1_value => 'transaction_header_line_detail');
1142: x_return_status := Okc_Api.G_RET_STS_ERROR;
1138: Okc_Api.SET_MESSAGE(p_app_name => g_app_name
1139: ,p_msg_name => g_uppercase_required
1140: ,p_token1 => g_col_name_token
1141: ,p_token1_value => 'transaction_header_line_detail');
1142: x_return_status := Okc_Api.G_RET_STS_ERROR;
1143: raise G_EXCEPTION_HALT_VALIDATION;
1144: -- check if transaction_header_line_detail is Y or N
1145: else
1146: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
1147: (p_lookup_type => 'YES_NO',
1148: p_lookup_code => p_tryv_rec.transaction_header_line_detail,
1149: p_app_id => l_app_id,
1150: p_view_app_id => l_view_app_id);
1151: if (l_dummy = OKC_API.G_FALSE) then
1152: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1153: p_msg_name => g_invalid_value,
1154: p_token1 => g_col_name_token,
1155: p_token1_value => 'transaction_header_line_detail');
1148: p_lookup_code => p_tryv_rec.transaction_header_line_detail,
1149: p_app_id => l_app_id,
1150: p_view_app_id => l_view_app_id);
1151: if (l_dummy = OKC_API.G_FALSE) then
1152: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1153: p_msg_name => g_invalid_value,
1154: p_token1 => g_col_name_token,
1155: p_token1_value => 'transaction_header_line_detail');
1156: x_return_status := Okc_Api.G_RET_STS_ERROR;
1152: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1153: p_msg_name => g_invalid_value,
1154: p_token1 => g_col_name_token,
1155: p_token1_value => 'transaction_header_line_detail');
1156: x_return_status := Okc_Api.G_RET_STS_ERROR;
1157: raise G_EXCEPTION_HALT_VALIDATION;
1158: end if;
1159: end if;
1160:
1165: null;
1166:
1167: when OTHERS then
1168: -- store SQL error message on message stack for caller
1169: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1170: p_msg_name => g_unexpected_error,
1171: p_token1 => g_sqlcode_token,
1172: p_token1_value => SQLCODE,
1173: p_token2 => g_sqlerrm_token,
1173: p_token2 => g_sqlerrm_token,
1174: p_token2_value => SQLERRM);
1175:
1176: -- notify caller of an UNEXPECTED error
1177: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1178:
1179: end Validate_Thl_Detail;
1180:
1181:
1195: procedure Validate_Trx_Type_Class(
1196: x_return_status out NOCOPY varchar2
1197: ,p_tryv_rec in tryv_rec_type ) is
1198:
1199: l_dummy varchar2(1) := OKC_API.G_FALSE;
1200:
1201: begin
1202:
1203: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1199: l_dummy varchar2(1) := OKC_API.G_FALSE;
1200:
1201: begin
1202:
1203: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1204:
1205: if (p_tryv_rec.trx_type_class is not null) and
1206: (p_tryv_rec.trx_type_class <> Okc_Api.G_MISS_CHAR) then
1207:
1202:
1203: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1204:
1205: if (p_tryv_rec.trx_type_class is not null) and
1206: (p_tryv_rec.trx_type_class <> Okc_Api.G_MISS_CHAR) then
1207:
1208: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
1209: (p_lookup_type => 'OKL_TRANSACTION_TYPE_CLASS',
1210: p_lookup_code => p_tryv_rec.trx_type_class);
1208: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE
1209: (p_lookup_type => 'OKL_TRANSACTION_TYPE_CLASS',
1210: p_lookup_code => p_tryv_rec.trx_type_class);
1211:
1212: if (l_dummy = OKC_API.G_FALSE) then
1213: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1214: p_msg_name => g_invalid_value,
1215: p_token1 => g_col_name_token,
1216: p_token1_value => 'trx_type_class');
1209: (p_lookup_type => 'OKL_TRANSACTION_TYPE_CLASS',
1210: p_lookup_code => p_tryv_rec.trx_type_class);
1211:
1212: if (l_dummy = OKC_API.G_FALSE) then
1213: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1214: p_msg_name => g_invalid_value,
1215: p_token1 => g_col_name_token,
1216: p_token1_value => 'trx_type_class');
1217: x_return_status := Okc_Api.G_RET_STS_ERROR;
1213: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1214: p_msg_name => g_invalid_value,
1215: p_token1 => g_col_name_token,
1216: p_token1_value => 'trx_type_class');
1217: x_return_status := Okc_Api.G_RET_STS_ERROR;
1218: raise G_EXCEPTION_HALT_VALIDATION;
1219: end if;
1220: end if;
1221:
1226: null;
1227:
1228: when OTHERS then
1229: -- store SQL error message on message stack for caller
1230: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1231: p_msg_name => g_unexpected_error,
1232: p_token1 => g_sqlcode_token,
1233: p_token1_value => SQLCODE,
1234: p_token2 => g_sqlerrm_token,
1233: p_token1_value => SQLCODE,
1234: p_token2 => g_sqlerrm_token,
1235: p_token2_value => SQLERRM);
1236: -- notify caller of an UNEXPECTED error
1237: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1238: end Validate_TRX_TYPE_CLASS;
1239:
1240: --Added by kthiruva on 06-May-2005 as part of Tax Enhancements
1241: --Bug 4386433 - Start of Changes
1255: procedure Validate_Tax_Upfront_YN(
1256: x_return_status out NOCOPY varchar2
1257: ,p_tryv_rec in tryv_rec_type ) is
1258:
1259: l_dummy varchar2(1) := OKC_API.G_FALSE;
1260:
1261: begin
1262:
1263: -- initialize return status
1260:
1261: begin
1262:
1263: -- initialize return status
1264: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1265:
1266: IF p_tryv_rec.tax_upfront_yn IS NOT NULL THEN
1267: --Check if tax_upfront_yn exists in the fnd_common_lookups or not
1268: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
1268: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
1269: p_lookup_code => p_tryv_rec.tax_upfront_yn,
1270: p_app_id => 0,
1271: p_view_app_id => 0);
1272: IF l_dummy = OKC_API.G_FALSE THEN
1273: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1274: p_msg_name => g_invalid_value,
1275: p_token1 => g_col_name_token,
1276: p_token1_value => 'tax_upfront_yn');
1269: p_lookup_code => p_tryv_rec.tax_upfront_yn,
1270: p_app_id => 0,
1271: p_view_app_id => 0);
1272: IF l_dummy = OKC_API.G_FALSE THEN
1273: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1274: p_msg_name => g_invalid_value,
1275: p_token1 => g_col_name_token,
1276: p_token1_value => 'tax_upfront_yn');
1277: x_return_status := Okc_Api.G_RET_STS_ERROR;
1273: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1274: p_msg_name => g_invalid_value,
1275: p_token1 => g_col_name_token,
1276: p_token1_value => 'tax_upfront_yn');
1277: x_return_status := Okc_Api.G_RET_STS_ERROR;
1278: RAISE G_EXCEPTION_HALT_VALIDATION;
1279: END IF;
1280: END IF;
1281:
1286: null;
1287:
1288: when OTHERS then
1289: -- store SQL error message on message stack for caller
1290: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1291: p_msg_name => g_unexpected_error,
1292: p_token1 => g_sqlcode_token,
1293: p_token1_value => SQLCODE,
1294: p_token2 => g_sqlerrm_token,
1294: p_token2 => g_sqlerrm_token,
1295: p_token2_value => SQLERRM);
1296:
1297: -- notify caller of an UNEXPECTED error
1298: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1299:
1300: END Validate_Tax_Upfront_YN;
1301:
1302: ---------------------------------------------------------------------------
1315: procedure Validate_Tax_Invoice_YN(
1316: x_return_status out NOCOPY varchar2
1317: ,p_tryv_rec in tryv_rec_type ) is
1318:
1319: l_dummy varchar2(1) := OKC_API.G_FALSE;
1320:
1321: begin
1322:
1323: -- initialize return status
1320:
1321: begin
1322:
1323: -- initialize return status
1324: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1325:
1326: IF p_tryv_rec.tax_invoice_yn IS NOT NULL THEN
1327: --Check if tax_upfront_yn exists in the fnd_common_lookups or not
1328: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
1328: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
1329: p_lookup_code => p_tryv_rec.tax_invoice_yn,
1330: p_app_id => 0,
1331: p_view_app_id => 0);
1332: IF l_dummy = OKC_API.G_FALSE THEN
1333: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1334: p_msg_name => g_invalid_value,
1335: p_token1 => g_col_name_token,
1336: p_token1_value => 'tax_invoice_yn');
1329: p_lookup_code => p_tryv_rec.tax_invoice_yn,
1330: p_app_id => 0,
1331: p_view_app_id => 0);
1332: IF l_dummy = OKC_API.G_FALSE THEN
1333: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1334: p_msg_name => g_invalid_value,
1335: p_token1 => g_col_name_token,
1336: p_token1_value => 'tax_invoice_yn');
1337: x_return_status := Okc_Api.G_RET_STS_ERROR;
1333: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1334: p_msg_name => g_invalid_value,
1335: p_token1 => g_col_name_token,
1336: p_token1_value => 'tax_invoice_yn');
1337: x_return_status := Okc_Api.G_RET_STS_ERROR;
1338: RAISE G_EXCEPTION_HALT_VALIDATION;
1339: END IF;
1340: END IF;
1341:
1346: null;
1347:
1348: when OTHERS then
1349: -- store SQL error message on message stack for caller
1350: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1351: p_msg_name => g_unexpected_error,
1352: p_token1 => g_sqlcode_token,
1353: p_token1_value => SQLCODE,
1354: p_token2 => g_sqlerrm_token,
1354: p_token2 => g_sqlerrm_token,
1355: p_token2_value => SQLERRM);
1356:
1357: -- notify caller of an UNEXPECTED error
1358: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1359:
1360: end Validate_Tax_Invoice_YN;
1361:
1362: ---------------------------------------------------------------------------
1375: procedure Validate_Tax_Schedule_YN(
1376: x_return_status out NOCOPY varchar2
1377: ,p_tryv_rec in tryv_rec_type ) is
1378:
1379: l_dummy varchar2(1) := OKC_API.G_FALSE;
1380:
1381: begin
1382:
1383: -- initialize return status
1380:
1381: begin
1382:
1383: -- initialize return status
1384: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1385:
1386: IF p_tryv_rec.tax_schedule_yn IS NOT NULL THEN
1387: --Check if tax_upfront_yn exists in the fnd_common_lookups or not
1388: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
1388: l_dummy := OKL_ACCOUNTING_UTIL.VALIDATE_LOOKUP_CODE(p_lookup_type => 'YES_NO',
1389: p_lookup_code => p_tryv_rec.tax_schedule_yn,
1390: p_app_id => 0,
1391: p_view_app_id => 0);
1392: IF l_dummy = OKC_API.G_FALSE THEN
1393: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1394: p_msg_name => g_invalid_value,
1395: p_token1 => g_col_name_token,
1396: p_token1_value => 'tax_schedule_yn');
1389: p_lookup_code => p_tryv_rec.tax_schedule_yn,
1390: p_app_id => 0,
1391: p_view_app_id => 0);
1392: IF l_dummy = OKC_API.G_FALSE THEN
1393: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1394: p_msg_name => g_invalid_value,
1395: p_token1 => g_col_name_token,
1396: p_token1_value => 'tax_schedule_yn');
1397: x_return_status := Okc_Api.G_RET_STS_ERROR;
1393: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1394: p_msg_name => g_invalid_value,
1395: p_token1 => g_col_name_token,
1396: p_token1_value => 'tax_schedule_yn');
1397: x_return_status := Okc_Api.G_RET_STS_ERROR;
1398: RAISE G_EXCEPTION_HALT_VALIDATION;
1399: END IF;
1400: END IF;
1401:
1406: null;
1407:
1408: when OTHERS then
1409: -- store SQL error message on message stack for caller
1410: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1411: p_msg_name => g_unexpected_error,
1412: p_token1 => g_sqlcode_token,
1413: p_token1_value => SQLCODE,
1414: p_token2 => g_sqlerrm_token,
1414: p_token2 => g_sqlerrm_token,
1415: p_token2_value => SQLERRM);
1416:
1417: -- notify caller of an UNEXPECTED error
1418: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1419:
1420: end Validate_Tax_Schedule_YN;
1421: -- Bug 4386433 - End of Changes
1422:
1558: function Validate_Attributes (
1559: p_tryv_rec in tryv_rec_type
1560: ) return varchar2 is
1561:
1562: x_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1563: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1564: begin
1565:
1566: -- call each column-level validation
1559: p_tryv_rec in tryv_rec_type
1560: ) return varchar2 is
1561:
1562: x_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1563: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1564: begin
1565:
1566: -- call each column-level validation
1567:
1567:
1568: -- Validate_Id
1569: Validate_Id(x_return_status, p_tryv_rec);
1570: -- store the highest degree of error
1571: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1572: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1573: -- need to leave
1574: l_return_status := x_return_status;
1575: raise G_EXCEPTION_HALT_VALIDATION;
1568: -- Validate_Id
1569: Validate_Id(x_return_status, p_tryv_rec);
1570: -- store the highest degree of error
1571: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1572: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1573: -- need to leave
1574: l_return_status := x_return_status;
1575: raise G_EXCEPTION_HALT_VALIDATION;
1576: else
1581:
1582: -- Validate_Object_Version_Number
1583: Validate_Object_Version_Number(x_return_status, p_tryv_rec);
1584: -- store the highest degree of error
1585: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1586: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1587: -- need to leave
1588: l_return_status := x_return_status;
1589: raise G_EXCEPTION_HALT_VALIDATION;
1582: -- Validate_Object_Version_Number
1583: Validate_Object_Version_Number(x_return_status, p_tryv_rec);
1584: -- store the highest degree of error
1585: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1586: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1587: -- need to leave
1588: l_return_status := x_return_status;
1589: raise G_EXCEPTION_HALT_VALIDATION;
1590: else
1595:
1596: -- Validate_Name
1597: Validate_Name(x_return_status, p_tryv_rec);
1598: -- store the highest degree of error
1599: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1600: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1601: -- need to leave
1602: l_return_status := x_return_status;
1603: raise G_EXCEPTION_HALT_VALIDATION;
1596: -- Validate_Name
1597: Validate_Name(x_return_status, p_tryv_rec);
1598: -- store the highest degree of error
1599: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1600: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1601: -- need to leave
1602: l_return_status := x_return_status;
1603: raise G_EXCEPTION_HALT_VALIDATION;
1604: else
1610:
1611: -- Validate_Sfwt_Flag
1612: Validate_Sfwt_Flag(x_return_status, p_tryv_rec);
1613: -- store the highest degree of error
1614: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1615: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1616: -- need to leave
1617: l_return_status := x_return_status;
1618: raise G_EXCEPTION_HALT_VALIDATION;
1611: -- Validate_Sfwt_Flag
1612: Validate_Sfwt_Flag(x_return_status, p_tryv_rec);
1613: -- store the highest degree of error
1614: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1615: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1616: -- need to leave
1617: l_return_status := x_return_status;
1618: raise G_EXCEPTION_HALT_VALIDATION;
1619: else
1624:
1625: -- Validate_Aep_Code
1626: Validate_Aep_Code(x_return_status, p_tryv_rec);
1627: -- store the highest degree of error
1628: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1629: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1630: -- need to leave
1631: l_return_status := x_return_status;
1632: raise G_EXCEPTION_HALT_VALIDATION;
1625: -- Validate_Aep_Code
1626: Validate_Aep_Code(x_return_status, p_tryv_rec);
1627: -- store the highest degree of error
1628: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1629: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1630: -- need to leave
1631: l_return_status := x_return_status;
1632: raise G_EXCEPTION_HALT_VALIDATION;
1633: else
1639:
1640: -- Validate_Ilc_Id
1641: Validate_Ilc_Id(x_return_status, p_tryv_rec);
1642: -- store the highest degree of error
1643: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1644: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1645: -- need to leave
1646: l_return_status := x_return_status;
1647: raise G_EXCEPTION_HALT_VALIDATION;
1640: -- Validate_Ilc_Id
1641: Validate_Ilc_Id(x_return_status, p_tryv_rec);
1642: -- store the highest degree of error
1643: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1644: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1645: -- need to leave
1646: l_return_status := x_return_status;
1647: raise G_EXCEPTION_HALT_VALIDATION;
1648: else
1654:
1655: -- Validate_Try_Id
1656: Validate_Try_Id(x_return_status, p_tryv_rec);
1657: -- store the highest degree of error
1658: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1659: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1660: -- need to leave
1661: l_return_status := x_return_status;
1662: raise G_EXCEPTION_HALT_VALIDATION;
1655: -- Validate_Try_Id
1656: Validate_Try_Id(x_return_status, p_tryv_rec);
1657: -- store the highest degree of error
1658: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1659: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1660: -- need to leave
1661: l_return_status := x_return_status;
1662: raise G_EXCEPTION_HALT_VALIDATION;
1663: else
1668:
1669: -- Validate_Try_Id_For
1670: Validate_Try_Id_For(x_return_status, p_tryv_rec);
1671: -- store the highest degree of error
1672: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1673: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1674: -- need to leave
1675: l_return_status := x_return_status;
1676: raise G_EXCEPTION_HALT_VALIDATION;
1669: -- Validate_Try_Id_For
1670: Validate_Try_Id_For(x_return_status, p_tryv_rec);
1671: -- store the highest degree of error
1672: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1673: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1674: -- need to leave
1675: l_return_status := x_return_status;
1676: raise G_EXCEPTION_HALT_VALIDATION;
1677: else
1683:
1684: -- Validate_Chl_Flag
1685: Validate_Chl_Flag(x_return_status, p_tryv_rec);
1686: -- store the highest degree of error
1687: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1688: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1689: -- need to leave
1690: l_return_status := x_return_status;
1691: raise G_EXCEPTION_HALT_VALIDATION;
1684: -- Validate_Chl_Flag
1685: Validate_Chl_Flag(x_return_status, p_tryv_rec);
1686: -- store the highest degree of error
1687: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1688: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1689: -- need to leave
1690: l_return_status := x_return_status;
1691: raise G_EXCEPTION_HALT_VALIDATION;
1692: else
1697:
1698: -- Validate_Thl_Detail
1699: Validate_Thl_Detail(x_return_status, p_tryv_rec);
1700: -- store the highest degree of error
1701: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1702: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1703: -- need to leave
1704: l_return_status := x_return_status;
1705: raise G_EXCEPTION_HALT_VALIDATION;
1698: -- Validate_Thl_Detail
1699: Validate_Thl_Detail(x_return_status, p_tryv_rec);
1700: -- store the highest degree of error
1701: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1702: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1703: -- need to leave
1704: l_return_status := x_return_status;
1705: raise G_EXCEPTION_HALT_VALIDATION;
1706: else
1711:
1712: -- Validate_trx_type_class
1713: Validate_trx_type_class(x_return_status, p_tryv_rec);
1714: -- store the highest degree of error
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
1717: -- need to leave
1718: l_return_status := x_return_status;
1719: raise G_EXCEPTION_HALT_VALIDATION;
1712: -- Validate_trx_type_class
1713: Validate_trx_type_class(x_return_status, p_tryv_rec);
1714: -- store the highest degree of error
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
1717: -- need to leave
1718: l_return_status := x_return_status;
1719: raise G_EXCEPTION_HALT_VALIDATION;
1720: else
1727: --Bug 4386433 - Start of Changes
1728: -- Validate_tax_upfront_yn
1729: Validate_tax_upfront_yn(x_return_status, p_tryv_rec);
1730: -- store the highest degree of error
1731: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1732: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1733: -- need to leave
1734: l_return_status := x_return_status;
1735: raise G_EXCEPTION_HALT_VALIDATION;
1728: -- Validate_tax_upfront_yn
1729: Validate_tax_upfront_yn(x_return_status, p_tryv_rec);
1730: -- store the highest degree of error
1731: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1732: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1733: -- need to leave
1734: l_return_status := x_return_status;
1735: raise G_EXCEPTION_HALT_VALIDATION;
1736: else
1741:
1742: -- Validate_tax_invoice_yn
1743: Validate_tax_invoice_yn(x_return_status, p_tryv_rec);
1744: -- store the highest degree of error
1745: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1746: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1747: -- need to leave
1748: l_return_status := x_return_status;
1749: raise G_EXCEPTION_HALT_VALIDATION;
1742: -- Validate_tax_invoice_yn
1743: Validate_tax_invoice_yn(x_return_status, p_tryv_rec);
1744: -- store the highest degree of error
1745: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1746: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1747: -- need to leave
1748: l_return_status := x_return_status;
1749: raise G_EXCEPTION_HALT_VALIDATION;
1750: else
1755:
1756: -- Validate_tax_schedule_yn
1757: Validate_tax_schedule_yn(x_return_status, p_tryv_rec);
1758: -- store the highest degree of error
1759: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1760: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1761: -- need to leave
1762: l_return_status := x_return_status;
1763: raise G_EXCEPTION_HALT_VALIDATION;
1756: -- Validate_tax_schedule_yn
1757: Validate_tax_schedule_yn(x_return_status, p_tryv_rec);
1758: -- store the highest degree of error
1759: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1760: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1761: -- need to leave
1762: l_return_status := x_return_status;
1763: raise G_EXCEPTION_HALT_VALIDATION;
1764: else
1770: --Bug 5707866 dpsingh
1771: -- Validate_Formula_YN
1772: Validate_Formula_YN(x_return_status, p_tryv_rec);
1773: -- store the highest degree of error
1774: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1775: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1776: -- need to leave
1777: l_return_status := x_return_status;
1778: raise G_EXCEPTION_HALT_VALIDATION;
1771: -- Validate_Formula_YN
1772: Validate_Formula_YN(x_return_status, p_tryv_rec);
1773: -- store the highest degree of error
1774: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1775: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1776: -- need to leave
1777: l_return_status := x_return_status;
1778: raise G_EXCEPTION_HALT_VALIDATION;
1779: else
1784:
1785: -- Validate_Accnt_Evnt_Class_Cde
1786: Validate_Accnt_Evnt_Class_Cde(x_return_status, p_tryv_rec);
1787: -- store the highest degree of error
1788: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1789: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1790: -- need to leave
1791: l_return_status := x_return_status;
1792: raise G_EXCEPTION_HALT_VALIDATION;
1785: -- Validate_Accnt_Evnt_Class_Cde
1786: Validate_Accnt_Evnt_Class_Cde(x_return_status, p_tryv_rec);
1787: -- store the highest degree of error
1788: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1789: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1790: -- need to leave
1791: l_return_status := x_return_status;
1792: raise G_EXCEPTION_HALT_VALIDATION;
1793: else
1804: return (l_return_status);
1805:
1806: when OTHERS then
1807: -- store SQL error message on message stack for caller
1808: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1809: p_msg_name => g_unexpected_error,
1810: p_token1 => g_sqlcode_token,
1811: p_token1_value => SQLCODE,
1812: p_token2 => g_sqlerrm_token,
1811: p_token1_value => SQLCODE,
1812: p_token2 => g_sqlerrm_token,
1813: p_token2_value => SQLERRM);
1814: -- notify caller of an UNEXPECTED error
1815: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1816: return(l_return_status);
1817:
1818: end Validate_Attributes;
1819:
1848:
1849: begin
1850:
1851: -- initialize return status
1852: x_return_status := Okc_Api.G_RET_STS_SUCCESS;
1853:
1854: open unique_try_csr(p_tryv_rec.name,
1855: l_language, p_tryv_rec.id);
1856: fetch unique_try_csr into l_dummy;
1856: fetch unique_try_csr into l_dummy;
1857: l_row_found := unique_try_csr%found;
1858: close unique_try_csr;
1859: if l_row_found then
1860: Okc_Api.set_message('OKL',G_UNQS);
1861: x_return_status := Okc_Api.G_RET_STS_ERROR;
1862: raise G_EXCEPTION_HALT_VALIDATION;
1863: end if;
1864: exception
1857: l_row_found := unique_try_csr%found;
1858: close unique_try_csr;
1859: if l_row_found then
1860: Okc_Api.set_message('OKL',G_UNQS);
1861: x_return_status := Okc_Api.G_RET_STS_ERROR;
1862: raise G_EXCEPTION_HALT_VALIDATION;
1863: end if;
1864: exception
1865: when G_EXCEPTION_HALT_VALIDATION then
1868: null;
1869:
1870: when OTHERS then
1871: -- store SQL error message on message stack for caller
1872: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1873: p_msg_name => g_unexpected_error,
1874: p_token1 => g_sqlcode_token,
1875: p_token1_value => SQLCODE,
1876: p_token2 => g_sqlerrm_token,
1876: p_token2 => g_sqlerrm_token,
1877: p_token2_value => SQLERRM);
1878:
1879: -- notify caller of an UNEXPECTED error
1880: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1881:
1882: end Validate_Unique_Try_Record;
1883:
1884: ---------------------------------------------------------------------------
1896:
1897: function Validate_Record (
1898: p_tryv_rec in tryv_rec_type
1899: ) return varchar2 is
1900: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1901: x_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1902: begin
1903:
1904: -- Validate_Unique_Try_Record
1897: function Validate_Record (
1898: p_tryv_rec in tryv_rec_type
1899: ) return varchar2 is
1900: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1901: x_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
1902: begin
1903:
1904: -- Validate_Unique_Try_Record
1905: Validate_Unique_Try_Record(x_return_status,p_tryv_rec );
1903:
1904: -- Validate_Unique_Try_Record
1905: Validate_Unique_Try_Record(x_return_status,p_tryv_rec );
1906: -- store the highest degree of error
1907: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1908: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1909: -- need to leave
1910: l_return_status := x_return_status;
1911: raise G_EXCEPTION_HALT_VALIDATION;
1904: -- Validate_Unique_Try_Record
1905: Validate_Unique_Try_Record(x_return_status,p_tryv_rec );
1906: -- store the highest degree of error
1907: if (x_return_status <> Okc_Api.G_RET_STS_SUCCESS) then
1908: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
1909: -- need to leave
1910: l_return_status := x_return_status;
1911: raise G_EXCEPTION_HALT_VALIDATION;
1912: else
1925: return (l_return_status);
1926:
1927: when OTHERS then
1928: -- store SQL error message on message stack for caller
1929: Okc_Api.SET_MESSAGE(p_app_name => g_app_name,
1930: p_msg_name => g_unexpected_error,
1931: p_token1 => g_sqlcode_token,
1932: p_token1_value => SQLCODE,
1933: p_token2 => g_sqlerrm_token,
1933: p_token2 => g_sqlerrm_token,
1934: p_token2_value => SQLERRM);
1935:
1936: -- notify caller of an UNEXPECTED error
1937: x_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
1938:
1939: end Validate_Record;
1940:
1941:
2053: p_tryv_rec in tryv_rec_type) is
2054:
2055: l_api_version constant number := 1;
2056: l_api_name constant varchar2(30) := 'V_validate_row';
2057: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2058: l_tryv_rec tryv_rec_type := p_tryv_rec;
2059: l_try_rec try_rec_type;
2060: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
2061: begin
2058: l_tryv_rec tryv_rec_type := p_tryv_rec;
2059: l_try_rec try_rec_type;
2060: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
2061: begin
2062: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2063: G_PKG_NAME,
2064: p_init_msg_list,
2065: l_api_version,
2066: p_api_version,
2065: l_api_version,
2066: p_api_version,
2067: '_PVT',
2068: x_return_status);
2069: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2070: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2071: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2072: raise Okc_Api.G_EXCEPTION_ERROR;
2073: end if;
2066: p_api_version,
2067: '_PVT',
2068: x_return_status);
2069: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2070: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2071: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2072: raise Okc_Api.G_EXCEPTION_ERROR;
2073: end if;
2074: --- Validate all non-missing attributes (Item Level Validation)
2067: '_PVT',
2068: x_return_status);
2069: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2070: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2071: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2072: raise Okc_Api.G_EXCEPTION_ERROR;
2073: end if;
2074: --- Validate all non-missing attributes (Item Level Validation)
2075: l_return_status := Validate_Attributes(l_tryv_rec);
2068: x_return_status);
2069: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2070: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2071: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2072: raise Okc_Api.G_EXCEPTION_ERROR;
2073: end if;
2074: --- Validate all non-missing attributes (Item Level Validation)
2075: l_return_status := Validate_Attributes(l_tryv_rec);
2076: --- If any errors happen abort API
2073: end if;
2074: --- Validate all non-missing attributes (Item Level Validation)
2075: l_return_status := Validate_Attributes(l_tryv_rec);
2076: --- If any errors happen abort API
2077: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2078: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2079: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2080: raise Okc_Api.G_EXCEPTION_ERROR;
2081: end if;
2074: --- Validate all non-missing attributes (Item Level Validation)
2075: l_return_status := Validate_Attributes(l_tryv_rec);
2076: --- If any errors happen abort API
2077: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2078: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2079: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2080: raise Okc_Api.G_EXCEPTION_ERROR;
2081: end if;
2082: l_return_status := Validate_Record(l_tryv_rec);
2075: l_return_status := Validate_Attributes(l_tryv_rec);
2076: --- If any errors happen abort API
2077: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2078: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2079: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2080: raise Okc_Api.G_EXCEPTION_ERROR;
2081: end if;
2082: l_return_status := Validate_Record(l_tryv_rec);
2083: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2076: --- If any errors happen abort API
2077: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2078: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2079: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2080: raise Okc_Api.G_EXCEPTION_ERROR;
2081: end if;
2082: l_return_status := Validate_Record(l_tryv_rec);
2083: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2084: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2079: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2080: raise Okc_Api.G_EXCEPTION_ERROR;
2081: end if;
2082: l_return_status := Validate_Record(l_tryv_rec);
2083: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2084: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2085: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2086: raise Okc_Api.G_EXCEPTION_ERROR;
2087: end if;
2080: raise Okc_Api.G_EXCEPTION_ERROR;
2081: end if;
2082: l_return_status := Validate_Record(l_tryv_rec);
2083: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2084: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2085: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2086: raise Okc_Api.G_EXCEPTION_ERROR;
2087: end if;
2088: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2081: end if;
2082: l_return_status := Validate_Record(l_tryv_rec);
2083: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2084: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2085: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2086: raise Okc_Api.G_EXCEPTION_ERROR;
2087: end if;
2088: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2089: exception
2082: l_return_status := Validate_Record(l_tryv_rec);
2083: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2084: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2085: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2086: raise Okc_Api.G_EXCEPTION_ERROR;
2087: end if;
2088: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2089: exception
2090: when Okc_Api.G_EXCEPTION_ERROR then
2084: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2085: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2086: raise Okc_Api.G_EXCEPTION_ERROR;
2087: end if;
2088: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2089: exception
2090: when Okc_Api.G_EXCEPTION_ERROR then
2091: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2092: (
2086: raise Okc_Api.G_EXCEPTION_ERROR;
2087: end if;
2088: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2089: exception
2090: when Okc_Api.G_EXCEPTION_ERROR then
2091: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2092: (
2093: l_api_name,
2094: G_PKG_NAME,
2087: end if;
2088: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2089: exception
2090: when Okc_Api.G_EXCEPTION_ERROR then
2091: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2092: (
2093: l_api_name,
2094: G_PKG_NAME,
2095: 'OKC_API.G_RET_STS_ERROR',
2091: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2092: (
2093: l_api_name,
2094: G_PKG_NAME,
2095: 'OKC_API.G_RET_STS_ERROR',
2096: x_msg_count,
2097: x_msg_data,
2098: '_PVT'
2099: );
2096: x_msg_count,
2097: x_msg_data,
2098: '_PVT'
2099: );
2100: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2101: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2102: (
2103: l_api_name,
2104: G_PKG_NAME,
2097: x_msg_data,
2098: '_PVT'
2099: );
2100: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2101: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2102: (
2103: l_api_name,
2104: G_PKG_NAME,
2105: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2101: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2102: (
2103: l_api_name,
2104: G_PKG_NAME,
2105: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2106: x_msg_count,
2107: x_msg_data,
2108: '_PVT'
2109: );
2107: x_msg_data,
2108: '_PVT'
2109: );
2110: when OTHERS then
2111: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2112: (
2113: l_api_name,
2114: G_PKG_NAME,
2115: 'OTHERS',
2130: p_tryv_tbl in tryv_tbl_type) is
2131:
2132: l_api_version constant number := 1;
2133: l_api_name constant varchar2(30) := 'V_tbl_validate_row';
2134: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2135: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2136: i number := 0;
2137: begin
2138: Okc_Api.init_msg_list(p_init_msg_list);
2131:
2132: l_api_version constant number := 1;
2133: l_api_name constant varchar2(30) := 'V_tbl_validate_row';
2134: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2135: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2136: i number := 0;
2137: begin
2138: Okc_Api.init_msg_list(p_init_msg_list);
2139: -- Make sure PL/SQL table has records in it before passing
2134: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2135: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2136: i number := 0;
2137: begin
2138: Okc_Api.init_msg_list(p_init_msg_list);
2139: -- Make sure PL/SQL table has records in it before passing
2140: if (p_tryv_tbl.COUNT > 0) then
2141: i := p_tryv_tbl.FIRST;
2142: loop
2141: i := p_tryv_tbl.FIRST;
2142: loop
2143: validate_row (
2144: p_api_version => p_api_version,
2145: p_init_msg_list => Okc_Api.G_FALSE,
2146: x_return_status => x_return_status,
2147: x_msg_count => x_msg_count,
2148: x_msg_data => x_msg_data,
2149: p_tryv_rec => p_tryv_tbl(i));
2148: x_msg_data => x_msg_data,
2149: p_tryv_rec => p_tryv_tbl(i));
2150: /* Begin Post Generation Change */
2151: -- store the highest degree of error
2152: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
2153: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
2154: l_overall_status := x_return_status;
2155: end if;
2156: end if;
2149: p_tryv_rec => p_tryv_tbl(i));
2150: /* Begin Post Generation Change */
2151: -- store the highest degree of error
2152: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
2153: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
2154: l_overall_status := x_return_status;
2155: end if;
2156: end if;
2157: /* End Post Generation Change */
2159: i := p_tryv_tbl.next(i);
2160: end loop;
2161: end if;
2162: exception
2163: when Okc_Api.G_EXCEPTION_ERROR then
2164: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2165: (
2166: l_api_name,
2167: G_PKG_NAME,
2160: end loop;
2161: end if;
2162: exception
2163: when Okc_Api.G_EXCEPTION_ERROR then
2164: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2165: (
2166: l_api_name,
2167: G_PKG_NAME,
2168: 'OKC_API.G_RET_STS_ERROR',
2164: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2165: (
2166: l_api_name,
2167: G_PKG_NAME,
2168: 'OKC_API.G_RET_STS_ERROR',
2169: x_msg_count,
2170: x_msg_data,
2171: '_PVT'
2172: );
2169: x_msg_count,
2170: x_msg_data,
2171: '_PVT'
2172: );
2173: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2174: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2175: (
2176: l_api_name,
2177: G_PKG_NAME,
2170: x_msg_data,
2171: '_PVT'
2172: );
2173: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2174: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2175: (
2176: l_api_name,
2177: G_PKG_NAME,
2178: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2174: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2175: (
2176: l_api_name,
2177: G_PKG_NAME,
2178: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2179: x_msg_count,
2180: x_msg_data,
2181: '_PVT'
2182: );
2180: x_msg_data,
2181: '_PVT'
2182: );
2183: when OTHERS then
2184: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2185: (
2186: l_api_name,
2187: G_PKG_NAME,
2188: 'OTHERS',
2207: x_try_rec out NOCOPY try_rec_type) is
2208:
2209: l_api_version constant number := 1;
2210: l_api_name constant varchar2(30) := 'B_insert_row';
2211: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2212: l_try_rec try_rec_type := p_try_rec;
2213: l_def_try_rec try_rec_type;
2214: ----------------------------------------
2215: -- Set_Attributes for:OKL_TRX_TYPES_B --
2217: function Set_Attributes (
2218: p_try_rec in try_rec_type,
2219: x_try_rec out NOCOPY try_rec_type
2220: ) return varchar2 is
2221: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2222: begin
2223: x_try_rec := p_try_rec;
2224: return(l_return_status);
2225: end Set_Attributes;
2223: x_try_rec := p_try_rec;
2224: return(l_return_status);
2225: end Set_Attributes;
2226: begin
2227: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2228: p_init_msg_list,
2229: '_PVT',
2230: x_return_status);
2231: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2227: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2228: p_init_msg_list,
2229: '_PVT',
2230: x_return_status);
2231: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2232: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2233: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2234: raise Okc_Api.G_EXCEPTION_ERROR;
2235: end if;
2228: p_init_msg_list,
2229: '_PVT',
2230: x_return_status);
2231: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2232: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2233: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2234: raise Okc_Api.G_EXCEPTION_ERROR;
2235: end if;
2236: --- Setting item attributes
2229: '_PVT',
2230: x_return_status);
2231: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2232: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2233: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2234: raise Okc_Api.G_EXCEPTION_ERROR;
2235: end if;
2236: --- Setting item attributes
2237: l_return_status := Set_Attributes(
2230: x_return_status);
2231: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2232: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2233: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2234: raise Okc_Api.G_EXCEPTION_ERROR;
2235: end if;
2236: --- Setting item attributes
2237: l_return_status := Set_Attributes(
2238: p_try_rec, -- IN
2237: l_return_status := Set_Attributes(
2238: p_try_rec, -- IN
2239: l_try_rec); -- OUT
2240: --- If any errors happen abort API
2241: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2242: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2243: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2244: raise Okc_Api.G_EXCEPTION_ERROR;
2245: end if;
2238: p_try_rec, -- IN
2239: l_try_rec); -- OUT
2240: --- If any errors happen abort API
2241: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2242: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2243: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2244: raise Okc_Api.G_EXCEPTION_ERROR;
2245: end if;
2246: insert into OKL_TRX_TYPES_B(
2239: l_try_rec); -- OUT
2240: --- If any errors happen abort API
2241: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2242: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2243: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2244: raise Okc_Api.G_EXCEPTION_ERROR;
2245: end if;
2246: insert into OKL_TRX_TYPES_B(
2247: id,
2240: --- If any errors happen abort API
2241: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2242: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2243: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2244: raise Okc_Api.G_EXCEPTION_ERROR;
2245: end if;
2246: insert into OKL_TRX_TYPES_B(
2247: id,
2248: try_id,
2294: l_try_rec.accounting_event_class_code
2295: );
2296: -- Set OUT values
2297: x_try_rec := l_try_rec;
2298: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2299: exception
2300: when Okc_Api.G_EXCEPTION_ERROR then
2301: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2302: (
2296: -- Set OUT values
2297: x_try_rec := l_try_rec;
2298: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2299: exception
2300: when Okc_Api.G_EXCEPTION_ERROR then
2301: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2302: (
2303: l_api_name,
2304: G_PKG_NAME,
2297: x_try_rec := l_try_rec;
2298: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2299: exception
2300: when Okc_Api.G_EXCEPTION_ERROR then
2301: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2302: (
2303: l_api_name,
2304: G_PKG_NAME,
2305: 'OKC_API.G_RET_STS_ERROR',
2301: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2302: (
2303: l_api_name,
2304: G_PKG_NAME,
2305: 'OKC_API.G_RET_STS_ERROR',
2306: x_msg_count,
2307: x_msg_data,
2308: '_PVT'
2309: );
2306: x_msg_count,
2307: x_msg_data,
2308: '_PVT'
2309: );
2310: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2311: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2312: (
2313: l_api_name,
2314: G_PKG_NAME,
2307: x_msg_data,
2308: '_PVT'
2309: );
2310: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2311: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2312: (
2313: l_api_name,
2314: G_PKG_NAME,
2315: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2311: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2312: (
2313: l_api_name,
2314: G_PKG_NAME,
2315: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2316: x_msg_count,
2317: x_msg_data,
2318: '_PVT'
2319: );
2317: x_msg_data,
2318: '_PVT'
2319: );
2320: when OTHERS then
2321: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2322: (
2323: l_api_name,
2324: G_PKG_NAME,
2325: 'OTHERS',
2340: x_okl_trx_types_tl_rec out NOCOPY okl_trx_types_tl_rec_type) is
2341:
2342: l_api_version constant number := 1;
2343: l_api_name constant varchar2(30) := 'TL_insert_row';
2344: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2345: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type := p_okl_trx_types_tl_rec;
2346: l_def_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
2347: cursor get_languages is
2348: select *
2354: function Set_Attributes (
2355: p_okl_trx_types_tl_rec in okl_trx_types_tl_rec_type,
2356: x_okl_trx_types_tl_rec out NOCOPY okl_trx_types_tl_rec_type
2357: ) return varchar2 is
2358: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2359: begin
2360: x_okl_trx_types_tl_rec := p_okl_trx_types_tl_rec;
2361: x_okl_trx_types_tl_rec.language := USERENV('LANG');
2362: x_okl_trx_types_tl_rec.SOURCE_LANG := USERENV('LANG');
2362: x_okl_trx_types_tl_rec.SOURCE_LANG := USERENV('LANG');
2363: return(l_return_status);
2364: end Set_Attributes;
2365: begin
2366: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2367: p_init_msg_list,
2368: '_PVT',
2369: x_return_status);
2370:
2367: p_init_msg_list,
2368: '_PVT',
2369: x_return_status);
2370:
2371: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2372: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2373: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2374: raise Okc_Api.G_EXCEPTION_ERROR;
2375: end if;
2368: '_PVT',
2369: x_return_status);
2370:
2371: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2372: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2373: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2374: raise Okc_Api.G_EXCEPTION_ERROR;
2375: end if;
2376: --- Setting item attributes
2369: x_return_status);
2370:
2371: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2372: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2373: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2374: raise Okc_Api.G_EXCEPTION_ERROR;
2375: end if;
2376: --- Setting item attributes
2377: l_return_status := Set_Attributes(
2370:
2371: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2372: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2373: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2374: raise Okc_Api.G_EXCEPTION_ERROR;
2375: end if;
2376: --- Setting item attributes
2377: l_return_status := Set_Attributes(
2378: p_okl_trx_types_tl_rec, -- IN
2378: p_okl_trx_types_tl_rec, -- IN
2379: l_okl_trx_types_tl_rec); -- OUT
2380:
2381: --- If any errors happen abort API
2382: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2383: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2384: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2385: raise Okc_Api.G_EXCEPTION_ERROR;
2386: end if;
2379: l_okl_trx_types_tl_rec); -- OUT
2380:
2381: --- If any errors happen abort API
2382: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2383: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2384: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2385: raise Okc_Api.G_EXCEPTION_ERROR;
2386: end if;
2387: for l_lang_rec in get_languages loop
2380:
2381: --- If any errors happen abort API
2382: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2383: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2384: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2385: raise Okc_Api.G_EXCEPTION_ERROR;
2386: end if;
2387: for l_lang_rec in get_languages loop
2388: l_okl_trx_types_tl_rec.language := l_lang_rec.language_code;
2381: --- If any errors happen abort API
2382: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2383: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2384: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2385: raise Okc_Api.G_EXCEPTION_ERROR;
2386: end if;
2387: for l_lang_rec in get_languages loop
2388: l_okl_trx_types_tl_rec.language := l_lang_rec.language_code;
2389: insert into OKL_TRX_TYPES_TL(
2416: l_okl_trx_types_tl_rec.last_update_login);
2417: end loop;
2418: -- Set OUT values
2419: x_okl_trx_types_tl_rec := l_okl_trx_types_tl_rec;
2420: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2421: exception
2422: when Okc_Api.G_EXCEPTION_ERROR then
2423: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2424: (
2418: -- Set OUT values
2419: x_okl_trx_types_tl_rec := l_okl_trx_types_tl_rec;
2420: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2421: exception
2422: when Okc_Api.G_EXCEPTION_ERROR then
2423: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2424: (
2425: l_api_name,
2426: G_PKG_NAME,
2419: x_okl_trx_types_tl_rec := l_okl_trx_types_tl_rec;
2420: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2421: exception
2422: when Okc_Api.G_EXCEPTION_ERROR then
2423: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2424: (
2425: l_api_name,
2426: G_PKG_NAME,
2427: 'OKC_API.G_RET_STS_ERROR',
2423: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2424: (
2425: l_api_name,
2426: G_PKG_NAME,
2427: 'OKC_API.G_RET_STS_ERROR',
2428: x_msg_count,
2429: x_msg_data,
2430: '_PVT'
2431: );
2428: x_msg_count,
2429: x_msg_data,
2430: '_PVT'
2431: );
2432: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2433: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2434: (
2435: l_api_name,
2436: G_PKG_NAME,
2429: x_msg_data,
2430: '_PVT'
2431: );
2432: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2433: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2434: (
2435: l_api_name,
2436: G_PKG_NAME,
2437: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2433: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2434: (
2435: l_api_name,
2436: G_PKG_NAME,
2437: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2438: x_msg_count,
2439: x_msg_data,
2440: '_PVT'
2441: );
2439: x_msg_data,
2440: '_PVT'
2441: );
2442: when OTHERS then
2443: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2444: (
2445: l_api_name,
2446: G_PKG_NAME,
2447: 'OTHERS',
2463: x_tryv_rec out NOCOPY tryv_rec_type) is
2464:
2465: l_api_version constant number := 1;
2466: l_api_name constant varchar2(30) := 'V_insert_row';
2467: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2468: l_tryv_rec tryv_rec_type;
2469: l_def_tryv_rec tryv_rec_type;
2470: l_try_rec try_rec_type;
2471: lx_try_rec try_rec_type;
2492: function Set_Attributes (
2493: p_tryv_rec in tryv_rec_type,
2494: x_tryv_rec out NOCOPY tryv_rec_type
2495: ) return varchar2 is
2496: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2497: begin
2498: x_tryv_rec := p_tryv_rec;
2499: x_tryv_rec.OBJECT_VERSION_NUMBER := 1;
2500: x_tryv_rec.SFWT_FLAG := 'N';
2508: x_tryv_rec.TRANSACTION_HEADER_LINE_DETAIL := 'Y';
2509: return(l_return_status);
2510: end Set_Attributes;
2511: begin
2512: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2513: G_PKG_NAME,
2514: p_init_msg_list,
2515: l_api_version,
2516: p_api_version,
2515: l_api_version,
2516: p_api_version,
2517: '_PVT',
2518: x_return_status);
2519: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2520: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2521: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2522: raise Okc_Api.G_EXCEPTION_ERROR;
2523: end if;
2516: p_api_version,
2517: '_PVT',
2518: x_return_status);
2519: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2520: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2521: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2522: raise Okc_Api.G_EXCEPTION_ERROR;
2523: end if;
2524: l_tryv_rec := null_out_defaults(p_tryv_rec);
2517: '_PVT',
2518: x_return_status);
2519: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2520: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2521: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2522: raise Okc_Api.G_EXCEPTION_ERROR;
2523: end if;
2524: l_tryv_rec := null_out_defaults(p_tryv_rec);
2525: -- Set primary key value
2518: x_return_status);
2519: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2520: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2521: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2522: raise Okc_Api.G_EXCEPTION_ERROR;
2523: end if;
2524: l_tryv_rec := null_out_defaults(p_tryv_rec);
2525: -- Set primary key value
2526: l_tryv_rec.ID := get_seq_id;
2528: l_return_status := Set_Attributes(
2529: l_tryv_rec, -- IN
2530: l_def_tryv_rec); -- OUT
2531: --- If any errors happen abort API
2532: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2533: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2534: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2535: raise Okc_Api.G_EXCEPTION_ERROR;
2536: end if;
2529: l_tryv_rec, -- IN
2530: l_def_tryv_rec); -- OUT
2531: --- If any errors happen abort API
2532: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2533: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2534: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2535: raise Okc_Api.G_EXCEPTION_ERROR;
2536: end if;
2537: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
2530: l_def_tryv_rec); -- OUT
2531: --- If any errors happen abort API
2532: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2533: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2534: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2535: raise Okc_Api.G_EXCEPTION_ERROR;
2536: end if;
2537: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
2538: --- Validate all non-missing attributes (Item Level Validation)
2531: --- If any errors happen abort API
2532: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2533: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2534: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2535: raise Okc_Api.G_EXCEPTION_ERROR;
2536: end if;
2537: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
2538: --- Validate all non-missing attributes (Item Level Validation)
2539: l_return_status := Validate_Attributes(l_def_tryv_rec);
2537: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
2538: --- Validate all non-missing attributes (Item Level Validation)
2539: l_return_status := Validate_Attributes(l_def_tryv_rec);
2540: --- If any errors happen abort API
2541: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2542: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2543: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2544: raise Okc_Api.G_EXCEPTION_ERROR;
2545: end if;
2538: --- Validate all non-missing attributes (Item Level Validation)
2539: l_return_status := Validate_Attributes(l_def_tryv_rec);
2540: --- If any errors happen abort API
2541: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2542: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2543: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2544: raise Okc_Api.G_EXCEPTION_ERROR;
2545: end if;
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2539: l_return_status := Validate_Attributes(l_def_tryv_rec);
2540: --- If any errors happen abort API
2541: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2542: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2543: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2544: raise Okc_Api.G_EXCEPTION_ERROR;
2545: end if;
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2547: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2540: --- If any errors happen abort API
2541: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2542: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2543: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2544: raise Okc_Api.G_EXCEPTION_ERROR;
2545: end if;
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2547: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2548: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2543: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2544: raise Okc_Api.G_EXCEPTION_ERROR;
2545: end if;
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2547: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2548: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2549: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2550: raise Okc_Api.G_EXCEPTION_ERROR;
2551: end if;
2544: raise Okc_Api.G_EXCEPTION_ERROR;
2545: end if;
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2547: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2548: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2549: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2550: raise Okc_Api.G_EXCEPTION_ERROR;
2551: end if;
2552: --------------------------------------
2545: end if;
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2547: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2548: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2549: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2550: raise Okc_Api.G_EXCEPTION_ERROR;
2551: end if;
2552: --------------------------------------
2553: -- Move VIEW record to "Child" records
2546: l_return_status := Validate_Record(l_def_tryv_rec);
2547: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2548: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2549: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2550: raise Okc_Api.G_EXCEPTION_ERROR;
2551: end if;
2552: --------------------------------------
2553: -- Move VIEW record to "Child" records
2554: --------------------------------------
2564: x_msg_data,
2565: l_try_rec,
2566: lx_try_rec
2567: );
2568: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2569: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2570: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2571: raise Okc_Api.G_EXCEPTION_ERROR;
2572: end if;
2565: l_try_rec,
2566: lx_try_rec
2567: );
2568: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2569: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2570: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2571: raise Okc_Api.G_EXCEPTION_ERROR;
2572: end if;
2573: migrate(lx_try_rec, l_def_tryv_rec);
2566: lx_try_rec
2567: );
2568: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2569: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2570: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2571: raise Okc_Api.G_EXCEPTION_ERROR;
2572: end if;
2573: migrate(lx_try_rec, l_def_tryv_rec);
2574: insert_row(
2567: );
2568: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2569: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2570: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2571: raise Okc_Api.G_EXCEPTION_ERROR;
2572: end if;
2573: migrate(lx_try_rec, l_def_tryv_rec);
2574: insert_row(
2575: p_init_msg_list,
2578: x_msg_data,
2579: l_okl_trx_types_tl_rec,
2580: lx_okl_trx_types_tl_rec
2581: );
2582: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2583: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2584: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2585: raise Okc_Api.G_EXCEPTION_ERROR;
2586: end if;
2579: l_okl_trx_types_tl_rec,
2580: lx_okl_trx_types_tl_rec
2581: );
2582: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2583: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2584: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2585: raise Okc_Api.G_EXCEPTION_ERROR;
2586: end if;
2587: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
2580: lx_okl_trx_types_tl_rec
2581: );
2582: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2583: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2584: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2585: raise Okc_Api.G_EXCEPTION_ERROR;
2586: end if;
2587: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
2588: -- Set OUT values
2581: );
2582: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2583: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2584: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2585: raise Okc_Api.G_EXCEPTION_ERROR;
2586: end if;
2587: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
2588: -- Set OUT values
2589: x_tryv_rec := l_def_tryv_rec;
2586: end if;
2587: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
2588: -- Set OUT values
2589: x_tryv_rec := l_def_tryv_rec;
2590: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2591: exception
2592: when Okc_Api.G_EXCEPTION_ERROR then
2593: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2594: (
2588: -- Set OUT values
2589: x_tryv_rec := l_def_tryv_rec;
2590: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2591: exception
2592: when Okc_Api.G_EXCEPTION_ERROR then
2593: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2594: (
2595: l_api_name,
2596: G_PKG_NAME,
2589: x_tryv_rec := l_def_tryv_rec;
2590: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2591: exception
2592: when Okc_Api.G_EXCEPTION_ERROR then
2593: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2594: (
2595: l_api_name,
2596: G_PKG_NAME,
2597: 'OKC_API.G_RET_STS_ERROR',
2593: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2594: (
2595: l_api_name,
2596: G_PKG_NAME,
2597: 'OKC_API.G_RET_STS_ERROR',
2598: x_msg_count,
2599: x_msg_data,
2600: '_PVT'
2601: );
2598: x_msg_count,
2599: x_msg_data,
2600: '_PVT'
2601: );
2602: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2603: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2604: (
2605: l_api_name,
2606: G_PKG_NAME,
2599: x_msg_data,
2600: '_PVT'
2601: );
2602: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2603: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2604: (
2605: l_api_name,
2606: G_PKG_NAME,
2607: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2603: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2604: (
2605: l_api_name,
2606: G_PKG_NAME,
2607: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2608: x_msg_count,
2609: x_msg_data,
2610: '_PVT'
2611: );
2609: x_msg_data,
2610: '_PVT'
2611: );
2612: when OTHERS then
2613: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2614: (
2615: l_api_name,
2616: G_PKG_NAME,
2617: 'OTHERS',
2633: x_tryv_tbl out NOCOPY tryv_tbl_type) is
2634:
2635: l_api_version constant number := 1;
2636: l_api_name constant varchar2(30) := 'V_tbl_insert_row';
2637: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2638: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2639: i number := 0;
2640: begin
2641: Okc_Api.init_msg_list(p_init_msg_list);
2634:
2635: l_api_version constant number := 1;
2636: l_api_name constant varchar2(30) := 'V_tbl_insert_row';
2637: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2638: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2639: i number := 0;
2640: begin
2641: Okc_Api.init_msg_list(p_init_msg_list);
2642: -- Make sure PL/SQL table has records in it before passing
2637: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2638: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2639: i number := 0;
2640: begin
2641: Okc_Api.init_msg_list(p_init_msg_list);
2642: -- Make sure PL/SQL table has records in it before passing
2643: if (p_tryv_tbl.COUNT > 0) then
2644: i := p_tryv_tbl.FIRST;
2645: loop
2644: i := p_tryv_tbl.FIRST;
2645: loop
2646: insert_row (
2647: p_api_version => p_api_version,
2648: p_init_msg_list => Okc_Api.G_FALSE,
2649: x_return_status => x_return_status,
2650: x_msg_count => x_msg_count,
2651: x_msg_data => x_msg_data,
2652: p_tryv_rec => p_tryv_tbl(i),
2652: p_tryv_rec => p_tryv_tbl(i),
2653: x_tryv_rec => x_tryv_tbl(i));
2654: /* Begin Post Generation Change */
2655: -- store the highest degree of error
2656: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
2657: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
2658: l_overall_status := x_return_status;
2659: end if;
2660: end if;
2653: x_tryv_rec => x_tryv_tbl(i));
2654: /* Begin Post Generation Change */
2655: -- store the highest degree of error
2656: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
2657: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
2658: l_overall_status := x_return_status;
2659: end if;
2660: end if;
2661: /* End Post Generation Change */
2664: end loop;
2665: end if;
2666: x_return_status := l_overall_status;
2667: exception
2668: when Okc_Api.G_EXCEPTION_ERROR then
2669: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2670: (
2671: l_api_name,
2672: G_PKG_NAME,
2665: end if;
2666: x_return_status := l_overall_status;
2667: exception
2668: when Okc_Api.G_EXCEPTION_ERROR then
2669: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2670: (
2671: l_api_name,
2672: G_PKG_NAME,
2673: 'OKC_API.G_RET_STS_ERROR',
2669: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2670: (
2671: l_api_name,
2672: G_PKG_NAME,
2673: 'OKC_API.G_RET_STS_ERROR',
2674: x_msg_count,
2675: x_msg_data,
2676: '_PVT'
2677: );
2674: x_msg_count,
2675: x_msg_data,
2676: '_PVT'
2677: );
2678: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2679: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2680: (
2681: l_api_name,
2682: G_PKG_NAME,
2675: x_msg_data,
2676: '_PVT'
2677: );
2678: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2679: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2680: (
2681: l_api_name,
2682: G_PKG_NAME,
2683: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2679: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2680: (
2681: l_api_name,
2682: G_PKG_NAME,
2683: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2684: x_msg_count,
2685: x_msg_data,
2686: '_PVT'
2687: );
2685: x_msg_data,
2686: '_PVT'
2687: );
2688: when OTHERS then
2689: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2690: (
2691: l_api_name,
2692: G_PKG_NAME,
2693: 'OTHERS',
2724: from OKL_TRX_TYPES_B
2725: where ID = p_try_rec.id;
2726: l_api_version constant number := 1;
2727: l_api_name constant varchar2(30) := 'B_lock_row';
2728: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2729: l_object_version_number OKL_TRX_TYPES_B.OBJECT_VERSION_NUMBER%type;
2730: lc_object_version_number OKL_TRX_TYPES_B.OBJECT_VERSION_NUMBER%type;
2731: l_row_notfound boolean := false;
2732: lc_row_notfound boolean := false;
2730: lc_object_version_number OKL_TRX_TYPES_B.OBJECT_VERSION_NUMBER%type;
2731: l_row_notfound boolean := false;
2732: lc_row_notfound boolean := false;
2733: begin
2734: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2735: p_init_msg_list,
2736: '_PVT',
2737: x_return_status);
2738: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2734: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2735: p_init_msg_list,
2736: '_PVT',
2737: x_return_status);
2738: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2739: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2740: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2741: raise Okc_Api.G_EXCEPTION_ERROR;
2742: end if;
2735: p_init_msg_list,
2736: '_PVT',
2737: x_return_status);
2738: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2739: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2740: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2741: raise Okc_Api.G_EXCEPTION_ERROR;
2742: end if;
2743: begin
2736: '_PVT',
2737: x_return_status);
2738: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2739: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2740: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2741: raise Okc_Api.G_EXCEPTION_ERROR;
2742: end if;
2743: begin
2744: open lock_csr(p_try_rec);
2737: x_return_status);
2738: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2739: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2740: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2741: raise Okc_Api.G_EXCEPTION_ERROR;
2742: end if;
2743: begin
2744: open lock_csr(p_try_rec);
2745: fetch lock_csr into l_object_version_number;
2749: when E_Resource_Busy then
2750: if (lock_csr%isopen) then
2751: close lock_csr;
2752: end if;
2753: Okc_Api.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
2754: raise App_Exceptions.RECORD_LOCK_EXCEPTION;
2755: end;
2756:
2757: if ( l_row_notfound ) then
2760: lc_row_notfound := lchk_csr%notfound;
2761: close lchk_csr;
2762: end if;
2763: if (lc_row_notfound) then
2764: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2765: raise Okc_Api.G_EXCEPTION_ERROR;
2766: elsif lc_object_version_number > p_try_rec.object_version_number then
2767: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2768: raise Okc_Api.G_EXCEPTION_ERROR;
2761: close lchk_csr;
2762: end if;
2763: if (lc_row_notfound) then
2764: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2765: raise Okc_Api.G_EXCEPTION_ERROR;
2766: elsif lc_object_version_number > p_try_rec.object_version_number then
2767: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2768: raise Okc_Api.G_EXCEPTION_ERROR;
2769: elsif lc_object_version_number <> p_try_rec.object_version_number then
2763: if (lc_row_notfound) then
2764: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2765: raise Okc_Api.G_EXCEPTION_ERROR;
2766: elsif lc_object_version_number > p_try_rec.object_version_number then
2767: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2768: raise Okc_Api.G_EXCEPTION_ERROR;
2769: elsif lc_object_version_number <> p_try_rec.object_version_number then
2770: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2771: raise Okc_Api.G_EXCEPTION_ERROR;
2764: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2765: raise Okc_Api.G_EXCEPTION_ERROR;
2766: elsif lc_object_version_number > p_try_rec.object_version_number then
2767: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2768: raise Okc_Api.G_EXCEPTION_ERROR;
2769: elsif lc_object_version_number <> p_try_rec.object_version_number then
2770: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2771: raise Okc_Api.G_EXCEPTION_ERROR;
2772: elsif lc_object_version_number = -1 then
2766: elsif lc_object_version_number > p_try_rec.object_version_number then
2767: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2768: raise Okc_Api.G_EXCEPTION_ERROR;
2769: elsif lc_object_version_number <> p_try_rec.object_version_number then
2770: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2771: raise Okc_Api.G_EXCEPTION_ERROR;
2772: elsif lc_object_version_number = -1 then
2773: Okc_Api.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
2774: raise Okc_Api.G_EXCEPTION_ERROR;
2767: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2768: raise Okc_Api.G_EXCEPTION_ERROR;
2769: elsif lc_object_version_number <> p_try_rec.object_version_number then
2770: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2771: raise Okc_Api.G_EXCEPTION_ERROR;
2772: elsif lc_object_version_number = -1 then
2773: Okc_Api.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
2774: raise Okc_Api.G_EXCEPTION_ERROR;
2775: end if;
2769: elsif lc_object_version_number <> p_try_rec.object_version_number then
2770: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2771: raise Okc_Api.G_EXCEPTION_ERROR;
2772: elsif lc_object_version_number = -1 then
2773: Okc_Api.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
2774: raise Okc_Api.G_EXCEPTION_ERROR;
2775: end if;
2776: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2777: exception
2770: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_CHANGED);
2771: raise Okc_Api.G_EXCEPTION_ERROR;
2772: elsif lc_object_version_number = -1 then
2773: Okc_Api.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
2774: raise Okc_Api.G_EXCEPTION_ERROR;
2775: end if;
2776: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2777: exception
2778: when Okc_Api.G_EXCEPTION_ERROR then
2772: elsif lc_object_version_number = -1 then
2773: Okc_Api.set_message(G_APP_NAME,G_RECORD_LOGICALLY_DELETED);
2774: raise Okc_Api.G_EXCEPTION_ERROR;
2775: end if;
2776: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2777: exception
2778: when Okc_Api.G_EXCEPTION_ERROR then
2779: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2780: (
2774: raise Okc_Api.G_EXCEPTION_ERROR;
2775: end if;
2776: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2777: exception
2778: when Okc_Api.G_EXCEPTION_ERROR then
2779: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2780: (
2781: l_api_name,
2782: G_PKG_NAME,
2775: end if;
2776: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2777: exception
2778: when Okc_Api.G_EXCEPTION_ERROR then
2779: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2780: (
2781: l_api_name,
2782: G_PKG_NAME,
2783: 'OKC_API.G_RET_STS_ERROR',
2779: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2780: (
2781: l_api_name,
2782: G_PKG_NAME,
2783: 'OKC_API.G_RET_STS_ERROR',
2784: x_msg_count,
2785: x_msg_data,
2786: '_PVT'
2787: );
2784: x_msg_count,
2785: x_msg_data,
2786: '_PVT'
2787: );
2788: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2789: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2790: (
2791: l_api_name,
2792: G_PKG_NAME,
2785: x_msg_data,
2786: '_PVT'
2787: );
2788: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2789: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2790: (
2791: l_api_name,
2792: G_PKG_NAME,
2793: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2789: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2790: (
2791: l_api_name,
2792: G_PKG_NAME,
2793: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2794: x_msg_count,
2795: x_msg_data,
2796: '_PVT'
2797: );
2795: x_msg_data,
2796: '_PVT'
2797: );
2798: when OTHERS then
2799: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2800: (
2801: l_api_name,
2802: G_PKG_NAME,
2803: 'OTHERS',
2825: for update nowait;
2826:
2827: l_api_version constant number := 1;
2828: l_api_name constant varchar2(30) := 'TL_lock_row';
2829: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2830: l_lock_var lock_csr%rowtype;
2831: l_row_notfound boolean := false;
2832: lc_row_notfound boolean := false;
2833: begin
2830: l_lock_var lock_csr%rowtype;
2831: l_row_notfound boolean := false;
2832: lc_row_notfound boolean := false;
2833: begin
2834: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2835: p_init_msg_list,
2836: '_PVT',
2837: x_return_status);
2838: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2834: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2835: p_init_msg_list,
2836: '_PVT',
2837: x_return_status);
2838: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2839: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2840: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2841: raise Okc_Api.G_EXCEPTION_ERROR;
2842: end if;
2835: p_init_msg_list,
2836: '_PVT',
2837: x_return_status);
2838: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2839: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2840: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2841: raise Okc_Api.G_EXCEPTION_ERROR;
2842: end if;
2843: begin
2836: '_PVT',
2837: x_return_status);
2838: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2839: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2840: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2841: raise Okc_Api.G_EXCEPTION_ERROR;
2842: end if;
2843: begin
2844: open lock_csr(p_okl_trx_types_tl_rec);
2837: x_return_status);
2838: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2839: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2840: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2841: raise Okc_Api.G_EXCEPTION_ERROR;
2842: end if;
2843: begin
2844: open lock_csr(p_okl_trx_types_tl_rec);
2845: fetch lock_csr into l_lock_var;
2849: when E_Resource_Busy then
2850: if (lock_csr%isopen) then
2851: close lock_csr;
2852: end if;
2853: Okc_Api.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
2854: raise App_Exceptions.RECORD_LOCK_EXCEPTION;
2855: end;
2856:
2857: if ( l_row_notfound ) then
2854: raise App_Exceptions.RECORD_LOCK_EXCEPTION;
2855: end;
2856:
2857: if ( l_row_notfound ) then
2858: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2859: raise Okc_Api.G_EXCEPTION_ERROR;
2860: end if;
2861: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2862: exception
2855: end;
2856:
2857: if ( l_row_notfound ) then
2858: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2859: raise Okc_Api.G_EXCEPTION_ERROR;
2860: end if;
2861: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2862: exception
2863: when Okc_Api.G_EXCEPTION_ERROR then
2857: if ( l_row_notfound ) then
2858: Okc_Api.set_message(G_FND_APP,G_FORM_RECORD_DELETED);
2859: raise Okc_Api.G_EXCEPTION_ERROR;
2860: end if;
2861: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2862: exception
2863: when Okc_Api.G_EXCEPTION_ERROR then
2864: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2865: (
2859: raise Okc_Api.G_EXCEPTION_ERROR;
2860: end if;
2861: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2862: exception
2863: when Okc_Api.G_EXCEPTION_ERROR then
2864: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2865: (
2866: l_api_name,
2867: G_PKG_NAME,
2860: end if;
2861: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2862: exception
2863: when Okc_Api.G_EXCEPTION_ERROR then
2864: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2865: (
2866: l_api_name,
2867: G_PKG_NAME,
2868: 'OKC_API.G_RET_STS_ERROR',
2864: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2865: (
2866: l_api_name,
2867: G_PKG_NAME,
2868: 'OKC_API.G_RET_STS_ERROR',
2869: x_msg_count,
2870: x_msg_data,
2871: '_PVT'
2872: );
2869: x_msg_count,
2870: x_msg_data,
2871: '_PVT'
2872: );
2873: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2874: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2875: (
2876: l_api_name,
2877: G_PKG_NAME,
2870: x_msg_data,
2871: '_PVT'
2872: );
2873: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2874: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2875: (
2876: l_api_name,
2877: G_PKG_NAME,
2878: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2874: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2875: (
2876: l_api_name,
2877: G_PKG_NAME,
2878: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2879: x_msg_count,
2880: x_msg_data,
2881: '_PVT'
2882: );
2880: x_msg_data,
2881: '_PVT'
2882: );
2883: when OTHERS then
2884: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2885: (
2886: l_api_name,
2887: G_PKG_NAME,
2888: 'OTHERS',
2903: p_tryv_rec in tryv_rec_type) is
2904:
2905: l_api_version constant number := 1;
2906: l_api_name constant varchar2(30) := 'V_lock_row';
2907: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2908: l_try_rec try_rec_type;
2909: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
2910: begin
2911: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2907: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
2908: l_try_rec try_rec_type;
2909: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
2910: begin
2911: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
2912: G_PKG_NAME,
2913: p_init_msg_list,
2914: l_api_version,
2915: p_api_version,
2914: l_api_version,
2915: p_api_version,
2916: '_PVT',
2917: x_return_status);
2918: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2919: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2920: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2921: raise Okc_Api.G_EXCEPTION_ERROR;
2922: end if;
2915: p_api_version,
2916: '_PVT',
2917: x_return_status);
2918: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2919: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2920: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2921: raise Okc_Api.G_EXCEPTION_ERROR;
2922: end if;
2923: --------------------------------------
2916: '_PVT',
2917: x_return_status);
2918: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2919: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2920: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2921: raise Okc_Api.G_EXCEPTION_ERROR;
2922: end if;
2923: --------------------------------------
2924: -- Move VIEW record to "Child" records
2917: x_return_status);
2918: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2919: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2920: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
2921: raise Okc_Api.G_EXCEPTION_ERROR;
2922: end if;
2923: --------------------------------------
2924: -- Move VIEW record to "Child" records
2925: --------------------------------------
2934: x_msg_count,
2935: x_msg_data,
2936: l_try_rec
2937: );
2938: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2939: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2940: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2941: raise Okc_Api.G_EXCEPTION_ERROR;
2942: end if;
2935: x_msg_data,
2936: l_try_rec
2937: );
2938: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2939: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2940: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2941: raise Okc_Api.G_EXCEPTION_ERROR;
2942: end if;
2943: lock_row(
2936: l_try_rec
2937: );
2938: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2939: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2940: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2941: raise Okc_Api.G_EXCEPTION_ERROR;
2942: end if;
2943: lock_row(
2944: p_init_msg_list,
2937: );
2938: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2939: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2940: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2941: raise Okc_Api.G_EXCEPTION_ERROR;
2942: end if;
2943: lock_row(
2944: p_init_msg_list,
2945: x_return_status,
2946: x_msg_count,
2947: x_msg_data,
2948: l_okl_trx_types_tl_rec
2949: );
2950: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2951: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2952: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2953: raise Okc_Api.G_EXCEPTION_ERROR;
2954: end if;
2947: x_msg_data,
2948: l_okl_trx_types_tl_rec
2949: );
2950: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2951: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2952: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2953: raise Okc_Api.G_EXCEPTION_ERROR;
2954: end if;
2955: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2948: l_okl_trx_types_tl_rec
2949: );
2950: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2951: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2952: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2953: raise Okc_Api.G_EXCEPTION_ERROR;
2954: end if;
2955: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2956: exception
2949: );
2950: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
2951: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2952: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2953: raise Okc_Api.G_EXCEPTION_ERROR;
2954: end if;
2955: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2956: exception
2957: when Okc_Api.G_EXCEPTION_ERROR then
2951: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
2952: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
2953: raise Okc_Api.G_EXCEPTION_ERROR;
2954: end if;
2955: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2956: exception
2957: when Okc_Api.G_EXCEPTION_ERROR then
2958: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2959: (
2953: raise Okc_Api.G_EXCEPTION_ERROR;
2954: end if;
2955: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2956: exception
2957: when Okc_Api.G_EXCEPTION_ERROR then
2958: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2959: (
2960: l_api_name,
2961: G_PKG_NAME,
2954: end if;
2955: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
2956: exception
2957: when Okc_Api.G_EXCEPTION_ERROR then
2958: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2959: (
2960: l_api_name,
2961: G_PKG_NAME,
2962: 'OKC_API.G_RET_STS_ERROR',
2958: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
2959: (
2960: l_api_name,
2961: G_PKG_NAME,
2962: 'OKC_API.G_RET_STS_ERROR',
2963: x_msg_count,
2964: x_msg_data,
2965: '_PVT'
2966: );
2963: x_msg_count,
2964: x_msg_data,
2965: '_PVT'
2966: );
2967: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2968: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2969: (
2970: l_api_name,
2971: G_PKG_NAME,
2964: x_msg_data,
2965: '_PVT'
2966: );
2967: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
2968: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2969: (
2970: l_api_name,
2971: G_PKG_NAME,
2972: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2968: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2969: (
2970: l_api_name,
2971: G_PKG_NAME,
2972: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2973: x_msg_count,
2974: x_msg_data,
2975: '_PVT'
2976: );
2974: x_msg_data,
2975: '_PVT'
2976: );
2977: when OTHERS then
2978: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
2979: (
2980: l_api_name,
2981: G_PKG_NAME,
2982: 'OTHERS',
2997: p_tryv_tbl in tryv_tbl_type) is
2998:
2999: l_api_version constant number := 1;
3000: l_api_name constant varchar2(30) := 'V_tbl_lock_row';
3001: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3002: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3003: i number := 0;
3004: begin
3005: Okc_Api.init_msg_list(p_init_msg_list);
2998:
2999: l_api_version constant number := 1;
3000: l_api_name constant varchar2(30) := 'V_tbl_lock_row';
3001: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3002: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3003: i number := 0;
3004: begin
3005: Okc_Api.init_msg_list(p_init_msg_list);
3006: -- Make sure PL/SQL table has records in it before passing
3001: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3002: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3003: i number := 0;
3004: begin
3005: Okc_Api.init_msg_list(p_init_msg_list);
3006: -- Make sure PL/SQL table has records in it before passing
3007: if (p_tryv_tbl.COUNT > 0) then
3008: i := p_tryv_tbl.FIRST;
3009: loop
3008: i := p_tryv_tbl.FIRST;
3009: loop
3010: lock_row (
3011: p_api_version => p_api_version,
3012: p_init_msg_list => Okc_Api.G_FALSE,
3013: x_return_status => x_return_status,
3014: x_msg_count => x_msg_count,
3015: x_msg_data => x_msg_data,
3016: p_tryv_rec => p_tryv_tbl(i));
3015: x_msg_data => x_msg_data,
3016: p_tryv_rec => p_tryv_tbl(i));
3017: /* Begin Post Generation Change */
3018: -- store the highest degree of error
3019: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
3020: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
3021: l_overall_status := x_return_status;
3022: end if;
3023: end if;
3016: p_tryv_rec => p_tryv_tbl(i));
3017: /* Begin Post Generation Change */
3018: -- store the highest degree of error
3019: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
3020: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
3021: l_overall_status := x_return_status;
3022: end if;
3023: end if;
3024: /* End Post Generation Change */
3026: i := p_tryv_tbl.next(i);
3027: end loop;
3028: end if;
3029: exception
3030: when Okc_Api.G_EXCEPTION_ERROR then
3031: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3032: (
3033: l_api_name,
3034: G_PKG_NAME,
3027: end loop;
3028: end if;
3029: exception
3030: when Okc_Api.G_EXCEPTION_ERROR then
3031: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3032: (
3033: l_api_name,
3034: G_PKG_NAME,
3035: 'OKC_API.G_RET_STS_ERROR',
3031: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3032: (
3033: l_api_name,
3034: G_PKG_NAME,
3035: 'OKC_API.G_RET_STS_ERROR',
3036: x_msg_count,
3037: x_msg_data,
3038: '_PVT'
3039: );
3036: x_msg_count,
3037: x_msg_data,
3038: '_PVT'
3039: );
3040: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3041: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3042: (
3043: l_api_name,
3044: G_PKG_NAME,
3037: x_msg_data,
3038: '_PVT'
3039: );
3040: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3041: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3042: (
3043: l_api_name,
3044: G_PKG_NAME,
3045: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3041: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3042: (
3043: l_api_name,
3044: G_PKG_NAME,
3045: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3046: x_msg_count,
3047: x_msg_data,
3048: '_PVT'
3049: );
3047: x_msg_data,
3048: '_PVT'
3049: );
3050: when OTHERS then
3051: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3052: (
3053: l_api_name,
3054: G_PKG_NAME,
3055: 'OTHERS',
3074: x_try_rec out NOCOPY try_rec_type) is
3075:
3076: l_api_version constant number := 1;
3077: l_api_name constant varchar2(30) := 'B_update_row';
3078: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3079: l_try_rec try_rec_type := p_try_rec;
3080: l_def_try_rec try_rec_type;
3081: l_row_notfound boolean := true;
3082: ----------------------------------
3087: x_try_rec out NOCOPY try_rec_type
3088: ) return varchar2 is
3089: l_try_rec try_rec_type;
3090: l_row_notfound boolean := true;
3091: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3092: begin
3093: x_try_rec := p_try_rec;
3094: -- Get current database values
3095: l_try_rec := get_rec(p_try_rec, l_row_notfound);
3093: x_try_rec := p_try_rec;
3094: -- Get current database values
3095: l_try_rec := get_rec(p_try_rec, l_row_notfound);
3096: if (l_row_notfound) then
3097: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
3098: end if;
3099: if (x_try_rec.id = Okc_Api.G_MISS_NUM)
3100: then
3101: x_try_rec.id := l_try_rec.id;
3095: l_try_rec := get_rec(p_try_rec, l_row_notfound);
3096: if (l_row_notfound) then
3097: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
3098: end if;
3099: if (x_try_rec.id = Okc_Api.G_MISS_NUM)
3100: then
3101: x_try_rec.id := l_try_rec.id;
3102: end if;
3103: if (x_try_rec.try_id = Okc_Api.G_MISS_NUM)
3099: if (x_try_rec.id = Okc_Api.G_MISS_NUM)
3100: then
3101: x_try_rec.id := l_try_rec.id;
3102: end if;
3103: if (x_try_rec.try_id = Okc_Api.G_MISS_NUM)
3104: then
3105: x_try_rec.try_id := l_try_rec.try_id;
3106: end if;
3107: if (x_try_rec.try_id_for = Okc_Api.G_MISS_NUM)
3103: if (x_try_rec.try_id = Okc_Api.G_MISS_NUM)
3104: then
3105: x_try_rec.try_id := l_try_rec.try_id;
3106: end if;
3107: if (x_try_rec.try_id_for = Okc_Api.G_MISS_NUM)
3108: then
3109: x_try_rec.try_id_for := l_try_rec.try_id_for;
3110: end if;
3111: if (x_try_rec.ilc_id = Okc_Api.G_MISS_NUM)
3107: if (x_try_rec.try_id_for = Okc_Api.G_MISS_NUM)
3108: then
3109: x_try_rec.try_id_for := l_try_rec.try_id_for;
3110: end if;
3111: if (x_try_rec.ilc_id = Okc_Api.G_MISS_NUM)
3112: then
3113: x_try_rec.ilc_id := l_try_rec.ilc_id;
3114: end if;
3115: if (x_try_rec.aep_code = Okc_Api.G_MISS_CHAR)
3111: if (x_try_rec.ilc_id = Okc_Api.G_MISS_NUM)
3112: then
3113: x_try_rec.ilc_id := l_try_rec.ilc_id;
3114: end if;
3115: if (x_try_rec.aep_code = Okc_Api.G_MISS_CHAR)
3116: then
3117: x_try_rec.aep_code := l_try_rec.aep_code;
3118: end if;
3119: if (x_try_rec.trx_type_class = Okc_Api.G_MISS_CHAR)
3115: if (x_try_rec.aep_code = Okc_Api.G_MISS_CHAR)
3116: then
3117: x_try_rec.aep_code := l_try_rec.aep_code;
3118: end if;
3119: if (x_try_rec.trx_type_class = Okc_Api.G_MISS_CHAR)
3120: then
3121: x_try_rec.trx_type_class := l_try_rec.trx_type_class;
3122: end if;
3123: if (x_try_rec.try_type = Okc_Api.G_MISS_CHAR)
3119: if (x_try_rec.trx_type_class = Okc_Api.G_MISS_CHAR)
3120: then
3121: x_try_rec.trx_type_class := l_try_rec.trx_type_class;
3122: end if;
3123: if (x_try_rec.try_type = Okc_Api.G_MISS_CHAR)
3124: then
3125: x_try_rec.try_type := l_try_rec.try_type;
3126: end if;
3127: if (x_try_rec.object_version_number = Okc_Api.G_MISS_NUM)
3123: if (x_try_rec.try_type = Okc_Api.G_MISS_CHAR)
3124: then
3125: x_try_rec.try_type := l_try_rec.try_type;
3126: end if;
3127: if (x_try_rec.object_version_number = Okc_Api.G_MISS_NUM)
3128: then
3129: x_try_rec.object_version_number := l_try_rec.object_version_number;
3130: end if;
3131: if (x_try_rec.org_id = Okc_Api.G_MISS_NUM)
3127: if (x_try_rec.object_version_number = Okc_Api.G_MISS_NUM)
3128: then
3129: x_try_rec.object_version_number := l_try_rec.object_version_number;
3130: end if;
3131: if (x_try_rec.org_id = Okc_Api.G_MISS_NUM)
3132: then
3133: x_try_rec.org_id := l_try_rec.org_id;
3134: end if;
3135: if (x_try_rec.created_by = Okc_Api.G_MISS_NUM)
3131: if (x_try_rec.org_id = Okc_Api.G_MISS_NUM)
3132: then
3133: x_try_rec.org_id := l_try_rec.org_id;
3134: end if;
3135: if (x_try_rec.created_by = Okc_Api.G_MISS_NUM)
3136: then
3137: x_try_rec.created_by := l_try_rec.created_by;
3138: end if;
3139: if (x_try_rec.creation_date = Okc_Api.G_MISS_DATE)
3135: if (x_try_rec.created_by = Okc_Api.G_MISS_NUM)
3136: then
3137: x_try_rec.created_by := l_try_rec.created_by;
3138: end if;
3139: if (x_try_rec.creation_date = Okc_Api.G_MISS_DATE)
3140: then
3141: x_try_rec.creation_date := l_try_rec.creation_date;
3142: end if;
3143: if (x_try_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3139: if (x_try_rec.creation_date = Okc_Api.G_MISS_DATE)
3140: then
3141: x_try_rec.creation_date := l_try_rec.creation_date;
3142: end if;
3143: if (x_try_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3144: then
3145: x_try_rec.last_updated_by := l_try_rec.last_updated_by;
3146: end if;
3147: if (x_try_rec.last_update_date = Okc_Api.G_MISS_DATE)
3143: if (x_try_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3144: then
3145: x_try_rec.last_updated_by := l_try_rec.last_updated_by;
3146: end if;
3147: if (x_try_rec.last_update_date = Okc_Api.G_MISS_DATE)
3148: then
3149: x_try_rec.last_update_date := l_try_rec.last_update_date;
3150: end if;
3151: if (x_try_rec.last_update_login = Okc_Api.G_MISS_NUM)
3147: if (x_try_rec.last_update_date = Okc_Api.G_MISS_DATE)
3148: then
3149: x_try_rec.last_update_date := l_try_rec.last_update_date;
3150: end if;
3151: if (x_try_rec.last_update_login = Okc_Api.G_MISS_NUM)
3152: then
3153: x_try_rec.last_update_login := l_try_rec.last_update_login;
3154: end if;
3155: --Added by kthiruva on 04-May-2005 for Tax Enhancements
3153: x_try_rec.last_update_login := l_try_rec.last_update_login;
3154: end if;
3155: --Added by kthiruva on 04-May-2005 for Tax Enhancements
3156: --Bug 4386433 - Start of Changes
3157: if (x_try_rec.tax_upfront_yn = Okc_Api.G_MISS_CHAR)
3158: then
3159: x_try_rec.tax_upfront_yn := l_try_rec.tax_upfront_yn;
3160: end if;
3161: if (x_try_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR)
3157: if (x_try_rec.tax_upfront_yn = Okc_Api.G_MISS_CHAR)
3158: then
3159: x_try_rec.tax_upfront_yn := l_try_rec.tax_upfront_yn;
3160: end if;
3161: if (x_try_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR)
3162: then
3163: x_try_rec.tax_invoice_yn := l_try_rec.tax_invoice_yn;
3164: end if;
3165: if (x_try_rec.tax_schedule_yn = Okc_Api.G_MISS_CHAR)
3161: if (x_try_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR)
3162: then
3163: x_try_rec.tax_invoice_yn := l_try_rec.tax_invoice_yn;
3164: end if;
3165: if (x_try_rec.tax_schedule_yn = Okc_Api.G_MISS_CHAR)
3166: then
3167: x_try_rec.tax_schedule_yn := l_try_rec.tax_schedule_yn;
3168: end if;
3169: --Bug 4386433 - End of Changes
3184: function Set_Attributes (
3185: p_try_rec in try_rec_type,
3186: x_try_rec out NOCOPY try_rec_type
3187: ) return varchar2 is
3188: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3189: begin
3190: x_try_rec := p_try_rec;
3191: return(l_return_status);
3192: end Set_Attributes;
3190: x_try_rec := p_try_rec;
3191: return(l_return_status);
3192: end Set_Attributes;
3193: begin
3194: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3195: p_init_msg_list,
3196: '_PVT',
3197: x_return_status);
3198: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3194: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3195: p_init_msg_list,
3196: '_PVT',
3197: x_return_status);
3198: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3199: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3200: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3201: raise Okc_Api.G_EXCEPTION_ERROR;
3202: end if;
3195: p_init_msg_list,
3196: '_PVT',
3197: x_return_status);
3198: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3199: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3200: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3201: raise Okc_Api.G_EXCEPTION_ERROR;
3202: end if;
3203: --- Setting item attributes
3196: '_PVT',
3197: x_return_status);
3198: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3199: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3200: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3201: raise Okc_Api.G_EXCEPTION_ERROR;
3202: end if;
3203: --- Setting item attributes
3204: l_return_status := Set_Attributes(
3197: x_return_status);
3198: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3199: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3200: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3201: raise Okc_Api.G_EXCEPTION_ERROR;
3202: end if;
3203: --- Setting item attributes
3204: l_return_status := Set_Attributes(
3205: p_try_rec, -- IN
3204: l_return_status := Set_Attributes(
3205: p_try_rec, -- IN
3206: l_try_rec); -- OUT
3207: --- If any errors happen abort API
3208: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3209: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3210: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3211: raise Okc_Api.G_EXCEPTION_ERROR;
3212: end if;
3205: p_try_rec, -- IN
3206: l_try_rec); -- OUT
3207: --- If any errors happen abort API
3208: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3209: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3210: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3211: raise Okc_Api.G_EXCEPTION_ERROR;
3212: end if;
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3206: l_try_rec); -- OUT
3207: --- If any errors happen abort API
3208: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3209: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3210: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3211: raise Okc_Api.G_EXCEPTION_ERROR;
3212: end if;
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3214: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3207: --- If any errors happen abort API
3208: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3209: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3210: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3211: raise Okc_Api.G_EXCEPTION_ERROR;
3212: end if;
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3214: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3215: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3210: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3211: raise Okc_Api.G_EXCEPTION_ERROR;
3212: end if;
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3214: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3215: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3216: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3217: raise Okc_Api.G_EXCEPTION_ERROR;
3218: end if;
3211: raise Okc_Api.G_EXCEPTION_ERROR;
3212: end if;
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3214: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3215: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3216: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3217: raise Okc_Api.G_EXCEPTION_ERROR;
3218: end if;
3219: update OKL_TRX_TYPES_B
3212: end if;
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3214: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3215: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3216: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3217: raise Okc_Api.G_EXCEPTION_ERROR;
3218: end if;
3219: update OKL_TRX_TYPES_B
3220: set TRY_ID = l_def_try_rec.try_id,
3213: l_return_status := populate_new_record(l_try_rec, l_def_try_rec);
3214: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3215: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3216: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3217: raise Okc_Api.G_EXCEPTION_ERROR;
3218: end if;
3219: update OKL_TRX_TYPES_B
3220: set TRY_ID = l_def_try_rec.try_id,
3221: TRY_ID_FOR = l_def_try_rec.try_id_for,
3241: ACCOUNTING_EVENT_CLASS_CODE = l_def_try_rec.accounting_event_class_code
3242: where ID = l_def_try_rec.id;
3243:
3244: x_try_rec := l_def_try_rec;
3245: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3246: exception
3247: when Okc_Api.G_EXCEPTION_ERROR then
3248: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3249: (
3243:
3244: x_try_rec := l_def_try_rec;
3245: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3246: exception
3247: when Okc_Api.G_EXCEPTION_ERROR then
3248: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3249: (
3250: l_api_name,
3251: G_PKG_NAME,
3244: x_try_rec := l_def_try_rec;
3245: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3246: exception
3247: when Okc_Api.G_EXCEPTION_ERROR then
3248: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3249: (
3250: l_api_name,
3251: G_PKG_NAME,
3252: 'OKC_API.G_RET_STS_ERROR',
3248: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3249: (
3250: l_api_name,
3251: G_PKG_NAME,
3252: 'OKC_API.G_RET_STS_ERROR',
3253: x_msg_count,
3254: x_msg_data,
3255: '_PVT'
3256: );
3253: x_msg_count,
3254: x_msg_data,
3255: '_PVT'
3256: );
3257: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3258: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3259: (
3260: l_api_name,
3261: G_PKG_NAME,
3254: x_msg_data,
3255: '_PVT'
3256: );
3257: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3258: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3259: (
3260: l_api_name,
3261: G_PKG_NAME,
3262: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3258: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3259: (
3260: l_api_name,
3261: G_PKG_NAME,
3262: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3263: x_msg_count,
3264: x_msg_data,
3265: '_PVT'
3266: );
3264: x_msg_data,
3265: '_PVT'
3266: );
3267: when OTHERS then
3268: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3269: (
3270: l_api_name,
3271: G_PKG_NAME,
3272: 'OTHERS',
3287: x_okl_trx_types_tl_rec out NOCOPY okl_trx_types_tl_rec_type) is
3288:
3289: l_api_version constant number := 1;
3290: l_api_name constant varchar2(30) := 'TL_update_row';
3291: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3292: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type := p_okl_trx_types_tl_rec;
3293: l_def_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
3294: l_row_notfound boolean := true;
3295: ----------------------------------
3300: x_okl_trx_types_tl_rec out NOCOPY okl_trx_types_tl_rec_type
3301: ) return varchar2 is
3302: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
3303: l_row_notfound boolean := true;
3304: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3305: begin
3306: x_okl_trx_types_tl_rec := p_okl_trx_types_tl_rec;
3307: -- Get current database values
3308: l_okl_trx_types_tl_rec := get_rec(p_okl_trx_types_tl_rec, l_row_notfound);
3306: x_okl_trx_types_tl_rec := p_okl_trx_types_tl_rec;
3307: -- Get current database values
3308: l_okl_trx_types_tl_rec := get_rec(p_okl_trx_types_tl_rec, l_row_notfound);
3309: if (l_row_notfound) then
3310: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
3311: end if;
3312: if (x_okl_trx_types_tl_rec.id = Okc_Api.G_MISS_NUM)
3313: then
3314: x_okl_trx_types_tl_rec.id := l_okl_trx_types_tl_rec.id;
3308: l_okl_trx_types_tl_rec := get_rec(p_okl_trx_types_tl_rec, l_row_notfound);
3309: if (l_row_notfound) then
3310: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
3311: end if;
3312: if (x_okl_trx_types_tl_rec.id = Okc_Api.G_MISS_NUM)
3313: then
3314: x_okl_trx_types_tl_rec.id := l_okl_trx_types_tl_rec.id;
3315: end if;
3316: if (x_okl_trx_types_tl_rec.language = Okc_Api.G_MISS_CHAR)
3312: if (x_okl_trx_types_tl_rec.id = Okc_Api.G_MISS_NUM)
3313: then
3314: x_okl_trx_types_tl_rec.id := l_okl_trx_types_tl_rec.id;
3315: end if;
3316: if (x_okl_trx_types_tl_rec.language = Okc_Api.G_MISS_CHAR)
3317: then
3318: x_okl_trx_types_tl_rec.language := l_okl_trx_types_tl_rec.language;
3319: end if;
3320: if (x_okl_trx_types_tl_rec.source_lang = Okc_Api.G_MISS_CHAR)
3316: if (x_okl_trx_types_tl_rec.language = Okc_Api.G_MISS_CHAR)
3317: then
3318: x_okl_trx_types_tl_rec.language := l_okl_trx_types_tl_rec.language;
3319: end if;
3320: if (x_okl_trx_types_tl_rec.source_lang = Okc_Api.G_MISS_CHAR)
3321: then
3322: x_okl_trx_types_tl_rec.source_lang := l_okl_trx_types_tl_rec.source_lang;
3323: end if;
3324: if (x_okl_trx_types_tl_rec.sfwt_flag = Okc_Api.G_MISS_CHAR)
3320: if (x_okl_trx_types_tl_rec.source_lang = Okc_Api.G_MISS_CHAR)
3321: then
3322: x_okl_trx_types_tl_rec.source_lang := l_okl_trx_types_tl_rec.source_lang;
3323: end if;
3324: if (x_okl_trx_types_tl_rec.sfwt_flag = Okc_Api.G_MISS_CHAR)
3325: then
3326: x_okl_trx_types_tl_rec.sfwt_flag := l_okl_trx_types_tl_rec.sfwt_flag;
3327: end if;
3328: if (x_okl_trx_types_tl_rec.name = Okc_Api.G_MISS_CHAR)
3324: if (x_okl_trx_types_tl_rec.sfwt_flag = Okc_Api.G_MISS_CHAR)
3325: then
3326: x_okl_trx_types_tl_rec.sfwt_flag := l_okl_trx_types_tl_rec.sfwt_flag;
3327: end if;
3328: if (x_okl_trx_types_tl_rec.name = Okc_Api.G_MISS_CHAR)
3329: then
3330: x_okl_trx_types_tl_rec.name := l_okl_trx_types_tl_rec.name;
3331: end if;
3332: if (x_okl_trx_types_tl_rec.description = Okc_Api.G_MISS_CHAR)
3328: if (x_okl_trx_types_tl_rec.name = Okc_Api.G_MISS_CHAR)
3329: then
3330: x_okl_trx_types_tl_rec.name := l_okl_trx_types_tl_rec.name;
3331: end if;
3332: if (x_okl_trx_types_tl_rec.description = Okc_Api.G_MISS_CHAR)
3333: then
3334: x_okl_trx_types_tl_rec.description := l_okl_trx_types_tl_rec.description;
3335: end if;
3336: if (x_okl_trx_types_tl_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR)
3332: if (x_okl_trx_types_tl_rec.description = Okc_Api.G_MISS_CHAR)
3333: then
3334: x_okl_trx_types_tl_rec.description := l_okl_trx_types_tl_rec.description;
3335: end if;
3336: if (x_okl_trx_types_tl_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR)
3337: then
3338: x_okl_trx_types_tl_rec.contract_header_line_flag := l_okl_trx_types_tl_rec.contract_header_line_flag;
3339: end if;
3340: if (x_okl_trx_types_tl_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR)
3336: if (x_okl_trx_types_tl_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR)
3337: then
3338: x_okl_trx_types_tl_rec.contract_header_line_flag := l_okl_trx_types_tl_rec.contract_header_line_flag;
3339: end if;
3340: if (x_okl_trx_types_tl_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR)
3341: then
3342: x_okl_trx_types_tl_rec.transaction_header_line_detail := l_okl_trx_types_tl_rec.transaction_header_line_detail;
3343: end if;
3344: if (x_okl_trx_types_tl_rec.created_by = Okc_Api.G_MISS_NUM)
3340: if (x_okl_trx_types_tl_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR)
3341: then
3342: x_okl_trx_types_tl_rec.transaction_header_line_detail := l_okl_trx_types_tl_rec.transaction_header_line_detail;
3343: end if;
3344: if (x_okl_trx_types_tl_rec.created_by = Okc_Api.G_MISS_NUM)
3345: then
3346: x_okl_trx_types_tl_rec.created_by := l_okl_trx_types_tl_rec.created_by;
3347: end if;
3348: if (x_okl_trx_types_tl_rec.creation_date = Okc_Api.G_MISS_DATE)
3344: if (x_okl_trx_types_tl_rec.created_by = Okc_Api.G_MISS_NUM)
3345: then
3346: x_okl_trx_types_tl_rec.created_by := l_okl_trx_types_tl_rec.created_by;
3347: end if;
3348: if (x_okl_trx_types_tl_rec.creation_date = Okc_Api.G_MISS_DATE)
3349: then
3350: x_okl_trx_types_tl_rec.creation_date := l_okl_trx_types_tl_rec.creation_date;
3351: end if;
3352: if (x_okl_trx_types_tl_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3348: if (x_okl_trx_types_tl_rec.creation_date = Okc_Api.G_MISS_DATE)
3349: then
3350: x_okl_trx_types_tl_rec.creation_date := l_okl_trx_types_tl_rec.creation_date;
3351: end if;
3352: if (x_okl_trx_types_tl_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3353: then
3354: x_okl_trx_types_tl_rec.last_updated_by := l_okl_trx_types_tl_rec.last_updated_by;
3355: end if;
3356: if (x_okl_trx_types_tl_rec.last_update_date = Okc_Api.G_MISS_DATE)
3352: if (x_okl_trx_types_tl_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3353: then
3354: x_okl_trx_types_tl_rec.last_updated_by := l_okl_trx_types_tl_rec.last_updated_by;
3355: end if;
3356: if (x_okl_trx_types_tl_rec.last_update_date = Okc_Api.G_MISS_DATE)
3357: then
3358: x_okl_trx_types_tl_rec.last_update_date := l_okl_trx_types_tl_rec.last_update_date;
3359: end if;
3360: if (x_okl_trx_types_tl_rec.last_update_login = Okc_Api.G_MISS_NUM)
3356: if (x_okl_trx_types_tl_rec.last_update_date = Okc_Api.G_MISS_DATE)
3357: then
3358: x_okl_trx_types_tl_rec.last_update_date := l_okl_trx_types_tl_rec.last_update_date;
3359: end if;
3360: if (x_okl_trx_types_tl_rec.last_update_login = Okc_Api.G_MISS_NUM)
3361: then
3362: x_okl_trx_types_tl_rec.last_update_login := l_okl_trx_types_tl_rec.last_update_login;
3363: end if;
3364: return(l_return_status);
3369: function Set_Attributes (
3370: p_okl_trx_types_tl_rec in okl_trx_types_tl_rec_type,
3371: x_okl_trx_types_tl_rec out NOCOPY okl_trx_types_tl_rec_type
3372: ) return varchar2 is
3373: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3374: begin
3375: x_okl_trx_types_tl_rec := p_okl_trx_types_tl_rec;
3376: x_okl_trx_types_tl_rec.language := USERENV('LANG');
3377: x_okl_trx_types_tl_rec.SOURCE_LANG := USERENV('LANG');
3377: x_okl_trx_types_tl_rec.SOURCE_LANG := USERENV('LANG');
3378: return(l_return_status);
3379: end Set_Attributes;
3380: begin
3381: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3382: p_init_msg_list,
3383: '_PVT',
3384: x_return_status);
3385: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3381: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3382: p_init_msg_list,
3383: '_PVT',
3384: x_return_status);
3385: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3386: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3387: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3388: raise Okc_Api.G_EXCEPTION_ERROR;
3389: end if;
3382: p_init_msg_list,
3383: '_PVT',
3384: x_return_status);
3385: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3386: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3387: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3388: raise Okc_Api.G_EXCEPTION_ERROR;
3389: end if;
3390: --- Setting item attributes
3383: '_PVT',
3384: x_return_status);
3385: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3386: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3387: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3388: raise Okc_Api.G_EXCEPTION_ERROR;
3389: end if;
3390: --- Setting item attributes
3391: l_return_status := Set_Attributes(
3384: x_return_status);
3385: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3386: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3387: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3388: raise Okc_Api.G_EXCEPTION_ERROR;
3389: end if;
3390: --- Setting item attributes
3391: l_return_status := Set_Attributes(
3392: p_okl_trx_types_tl_rec, -- IN
3391: l_return_status := Set_Attributes(
3392: p_okl_trx_types_tl_rec, -- IN
3393: l_okl_trx_types_tl_rec); -- OUT
3394: --- If any errors happen abort API
3395: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3396: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3397: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3398: raise Okc_Api.G_EXCEPTION_ERROR;
3399: end if;
3392: p_okl_trx_types_tl_rec, -- IN
3393: l_okl_trx_types_tl_rec); -- OUT
3394: --- If any errors happen abort API
3395: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3396: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3397: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3398: raise Okc_Api.G_EXCEPTION_ERROR;
3399: end if;
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3393: l_okl_trx_types_tl_rec); -- OUT
3394: --- If any errors happen abort API
3395: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3396: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3397: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3398: raise Okc_Api.G_EXCEPTION_ERROR;
3399: end if;
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3401: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3394: --- If any errors happen abort API
3395: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3396: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3397: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3398: raise Okc_Api.G_EXCEPTION_ERROR;
3399: end if;
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3401: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3402: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3397: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3398: raise Okc_Api.G_EXCEPTION_ERROR;
3399: end if;
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3401: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3402: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3403: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3404: raise Okc_Api.G_EXCEPTION_ERROR;
3405: end if;
3398: raise Okc_Api.G_EXCEPTION_ERROR;
3399: end if;
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3401: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3402: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3403: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3404: raise Okc_Api.G_EXCEPTION_ERROR;
3405: end if;
3406: update OKL_TRX_TYPES_TL
3399: end if;
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3401: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3402: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3403: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3404: raise Okc_Api.G_EXCEPTION_ERROR;
3405: end if;
3406: update OKL_TRX_TYPES_TL
3407: set name = l_def_okl_trx_types_tl_rec.name,
3400: l_return_status := populate_new_record(l_okl_trx_types_tl_rec, l_def_okl_trx_types_tl_rec);
3401: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3402: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3403: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3404: raise Okc_Api.G_EXCEPTION_ERROR;
3405: end if;
3406: update OKL_TRX_TYPES_TL
3407: set name = l_def_okl_trx_types_tl_rec.name,
3408: DESCRIPTION = l_def_okl_trx_types_tl_rec.description,
3423: where ID = l_def_okl_trx_types_tl_rec.id
3424: and SOURCE_LANG <> USERENV('LANG');
3425:
3426: x_okl_trx_types_tl_rec := l_def_okl_trx_types_tl_rec;
3427: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3428: exception
3429: when Okc_Api.G_EXCEPTION_ERROR then
3430: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3431: (
3425:
3426: x_okl_trx_types_tl_rec := l_def_okl_trx_types_tl_rec;
3427: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3428: exception
3429: when Okc_Api.G_EXCEPTION_ERROR then
3430: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3431: (
3432: l_api_name,
3433: G_PKG_NAME,
3426: x_okl_trx_types_tl_rec := l_def_okl_trx_types_tl_rec;
3427: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3428: exception
3429: when Okc_Api.G_EXCEPTION_ERROR then
3430: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3431: (
3432: l_api_name,
3433: G_PKG_NAME,
3434: 'OKC_API.G_RET_STS_ERROR',
3430: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3431: (
3432: l_api_name,
3433: G_PKG_NAME,
3434: 'OKC_API.G_RET_STS_ERROR',
3435: x_msg_count,
3436: x_msg_data,
3437: '_PVT'
3438: );
3435: x_msg_count,
3436: x_msg_data,
3437: '_PVT'
3438: );
3439: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3440: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3441: (
3442: l_api_name,
3443: G_PKG_NAME,
3436: x_msg_data,
3437: '_PVT'
3438: );
3439: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3440: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3441: (
3442: l_api_name,
3443: G_PKG_NAME,
3444: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3440: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3441: (
3442: l_api_name,
3443: G_PKG_NAME,
3444: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3445: x_msg_count,
3446: x_msg_data,
3447: '_PVT'
3448: );
3446: x_msg_data,
3447: '_PVT'
3448: );
3449: when OTHERS then
3450: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3451: (
3452: l_api_name,
3453: G_PKG_NAME,
3454: 'OTHERS',
3470: x_tryv_rec out NOCOPY tryv_rec_type) is
3471:
3472: l_api_version constant number := 1;
3473: l_api_name constant varchar2(30) := 'V_update_row';
3474: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3475: l_tryv_rec tryv_rec_type := p_tryv_rec;
3476: l_def_tryv_rec tryv_rec_type;
3477: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
3478: lx_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
3499: x_tryv_rec out NOCOPY tryv_rec_type
3500: ) return varchar2 is
3501: l_tryv_rec tryv_rec_type;
3502: l_row_notfound boolean := true;
3503: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3504: begin
3505: x_tryv_rec := p_tryv_rec;
3506: -- Get current database values
3507: l_tryv_rec := get_rec(p_tryv_rec, l_row_notfound);
3505: x_tryv_rec := p_tryv_rec;
3506: -- Get current database values
3507: l_tryv_rec := get_rec(p_tryv_rec, l_row_notfound);
3508: if (l_row_notfound) then
3509: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
3510: end if;
3511: if (x_tryv_rec.id = Okc_Api.G_MISS_NUM)
3512: then
3513: x_tryv_rec.id := l_tryv_rec.id;
3507: l_tryv_rec := get_rec(p_tryv_rec, l_row_notfound);
3508: if (l_row_notfound) then
3509: l_return_status := Okc_Api.G_RET_STS_UNEXP_ERROR;
3510: end if;
3511: if (x_tryv_rec.id = Okc_Api.G_MISS_NUM)
3512: then
3513: x_tryv_rec.id := l_tryv_rec.id;
3514: end if;
3515: if (x_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM)
3511: if (x_tryv_rec.id = Okc_Api.G_MISS_NUM)
3512: then
3513: x_tryv_rec.id := l_tryv_rec.id;
3514: end if;
3515: if (x_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM)
3516: then
3517: x_tryv_rec.object_version_number := l_tryv_rec.object_version_number;
3518: end if;
3519: if (x_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR)
3515: if (x_tryv_rec.object_version_number = Okc_Api.G_MISS_NUM)
3516: then
3517: x_tryv_rec.object_version_number := l_tryv_rec.object_version_number;
3518: end if;
3519: if (x_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR)
3520: then
3521: x_tryv_rec.sfwt_flag := l_tryv_rec.sfwt_flag;
3522: end if;
3523: if (x_tryv_rec.aep_code = Okc_Api.G_MISS_CHAR)
3519: if (x_tryv_rec.sfwt_flag = Okc_Api.G_MISS_CHAR)
3520: then
3521: x_tryv_rec.sfwt_flag := l_tryv_rec.sfwt_flag;
3522: end if;
3523: if (x_tryv_rec.aep_code = Okc_Api.G_MISS_CHAR)
3524: then
3525: x_tryv_rec.aep_code := l_tryv_rec.aep_code;
3526: end if;
3527: if (x_tryv_rec.trx_type_class = Okc_Api.G_MISS_CHAR)
3523: if (x_tryv_rec.aep_code = Okc_Api.G_MISS_CHAR)
3524: then
3525: x_tryv_rec.aep_code := l_tryv_rec.aep_code;
3526: end if;
3527: if (x_tryv_rec.trx_type_class = Okc_Api.G_MISS_CHAR)
3528: then
3529: x_tryv_rec.trx_type_class := l_tryv_rec.trx_type_class;
3530: end if;
3531: if (x_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM)
3527: if (x_tryv_rec.trx_type_class = Okc_Api.G_MISS_CHAR)
3528: then
3529: x_tryv_rec.trx_type_class := l_tryv_rec.trx_type_class;
3530: end if;
3531: if (x_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM)
3532: then
3533: x_tryv_rec.ilc_id := l_tryv_rec.ilc_id;
3534: end if;
3535: if (x_tryv_rec.try_id = Okc_Api.G_MISS_NUM)
3531: if (x_tryv_rec.ilc_id = Okc_Api.G_MISS_NUM)
3532: then
3533: x_tryv_rec.ilc_id := l_tryv_rec.ilc_id;
3534: end if;
3535: if (x_tryv_rec.try_id = Okc_Api.G_MISS_NUM)
3536: then
3537: x_tryv_rec.try_id := l_tryv_rec.try_id;
3538: end if;
3539: if (x_tryv_rec.try_id_for = Okc_Api.G_MISS_NUM)
3535: if (x_tryv_rec.try_id = Okc_Api.G_MISS_NUM)
3536: then
3537: x_tryv_rec.try_id := l_tryv_rec.try_id;
3538: end if;
3539: if (x_tryv_rec.try_id_for = Okc_Api.G_MISS_NUM)
3540: then
3541: x_tryv_rec.try_id_for := l_tryv_rec.try_id_for;
3542: end if;
3543: if (x_tryv_rec.try_type = Okc_Api.G_MISS_CHAR)
3539: if (x_tryv_rec.try_id_for = Okc_Api.G_MISS_NUM)
3540: then
3541: x_tryv_rec.try_id_for := l_tryv_rec.try_id_for;
3542: end if;
3543: if (x_tryv_rec.try_type = Okc_Api.G_MISS_CHAR)
3544: then
3545: x_tryv_rec.try_type := l_tryv_rec.try_type;
3546: end if;
3547: if (x_tryv_rec.name = Okc_Api.G_MISS_CHAR)
3543: if (x_tryv_rec.try_type = Okc_Api.G_MISS_CHAR)
3544: then
3545: x_tryv_rec.try_type := l_tryv_rec.try_type;
3546: end if;
3547: if (x_tryv_rec.name = Okc_Api.G_MISS_CHAR)
3548: then
3549: x_tryv_rec.name := l_tryv_rec.name;
3550: end if;
3551: if (x_tryv_rec.description = Okc_Api.G_MISS_CHAR)
3547: if (x_tryv_rec.name = Okc_Api.G_MISS_CHAR)
3548: then
3549: x_tryv_rec.name := l_tryv_rec.name;
3550: end if;
3551: if (x_tryv_rec.description = Okc_Api.G_MISS_CHAR)
3552: then
3553: x_tryv_rec.description := l_tryv_rec.description;
3554: end if;
3555: if (x_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR)
3551: if (x_tryv_rec.description = Okc_Api.G_MISS_CHAR)
3552: then
3553: x_tryv_rec.description := l_tryv_rec.description;
3554: end if;
3555: if (x_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR)
3556: then
3557: x_tryv_rec.contract_header_line_flag := l_tryv_rec.contract_header_line_flag;
3558: end if;
3559: if (x_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR)
3555: if (x_tryv_rec.contract_header_line_flag = Okc_Api.G_MISS_CHAR)
3556: then
3557: x_tryv_rec.contract_header_line_flag := l_tryv_rec.contract_header_line_flag;
3558: end if;
3559: if (x_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR)
3560: then
3561: x_tryv_rec.transaction_header_line_detail := l_tryv_rec.transaction_header_line_detail;
3562: end if;
3563: if (x_tryv_rec.org_id = Okc_Api.G_MISS_NUM)
3559: if (x_tryv_rec.transaction_header_line_detail = Okc_Api.G_MISS_CHAR)
3560: then
3561: x_tryv_rec.transaction_header_line_detail := l_tryv_rec.transaction_header_line_detail;
3562: end if;
3563: if (x_tryv_rec.org_id = Okc_Api.G_MISS_NUM)
3564: then
3565: x_tryv_rec.org_id := l_tryv_rec.org_id;
3566: end if;
3567: if (x_tryv_rec.created_by = Okc_Api.G_MISS_NUM)
3563: if (x_tryv_rec.org_id = Okc_Api.G_MISS_NUM)
3564: then
3565: x_tryv_rec.org_id := l_tryv_rec.org_id;
3566: end if;
3567: if (x_tryv_rec.created_by = Okc_Api.G_MISS_NUM)
3568: then
3569: x_tryv_rec.created_by := l_tryv_rec.created_by;
3570: end if;
3571: if (x_tryv_rec.creation_date = Okc_Api.G_MISS_DATE)
3567: if (x_tryv_rec.created_by = Okc_Api.G_MISS_NUM)
3568: then
3569: x_tryv_rec.created_by := l_tryv_rec.created_by;
3570: end if;
3571: if (x_tryv_rec.creation_date = Okc_Api.G_MISS_DATE)
3572: then
3573: x_tryv_rec.creation_date := l_tryv_rec.creation_date;
3574: end if;
3575: if (x_tryv_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3571: if (x_tryv_rec.creation_date = Okc_Api.G_MISS_DATE)
3572: then
3573: x_tryv_rec.creation_date := l_tryv_rec.creation_date;
3574: end if;
3575: if (x_tryv_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3576: then
3577: x_tryv_rec.last_updated_by := l_tryv_rec.last_updated_by;
3578: end if;
3579: if (x_tryv_rec.last_update_date = Okc_Api.G_MISS_DATE)
3575: if (x_tryv_rec.last_updated_by = Okc_Api.G_MISS_NUM)
3576: then
3577: x_tryv_rec.last_updated_by := l_tryv_rec.last_updated_by;
3578: end if;
3579: if (x_tryv_rec.last_update_date = Okc_Api.G_MISS_DATE)
3580: then
3581: x_tryv_rec.last_update_date := l_tryv_rec.last_update_date;
3582: end if;
3583: if (x_tryv_rec.last_update_login = Okc_Api.G_MISS_NUM)
3579: if (x_tryv_rec.last_update_date = Okc_Api.G_MISS_DATE)
3580: then
3581: x_tryv_rec.last_update_date := l_tryv_rec.last_update_date;
3582: end if;
3583: if (x_tryv_rec.last_update_login = Okc_Api.G_MISS_NUM)
3584: then
3585: x_tryv_rec.last_update_login := l_tryv_rec.last_update_login;
3586: end if;
3587: --Added by kthiruva on 04-May-2005 for Tax Enhancements
3585: x_tryv_rec.last_update_login := l_tryv_rec.last_update_login;
3586: end if;
3587: --Added by kthiruva on 04-May-2005 for Tax Enhancements
3588: --Bug 4386433 - Start of Changes
3589: if (x_tryv_rec.tax_upfront_yn = Okc_Api.G_MISS_CHAR)
3590: then
3591: x_tryv_rec.tax_upfront_yn := l_tryv_rec.tax_upfront_yn;
3592: end if;
3593: if (x_tryv_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR)
3589: if (x_tryv_rec.tax_upfront_yn = Okc_Api.G_MISS_CHAR)
3590: then
3591: x_tryv_rec.tax_upfront_yn := l_tryv_rec.tax_upfront_yn;
3592: end if;
3593: if (x_tryv_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR)
3594: then
3595: x_tryv_rec.tax_invoice_yn := l_tryv_rec.tax_invoice_yn;
3596: end if;
3597: if (x_tryv_rec.tax_schedule_yn = Okc_Api.G_MISS_CHAR)
3593: if (x_tryv_rec.tax_invoice_yn = Okc_Api.G_MISS_CHAR)
3594: then
3595: x_tryv_rec.tax_invoice_yn := l_tryv_rec.tax_invoice_yn;
3596: end if;
3597: if (x_tryv_rec.tax_schedule_yn = Okc_Api.G_MISS_CHAR)
3598: then
3599: x_tryv_rec.tax_schedule_yn := l_tryv_rec.tax_schedule_yn;
3600: end if;
3601: --Bug 4386433 - End of Changes
3616: function Set_Attributes (
3617: p_tryv_rec in tryv_rec_type,
3618: x_tryv_rec out NOCOPY tryv_rec_type
3619: ) return varchar2 is
3620: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3621: begin
3622: x_tryv_rec := p_tryv_rec;
3623: x_tryv_rec.OBJECT_VERSION_NUMBER := NVL(x_tryv_rec.OBJECT_VERSION_NUMBER, 0) + 1;
3624: return(l_return_status);
3623: x_tryv_rec.OBJECT_VERSION_NUMBER := NVL(x_tryv_rec.OBJECT_VERSION_NUMBER, 0) + 1;
3624: return(l_return_status);
3625: end Set_Attributes;
3626: begin
3627: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3628: G_PKG_NAME,
3629: p_init_msg_list,
3630: l_api_version,
3631: p_api_version,
3630: l_api_version,
3631: p_api_version,
3632: '_PVT',
3633: x_return_status);
3634: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3635: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3636: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3637: raise Okc_Api.G_EXCEPTION_ERROR;
3638: end if;
3631: p_api_version,
3632: '_PVT',
3633: x_return_status);
3634: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3635: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3636: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3637: raise Okc_Api.G_EXCEPTION_ERROR;
3638: end if;
3639: --- Setting item attributes
3632: '_PVT',
3633: x_return_status);
3634: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3635: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3636: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3637: raise Okc_Api.G_EXCEPTION_ERROR;
3638: end if;
3639: --- Setting item attributes
3640: l_return_status := Set_Attributes(
3633: x_return_status);
3634: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3635: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3636: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3637: raise Okc_Api.G_EXCEPTION_ERROR;
3638: end if;
3639: --- Setting item attributes
3640: l_return_status := Set_Attributes(
3641: p_tryv_rec, -- IN
3640: l_return_status := Set_Attributes(
3641: p_tryv_rec, -- IN
3642: l_tryv_rec); -- OUT
3643: --- If any errors happen abort API
3644: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3645: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3646: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3647: raise Okc_Api.G_EXCEPTION_ERROR;
3648: end if;
3641: p_tryv_rec, -- IN
3642: l_tryv_rec); -- OUT
3643: --- If any errors happen abort API
3644: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3645: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3646: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3647: raise Okc_Api.G_EXCEPTION_ERROR;
3648: end if;
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3642: l_tryv_rec); -- OUT
3643: --- If any errors happen abort API
3644: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3645: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3646: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3647: raise Okc_Api.G_EXCEPTION_ERROR;
3648: end if;
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3650: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3643: --- If any errors happen abort API
3644: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3645: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3646: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3647: raise Okc_Api.G_EXCEPTION_ERROR;
3648: end if;
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3650: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3651: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3646: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3647: raise Okc_Api.G_EXCEPTION_ERROR;
3648: end if;
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3650: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3651: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3652: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3653: raise Okc_Api.G_EXCEPTION_ERROR;
3654: end if;
3647: raise Okc_Api.G_EXCEPTION_ERROR;
3648: end if;
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3650: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3651: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3652: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3653: raise Okc_Api.G_EXCEPTION_ERROR;
3654: end if;
3655: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
3648: end if;
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3650: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3651: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3652: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3653: raise Okc_Api.G_EXCEPTION_ERROR;
3654: end if;
3655: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
3656: --- Validate all non-missing attributes (Item Level Validation)
3649: l_return_status := populate_new_record(l_tryv_rec, l_def_tryv_rec);
3650: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3651: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3652: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3653: raise Okc_Api.G_EXCEPTION_ERROR;
3654: end if;
3655: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
3656: --- Validate all non-missing attributes (Item Level Validation)
3657: l_return_status := Validate_Attributes(l_def_tryv_rec);
3655: l_def_tryv_rec := fill_who_columns(l_def_tryv_rec);
3656: --- Validate all non-missing attributes (Item Level Validation)
3657: l_return_status := Validate_Attributes(l_def_tryv_rec);
3658: --- If any errors happen abort API
3659: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3660: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3661: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3662: raise Okc_Api.G_EXCEPTION_ERROR;
3663: end if;
3656: --- Validate all non-missing attributes (Item Level Validation)
3657: l_return_status := Validate_Attributes(l_def_tryv_rec);
3658: --- If any errors happen abort API
3659: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3660: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3661: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3662: raise Okc_Api.G_EXCEPTION_ERROR;
3663: end if;
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3657: l_return_status := Validate_Attributes(l_def_tryv_rec);
3658: --- If any errors happen abort API
3659: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3660: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3661: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3662: raise Okc_Api.G_EXCEPTION_ERROR;
3663: end if;
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3665: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3658: --- If any errors happen abort API
3659: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3660: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3661: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3662: raise Okc_Api.G_EXCEPTION_ERROR;
3663: end if;
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3665: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3666: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3661: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3662: raise Okc_Api.G_EXCEPTION_ERROR;
3663: end if;
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3665: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3666: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3667: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3668: raise Okc_Api.G_EXCEPTION_ERROR;
3669: end if;
3662: raise Okc_Api.G_EXCEPTION_ERROR;
3663: end if;
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3665: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3666: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3667: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3668: raise Okc_Api.G_EXCEPTION_ERROR;
3669: end if;
3670:
3663: end if;
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3665: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3666: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3667: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3668: raise Okc_Api.G_EXCEPTION_ERROR;
3669: end if;
3670:
3671: --------------------------------------
3664: l_return_status := Validate_Record(l_def_tryv_rec);
3665: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3666: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3667: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3668: raise Okc_Api.G_EXCEPTION_ERROR;
3669: end if;
3670:
3671: --------------------------------------
3672: -- Move VIEW record to "Child" records
3683: x_msg_data,
3684: l_okl_trx_types_tl_rec,
3685: lx_okl_trx_types_tl_rec
3686: );
3687: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3688: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3689: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3690: raise Okc_Api.G_EXCEPTION_ERROR;
3691: end if;
3684: l_okl_trx_types_tl_rec,
3685: lx_okl_trx_types_tl_rec
3686: );
3687: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3688: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3689: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3690: raise Okc_Api.G_EXCEPTION_ERROR;
3691: end if;
3692: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
3685: lx_okl_trx_types_tl_rec
3686: );
3687: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3688: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3689: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3690: raise Okc_Api.G_EXCEPTION_ERROR;
3691: end if;
3692: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
3693: update_row(
3686: );
3687: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3688: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3689: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3690: raise Okc_Api.G_EXCEPTION_ERROR;
3691: end if;
3692: migrate(lx_okl_trx_types_tl_rec, l_def_tryv_rec);
3693: update_row(
3694: p_init_msg_list,
3697: x_msg_data,
3698: l_try_rec,
3699: lx_try_rec
3700: );
3701: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3702: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3703: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3704: raise Okc_Api.G_EXCEPTION_ERROR;
3705: end if;
3698: l_try_rec,
3699: lx_try_rec
3700: );
3701: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3702: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3703: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3704: raise Okc_Api.G_EXCEPTION_ERROR;
3705: end if;
3706: migrate(lx_try_rec, l_def_tryv_rec);
3699: lx_try_rec
3700: );
3701: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3702: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3703: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3704: raise Okc_Api.G_EXCEPTION_ERROR;
3705: end if;
3706: migrate(lx_try_rec, l_def_tryv_rec);
3707: x_tryv_rec := l_def_tryv_rec;
3700: );
3701: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3702: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3703: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
3704: raise Okc_Api.G_EXCEPTION_ERROR;
3705: end if;
3706: migrate(lx_try_rec, l_def_tryv_rec);
3707: x_tryv_rec := l_def_tryv_rec;
3708: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3704: raise Okc_Api.G_EXCEPTION_ERROR;
3705: end if;
3706: migrate(lx_try_rec, l_def_tryv_rec);
3707: x_tryv_rec := l_def_tryv_rec;
3708: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3709: exception
3710: when Okc_Api.G_EXCEPTION_ERROR then
3711: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3712: (
3706: migrate(lx_try_rec, l_def_tryv_rec);
3707: x_tryv_rec := l_def_tryv_rec;
3708: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3709: exception
3710: when Okc_Api.G_EXCEPTION_ERROR then
3711: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3712: (
3713: l_api_name,
3714: G_PKG_NAME,
3707: x_tryv_rec := l_def_tryv_rec;
3708: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3709: exception
3710: when Okc_Api.G_EXCEPTION_ERROR then
3711: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3712: (
3713: l_api_name,
3714: G_PKG_NAME,
3715: 'OKC_API.G_RET_STS_ERROR',
3711: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3712: (
3713: l_api_name,
3714: G_PKG_NAME,
3715: 'OKC_API.G_RET_STS_ERROR',
3716: x_msg_count,
3717: x_msg_data,
3718: '_PVT'
3719: );
3716: x_msg_count,
3717: x_msg_data,
3718: '_PVT'
3719: );
3720: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3721: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3722: (
3723: l_api_name,
3724: G_PKG_NAME,
3717: x_msg_data,
3718: '_PVT'
3719: );
3720: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3721: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3722: (
3723: l_api_name,
3724: G_PKG_NAME,
3725: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3721: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3722: (
3723: l_api_name,
3724: G_PKG_NAME,
3725: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3726: x_msg_count,
3727: x_msg_data,
3728: '_PVT'
3729: );
3727: x_msg_data,
3728: '_PVT'
3729: );
3730: when OTHERS then
3731: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3732: (
3733: l_api_name,
3734: G_PKG_NAME,
3735: 'OTHERS',
3751: x_tryv_tbl out NOCOPY tryv_tbl_type) is
3752:
3753: l_api_version constant number := 1;
3754: l_api_name constant varchar2(30) := 'V_tbl_update_row';
3755: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3756: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3757: i number := 0;
3758: begin
3759: Okc_Api.init_msg_list(p_init_msg_list);
3752:
3753: l_api_version constant number := 1;
3754: l_api_name constant varchar2(30) := 'V_tbl_update_row';
3755: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3756: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3757: i number := 0;
3758: begin
3759: Okc_Api.init_msg_list(p_init_msg_list);
3760: -- Make sure PL/SQL table has records in it before passing
3755: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3756: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3757: i number := 0;
3758: begin
3759: Okc_Api.init_msg_list(p_init_msg_list);
3760: -- Make sure PL/SQL table has records in it before passing
3761: if (p_tryv_tbl.COUNT > 0) then
3762: i := p_tryv_tbl.FIRST;
3763: loop
3762: i := p_tryv_tbl.FIRST;
3763: loop
3764: update_row (
3765: p_api_version => p_api_version,
3766: p_init_msg_list => Okc_Api.G_FALSE,
3767: x_return_status => x_return_status,
3768: x_msg_count => x_msg_count,
3769: x_msg_data => x_msg_data,
3770: p_tryv_rec => p_tryv_tbl(i),
3770: p_tryv_rec => p_tryv_tbl(i),
3771: x_tryv_rec => x_tryv_tbl(i));
3772: /* Begin Post Generation Change */
3773: -- store the highest degree of error
3774: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
3775: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
3776: l_overall_status := x_return_status;
3777: end if;
3778: end if;
3771: x_tryv_rec => x_tryv_tbl(i));
3772: /* Begin Post Generation Change */
3773: -- store the highest degree of error
3774: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
3775: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
3776: l_overall_status := x_return_status;
3777: end if;
3778: end if;
3779: /* End Post Generation Change */
3781: i := p_tryv_tbl.next(i);
3782: end loop;
3783: end if;
3784: exception
3785: when Okc_Api.G_EXCEPTION_ERROR then
3786: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3787: (
3788: l_api_name,
3789: G_PKG_NAME,
3782: end loop;
3783: end if;
3784: exception
3785: when Okc_Api.G_EXCEPTION_ERROR then
3786: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3787: (
3788: l_api_name,
3789: G_PKG_NAME,
3790: 'OKC_API.G_RET_STS_ERROR',
3786: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3787: (
3788: l_api_name,
3789: G_PKG_NAME,
3790: 'OKC_API.G_RET_STS_ERROR',
3791: x_msg_count,
3792: x_msg_data,
3793: '_PVT'
3794: );
3791: x_msg_count,
3792: x_msg_data,
3793: '_PVT'
3794: );
3795: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3796: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3797: (
3798: l_api_name,
3799: G_PKG_NAME,
3792: x_msg_data,
3793: '_PVT'
3794: );
3795: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3796: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3797: (
3798: l_api_name,
3799: G_PKG_NAME,
3800: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3796: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3797: (
3798: l_api_name,
3799: G_PKG_NAME,
3800: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3801: x_msg_count,
3802: x_msg_data,
3803: '_PVT'
3804: );
3802: x_msg_data,
3803: '_PVT'
3804: );
3805: when OTHERS then
3806: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3807: (
3808: l_api_name,
3809: G_PKG_NAME,
3810: 'OTHERS',
3828: p_try_rec in try_rec_type) is
3829:
3830: l_api_version constant number := 1;
3831: l_api_name constant varchar2(30) := 'B_delete_row';
3832: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3833: l_try_rec try_rec_type:= p_try_rec;
3834: l_row_notfound boolean := true;
3835: begin
3836: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3832: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3833: l_try_rec try_rec_type:= p_try_rec;
3834: l_row_notfound boolean := true;
3835: begin
3836: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3837: p_init_msg_list,
3838: '_PVT',
3839: x_return_status);
3840: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3836: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3837: p_init_msg_list,
3838: '_PVT',
3839: x_return_status);
3840: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3841: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3842: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3843: raise Okc_Api.G_EXCEPTION_ERROR;
3844: end if;
3837: p_init_msg_list,
3838: '_PVT',
3839: x_return_status);
3840: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3841: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3842: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3843: raise Okc_Api.G_EXCEPTION_ERROR;
3844: end if;
3845: delete from OKL_TRX_TYPES_B
3838: '_PVT',
3839: x_return_status);
3840: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3841: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3842: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3843: raise Okc_Api.G_EXCEPTION_ERROR;
3844: end if;
3845: delete from OKL_TRX_TYPES_B
3846: where ID = l_try_rec.id;
3839: x_return_status);
3840: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3841: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3842: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3843: raise Okc_Api.G_EXCEPTION_ERROR;
3844: end if;
3845: delete from OKL_TRX_TYPES_B
3846: where ID = l_try_rec.id;
3847:
3844: end if;
3845: delete from OKL_TRX_TYPES_B
3846: where ID = l_try_rec.id;
3847:
3848: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3849: exception
3850: when Okc_Api.G_EXCEPTION_ERROR then
3851: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3852: (
3846: where ID = l_try_rec.id;
3847:
3848: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3849: exception
3850: when Okc_Api.G_EXCEPTION_ERROR then
3851: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3852: (
3853: l_api_name,
3854: G_PKG_NAME,
3847:
3848: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3849: exception
3850: when Okc_Api.G_EXCEPTION_ERROR then
3851: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3852: (
3853: l_api_name,
3854: G_PKG_NAME,
3855: 'OKC_API.G_RET_STS_ERROR',
3851: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3852: (
3853: l_api_name,
3854: G_PKG_NAME,
3855: 'OKC_API.G_RET_STS_ERROR',
3856: x_msg_count,
3857: x_msg_data,
3858: '_PVT'
3859: );
3856: x_msg_count,
3857: x_msg_data,
3858: '_PVT'
3859: );
3860: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3861: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3862: (
3863: l_api_name,
3864: G_PKG_NAME,
3857: x_msg_data,
3858: '_PVT'
3859: );
3860: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3861: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3862: (
3863: l_api_name,
3864: G_PKG_NAME,
3865: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3861: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3862: (
3863: l_api_name,
3864: G_PKG_NAME,
3865: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3866: x_msg_count,
3867: x_msg_data,
3868: '_PVT'
3869: );
3867: x_msg_data,
3868: '_PVT'
3869: );
3870: when OTHERS then
3871: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3872: (
3873: l_api_name,
3874: G_PKG_NAME,
3875: 'OTHERS',
3889: p_okl_trx_types_tl_rec in okl_trx_types_tl_rec_type) is
3890:
3891: l_api_version constant number := 1;
3892: l_api_name constant varchar2(30) := 'TL_delete_row';
3893: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3894: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type:= p_okl_trx_types_tl_rec;
3895: l_row_notfound boolean := true;
3896: -----------------------------------------
3897: -- Set_Attributes for:OKL_TRX_TYPES_TL --
3899: function Set_Attributes (
3900: p_okl_trx_types_tl_rec in okl_trx_types_tl_rec_type,
3901: x_okl_trx_types_tl_rec out NOCOPY okl_trx_types_tl_rec_type
3902: ) return varchar2 is
3903: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3904: begin
3905: x_okl_trx_types_tl_rec := p_okl_trx_types_tl_rec;
3906: x_okl_trx_types_tl_rec.language := USERENV('LANG');
3907: return(l_return_status);
3906: x_okl_trx_types_tl_rec.language := USERENV('LANG');
3907: return(l_return_status);
3908: end Set_Attributes;
3909: begin
3910: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3911: p_init_msg_list,
3912: '_PVT',
3913: x_return_status);
3914: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3910: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3911: p_init_msg_list,
3912: '_PVT',
3913: x_return_status);
3914: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3915: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3916: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3917: raise Okc_Api.G_EXCEPTION_ERROR;
3918: end if;
3911: p_init_msg_list,
3912: '_PVT',
3913: x_return_status);
3914: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3915: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3916: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3917: raise Okc_Api.G_EXCEPTION_ERROR;
3918: end if;
3919: --- Setting item attributes
3912: '_PVT',
3913: x_return_status);
3914: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3915: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3916: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3917: raise Okc_Api.G_EXCEPTION_ERROR;
3918: end if;
3919: --- Setting item attributes
3920: l_return_status := Set_Attributes(
3913: x_return_status);
3914: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3915: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3916: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3917: raise Okc_Api.G_EXCEPTION_ERROR;
3918: end if;
3919: --- Setting item attributes
3920: l_return_status := Set_Attributes(
3921: p_okl_trx_types_tl_rec, -- IN
3920: l_return_status := Set_Attributes(
3921: p_okl_trx_types_tl_rec, -- IN
3922: l_okl_trx_types_tl_rec); -- OUT
3923: --- If any errors happen abort API
3924: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3925: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3926: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3927: raise Okc_Api.G_EXCEPTION_ERROR;
3928: end if;
3921: p_okl_trx_types_tl_rec, -- IN
3922: l_okl_trx_types_tl_rec); -- OUT
3923: --- If any errors happen abort API
3924: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3925: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3926: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3927: raise Okc_Api.G_EXCEPTION_ERROR;
3928: end if;
3929: delete from OKL_TRX_TYPES_TL
3922: l_okl_trx_types_tl_rec); -- OUT
3923: --- If any errors happen abort API
3924: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3925: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3926: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3927: raise Okc_Api.G_EXCEPTION_ERROR;
3928: end if;
3929: delete from OKL_TRX_TYPES_TL
3930: where ID = l_okl_trx_types_tl_rec.id;
3923: --- If any errors happen abort API
3924: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3925: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3926: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3927: raise Okc_Api.G_EXCEPTION_ERROR;
3928: end if;
3929: delete from OKL_TRX_TYPES_TL
3930: where ID = l_okl_trx_types_tl_rec.id;
3931:
3928: end if;
3929: delete from OKL_TRX_TYPES_TL
3930: where ID = l_okl_trx_types_tl_rec.id;
3931:
3932: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3933: exception
3934: when Okc_Api.G_EXCEPTION_ERROR then
3935: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3936: (
3930: where ID = l_okl_trx_types_tl_rec.id;
3931:
3932: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3933: exception
3934: when Okc_Api.G_EXCEPTION_ERROR then
3935: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3936: (
3937: l_api_name,
3938: G_PKG_NAME,
3931:
3932: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
3933: exception
3934: when Okc_Api.G_EXCEPTION_ERROR then
3935: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3936: (
3937: l_api_name,
3938: G_PKG_NAME,
3939: 'OKC_API.G_RET_STS_ERROR',
3935: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
3936: (
3937: l_api_name,
3938: G_PKG_NAME,
3939: 'OKC_API.G_RET_STS_ERROR',
3940: x_msg_count,
3941: x_msg_data,
3942: '_PVT'
3943: );
3940: x_msg_count,
3941: x_msg_data,
3942: '_PVT'
3943: );
3944: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3945: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3946: (
3947: l_api_name,
3948: G_PKG_NAME,
3941: x_msg_data,
3942: '_PVT'
3943: );
3944: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
3945: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3946: (
3947: l_api_name,
3948: G_PKG_NAME,
3949: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3945: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3946: (
3947: l_api_name,
3948: G_PKG_NAME,
3949: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3950: x_msg_count,
3951: x_msg_data,
3952: '_PVT'
3953: );
3951: x_msg_data,
3952: '_PVT'
3953: );
3954: when OTHERS then
3955: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
3956: (
3957: l_api_name,
3958: G_PKG_NAME,
3959: 'OTHERS',
3974: p_tryv_rec in tryv_rec_type) is
3975:
3976: l_api_version constant number := 1;
3977: l_api_name constant varchar2(30) := 'V_delete_row';
3978: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
3979: l_tryv_rec tryv_rec_type := p_tryv_rec;
3980: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
3981: l_try_rec try_rec_type;
3982: begin
3979: l_tryv_rec tryv_rec_type := p_tryv_rec;
3980: l_okl_trx_types_tl_rec okl_trx_types_tl_rec_type;
3981: l_try_rec try_rec_type;
3982: begin
3983: l_return_status := Okc_Api.START_ACTIVITY(l_api_name,
3984: G_PKG_NAME,
3985: p_init_msg_list,
3986: l_api_version,
3987: p_api_version,
3986: l_api_version,
3987: p_api_version,
3988: '_PVT',
3989: x_return_status);
3990: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3991: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3992: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3993: raise Okc_Api.G_EXCEPTION_ERROR;
3994: end if;
3987: p_api_version,
3988: '_PVT',
3989: x_return_status);
3990: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3991: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3992: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3993: raise Okc_Api.G_EXCEPTION_ERROR;
3994: end if;
3995: --------------------------------------
3988: '_PVT',
3989: x_return_status);
3990: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3991: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3992: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3993: raise Okc_Api.G_EXCEPTION_ERROR;
3994: end if;
3995: --------------------------------------
3996: -- Move VIEW record to "Child" records
3989: x_return_status);
3990: if (l_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
3991: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
3992: elsif (l_return_status = Okc_Api.G_RET_STS_ERROR) then
3993: raise Okc_Api.G_EXCEPTION_ERROR;
3994: end if;
3995: --------------------------------------
3996: -- Move VIEW record to "Child" records
3997: --------------------------------------
4006: x_msg_count,
4007: x_msg_data,
4008: l_okl_trx_types_tl_rec
4009: );
4010: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4011: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4012: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4013: raise Okc_Api.G_EXCEPTION_ERROR;
4014: end if;
4007: x_msg_data,
4008: l_okl_trx_types_tl_rec
4009: );
4010: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4011: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4012: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4013: raise Okc_Api.G_EXCEPTION_ERROR;
4014: end if;
4015: delete_row(
4008: l_okl_trx_types_tl_rec
4009: );
4010: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4011: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4012: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4013: raise Okc_Api.G_EXCEPTION_ERROR;
4014: end if;
4015: delete_row(
4016: p_init_msg_list,
4009: );
4010: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4011: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4012: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4013: raise Okc_Api.G_EXCEPTION_ERROR;
4014: end if;
4015: delete_row(
4016: p_init_msg_list,
4017: x_return_status,
4018: x_msg_count,
4019: x_msg_data,
4020: l_try_rec
4021: );
4022: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4023: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4024: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4025: raise Okc_Api.G_EXCEPTION_ERROR;
4026: end if;
4019: x_msg_data,
4020: l_try_rec
4021: );
4022: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4023: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4024: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4025: raise Okc_Api.G_EXCEPTION_ERROR;
4026: end if;
4027: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
4020: l_try_rec
4021: );
4022: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4023: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4024: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4025: raise Okc_Api.G_EXCEPTION_ERROR;
4026: end if;
4027: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
4028: exception
4021: );
4022: if (x_return_status = Okc_Api.G_RET_STS_UNEXP_ERROR) then
4023: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4024: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4025: raise Okc_Api.G_EXCEPTION_ERROR;
4026: end if;
4027: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
4028: exception
4029: when Okc_Api.G_EXCEPTION_ERROR then
4023: raise Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR;
4024: elsif (x_return_status = Okc_Api.G_RET_STS_ERROR) then
4025: raise Okc_Api.G_EXCEPTION_ERROR;
4026: end if;
4027: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
4028: exception
4029: when Okc_Api.G_EXCEPTION_ERROR then
4030: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
4031: (
4025: raise Okc_Api.G_EXCEPTION_ERROR;
4026: end if;
4027: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
4028: exception
4029: when Okc_Api.G_EXCEPTION_ERROR then
4030: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
4031: (
4032: l_api_name,
4033: G_PKG_NAME,
4026: end if;
4027: Okc_Api.END_ACTIVITY(x_msg_count, x_msg_data);
4028: exception
4029: when Okc_Api.G_EXCEPTION_ERROR then
4030: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
4031: (
4032: l_api_name,
4033: G_PKG_NAME,
4034: 'OKC_API.G_RET_STS_ERROR',
4030: x_return_status := Okc_Api.HANDLE_EXCEPTIONS
4031: (
4032: l_api_name,
4033: G_PKG_NAME,
4034: 'OKC_API.G_RET_STS_ERROR',
4035: x_msg_count,
4036: x_msg_data,
4037: '_PVT'
4038: );
4035: x_msg_count,
4036: x_msg_data,
4037: '_PVT'
4038: );
4039: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
4040: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4041: (
4042: l_api_name,
4043: G_PKG_NAME,
4036: x_msg_data,
4037: '_PVT'
4038: );
4039: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
4040: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4041: (
4042: l_api_name,
4043: G_PKG_NAME,
4044: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4040: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4041: (
4042: l_api_name,
4043: G_PKG_NAME,
4044: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4045: x_msg_count,
4046: x_msg_data,
4047: '_PVT'
4048: );
4046: x_msg_data,
4047: '_PVT'
4048: );
4049: when OTHERS then
4050: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4051: (
4052: l_api_name,
4053: G_PKG_NAME,
4054: 'OTHERS',
4069: p_tryv_tbl in tryv_tbl_type) is
4070:
4071: l_api_version constant number := 1;
4072: l_api_name constant varchar2(30) := 'V_tbl_delete_row';
4073: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
4074: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
4075: i number := 0;
4076: begin
4077: Okc_Api.init_msg_list(p_init_msg_list);
4070:
4071: l_api_version constant number := 1;
4072: l_api_name constant varchar2(30) := 'V_tbl_delete_row';
4073: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
4074: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
4075: i number := 0;
4076: begin
4077: Okc_Api.init_msg_list(p_init_msg_list);
4078: -- Make sure PL/SQL table has records in it before passing
4073: l_return_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
4074: l_overall_status varchar2(1) := Okc_Api.G_RET_STS_SUCCESS;
4075: i number := 0;
4076: begin
4077: Okc_Api.init_msg_list(p_init_msg_list);
4078: -- Make sure PL/SQL table has records in it before passing
4079: if (p_tryv_tbl.COUNT > 0) then
4080: i := p_tryv_tbl.FIRST;
4081: loop
4080: i := p_tryv_tbl.FIRST;
4081: loop
4082: delete_row (
4083: p_api_version => p_api_version,
4084: p_init_msg_list => Okc_Api.G_FALSE,
4085: x_return_status => x_return_status,
4086: x_msg_count => x_msg_count,
4087: x_msg_data => x_msg_data,
4088: p_tryv_rec => p_tryv_tbl(i));
4087: x_msg_data => x_msg_data,
4088: p_tryv_rec => p_tryv_tbl(i));
4089: /* Begin Post Generation Change */
4090: -- store the highest degree of error
4091: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
4092: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
4093: l_overall_status := x_return_status;
4094: end if;
4095: end if;
4088: p_tryv_rec => p_tryv_tbl(i));
4089: /* Begin Post Generation Change */
4090: -- store the highest degree of error
4091: if x_return_status <> Okc_Api.G_RET_STS_SUCCESS then
4092: if l_overall_status <> Okc_Api.G_RET_STS_UNEXP_ERROR then
4093: l_overall_status := x_return_status;
4094: end if;
4095: end if;
4096: /* End Post Generation Change */
4098: i := p_tryv_tbl.next(i);
4099: end loop;
4100: end if;
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: end loop;
4100: end if;
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: '_PVT'
4111: );
4108: x_msg_count,
4109: x_msg_data,
4110: '_PVT'
4111: );
4112: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
4113: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4114: (
4115: l_api_name,
4116: G_PKG_NAME,
4109: x_msg_data,
4110: '_PVT'
4111: );
4112: when Okc_Api.G_EXCEPTION_UNEXPECTED_ERROR then
4113: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4114: (
4115: l_api_name,
4116: G_PKG_NAME,
4117: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4113: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4114: (
4115: l_api_name,
4116: G_PKG_NAME,
4117: 'OKC_API.G_RET_STS_UNEXP_ERROR',
4118: x_msg_count,
4119: x_msg_data,
4120: '_PVT'
4121: );
4119: x_msg_data,
4120: '_PVT'
4121: );
4122: when OTHERS then
4123: x_return_status :=Okc_Api.HANDLE_EXCEPTIONS
4124: (
4125: l_api_name,
4126: G_PKG_NAME,
4127: 'OTHERS',