DBA Data[Home] [Help]

APPS.FA_RETIREMENT_PUB dependencies on FND_API

Line 188: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE

184:
185: ------------------------------------------------------------------------------
186: PROCEDURE do_retirement
187: (p_api_version in NUMBER
188: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
189: ,p_commit in VARCHAR2 := FND_API.G_FALSE
190: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
191: ,p_calling_fn in VARCHAR2
192: ,x_return_status out NOCOPY VARCHAR2

Line 189: ,p_commit in VARCHAR2 := FND_API.G_FALSE

185: ------------------------------------------------------------------------------
186: PROCEDURE do_retirement
187: (p_api_version in NUMBER
188: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
189: ,p_commit in VARCHAR2 := FND_API.G_FALSE
190: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
191: ,p_calling_fn in VARCHAR2
192: ,x_return_status out NOCOPY VARCHAR2
193: ,x_msg_count out NOCOPY NUMBER

Line 190: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL

186: PROCEDURE do_retirement
187: (p_api_version in NUMBER
188: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
189: ,p_commit in VARCHAR2 := FND_API.G_FALSE
190: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
191: ,p_calling_fn in VARCHAR2
192: ,x_return_status out NOCOPY VARCHAR2
193: ,x_msg_count out NOCOPY NUMBER
194: ,x_msg_data out NOCOPY VARCHAR2

Line 291: raise FND_API.G_EXC_ERROR;

287: if (not g_log_level_rec.initialized) then
288: if (NOT fa_util_pub.get_log_level_rec (
289: x_log_level_rec => g_log_level_rec
290: )) then
291: raise FND_API.G_EXC_ERROR;
292: end if;
293: end if;
294:
295: g_release := fa_cache_pkg.fazarel_release;

Line 305: if not FND_API.compatible_api_call

301:
302: -- check version of the API
303: -- standard call to check for API call compatibility.
304:
305: if not FND_API.compatible_api_call
306: (G_API_VERSION
307: ,p_api_version
308: ,G_API_NAME
309: ,G_PKG_NAME) then

Line 310: raise FND_API.G_EXC_UNEXPECTED_ERROR;

306: (G_API_VERSION
307: ,p_api_version
308: ,G_API_NAME
309: ,G_PKG_NAME) then
310: raise FND_API.G_EXC_UNEXPECTED_ERROR;
311: end if;
312:
313: -- initialize message list if p_init_msg_list is set to TRUE.
314: if (FND_API.to_boolean(p_init_msg_list) ) then

Line 314: if (FND_API.to_boolean(p_init_msg_list) ) then

310: raise FND_API.G_EXC_UNEXPECTED_ERROR;
311: end if;
312:
313: -- initialize message list if p_init_msg_list is set to TRUE.
314: if (FND_API.to_boolean(p_init_msg_list) ) then
315: -- initialize error message stack.
316: fa_srvr_msg.init_server_message;
317:
318: -- initialize debug message stack.

Line 350: raise FND_API.G_EXC_UNEXPECTED_ERROR;

346: if l_asset_hdr_rec.book_type_code is not null then
347:
348: -- call the cache for the primary transaction book
349: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
350: raise FND_API.G_EXC_UNEXPECTED_ERROR;
351: end if;
352:
353: -- ***************************
354: -- ** Transaction approval

Line 369: raise FND_API.G_EXC_ERROR;

365: ,x_trx_date => l_asset_retire_rec.date_retired
366: ,x_init_message_flag => 'NO', p_log_level_rec => g_log_level_rec);
367: if not l_ins_status then
368: g_msg_name := 'error msg name-after trx_app';
369: raise FND_API.G_EXC_ERROR;
370: end if;
371:
372: -- l_book_class := fa_cache_pkg.fazcbc_record.book_class;
373: -- l_set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

Line 384: raise FND_API.G_EXC_UNEXPECTED_ERROR;

380: if not fa_cache_pkg.fazcsob
381: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
382: ,x_mrc_sob_type_code => l_reporting_flag, p_log_level_rec => g_log_level_rec)
383: then
384: raise FND_API.G_EXC_UNEXPECTED_ERROR;
385: end if;
386:
387: -- Error out if the program is submitted from the Reporting Responsibility
388: -- No transaction permitted directly on reporting books.

Line 392: raise FND_API.G_EXC_UNEXPECTED_ERROR;

388: -- No transaction permitted directly on reporting books.
389: if l_reporting_flag = 'R' then
390: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
391: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
392: raise FND_API.G_EXC_UNEXPECTED_ERROR;
393: end if;
394:
395: --Check if impairment has been posted in current period.
396: if not FA_ASSET_VAL_PVT.validate_impairment_exists

Line 403: raise FND_API.G_EXC_ERROR;

399: p_mrc_sob_type_code => 'P',
400: p_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
401: p_log_level_rec => g_log_level_rec) then
402:
403: raise FND_API.G_EXC_ERROR;
404: end if;
405: /*phase5 This function will validate if current transaction is overlapping to any previously done impairment*/
406: /* Commenting out as a part of IFRS
407: if not FA_ASSET_VAL_PVT.check_overlapping_impairment(

Line 417: raise FND_API.G_EXC_ERROR;

413: (name => 'FA_OVERLAPPING_IMP_NOT_ALLOWED',
414: calling_fn => 'FA_ASSET_VAL_PVT.check_overlapping_impairment'
415: ,p_log_level_rec => g_log_level_rec);
416:
417: raise FND_API.G_EXC_ERROR;
418: end if;
419: IFRS change ends */
420: end if; -- book_type_code
421:

Line 433: raise FND_API.G_EXC_UNEXPECTED_ERROR;

429: if not FA_UTIL_PVT.get_asset_desc_rec
430: (p_asset_hdr_rec => l_asset_hdr_rec
431: ,px_asset_desc_rec => l_asset_desc_rec
432: , p_log_level_rec => g_log_level_rec) then
433: raise FND_API.G_EXC_UNEXPECTED_ERROR;
434: end if;
435:
436: -- pop asset_type_rec
437: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', p_log_level_rec => g_log_level_rec); end if;

Line 443: raise FND_API.G_EXC_UNEXPECTED_ERROR;

439: (p_asset_hdr_rec => l_asset_hdr_rec
440: ,px_asset_type_rec => l_asset_type_rec
441: ,p_date_effective => NULL
442: , p_log_level_rec => g_log_level_rec) then
443: raise FND_API.G_EXC_UNEXPECTED_ERROR;
444: end if;
445:
446: /* Bug# 4663092: fyi: May not needed at this level */
447: -- pop asset_fin_rec

Line 456: raise FND_API.G_EXC_UNEXPECTED_ERROR;

452: ,px_asset_fin_rec => l_asset_fin_rec
453: ,p_transaction_header_id => NULL
454: ,p_mrc_sob_type_code => 'P'
455: , p_log_level_rec => g_log_level_rec) then
456: raise FND_API.G_EXC_UNEXPECTED_ERROR;
457: end if;
458:
459: --Added for IFRS
460: if (not fa_cache_pkg.fazccmt(l_asset_fin_rec.deprn_method_code,

Line 466: raise FND_API.G_EXC_UNEXPECTED_ERROR;

462: if (g_log_level_rec.statement_level) then
463: fa_debug_pkg.add(l_calling_fn, 'Error calling', 'fa_cache_pkg.fazccmt', p_log_level_rec => g_log_level_rec);
464: end if;
465:
466: raise FND_API.G_EXC_UNEXPECTED_ERROR;
467: end if;
468:
469: if l_asset_hdr_rec.book_type_code is not null then
470:

Line 481: raise FND_API.G_EXC_ERROR;

477: (name => 'FA_OVERLAPPING_IMP_NOT_ALLOWED',
478: calling_fn => 'FA_ASSET_VAL_PVT.check_overlapping_impairment'
479: ,p_log_level_rec => g_log_level_rec);
480:
481: raise FND_API.G_EXC_ERROR;
482: end if;
483:
484: end if;
485: --Added for IFRS

Line 493: raise FND_API.G_EXC_UNEXPECTED_ERROR;

489: if not FA_UTIL_PVT.get_period_rec
490: (p_book => l_asset_hdr_rec.book_type_code
491: ,x_period_rec => l_period_rec
492: , p_log_level_rec => g_log_level_rec) then
493: raise FND_API.G_EXC_UNEXPECTED_ERROR;
494: end if;
495:
496:
497: -- get the current units of the asset from fa_asset_history table

Line 508: raise FND_API.G_EXC_UNEXPECTED_ERROR;

504: (p_calling_fn => l_calling_fn
505: ,p_asset_id => l_asset_hdr_rec.asset_id
506: ,x_current_units => l_asset_desc_rec.current_units
507: , p_log_level_rec => g_log_level_rec) then
508: raise FND_API.G_EXC_UNEXPECTED_ERROR;
509: end if;
510:
511: -- *********************************************
512: -- ** Set default values unless provided

Line 549: raise FND_API.G_EXC_ERROR;

545: ,x_trx_date => l_asset_retire_rec.date_retired
546: ,x_init_message_flag => 'NO', p_log_level_rec => g_log_level_rec);
547: if not l_ins_status then
548: g_msg_name := 'error msg name-after trx_app group';
549: raise FND_API.G_EXC_ERROR;
550: end if;
551:
552: end if;
553:

Line 616: raise FND_API.G_EXC_UNEXPECTED_ERROR;

612: if not FA_UTIL_PVT.get_asset_cat_rec (
613: p_asset_hdr_rec => l_asset_hdr_rec,
614: px_asset_cat_rec => l_asset_cat_rec,
615: p_date_effective => NULL, p_log_level_rec => g_log_level_rec) then
616: raise FND_API.G_EXC_UNEXPECTED_ERROR;
617: end if;
618:
619: -- Initialize g_inv_trans_rec global variable
620: g_inv_trans_rec.invoice_transaction_id := to_number(null);

Line 642: raise FND_API.G_EXC_UNEXPECTED_ERROR;

638: if g_log_level_rec.statement_level then
639: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', p_log_level_rec => g_log_level_rec);
640: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, p_log_level_rec => g_log_level_rec);
641: end if;
642: raise FND_API.G_EXC_UNEXPECTED_ERROR;
643: end if;
644:
645: if (g_log_level_rec.statement_level) then
646: FA_DEBUG_PKG.ADD (fname=>'FAPRETB.pls',

Line 672: raise FND_API.G_EXC_ERROR;

668: fetch c_get_group_reduction_val into l_reduction_rate, l_reduce_retirement_flag;
669: close c_get_group_reduction_val;
670: if(nvl(l_asset_retire_rec.reduction_rate,0) <> 0 and nvl(l_reduce_retirement_flag,'N') = 'N') then
671: g_msg_name := 'FA_RET_NO_REDUCTION';
672: raise FND_API.G_EXC_ERROR;
673: end if;
674: if(l_reduce_retirement_flag = 'Y') then
675: if (l_asset_retire_rec.reduction_rate is null ) then
676: l_asset_retire_rec.reduction_rate := l_reduction_rate;

Line 704: raise FND_API.G_EXC_UNEXPECTED_ERROR;

700: ,p_period_rec => l_period_rec
701: ,p_calling_fn => p_calling_fn
702: ,p_log_level_rec => g_log_level_rec
703: ) then
704: raise FND_API.G_EXC_UNEXPECTED_ERROR;
705: end if;
706:
707:
708: -- **********************************************

Line 724: raise FND_API.G_EXC_ERROR;

720: -- can only fully retire CIP assets unless source line retirement
721: if l_asset_type_rec.asset_type = 'CIP' and p_inv_tbl.count = 0
722: and l_asset_retire_rec.units_retired <> l_asset_desc_rec.current_units then
723: g_msg_name := 'FA_RET_WHOLE_CIP_ASSET';
724: raise FND_API.G_EXC_ERROR;
725: end if;
726:
727: else -- if units_retired is null
728:

Line 733: raise FND_API.G_EXC_ERROR;

729: -- can only fully retire CIP assets unless source line retirement
730: if l_asset_type_rec.asset_type = 'CIP' and p_inv_tbl.count = 0
731: and l_asset_retire_rec.cost_retired <> l_asset_fin_rec.cost then
732: g_msg_name := 'FA_RET_WHOLE_CIP_ASSET';
733: raise FND_API.G_EXC_ERROR;
734: end if;
735:
736: end if; -- partial retirement on CIP asset
737:

Line 743: raise FND_API.G_EXC_ERROR;

739: -- of retirement in FAXASSET(i.e. fa_retire_pkg.initialize).
740: -- ? not sure of the following code - need more investigation
741: if l_asset_desc_rec.unit_adjustment_flag = 'YES' then
742: g_msg_name := 'FA_RET_CHANGE_UNITS_TFR_FORM';
743: raise FND_API.G_EXC_ERROR;
744: end if;
745:
746: -- FYI: We don't allow unit retirements for TAX book
747: -- probably because TAX book does not have its own distributions

Line 753: raise FND_API.G_EXC_ERROR;

749: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
750: and l_asset_retire_rec.units_retired is not null then
751: g_msg_name := 'FA_RET_NO_PART_UNIT_IN_TAX';
752: -- ? can not find this message name in msg table
753: raise FND_API.G_EXC_ERROR;
754: end if;
755:
756:
757: /* IAC Specific Validation */

Line 764: raise FND_API.G_EXC_ERROR;

760: p_book_type_code => l_asset_hdr_rec.book_type_code,
761: p_asset_id => l_asset_hdr_rec.asset_id,
762: p_calling_function => l_calling_fn
763: ) then
764: raise FND_API.G_EXC_ERROR;
765: end if;
766: end if;
767:
768: -- check if any adjustment is pending

Line 858: raise FND_API.G_EXC_UNEXPECTED_ERROR;

854: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.cost_retired
855: ,x_book => l_asset_hdr_rec.book_type_code
856: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
857: ,p_log_level_rec => g_log_level_rec) then
858: raise FND_API.G_EXC_UNEXPECTED_ERROR;
859: end if;
860:
861: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'derived cost_retired: ', l_asset_retire_rec.cost_retired, p_log_level_rec => g_log_level_rec); end if;
862:

Line 919: raise FND_API.G_EXC_ERROR;

915: p_calling_fn => 'FA_RETIREMENT_PUB.do_retirement'
916: , p_log_level_rec => g_log_level_rec) then
917: g_msg_name := null;
918: g_token1 := null;
919: raise FND_API.G_EXC_ERROR;
920: end if;
921:
922: -- Bug 9916378
923: if not FA_ASSET_VAL_PVT.validate_prev_period_amort

Line 929: raise FND_API.G_EXC_ERROR;

925: p_trans_rec => l_trans_rec,
926: p_period_rec => l_period_rec,
927: p_asset_retire_rec => l_asset_retire_rec,
928: p_log_level_rec => g_log_level_rec) then
929: raise FND_API.G_EXC_ERROR;
930: end if;
931:
932: -- ***************************
933: -- ** Main

Line 956: raise FND_API.G_EXC_ERROR;

952: ,p_inv_tbl => l_inv_tbl
953: ,p_period_rec => l_period_rec
954: ,p_log_level_rec => g_log_level_rec
955: ) then
956: raise FND_API.G_EXC_ERROR;
957: end if;
958:
959: l_retirement_id := l_asset_retire_rec.retirement_id;
960:

Line 995: raise FND_API.G_EXC_UNEXPECTED_ERROR;

991: if not fa_cache_pkg.fazctbk
992: (x_corp_book => l_asset_hdr_rec.book_type_code
993: ,x_asset_type => l_asset_type_rec.asset_type
994: ,x_tax_book_tbl => l_tax_book_tbl, p_log_level_rec => g_log_level_rec) then
995: raise FND_API.G_EXC_UNEXPECTED_ERROR;
996: end if;
997:
998: if g_log_level_rec.statement_level then
999: fa_debug_pkg.add

Line 1027: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1023:
1024: -- cache the book information for the tax book
1025: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index),
1026: p_log_level_rec => g_log_level_rec) then
1027: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1028: end if;
1029:
1030: -- ? Excerpt from Brad's comment on this part - need more investigation:
1031: -- 'May need to set the transaction date, trx_type, subtype here as well

Line 1061: raise FND_API.G_EXC_ERROR;

1057: ,p_inv_tbl => l_inv_tbl
1058: ,p_period_rec => l_period_rec
1059: ,p_log_level_rec => g_log_level_rec
1060: ) then
1061: raise FND_API.G_EXC_ERROR;
1062: end if;
1063:
1064: end if;
1065:

Line 1078: l_asset_retire_rec.calculate_gain_loss := FND_API.G_TRUE;

1074: l_asset_retire_rec.recognize_gain_loss, g_log_level_rec);
1075: end if;
1076: IF (l_asset_fin_rec.group_asset_id is not null
1077: and l_asset_retire_rec.recognize_gain_loss = 'YES') THEN
1078: l_asset_retire_rec.calculate_gain_loss := FND_API.G_TRUE;
1079: END IF;
1080:
1081: l_calculate_gain_loss_flag := l_asset_retire_rec.calculate_gain_loss;
1082:

Line 1093: if l_calculate_gain_loss_flag = FND_API.G_TRUE then

1089: end if;
1090:
1091: -- submit calculate_gain_loss programs if flag is set
1092:
1093: if l_calculate_gain_loss_flag = FND_API.G_TRUE then
1094:
1095: if g_log_level_rec.statement_level then
1096: fa_debug_pkg.add
1097: (fname => l_calling_fn,

Line 1111: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1107: (p_retirement_id => l_retirement_id
1108: ,p_mrc_sob_type_code => 'P'
1109: ,p_log_level_rec => g_log_level_rec
1110: ) then
1111: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1112: end if;
1113: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'right after calc gain/loss', '', p_log_level_rec => g_log_level_rec); end if;
1114:
1115: end if;

Line 1132: if FND_API.to_boolean(p_commit) then

1128: p_log_level_rec => g_log_level_rec);
1129:
1130:
1131: -- commit if p_commit is TRUE.
1132: if FND_API.to_boolean(p_commit) then
1133: COMMIT WORK;
1134: end if;
1135:
1136: -- Standard call to get message count and if count is 1 get message info.

Line 1142: x_return_status := FND_API.G_RET_STS_SUCCESS;

1138: ,p_data => x_msg_data
1139: );
1140:
1141: -- return the status.
1142: x_return_status := FND_API.G_RET_STS_SUCCESS;
1143:
1144: EXCEPTION
1145:
1146: when FND_API.G_EXC_ERROR then

Line 1146: when FND_API.G_EXC_ERROR then

1142: x_return_status := FND_API.G_RET_STS_SUCCESS;
1143:
1144: EXCEPTION
1145:
1146: when FND_API.G_EXC_ERROR then
1147:
1148: ROLLBACK TO do_retirement;
1149:
1150: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1150: x_return_status := FND_API.G_RET_STS_ERROR;

1146: when FND_API.G_EXC_ERROR then
1147:
1148: ROLLBACK TO do_retirement;
1149:
1150: x_return_status := FND_API.G_RET_STS_ERROR;
1151:
1152: if g_token1 is null then
1153: fa_srvr_msg.add_message(calling_fn => l_calling_fn
1154: ,name => g_msg_name

Line 1168: when FND_API.G_EXC_UNEXPECTED_ERROR then

1164: FND_MSG_PUB.count_and_get(p_count => x_msg_count
1165: ,p_data => x_msg_data
1166: );
1167:
1168: when FND_API.G_EXC_UNEXPECTED_ERROR then
1169:
1170: ROLLBACK TO do_retirement;
1171:
1172: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1172: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1168: when FND_API.G_EXC_UNEXPECTED_ERROR then
1169:
1170: ROLLBACK TO do_retirement;
1171:
1172: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1173:
1174: fa_srvr_msg.add_message(calling_fn => l_calling_fn
1175: , p_log_level_rec => g_log_level_rec);
1176: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 1184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1180: when others then
1181:
1182: ROLLBACK TO do_retirement;
1183:
1184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1185:
1186: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
1187: , p_log_level_rec => g_log_level_rec);
1188: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 1293: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1289: -- populate rec_types that were not provided by users
1290:
1291: -- call the cache for the primary transaction book
1292: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
1293: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1294: end if;
1295:
1296: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
1297:

Line 1307: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1303: ,px_asset_fin_rec => l_asset_fin_rec
1304: ,p_transaction_header_id => NULL
1305: ,p_mrc_sob_type_code => 'P'
1306: , p_log_level_rec => p_log_level_rec) then
1307: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1308: end if;
1309:
1310: fa_debug_pkg.add(l_calling_fn,'l_asset_fin_rec.recognize_gain_loss',l_asset_fin_rec.recognize_gain_loss,p_log_level_rec);
1311:

Line 1325: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1321: (p_book => l_asset_hdr_rec.book_type_code
1322: ,p_effective_date => NULL
1323: ,x_period_rec => l_period_rec
1324: , p_log_level_rec => p_log_level_rec) then
1325: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1326: end if;
1327:
1328: -- ***************************************************
1329: -- ** Do asset/book-level validation on transaction

Line 1361: raise FND_API.G_EXC_ERROR;

1357: if (l_asset_hdr_rec.period_of_addition = 'Y' and
1358: G_release = 11) then
1359: -- error out since retirement is not allowed in period of addition
1360: g_msg_name := 'FA_RET_CANT_RET_NONDEPRN';
1361: raise FND_API.G_EXC_ERROR;
1362: end if;
1363: else
1364: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1365: end if;

Line 1364: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1360: g_msg_name := 'FA_RET_CANT_RET_NONDEPRN';
1361: raise FND_API.G_EXC_ERROR;
1362: end if;
1363: else
1364: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1365: end if;
1366: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec => p_log_level_rec); end if;
1367:
1368: -- check if there is an add-to-asset transaction pending

Line 1377: raise FND_API.G_EXC_ERROR;

1373: ,p_book => l_asset_hdr_rec.book_type_code
1374: , p_log_level_rec => p_log_level_rec) then
1375: -- Users must post their mass additions before they can retire the asset
1376: g_msg_name := 'FA_RET_CANT_RET_INCOMPLETE_ASS';
1377: raise FND_API.G_EXC_ERROR;
1378: end if;
1379:
1380: -- check if another retirement/reinstatement already pending
1381: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec => p_log_level_rec); end if;

Line 1387: raise FND_API.G_EXC_ERROR;

1383: (p_asset_id => l_asset_hdr_rec.asset_id
1384: ,p_book => l_asset_hdr_rec.book_type_code
1385: , p_log_level_rec => p_log_level_rec) then
1386: g_msg_name := 'FA_RET_PENDING_RETIREMENTS';
1387: raise FND_API.G_EXC_ERROR;
1388: end if;
1389:
1390: -- check if the asset has already been fully retired
1391: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if the asset is already fully retired', '', p_log_level_rec => p_log_level_rec); end if;

Line 1397: raise FND_API.G_EXC_ERROR;

1393: (p_asset_id => l_asset_hdr_rec.asset_id
1394: ,p_book => l_asset_hdr_rec.book_type_code
1395: , p_log_level_rec => p_log_level_rec) then
1396: g_msg_name := 'FA_REC_RETIRED';
1397: raise FND_API.G_EXC_ERROR;
1398: end if;
1399:
1400: -- check if date_retired is valid in terms of trx date
1401: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if date_retired is valid in terms of trx date', '', p_log_level_rec => p_log_level_rec); end if;

Line 1412: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1408: ,p_asset_id => l_asset_hdr_rec.asset_id
1409: ,p_book => l_asset_hdr_rec.book_type_code
1410: ,x_latest_trans_date => l_latest_trans_date
1411: , p_log_level_rec => p_log_level_rec) then
1412: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1413: end if;
1414:
1415: if l_asset_retire_rec.date_retired < l_latest_trans_date then
1416: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';

Line 1417: raise FND_API.G_EXC_ERROR;

1413: end if;
1414:
1415: if l_asset_retire_rec.date_retired < l_latest_trans_date then
1416: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
1417: raise FND_API.G_EXC_ERROR;
1418: end if;
1419:
1420: -- BUG# 3575340
1421: -- need to prevent the backdate of a retirement not only

Line 1482: raise FND_API.G_EXC_ERROR;

1478:
1479: if not fa_cache_pkg.fazccvt
1480: (x_prorate_convention_code => l_asset_retire_rec.retirement_prorate_convention,
1481: x_fiscal_year_name => l_fiscal_year_name, p_log_level_rec => p_log_level_rec) then
1482: raise FND_API.G_EXC_ERROR;
1483: end if;
1484:
1485: if not fa_cache_pkg.fazcdp
1486: (x_book_type_code => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then

Line 1487: raise FND_API.G_EXC_ERROR;

1483: end if;
1484:
1485: if not fa_cache_pkg.fazcdp
1486: (x_book_type_code => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
1487: raise FND_API.G_EXC_ERROR;
1488: end if;
1489:
1490: select prorate_date
1491: into l_ret_prorate_date

Line 1513: raise FND_API.G_EXC_ERROR;

1509: -- added this for bug 3684222
1510: if (l_ret_prorate_date < l_latest_reval_date and
1511: l_ret_prorate_date < fa_cache_pkg.fazcdp_record.calendar_period_open_date) then
1512: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
1513: raise FND_API.G_EXC_ERROR;
1514: end if;
1515:
1516:
1517: end if; -- date_retired

Line 1525: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1521: if (p_log_level_rec.statement_level) then
1522: fa_debug_pkg.add(l_calling_fn, 'Error calling', 'fa_cache_pkg.fazccmt', p_log_level_rec => p_log_level_rec);
1523: end if;
1524:
1525: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1526: end if;
1527:
1528: /* Bug 8584206 */
1529: IF not FA_ASSET_VAL_PVT.validate_energy_transactions (

Line 1536: raise FND_API.G_EXC_ERROR;

1532: p_asset_fin_rec_old => p_asset_fin_rec,
1533: p_asset_hdr_rec => p_asset_hdr_rec ,
1534: p_log_level_rec => p_log_level_rec) then
1535:
1536: raise FND_API.G_EXC_ERROR;
1537: END IF;
1538:
1539:
1540: --

Line 1553: raise FND_API.G_EXC_ERROR;

1549: <> nvl(l_asset_fin_rec.period_counter_life_complete,99)
1550: then
1551:
1552: g_msg_name := 'FA_NO_TRX_WHEN_LIFE_COMPLETE';
1553: raise FND_API.G_EXC_ERROR;
1554:
1555: end if;
1556:
1557: end if; -- date_retired

Line 1578: raise FND_API.G_EXC_ERROR;

1574: value=> l_asset_fin_rec.cost, p_log_level_rec => p_log_level_rec);
1575: end if;
1576:
1577: g_msg_name := 'FA_RET_COST_TOO_BIG';
1578: raise FND_API.G_EXC_ERROR;
1579: end if;
1580:
1581: end if; -- units_retired
1582:

Line 1599: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1595: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.cost_retired
1596: ,x_book => l_asset_hdr_rec.book_type_code
1597: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
1598: , p_log_level_rec => p_log_level_rec) then
1599: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1600: end if;
1601:
1602: end if;
1603:

Line 1642: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1638: px_trans_rec => l_trans_rec,
1639: p_event_status => FA_XLA_EVENTS_PVT.C_EVENT_INCOMPLETE,
1640: p_calling_fn => 'FA_RETIREMENT_PUB.do_all_books_retirement'
1641: ,p_log_level_rec => p_log_level_rec) then
1642: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1643: end if;
1644:
1645: -- ***************************
1646: -- ** Main

Line 1666: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1662: ,p_period_rec => l_period_rec
1663: ,p_mrc_sob_type_code => 'P'
1664: ,p_log_level_rec => p_log_level_rec
1665: ) then
1666: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1667: end if;
1668:
1669: if p_log_level_rec.statement_level then
1670: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec => p_log_level_rec);

Line 1689: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1685: -- call the sob cache to get the table of sob_ids
1686: if not FA_CACHE_PKG.fazcrsob
1687: (x_book_type_code => l_asset_hdr_rec.book_type_code,
1688: x_sob_tbl => l_sob_tbl, p_log_level_rec => p_log_level_rec) then
1689: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1690: end if;
1691:
1692: -- loop through each book starting with the primary and
1693: -- call sub routine for each

Line 1724: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1720: ,p_period_rec => l_period_rec
1721: ,p_mrc_sob_type_code => 'R'
1722: ,p_log_level_rec => p_log_level_rec
1723: ) then
1724: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1725: end if;
1726: /*=================================================================
1727: Secondary Changes Start
1728: If primary and secondary sob_id is different then we need to

Line 1750: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1746: px_trans_rec => l_secondary_trans_rec,
1747: p_event_status => FA_XLA_EVENTS_PVT.C_EVENT_INCOMPLETE,
1748: p_calling_fn => 'FA_RETIREMENT_PUB.do_all_books_retirement'
1749: ,p_log_level_rec => p_log_level_rec) then
1750: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1751: end if;
1752: end if;
1753: /*Secondary Changes End
1754: ==================================================================*/

Line 1869: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1865: ,px_asset_fin_rec => l_asset_fin_mrc_rec
1866: ,p_transaction_header_id => NULL
1867: ,p_mrc_sob_type_code => p_mrc_sob_type_code
1868: , p_log_level_rec => p_log_level_rec) then
1869: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1870: end if;
1871:
1872: -- pop asset_cat_rec
1873: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec => p_log_level_rec); end if;

Line 1879: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1875: (p_asset_hdr_rec => l_asset_hdr_rec
1876: ,px_asset_cat_rec => l_asset_cat_rec
1877: ,p_date_effective => NULL
1878: , p_log_level_rec => p_log_level_rec) then
1879: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1880: end if;
1881:
1882: -- ***************************
1883: -- ** Do basic calculation

Line 1950: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1946: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.cost_retired
1947: ,x_book => l_asset_hdr_rec.book_type_code
1948: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
1949: , p_log_level_rec => p_log_level_rec) then
1950: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1951: end if;
1952: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.proceeds_of_sale
1953: ,x_book => l_asset_hdr_rec.book_type_code
1954: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id

Line 1956: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1952: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.proceeds_of_sale
1953: ,x_book => l_asset_hdr_rec.book_type_code
1954: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
1955: , p_log_level_rec => p_log_level_rec) then
1956: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1957: end if;
1958: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.cost_of_removal
1959: ,x_book => l_asset_hdr_rec.book_type_code
1960: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id

Line 1962: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1958: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.cost_of_removal
1959: ,x_book => l_asset_hdr_rec.book_type_code
1960: ,x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
1961: , p_log_level_rec => p_log_level_rec) then
1962: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1963: end if;
1964:
1965: -- if transaction is full retirement
1966: -- then set cost_retired to full cost

Line 2009: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2005: ,p_period_rec => l_period_rec
2006: ,p_mrc_sob_type_code => p_mrc_sob_type_code
2007: ,p_log_level_rec => p_log_level_rec
2008: ) then
2009: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2010: end if;
2011:
2012: if l_asset_retire_rec.units_retired = l_asset_desc_rec.current_units
2013: or l_asset_retire_rec.units_retired is null then

Line 2051: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2047: p_period_rec => l_period_rec,
2048: p_mrc_sob_type_code => p_mrc_sob_type_code,
2049: p_calling_fn => 'DO_RETIREMENT.CGLFR_CR_ONLY', p_log_level_rec => p_log_level_rec) then
2050:
2051: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2052: end if;
2053: elsif (G_release = 11) then
2054: l_dist_trans_rec.transaction_header_id := NULL;
2055: end if; --group_asset_id <> null

Line 2136: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2132: ,px_asset_hdr_rec => l_asset_hdr_rec
2133: ,px_asset_cat_rec_new => l_asset_cat_rec
2134: ,px_asset_dist_tbl => l_asset_dist_tbl
2135: , p_log_level_rec => p_log_level_rec) then
2136: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2137: end if;
2138:
2139: end if;
2140:

Line 2148: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2144: -- call book cache to reset with right book
2145:
2146: -- call the cache for the book
2147: if not fa_cache_pkg.fazcbc(X_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
2148: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2149: end if;
2150:
2151: --
2152: -- If this is member asset and Recognize Gain Loss is set

Line 2174: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2170: p_period_rec => l_period_rec,
2171: p_mrc_sob_type_code => p_mrc_sob_type_code,
2172: p_calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec) then
2173:
2174: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2175: end if;
2176:
2177: end if;
2178:

Line 2441: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2437: (p_asset_hdr_rec => l_asset_hdr_rec,
2438: px_asset_fin_rec => l_asset_fin_rec,
2439: p_transaction_header_id => NULL,
2440: p_mrc_sob_type_code => p_mrc_sob_type_code, p_log_level_rec => p_log_level_rec) then
2441: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2442: end if;
2443:
2444: if not FA_UTIL_PVT.get_asset_type_rec
2445: (p_asset_hdr_rec => l_asset_hdr_rec,

Line 2447: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2443:
2444: if not FA_UTIL_PVT.get_asset_type_rec
2445: (p_asset_hdr_rec => l_asset_hdr_rec,
2446: px_asset_type_rec => l_asset_type_rec, p_log_level_rec => p_log_level_rec) then
2447: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2448: end if;
2449:
2450: if (p_mrc_sob_type_code <> 'R') then
2451:

Line 2502: raise FND_API.G_EXC_ERROR;

2498: 'FA_RETIREMENT_PUB.do_sub_regular_retirement'
2499: , p_log_level_rec => p_log_level_rec) then
2500: g_msg_name := null;
2501: g_token1 := null;
2502: raise FND_API.G_EXC_ERROR;
2503: end if;
2504:
2505: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec => p_log_level_rec); end if;
2506: fa_transaction_headers_pkg.insert_row

Line 2588: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2584: if not FA_UTILS_PKG.faxrnd(x_amount => l_salvage_value_new,
2585: x_book => l_asset_hdr_rec.book_type_code,
2586: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2587: p_log_level_rec => p_log_level_rec) then
2588: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2589: end if;
2590:
2591: end if;
2592:

Line 2684: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2680: if not FA_UTILS_PKG.faxrnd(x_amount => l_recoverable_cost_new,
2681: x_book => l_asset_hdr_rec.book_type_code,
2682: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2683: p_log_level_rec => p_log_level_rec) then
2684: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2685: end if;
2686:
2687: -- Bug4343087: Moved function call of FA_UTILS_PKG.faxrnd for
2688: -- l_adjusted_cost_new to after deprn basis function call.

Line 2694: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2690: if not FA_UTILS_PKG.faxrnd(x_amount => l_unrevalued_cost_new,
2691: x_book => l_asset_hdr_rec.book_type_code,
2692: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2693: p_log_level_rec => p_log_level_rec) then
2694: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2695: end if;
2696:
2697: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.eofy_reserve,
2698: x_book => l_asset_hdr_rec.book_type_code,

Line 2701: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2697: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.eofy_reserve,
2698: x_book => l_asset_hdr_rec.book_type_code,
2699: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2700: p_log_level_rec => p_log_level_rec) then
2701: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2702: end if;
2703:
2704: if not FA_UTILS_PKG.faxrnd(x_amount => l_eofy_reserve_new,
2705: x_book => l_asset_hdr_rec.book_type_code,

Line 2708: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2704: if not FA_UTILS_PKG.faxrnd(x_amount => l_eofy_reserve_new,
2705: x_book => l_asset_hdr_rec.book_type_code,
2706: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2707: p_log_level_rec => p_log_level_rec) then
2708: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2709: end if;
2710:
2711: if not FA_UTILS_PKG.faxrnd(x_amount => l_reval_amort_basis_new,
2712: x_book => l_asset_hdr_rec.book_type_code,

Line 2715: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2711: if not FA_UTILS_PKG.faxrnd(x_amount => l_reval_amort_basis_new,
2712: x_book => l_asset_hdr_rec.book_type_code,
2713: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2714: p_log_level_rec => p_log_level_rec) then
2715: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2716: end if;
2717:
2718: --
2719: -- Processing member asset if Recognize Gain Loss is NO.

Line 2804: raise FND_API.G_EXC_UNEXPECTED_ERROR; -- ENERGY

2800: if not FA_UTILS_PKG.faxrnd(x_amount => l_reserve_retired, -- ENERGY
2801: x_book => l_asset_hdr_rec.book_type_code,
2802: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2803: p_log_level_rec => p_log_level_rec) then -- ENERGY
2804: raise FND_API.G_EXC_UNEXPECTED_ERROR; -- ENERGY
2805: end if; -- ENERGY
2806: -- ENERGY
2807: l_asset_retire_rec.reserve_retired := l_reserve_retired; -- ENERGY
2808:

Line 2882: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2878: if not FA_UTILS_PKG.faxrnd(x_amount => l_adjusted_cost_new,
2879: x_book => l_asset_hdr_rec.book_type_code,
2880: x_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
2881: p_log_level_rec => p_log_level_rec) then
2882: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2883: end if;
2884:
2885: if p_log_level_rec.statement_level then
2886: fa_debug_pkg.add(l_calling_fn, 'l_adjusted_cost_new', l_adjusted_cost_new, p_log_level_rec => p_log_level_rec);

Line 3290: when FND_API.G_EXC_UNEXPECTED_ERROR then

3286: EXCEPTION
3287: /*
3288: * Added for Group Asset uptake
3289: */
3290: when FND_API.G_EXC_UNEXPECTED_ERROR then
3291: fa_srvr_msg.add_message(calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
3292:
3293: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
3294: , p_log_level_rec => p_log_level_rec);

Line 3343: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3339: ,x_return_status => l_return_status, p_log_level_rec => p_log_level_rec);
3340: end if;
3341:
3342: if l_return_status > 0 then
3343: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3344: end if;
3345:
3346: return TRUE;
3347:

Line 3350: when FND_API.G_EXC_UNEXPECTED_ERROR then

3346: return TRUE;
3347:
3348: EXCEPTION
3349:
3350: when FND_API.G_EXC_UNEXPECTED_ERROR then
3351: fa_srvr_msg.add_message(calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec);
3352:
3353: return FALSE;
3354:

Line 3375: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE

3371: -----------------------------------------------------------------------------
3372:
3373: PROCEDURE undo_retirement
3374: (p_api_version in NUMBER
3375: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
3376: ,p_commit in VARCHAR2 := FND_API.G_FALSE
3377: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
3378: ,p_calling_fn in VARCHAR2
3379: ,x_return_status out NOCOPY VARCHAR2

Line 3376: ,p_commit in VARCHAR2 := FND_API.G_FALSE

3372:
3373: PROCEDURE undo_retirement
3374: (p_api_version in NUMBER
3375: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
3376: ,p_commit in VARCHAR2 := FND_API.G_FALSE
3377: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
3378: ,p_calling_fn in VARCHAR2
3379: ,x_return_status out NOCOPY VARCHAR2
3380: ,x_msg_count out NOCOPY NUMBER

Line 3377: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL

3373: PROCEDURE undo_retirement
3374: (p_api_version in NUMBER
3375: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
3376: ,p_commit in VARCHAR2 := FND_API.G_FALSE
3377: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
3378: ,p_calling_fn in VARCHAR2
3379: ,x_return_status out NOCOPY VARCHAR2
3380: ,x_msg_count out NOCOPY NUMBER
3381: ,x_msg_data out NOCOPY VARCHAR2

Line 3423: raise FND_API.G_EXC_ERROR;

3419: if (not g_log_level_rec.initialized) then
3420: if (NOT fa_util_pub.get_log_level_rec (
3421: x_log_level_rec => g_log_level_rec
3422: )) then
3423: raise FND_API.G_EXC_ERROR;
3424: end if;
3425: end if;
3426:
3427: g_release := fa_cache_pkg.fazarel_release;

Line 3430: if (FND_API.to_boolean(p_init_msg_list) ) then

3426:
3427: g_release := fa_cache_pkg.fazarel_release;
3428:
3429: -- initialize message list if p_init_msg_list is set to TRUE.
3430: if (FND_API.to_boolean(p_init_msg_list) ) then
3431: -- initialize error message stack.
3432: fa_srvr_msg.init_server_message;
3433:
3434: -- initialize debug message stack.

Line 3464: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3460: (px_asset_retire_rec => l_asset_retire_rec,
3461: p_mrc_sob_type_code => 'P',
3462: p_set_of_books_id => null
3463: , p_log_level_rec => g_log_level_rec) then
3464: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3465: end if;
3466:
3467: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
3468: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 3475: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3471: (p_asset_hdr_rec => l_asset_hdr_rec
3472: ,px_asset_type_rec => l_asset_type_rec
3473: ,p_date_effective => NULL
3474: , p_log_level_rec => g_log_level_rec) then
3475: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3476: end if;
3477:
3478: if l_asset_hdr_rec.book_type_code is not null then
3479:

Line 3482: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3478: if l_asset_hdr_rec.book_type_code is not null then
3479:
3480: -- call the cache for the primary transaction book
3481: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
3482: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3483: end if;
3484:
3485: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
3486: lv_asset_hdr_rec := l_asset_hdr_rec;

Line 3493: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3489: if not fa_cache_pkg.fazcsob
3490: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
3491: ,x_mrc_sob_type_code => l_reporting_flag, p_log_level_rec => g_log_level_rec)
3492: then
3493: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3494: end if;
3495:
3496: -- Error out if the program is submitted from the Reporting Responsibility
3497: -- No transaction permitted directly on reporting books.

Line 3501: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3497: -- No transaction permitted directly on reporting books.
3498: if l_reporting_flag = 'R' then
3499: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
3500: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
3501: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3502: end if;
3503:
3504:
3505: end if; -- book_type_code

Line 3529: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3525: ,p_period_rec => l_period_rec
3526: ,p_calling_fn => p_calling_fn
3527: ,p_log_level_rec => g_log_level_rec
3528: ) then
3529: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3530: end if;
3531:
3532:
3533: /* IAC Specific Validation */

Line 3540: raise FND_API.G_EXC_ERROR;

3536: p_book_type_code => l_asset_hdr_rec.book_type_code,
3537: p_asset_id => l_asset_hdr_rec.asset_id,
3538: p_calling_function => l_calling_fn
3539: ) then
3540: raise FND_API.G_EXC_ERROR;
3541: end if;
3542: end if;
3543:
3544: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_validation', '', p_log_level_rec => g_log_level_rec); end if;

Line 3560: raise FND_API.G_EXC_ERROR;

3556: ,p_asset_type_rec => l_asset_type_rec -- bug 8630242
3557: ,px_asset_retire_rec => l_asset_retire_rec
3558: ,p_log_level_rec => g_log_level_rec
3559: ) then
3560: raise FND_API.G_EXC_ERROR;
3561: end if;
3562:
3563: /* if book is a corporate book, process cip assets and autocopy */
3564:

Line 3577: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3573: if not fa_cache_pkg.fazctbk
3574: (x_corp_book => l_asset_hdr_rec.book_type_code
3575: ,x_asset_type => l_asset_type_rec.asset_type
3576: ,x_tax_book_tbl => l_tax_book_tbl, p_log_level_rec => g_log_level_rec) then
3577: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3578: end if;
3579:
3580: for l_tax_index in 1..l_tax_book_tbl.count loop
3581:

Line 3596: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3592:
3593: -- cache the book information for the tax book
3594: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index),
3595: p_log_level_rec => g_log_level_rec) then
3596: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3597: end if;
3598:
3599: lv_trans_rec.transaction_header_id := null;
3600: lv_asset_retire_rec := null;

Line 3617: raise FND_API.G_EXC_ERROR;

3613: ,p_asset_type_rec => l_asset_type_rec -- bug 8630242
3614: ,px_asset_retire_rec => lv_asset_retire_rec -- tax
3615: ,p_log_level_rec => g_log_level_rec
3616: ) then
3617: raise FND_API.G_EXC_ERROR;
3618: end if;
3619:
3620: end if;
3621:

Line 3631: if FND_API.to_boolean(p_commit) then

3627: end if; -- book_class
3628:
3629:
3630: -- commit if p_commit is TRUE.
3631: if FND_API.to_boolean(p_commit) then
3632: COMMIT WORK;
3633: end if;
3634:
3635: -- Standard call to get message count and if count is 1 get message info.

Line 3641: x_return_status := FND_API.G_RET_STS_SUCCESS;

3637: ,p_data => x_msg_data
3638: );
3639:
3640: -- return the status.
3641: x_return_status := FND_API.G_RET_STS_SUCCESS;
3642:
3643: EXCEPTION
3644:
3645: when FND_API.G_EXC_ERROR then

Line 3645: when FND_API.G_EXC_ERROR then

3641: x_return_status := FND_API.G_RET_STS_SUCCESS;
3642:
3643: EXCEPTION
3644:
3645: when FND_API.G_EXC_ERROR then
3646:
3647: ROLLBACK TO undo_retirement;
3648:
3649: x_return_status := FND_API.G_RET_STS_ERROR;

Line 3649: x_return_status := FND_API.G_RET_STS_ERROR;

3645: when FND_API.G_EXC_ERROR then
3646:
3647: ROLLBACK TO undo_retirement;
3648:
3649: x_return_status := FND_API.G_RET_STS_ERROR;
3650:
3651: if g_token1 is null then
3652: fa_srvr_msg.add_message(calling_fn => l_calling_fn
3653: ,name => g_msg_name

Line 3669: when FND_API.G_EXC_UNEXPECTED_ERROR then

3665: FND_MSG_PUB.count_and_get(p_count => x_msg_count
3666: ,p_data => x_msg_data
3667: );
3668:
3669: when FND_API.G_EXC_UNEXPECTED_ERROR then
3670:
3671: ROLLBACK TO undo_retirement;
3672:
3673: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 3673: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3669: when FND_API.G_EXC_UNEXPECTED_ERROR then
3670:
3671: ROLLBACK TO undo_retirement;
3672:
3673: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3674:
3675: fa_srvr_msg.add_message(calling_fn => l_calling_fn
3676: , p_log_level_rec => g_log_level_rec);
3677: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn

Line 3687: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3683: when others then
3684:
3685: ROLLBACK TO undo_retirement;
3686:
3687: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3688:
3689: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
3690: , p_log_level_rec => g_log_level_rec);
3691: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 3767: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3763: (px_asset_retire_rec => l_asset_retire_rec,
3764: p_mrc_sob_type_code => 'P',
3765: p_set_of_books_id => null
3766: , p_log_level_rec => p_log_level_rec) then
3767: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3768: end if;
3769:
3770: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
3771: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 3775: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3771: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;
3772:
3773: -- call the cache for the primary transaction book
3774: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
3775: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3776: end if;
3777:
3778: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
3779:

Line 3788: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3784: (p_book => l_asset_hdr_rec.book_type_code
3785: ,p_effective_date => NULL
3786: ,x_period_rec => l_period_rec
3787: , p_log_level_rec => p_log_level_rec) then
3788: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3789: end if;
3790:
3791: -- ***************************************************
3792: -- ** Do asset/book-level validation on transaction

Line 3811: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3807: p_book_type_code => l_asset_hdr_rec.book_type_code,
3808: p_asset_type => l_asset_type_rec.asset_type , -- bug 8630242
3809: p_calling_fn => 'fa_retirement_pub.undo_all_books_retirement'
3810: ,p_log_level_rec => p_log_level_rec) then
3811: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3812: end if;
3813:
3814:
3815: -- ***************************

Line 3829: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3825: ,px_asset_retire_rec => l_asset_retire_rec
3826: ,p_mrc_sob_type_code => 'P'
3827: ,p_log_level_rec => p_log_level_rec
3828: ) then
3829: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3830: end if;
3831:
3832: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
3833: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 3863: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3859: ,px_asset_retire_rec => l_asset_retire_rec
3860: ,p_mrc_sob_type_code => 'R'
3861: ,p_log_level_rec => p_log_level_rec
3862: ) then
3863: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3864: end if;
3865: /*=================================================================
3866: Secondary Changes Start
3867: If primary and secondary sob_id is different then we need to

Line 3887: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3883: p_asset_type => l_asset_type_rec.asset_type , -- bug 8630242,
3884: p_secondary_sob_id => l_secondary_sob_id,
3885: p_calling_fn => 'fa_ret_pub.undo_all_books_retirement.secondary'
3886: ,p_log_level_rec => p_log_level_rec) then
3887: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3888: end if;
3889: end if;
3890: /*Secondary Changes End
3891: ==================================================================*/

Line 4005: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4001: (px_asset_retire_rec => l_asset_retire_rec,
4002: p_mrc_sob_type_code => p_mrc_sob_type_code,
4003: p_set_of_books_id => p_asset_hdr_rec.set_of_books_id
4004: , p_log_level_rec => p_log_level_rec) then
4005: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4006: end if;
4007:
4008: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
4009: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 4017: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4013: if not FA_UTIL_PVT.get_asset_desc_rec
4014: (p_asset_hdr_rec => l_asset_hdr_rec
4015: ,px_asset_desc_rec => l_asset_desc_rec
4016: , p_log_level_rec => p_log_level_rec) then
4017: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4018: end if;
4019:
4020: -- pop asset_fin_rec
4021: -- get fa_books row where transaction_header_id_out is null

Line 4029: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4025: ,px_asset_fin_rec => l_asset_fin_rec
4026: ,p_transaction_header_id => NULL
4027: ,p_mrc_sob_type_code => p_mrc_sob_type_code
4028: , p_log_level_rec => p_log_level_rec) then
4029: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4030: end if;
4031:
4032: if p_log_level_rec.statement_level then
4033: fa_debug_pkg.add(l_calling_fn, 'after pop asset_fin_rec', '', p_log_level_rec => p_log_level_rec);

Line 4092: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4088: p_group_asset_id => l_asset_fin_rec.group_asset_id,
4089: p_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
4090: p_mrc_sob_type_code => p_mrc_sob_type_code,
4091: p_calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec) then
4092: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4093: end if;
4094: elsif (p_mrc_sob_type_code <> 'R') then
4095: update fa_books
4096: set adjustment_required_status = 'NONE'

Line 4137: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4133: ,x_current_units => l_old_units
4134: , p_log_level_rec => p_log_level_rec) then
4135: g_msg_name := null;
4136: g_token1 := null;
4137: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4138: end if;
4139: end if;
4140: -- End of bug 7125732
4141:

Line 4389: when FND_API.G_EXC_UNEXPECTED_ERROR then

4385: EXCEPTION
4386: /*
4387: * Added for Group Asset uptake
4388: */
4389: when FND_API.G_EXC_UNEXPECTED_ERROR then
4390: -- Make sure to close curosr opened for source line retirement
4391: if c_inv_trx_id%ISOPEN then
4392: CLOSE c_inv_trx_id;
4393: end if;

Line 4435: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE

4431: -- asset_id/book parameter.
4432:
4433: PROCEDURE do_reinstatement
4434: (p_api_version in NUMBER
4435: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
4436: ,p_commit in VARCHAR2 := FND_API.G_FALSE
4437: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
4438: ,p_calling_fn in VARCHAR2
4439: ,x_return_status out NOCOPY VARCHAR2

Line 4436: ,p_commit in VARCHAR2 := FND_API.G_FALSE

4432:
4433: PROCEDURE do_reinstatement
4434: (p_api_version in NUMBER
4435: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
4436: ,p_commit in VARCHAR2 := FND_API.G_FALSE
4437: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
4438: ,p_calling_fn in VARCHAR2
4439: ,x_return_status out NOCOPY VARCHAR2
4440: ,x_msg_count out NOCOPY NUMBER

Line 4437: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL

4433: PROCEDURE do_reinstatement
4434: (p_api_version in NUMBER
4435: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
4436: ,p_commit in VARCHAR2 := FND_API.G_FALSE
4437: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
4438: ,p_calling_fn in VARCHAR2
4439: ,x_return_status out NOCOPY VARCHAR2
4440: ,x_msg_count out NOCOPY NUMBER
4441: ,x_msg_data out NOCOPY VARCHAR2

Line 4511: raise FND_API.G_EXC_ERROR;

4507: if (not g_log_level_rec.initialized) then
4508: if (NOT fa_util_pub.get_log_level_rec (
4509: x_log_level_rec => g_log_level_rec
4510: )) then
4511: raise FND_API.G_EXC_ERROR;
4512: end if;
4513: end if;
4514:
4515: g_release := fa_cache_pkg.fazarel_release;

Line 4519: if (FND_API.to_boolean(p_init_msg_list) ) then

4515: g_release := fa_cache_pkg.fazarel_release;
4516:
4517:
4518: -- initialize message list if p_init_msg_list is set to TRUE.
4519: if (FND_API.to_boolean(p_init_msg_list) ) then
4520: -- initialize error message stack.
4521: fa_srvr_msg.init_server_message;
4522:
4523: -- initialize debug message stack.

Line 4550: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4546: (px_asset_retire_rec => l_asset_retire_rec,
4547: p_mrc_sob_type_code => 'P',
4548: p_set_of_books_id => null
4549: , p_log_level_rec => g_log_level_rec) then
4550: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4551: end if;
4552:
4553: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
4554: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 4563: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4559: fa_debug_pkg.add(l_calling_fn, 'fa_ret retirement_id:', l_asset_retire_rec.retirement_id, p_log_level_rec => g_log_level_rec);
4560: end if;
4561:
4562: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
4563: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4564: end if;
4565:
4566: /*Bug# 8527619 */
4567: if not FA_UTIL_PVT.get_asset_fin_rec

Line 4573: raise FND_API.G_EXC_ERROR;

4569: px_asset_fin_rec => l_asset_fin_rec,
4570: p_transaction_header_id => NULL,
4571: p_mrc_sob_type_code => 'P',
4572: p_log_level_rec => g_log_level_rec) then
4573: raise FND_API.G_EXC_ERROR;
4574: end if;
4575:
4576: -- ***************************
4577: -- ** Transaction approval

Line 4592: raise FND_API.G_EXC_ERROR;

4588: ,x_trx_date => l_asset_retire_rec.date_retired
4589: ,x_init_message_flag => 'NO', p_log_level_rec => g_log_level_rec);
4590: if not l_ins_status then
4591: g_msg_name := 'error msg name-after trx_app';
4592: raise FND_API.G_EXC_ERROR;
4593: end if;
4594:
4595: if g_log_level_rec.statement_level then
4596: fa_debug_pkg.add(l_calling_fn, 'l_asset_retire_rec.recognize_gain_loss',

Line 4601: l_asset_retire_rec.calculate_gain_loss := FND_API.G_TRUE;

4597: l_asset_retire_rec.recognize_gain_loss, g_log_level_rec);
4598: end if;
4599: IF (l_asset_fin_rec.group_asset_id is not null
4600: and l_asset_retire_rec.recognize_gain_loss = 'YES') THEN
4601: l_asset_retire_rec.calculate_gain_loss := FND_API.G_TRUE;
4602: END IF;
4603:
4604: l_calculate_gain_loss_flag := l_asset_retire_rec.calculate_gain_loss;
4605:

Line 4613: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4609: ,px_asset_fin_rec => l_asset_fin_rec
4610: ,p_transaction_header_id => NULL
4611: ,p_mrc_sob_type_code => 'P'
4612: , p_log_level_rec => g_log_level_rec) then
4613: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4614: end if;
4615:
4616: if (l_asset_fin_rec.group_asset_id is not null) then
4617: l_ins_status := FA_TRX_APPROVAL_PKG.faxcat

Line 4625: raise FND_API.G_EXC_ERROR;

4621: ,x_trx_date => l_asset_retire_rec.date_retired
4622: ,x_init_message_flag => 'NO', p_log_level_rec => g_log_level_rec);
4623: if not l_ins_status then
4624: g_msg_name := 'error msg name-after trx_app group';
4625: raise FND_API.G_EXC_ERROR;
4626: end if;
4627:
4628: end if;
4629:

Line 4639: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4635: if l_asset_hdr_rec.book_type_code is not null then
4636:
4637: -- call the cache for the primary transaction book
4638: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
4639: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4640: end if;
4641:
4642: -- l_book_class := fa_cache_pkg.fazcbc_record.book_class;
4643: -- l_set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

Line 4654: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4650: if not fa_cache_pkg.fazcsob
4651: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
4652: ,x_mrc_sob_type_code => l_reporting_flag, p_log_level_rec => g_log_level_rec)
4653: then
4654: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4655: end if;
4656:
4657: -- Error out if the program is submitted from the Reporting Responsibility
4658: -- No transaction permitted directly on reporting books.

Line 4662: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4658: -- No transaction permitted directly on reporting books.
4659: if l_reporting_flag = 'R' then
4660: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
4661: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
4662: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4663: end if;
4664:
4665: --Check if impairment has been posted in current period.
4666: if not FA_ASSET_VAL_PVT.validate_impairment_exists

Line 4673: raise FND_API.G_EXC_ERROR;

4669: p_mrc_sob_type_code => 'P',
4670: p_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
4671: p_log_level_rec => g_log_level_rec) then
4672:
4673: raise FND_API.G_EXC_ERROR;
4674: end if;
4675:
4676: end if; -- book_type_code
4677:

Line 4688: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4684: (p_book => l_asset_hdr_rec.book_type_code
4685: ,p_effective_date => NULL
4686: ,x_period_rec => l_period_rec
4687: , p_log_level_rec => g_log_level_rec) then
4688: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4689: end if;
4690:
4691: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed pop period_rec', '', p_log_level_rec => g_log_level_rec); end if;
4692:

Line 4700: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4696: (p_asset_hdr_rec => l_asset_hdr_rec
4697: ,px_asset_type_rec => l_asset_type_rec
4698: ,p_date_effective => NULL
4699: , p_log_level_rec => g_log_level_rec) then
4700: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4701: end if;
4702:
4703: -- **********************************************
4704: -- ** Do asset-level validation on transaction

Line 4751: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4747: ,p_period_rec => l_period_rec
4748: ,p_calling_fn => p_calling_fn
4749: ,p_log_level_rec => g_log_level_rec
4750: ) then
4751: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4752: end if;
4753:
4754: /* IAC Specific Validation */
4755: if (FA_IGI_EXT_PKG.IAC_Enabled) then

Line 4761: raise FND_API.G_EXC_ERROR;

4757: p_book_type_code => l_asset_hdr_rec.book_type_code,
4758: p_asset_id => l_asset_hdr_rec.asset_id,
4759: p_calling_function => l_calling_fn
4760: ) then
4761: raise FND_API.G_EXC_ERROR;
4762: end if;
4763: end if;
4764:
4765: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after validation', '', p_log_level_rec => g_log_level_rec); end if;

Line 4784: raise FND_API.G_EXC_ERROR;

4780: ,p_inv_tbl => l_inv_tbl
4781: ,p_period_rec => l_period_rec
4782: ,p_log_level_rec => g_log_level_rec
4783: ) then
4784: raise FND_API.G_EXC_ERROR;
4785: end if;
4786:
4787: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_all_books_reinstatement', '', p_log_level_rec => g_log_level_rec); end if;
4788:

Line 4808: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4804: if not fa_cache_pkg.fazctbk
4805: (x_corp_book => l_asset_hdr_rec.book_type_code
4806: ,x_asset_type => l_asset_type_rec.asset_type
4807: ,x_tax_book_tbl => l_tax_book_tbl, p_log_level_rec => g_log_level_rec) then
4808: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4809: end if;
4810:
4811: for l_tax_index in 1..l_tax_book_tbl.count loop
4812:

Line 4833: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4829:
4830: -- cache the book information for the tax book
4831: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index),
4832: p_log_level_rec => g_log_level_rec) then
4833: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4834: end if;
4835:
4836: -- ? Excerpt from Brad's comment on this part - need more investigation:
4837: -- 'May need to set the transaction date, trx_type, subtype here as well

Line 4868: raise FND_API.G_EXC_ERROR;

4864: ,p_inv_tbl => l_inv_tbl
4865: ,p_period_rec => l_period_rec
4866: ,p_log_level_rec => g_log_level_rec
4867: ) then
4868: raise FND_API.G_EXC_ERROR;
4869: end if;
4870:
4871:
4872: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed do_all_books_reinstatement for tax book', '', p_log_level_rec => g_log_level_rec); end if;

Line 4884: if l_calculate_gain_loss_flag = FND_API.G_TRUE then

4880: end if; -- book_class
4881:
4882: -- submit calculate_gain_loss programs if flag is set
4883:
4884: if l_calculate_gain_loss_flag = FND_API.G_TRUE then
4885:
4886: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', p_log_level_rec => g_log_level_rec); end if;
4887: if not calculate_gain_loss
4888: (p_retirement_id => l_retirement_id

Line 4892: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4888: (p_retirement_id => l_retirement_id
4889: ,p_mrc_sob_type_code => 'P'
4890: ,p_log_level_rec => g_log_level_rec
4891: ) then
4892: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4893: end if;
4894:
4895: end if;
4896:

Line 4898: if FND_API.to_boolean(p_commit) then

4894:
4895: end if;
4896:
4897: -- commit if p_commit is TRUE.
4898: if FND_API.to_boolean(p_commit) then
4899: COMMIT WORK;
4900: end if;
4901:
4902: -- Standard call to get message count and if count is 1 get message info.

Line 4908: x_return_status := FND_API.G_RET_STS_SUCCESS;

4904: ,p_data => x_msg_data
4905: );
4906:
4907: -- return the status.
4908: x_return_status := FND_API.G_RET_STS_SUCCESS;
4909:
4910: EXCEPTION
4911:
4912: when FND_API.G_EXC_ERROR then

Line 4912: when FND_API.G_EXC_ERROR then

4908: x_return_status := FND_API.G_RET_STS_SUCCESS;
4909:
4910: EXCEPTION
4911:
4912: when FND_API.G_EXC_ERROR then
4913:
4914: ROLLBACK TO do_reinstatement;
4915:
4916: x_return_status := FND_API.G_RET_STS_ERROR;

Line 4916: x_return_status := FND_API.G_RET_STS_ERROR;

4912: when FND_API.G_EXC_ERROR then
4913:
4914: ROLLBACK TO do_reinstatement;
4915:
4916: x_return_status := FND_API.G_RET_STS_ERROR;
4917:
4918: if g_token1 is null then
4919: fa_srvr_msg.add_message(calling_fn => l_calling_fn
4920: ,name => g_msg_name

Line 4936: when FND_API.G_EXC_UNEXPECTED_ERROR then

4932: FND_MSG_PUB.count_and_get(p_count => x_msg_count
4933: ,p_data => x_msg_data
4934: );
4935:
4936: when FND_API.G_EXC_UNEXPECTED_ERROR then
4937:
4938: ROLLBACK TO do_reinstatement;
4939:
4940: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 4940: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

4936: when FND_API.G_EXC_UNEXPECTED_ERROR then
4937:
4938: ROLLBACK TO do_reinstatement;
4939:
4940: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4941:
4942: fa_srvr_msg.add_message(calling_fn => l_calling_fn
4943: , p_log_level_rec => g_log_level_rec);
4944: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn

Line 4954: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

4950: when others then
4951:
4952: ROLLBACK TO do_reinstatement;
4953:
4954: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4955:
4956: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
4957: , p_log_level_rec => g_log_level_rec);
4958: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 5045: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5041: -- populate rec_types that were not provided by users
5042:
5043: -- call the cache for the primary transaction book
5044: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
5045: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5046: end if;
5047:
5048: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
5049:

Line 5057: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5053: (p_book => l_asset_hdr_rec.book_type_code
5054: ,p_effective_date => NULL
5055: ,x_period_rec => l_period_rec
5056: , p_log_level_rec => p_log_level_rec) then
5057: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5058: end if;
5059:
5060: -- ***************************************************
5061: -- ** Do asset/book-level validation on transaction

Line 5076: raise FND_API.G_EXC_ERROR;

5072: ,p_book => l_asset_hdr_rec.book_type_code
5073: , p_log_level_rec => p_log_level_rec) then
5074: -- Users must post their mass additions before they can retire the asset
5075: g_msg_name := 'FA_RET_CANT_RET_INCOMPLETE_ASS';
5076: raise FND_API.G_EXC_ERROR;
5077: end if;
5078:
5079: -- check if another retirement/reinstatement already pending
5080: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec => p_log_level_rec); end if;

Line 5086: raise FND_API.G_EXC_ERROR;

5082: (p_asset_id => l_asset_hdr_rec.asset_id
5083: ,p_book => l_asset_hdr_rec.book_type_code
5084: , p_log_level_rec => p_log_level_rec) then
5085: g_msg_name := 'FA_SHARED_PENDING_RETIREMENT';
5086: raise FND_API.G_EXC_ERROR;
5087: end if;
5088:
5089: -- check if date_retired is valid in terms of trx date
5090: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if date_retired is valid in terms of trx date', '', p_log_level_rec => p_log_level_rec); end if;

Line 5101: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5097: ,p_asset_id => l_asset_hdr_rec.asset_id
5098: ,p_book => l_asset_hdr_rec.book_type_code
5099: ,x_latest_trans_date => l_latest_trans_date
5100: , p_log_level_rec => p_log_level_rec) then
5101: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5102: end if;
5103:
5104: -- Bug3130595
5105: -- Removing following check since we need to allow reinstatement

Line 5110: -- raise FND_API.G_EXC_ERROR;

5106: -- of retirement even there are another trx in between ret and reinstatement
5107: --
5108: --if l_asset_retire_rec.date_retired < l_latest_trans_date then
5109: -- g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
5110: -- raise FND_API.G_EXC_ERROR;
5111: --end if;
5112:
5113: end if; -- date_retired
5114:

Line 5149: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5145: ,p_rate => l_rate
5146: ,p_mrc_sob_type_code => 'P'
5147: ,p_log_level_rec => p_log_level_rec
5148: ) then
5149: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5150: end if;
5151:
5152:
5153: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then

Line 5236: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5232: ,p_rate => l_rate
5233: ,p_mrc_sob_type_code => 'R'
5234: ,p_log_level_rec => p_log_level_rec
5235: ) then
5236: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5237: end if;
5238:
5239: -- ? may need to call MC_FA_UTILITIES_PKG.insert_books_rates procedure
5240: -- to process invoice trx

Line 5344: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5340: ,px_asset_fin_rec => l_asset_fin_rec
5341: ,p_transaction_header_id => NULL
5342: ,p_mrc_sob_type_code => p_mrc_sob_type_code
5343: , p_log_level_rec => p_log_level_rec) then
5344: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5345: end if;
5346:
5347: -- pop asset_retire_rec
5348: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_retire_rec', '', p_log_level_rec => p_log_level_rec); end if;

Line 5354: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5350: (px_asset_retire_rec => l_asset_retire_rec,
5351: p_mrc_sob_type_code => p_mrc_sob_type_code,
5352: p_set_of_books_id => p_asset_hdr_rec.set_of_books_id
5353: , p_log_level_rec => p_log_level_rec) then
5354: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5355: end if;
5356:
5357: -- pop asset_cat_rec
5358: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec => p_log_level_rec); end if;

Line 5364: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5360: (p_asset_hdr_rec => l_asset_hdr_rec
5361: ,px_asset_cat_rec => l_asset_cat_rec
5362: ,p_date_effective => NULL
5363: , p_log_level_rec => p_log_level_rec) then
5364: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5365: end if;
5366:
5367: -- ***************************
5368: -- ** Do basic calculation

Line 5390: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5386: ,p_period_rec => l_period_rec
5387: ,p_mrc_sob_type_code => p_mrc_sob_type_code
5388: ,p_log_level_rec => p_log_level_rec
5389: ) then
5390: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5391: end if;
5392:
5393: /*************************************************************
5394: * Partial unit reinstatement will be handled

Line 5455: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5451: ,px_asset_hdr_rec => l_asset_hdr_rec
5452: ,px_asset_cat_rec_new => l_asset_cat_rec
5453: ,px_asset_dist_tbl => l_asset_dist_tbl
5454: , p_log_level_rec => p_log_level_rec) then
5455: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5456: end if;
5457:
5458: end if;
5459: ********************************/

Line 5480: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5476: p_asset_desc_rec => l_asset_desc_rec,
5477: p_period_rec => l_period_rec,
5478: p_mrc_sob_type_code => p_mrc_sob_type_code,
5479: p_calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec) then
5480: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5481: end if;
5482:
5483: end if;
5484:

Line 5661: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5657: px_trans_rec => l_trans_rec,
5658: p_event_status => l_event_status,
5659: p_calling_fn => 'FA_RETIREMENT_PUB.do_sub_regular_reinstatement',
5660: p_log_level_rec => p_log_level_rec) then
5661: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5662: end if;
5663: --Secondary Changes
5664: l_secondary_sob_id := FA_XLA_EVENTS_PVT.get_secondary_sob_id(p_asset_hdr_rec.book_type_code);
5665: if(l_secondary_sob_id is not null) then

Line 5678: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5674: px_trans_rec => l_secondary_trans_rec,
5675: p_event_status => l_event_status,
5676: p_calling_fn => 'FA_RETIREMENT_PUB.do_sub_regular_reinstatement'
5677: ,p_log_level_rec => p_log_level_rec) then
5678: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5679: end if;
5680: end if;
5681:
5682: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec => p_log_level_rec); end if;

Line 5824: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5820: p_inv_tbl => l_inv_tbl,
5821: p_rowid => l_rowid,
5822: p_calling_fn => l_calling_fn,
5823: p_log_level_rec => p_log_level_rec) then
5824: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5825: end if;
5826:
5827: end if; -- (l_invoice_transaction_id is not null)
5828:

Line 5835: when FND_API.G_EXC_UNEXPECTED_ERROR then

5831: EXCEPTION
5832: /*
5833: * Added for Group Asset uptake
5834: */
5835: when FND_API.G_EXC_UNEXPECTED_ERROR then
5836: -- Make sure to close curosr opened for source line retirement
5837: if c_inv_trx_id%ISOPEN then
5838: CLOSE c_inv_trx_id;
5839: end if;

Line 5878: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE

5874: -- 1. delete into TH
5875: -- 2. update RET
5876: PROCEDURE undo_reinstatement
5877: (p_api_version in NUMBER
5878: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
5879: ,p_commit in VARCHAR2 := FND_API.G_FALSE
5880: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
5881: ,p_calling_fn in VARCHAR2
5882: ,x_return_status out NOCOPY VARCHAR2

Line 5879: ,p_commit in VARCHAR2 := FND_API.G_FALSE

5875: -- 2. update RET
5876: PROCEDURE undo_reinstatement
5877: (p_api_version in NUMBER
5878: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
5879: ,p_commit in VARCHAR2 := FND_API.G_FALSE
5880: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
5881: ,p_calling_fn in VARCHAR2
5882: ,x_return_status out NOCOPY VARCHAR2
5883: ,x_msg_count out NOCOPY NUMBER

Line 5880: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL

5876: PROCEDURE undo_reinstatement
5877: (p_api_version in NUMBER
5878: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
5879: ,p_commit in VARCHAR2 := FND_API.G_FALSE
5880: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
5881: ,p_calling_fn in VARCHAR2
5882: ,x_return_status out NOCOPY VARCHAR2
5883: ,x_msg_count out NOCOPY NUMBER
5884: ,x_msg_data out NOCOPY VARCHAR2

Line 5928: raise FND_API.G_EXC_ERROR;

5924: if (not g_log_level_rec.initialized) then
5925: if (NOT fa_util_pub.get_log_level_rec (
5926: x_log_level_rec => g_log_level_rec
5927: )) then
5928: raise FND_API.G_EXC_ERROR;
5929: end if;
5930: end if;
5931:
5932: g_release := fa_cache_pkg.fazarel_release;

Line 5935: if (FND_API.to_boolean(p_init_msg_list) ) then

5931:
5932: g_release := fa_cache_pkg.fazarel_release;
5933:
5934: -- initialize message list if p_init_msg_list is set to TRUE.
5935: if (FND_API.to_boolean(p_init_msg_list) ) then
5936: -- initialize error message stack.
5937: fa_srvr_msg.init_server_message;
5938:
5939: -- initialize debug message stack.

Line 5960: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5956: (px_asset_retire_rec => l_asset_retire_rec,
5957: p_mrc_sob_type_code => 'P',
5958: p_set_of_books_id => null
5959: , p_log_level_rec => g_log_level_rec) then
5960: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5961: end if;
5962:
5963: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
5964: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 5971: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5967: (p_asset_hdr_rec => l_asset_hdr_rec
5968: ,px_asset_type_rec => l_asset_type_rec
5969: ,p_date_effective => NULL
5970: , p_log_level_rec => g_log_level_rec) then
5971: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5972: end if;
5973:
5974: if l_asset_hdr_rec.book_type_code is not null then
5975:

Line 5978: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5974: if l_asset_hdr_rec.book_type_code is not null then
5975:
5976: -- call the cache for the primary transaction book
5977: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => g_log_level_rec) then
5978: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5979: end if;
5980:
5981: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
5982: lv_asset_hdr_rec := l_asset_hdr_rec;

Line 5989: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5985: if not fa_cache_pkg.fazcsob
5986: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
5987: ,x_mrc_sob_type_code => l_reporting_flag, p_log_level_rec => g_log_level_rec)
5988: then
5989: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5990: end if;
5991:
5992: -- Error out if the program is submitted from the Reporting Responsibility
5993: -- No transaction permitted directly on reporting books.

Line 5997: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5993: -- No transaction permitted directly on reporting books.
5994: if l_reporting_flag = 'R' then
5995: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
5996: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
5997: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5998: end if;
5999:
6000:
6001: end if; -- book_type_code

Line 6024: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6020: ,p_period_rec => l_period_rec
6021: ,p_calling_fn => p_calling_fn
6022: ,p_log_level_rec => g_log_level_rec
6023: ) then
6024: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6025: end if;
6026:
6027: /* IAC Specific Validation */
6028: if (FA_IGI_EXT_PKG.IAC_Enabled) then

Line 6034: raise FND_API.G_EXC_ERROR;

6030: p_book_type_code => l_asset_hdr_rec.book_type_code,
6031: p_asset_id => l_asset_hdr_rec.asset_id,
6032: p_calling_function => l_calling_fn
6033: ) then
6034: raise FND_API.G_EXC_ERROR;
6035: end if;
6036: end if;
6037:
6038: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end do_validation', '', p_log_level_rec => g_log_level_rec); end if;

Line 6047: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6043: ,px_asset_retire_rec => l_asset_retire_rec
6044: ,p_asset_type_rec => l_asset_type_rec --bug 8643362
6045: ,p_log_level_rec => g_log_level_rec
6046: ) then
6047: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6048: end if;
6049:
6050: /* if book is a corporate book, process cip assets and autocopy */
6051:

Line 6066: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6062: if not fa_cache_pkg.fazctbk
6063: (x_corp_book => l_asset_hdr_rec.book_type_code
6064: ,x_asset_type => l_asset_type_rec.asset_type
6065: ,x_tax_book_tbl => l_tax_book_tbl, p_log_level_rec => g_log_level_rec) then
6066: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6067: end if;
6068:
6069: for l_tax_index in 1..l_tax_book_tbl.count loop
6070:

Line 6090: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6086:
6087: -- cache the book information for the tax book
6088: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index),
6089: p_log_level_rec => g_log_level_rec) then
6090: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6091: end if;
6092:
6093: lv_trans_rec.transaction_header_id := null;
6094: lv_asset_retire_rec := null;

Line 6113: raise FND_API.G_EXC_ERROR;

6109: ,px_asset_retire_rec => lv_asset_retire_rec -- tax
6110: ,p_asset_type_rec => l_asset_type_rec --bug 8643362
6111: ,p_log_level_rec => g_log_level_rec
6112: ) then
6113: raise FND_API.G_EXC_ERROR;
6114: end if;
6115:
6116: end if;
6117:

Line 6127: if FND_API.to_boolean(p_commit) then

6123: end if; -- book_class
6124:
6125:
6126: -- commit if p_commit is TRUE.
6127: if FND_API.to_boolean(p_commit) then
6128: COMMIT WORK;
6129: end if;
6130:
6131: -- Standard call to get message count and if count is 1 get message info.

Line 6137: x_return_status := FND_API.G_RET_STS_SUCCESS;

6133: ,p_data => x_msg_data
6134: );
6135:
6136: -- return the status.
6137: x_return_status := FND_API.G_RET_STS_SUCCESS;
6138:
6139: EXCEPTION
6140:
6141: when FND_API.G_EXC_ERROR then

Line 6141: when FND_API.G_EXC_ERROR then

6137: x_return_status := FND_API.G_RET_STS_SUCCESS;
6138:
6139: EXCEPTION
6140:
6141: when FND_API.G_EXC_ERROR then
6142:
6143: ROLLBACK TO undo_reinstatement;
6144:
6145: x_return_status := FND_API.G_RET_STS_ERROR;

Line 6145: x_return_status := FND_API.G_RET_STS_ERROR;

6141: when FND_API.G_EXC_ERROR then
6142:
6143: ROLLBACK TO undo_reinstatement;
6144:
6145: x_return_status := FND_API.G_RET_STS_ERROR;
6146:
6147: if g_token1 is null then
6148: fa_srvr_msg.add_message(calling_fn => l_calling_fn
6149: ,name => g_msg_name

Line 6165: when FND_API.G_EXC_UNEXPECTED_ERROR then

6161: FND_MSG_PUB.count_and_get(p_count => x_msg_count
6162: ,p_data => x_msg_data
6163: );
6164:
6165: when FND_API.G_EXC_UNEXPECTED_ERROR then
6166:
6167: ROLLBACK TO undo_reinstatement;
6168:
6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

6165: when FND_API.G_EXC_UNEXPECTED_ERROR then
6166:
6167: ROLLBACK TO undo_reinstatement;
6168:
6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6170:
6171: fa_srvr_msg.add_message(calling_fn => l_calling_fn
6172: , p_log_level_rec => g_log_level_rec);
6173: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn

Line 6183: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

6179: when others then
6180:
6181: ROLLBACK TO undo_reinstatement;
6182:
6183: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6184:
6185: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
6186: , p_log_level_rec => g_log_level_rec);
6187: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 6261: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6257: (px_asset_retire_rec => l_asset_retire_rec,
6258: p_mrc_sob_type_code => 'P',
6259: p_set_of_books_id => null
6260: , p_log_level_rec => p_log_level_rec) then
6261: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6262: end if;
6263:
6264: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
6265: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 6269: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6265: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;
6266:
6267: -- call the cache for the primary transaction book
6268: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
6269: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6270: end if;
6271:
6272: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
6273:

Line 6281: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6277: (p_book => l_asset_hdr_rec.book_type_code
6278: ,p_effective_date => NULL
6279: ,x_period_rec => l_period_rec
6280: , p_log_level_rec => p_log_level_rec) then
6281: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6282: end if;
6283:
6284: -- ***************************************************
6285: -- ** Do asset/book-level validation on transaction

Line 6304: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6300: p_book_type_code => l_asset_hdr_rec.book_type_code,
6301: p_asset_type => l_asset_type_rec.asset_type, --bug 8643362
6302: p_calling_fn => 'fa_retirement_pub.undo_all_books_reinstatement'
6303: ,p_log_level_rec => p_log_level_rec) then
6304: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6305: end if;
6306:
6307: -- ***************************
6308: -- ** Main

Line 6321: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6317: ,px_asset_retire_rec => l_asset_retire_rec
6318: ,p_mrc_sob_type_code => 'P'
6319: ,p_log_level_rec => p_log_level_rec
6320: ) then
6321: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6322: end if;
6323:
6324: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
6325: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn, p_log_level_rec => p_log_level_rec);

Line 6354: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6350: ,px_asset_retire_rec => l_asset_retire_rec
6351: ,p_mrc_sob_type_code => 'R'
6352: ,p_log_level_rec => p_log_level_rec
6353: ) then
6354: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6355: end if;
6356: /*=================================================================
6357: Secondary Changes Start*/
6358: l_secondary_sob_id := FA_XLA_EVENTS_PVT.get_secondary_sob_id( l_asset_hdr_rec.book_type_code);

Line 6372: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6368: p_asset_type => l_asset_type_rec.asset_type, --bug 8643362
6369: p_secondary_sob_id => l_secondary_sob_id,
6370: p_calling_fn => 'fa_ret_pub.undo_all_books_reinstatement.secondary'
6371: ,p_log_level_rec => p_log_level_rec) then
6372: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6373: end if;
6374: end if;
6375: /*Secondary Changes End
6376: ==================================================================*/

Line 6446: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6442: (px_asset_retire_rec => l_asset_retire_rec,
6443: p_mrc_sob_type_code => p_mrc_sob_type_code,
6444: p_set_of_books_id => p_asset_hdr_rec.set_of_books_id
6445: , p_log_level_rec => p_log_level_rec) then
6446: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6447: end if;
6448:
6449: l_asset_retire_rec.status := 'PROCESSED';
6450:

Line 6553: X_Transaction_Header_Id_Out => FND_API.G_MISS_NUM,--bug fix 4088953

6549: X_Status => l_asset_retire_rec.status,
6550: X_Last_Update_Date => l_trans_rec.who_info.last_update_date,
6551: X_Last_Updated_By => l_trans_rec.who_info.last_updated_by,
6552: X_Ret_Prorate_Convention => l_asset_retire_rec.retirement_prorate_convention,
6553: X_Transaction_Header_Id_Out => FND_API.G_MISS_NUM,--bug fix 4088953
6554: X_Units => l_asset_retire_rec.units_retired,
6555: X_Cost_Of_Removal => l_asset_retire_rec.cost_of_removal,
6556: X_Nbv_Retired => l_asset_retire_rec.detail_info.nbv_retired,
6557: X_Gain_Loss_Amount => l_asset_retire_rec.detail_info.gain_loss_amount,

Line 6606: when FND_API.G_EXC_UNEXPECTED_ERROR then

6602: EXCEPTION
6603: /*
6604: * Added for Group Asset uptake
6605: */
6606: when FND_API.G_EXC_UNEXPECTED_ERROR then
6607: -- Make sure to close curosr opened for source line retirement
6608: if c_inv_trx_id%ISOPEN then
6609: CLOSE c_inv_trx_id;
6610: end if;

Line 6749: raise FND_API.G_EXC_ERROR;

6745: -- msg_text: Invalid value for <>. <> is a required field.
6746: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6747: g_token1 := 'XMLTAG';
6748: g_value1 := 'ASSET_ID and BOOK_TYPE_CODE';
6749: raise FND_API.G_EXC_ERROR;
6750: end if;
6751: end if;
6752:
6753: -- check if asset is attached to hierarchy and see if it can

Line 6791: raise FND_API.G_EXC_ERROR;

6787: -- msg_text: Invalid value for <>. <> is a required field.
6788: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6789: g_token1 := 'XMLTAG';
6790: g_value1 := 'ASSET_ID/BOOK_TYPE_CODE or RETIREMENT_ID';
6791: raise FND_API.G_EXC_ERROR;
6792: end if;
6793: end if;
6794:
6795: -- check if retirement type exists in fa_lookups if it is provided

Line 6806: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6802: , p_log_level_rec => p_log_level_rec) then
6803: g_msg_name := null;
6804: g_token1 := null;
6805: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: Retirement type is invalid', '', p_log_level_rec => p_log_level_rec); end if;
6806: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6807: end if;
6808: end if;
6809: end if;
6810:

Line 6815: raise FND_API.G_EXC_ERROR;

6811: /*Bug 8287630 - Group Asset cannot be retired */
6812: if l_validation_type=g_retirement then
6813: if l_asset_type_rec.asset_type = 'GROUP' then
6814: g_msg_name := 'FA_RET_GROUP_NOT_ALLOWED';
6815: raise FND_API.G_EXC_ERROR;
6816: end if;
6817: end if;
6818: /*Bug 8287630 - Group Asset cannot be retired */
6819:

Line 6828: raise FND_API.G_EXC_ERROR;

6824: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if trade in asset number is the asset you are retiring', '', p_log_level_rec => p_log_level_rec); end if;
6825: if l_asset_hdr_rec.asset_id=l_asset_retire_rec.trade_in_asset_id then
6826: g_msg_name := 'FA_RET_INVALID_TRADE_IN';
6827: g_token1 := null;
6828: raise FND_API.G_EXC_ERROR;
6829: end if;
6830:
6831: -- check if the trade-in asset exists in Oracle Assets
6832: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if trade_in_asset_id exists in Oracle Assets', '', p_log_level_rec => p_log_level_rec); end if;

Line 6838: raise FND_API.G_EXC_ERROR;

6834: (p_asset_id => l_asset_hdr_rec.asset_id
6835: , p_log_level_rec => p_log_level_rec) then
6836: g_msg_name := 'FA_RET_TRADE_IN_NONEXISTENT';
6837: g_token1 := null;
6838: raise FND_API.G_EXC_ERROR;
6839: end if;
6840:
6841: end if; -- trade-in asset
6842: end if; -- g_retirement

Line 6853: raise FND_API.G_EXC_ERROR;

6849: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Either units_retired or cost_retired should be provided.', '', p_log_level_rec => p_log_level_rec); end if;
6850: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6851: g_token1 := 'XMLTAG';
6852: g_value1 := 'UNITS_RETIRED or COST_RETIRED';
6853: raise FND_API.G_EXC_ERROR;
6854: end if;
6855: end if;
6856:
6857: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check units', '', p_log_level_rec => p_log_level_rec); end if;

Line 6865: raise FND_API.G_EXC_ERROR;

6861: -- check to make sure that units_retired is positive
6862: if l_asset_retire_rec.units_retired < 0 then
6863: g_msg_name := 'FA_SHARED_GREATER_THAN_ZERO';
6864: g_token1 := null;
6865: raise FND_API.G_EXC_ERROR;
6866: end if;
6867:
6868: -- get the current units of the asset from fa_asset_history table
6869: if not FA_UTIL_PVT.get_current_units

Line 6876: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6872: ,x_current_units => l_asset_desc_rec.current_units
6873: , p_log_level_rec => p_log_level_rec) then
6874: g_msg_name := null;
6875: g_token1 := null;
6876: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6877: end if;
6878:
6879: -- check if units_retired exceeds current units
6880: if l_asset_retire_rec.units_retired > l_asset_desc_rec.current_units then

Line 6883: raise FND_API.G_EXC_ERROR;

6879: -- check if units_retired exceeds current units
6880: if l_asset_retire_rec.units_retired > l_asset_desc_rec.current_units then
6881: g_msg_name := 'FA_RET_UNITS_TOO_BIG';
6882: g_token1 := null;
6883: raise FND_API.G_EXC_ERROR;
6884: end if;
6885:
6886: end if;
6887: end if;

Line 6906: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6902: p_set_of_books_id => null
6903: , p_log_level_rec => p_log_level_rec) then
6904: g_msg_name := null;
6905: g_token1 := null;
6906: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6907: end if;
6908: -- At this point, lv_asset_retire_rec has the previous retirement info.
6909: end if;
6910:

Line 6925: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6921: if l_validation_type = g_retirement then
6922:
6923: -- call the cache for the transaction book
6924: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code, p_log_level_rec => p_log_level_rec) then
6925: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6926: end if;
6927:
6928: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check to make sure that the transaction is not for CIP on TAX book', '', p_log_level_rec => p_log_level_rec); end if;
6929: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'

Line 6936: raise FND_API.G_EXC_ERROR;

6932: -- we do not support this transaction
6933: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction on CIP asset.', '', p_log_level_rec => p_log_level_rec); end if;
6934: g_msg_name := null;
6935: g_token1 := null;
6936: raise FND_API.G_EXC_ERROR;
6937:
6938: end if;
6939:
6940: elsif l_validation_type in (g_reinstatement

Line 6948: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6944: -- call the cache for the transaction book
6945: if not fa_cache_pkg.fazcbc(x_book => lv_asset_retire_rec.detail_info.book_type_code, p_log_level_rec => p_log_level_rec) then
6946: g_msg_name := null;
6947: g_token1 := null;
6948: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6949: end if;
6950:
6951: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
6952: and l_asset_type_rec.asset_type = 'CIP' then

Line 6958: raise FND_API.G_EXC_ERROR;

6954: -- we do not support this transaction
6955: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction on CIP asset.', '', p_log_level_rec => p_log_level_rec); end if;
6956: g_msg_name := null;
6957: g_token1 := null;
6958: raise FND_API.G_EXC_ERROR;
6959:
6960: end if;
6961:
6962: end if; -- check CIP on TAX

Line 6979: raise FND_API.G_EXC_ERROR;

6975: -- check to make sure that units_retired is negative
6976: if l_asset_retire_rec.units_retired > 0 then
6977: g_msg_name := 'FA_SHARED_LESS_THAN_ZERO'; -- ? may need to add to msg table
6978: g_token1 := null;
6979: raise FND_API.G_EXC_ERROR;
6980: end if;
6981:
6982: -- check to make sure that units_retired for reinstatement
6983: -- does not exceed the units_retired in retirement row.

Line 6988: raise FND_API.G_EXC_ERROR;

6984: if (-1 * l_asset_retire_rec.units_retired)
6985: > lv_asset_retire_rec.units_retired then
6986: g_msg_name := 'FA_RET_UNITS_TOO_BIG'; -- Is this correct message even for reinstatement ?
6987: g_token1 := null;
6988: raise FND_API.G_EXC_ERROR;
6989: end if;
6990:
6991: end if;
6992:

Line 7022: raise FND_API.G_EXC_ERROR;

7018: fa_debug_pkg.add(l_calling_fn,'Ret. Units',l_asset_retire_rec.units_retired, p_log_level_rec => p_log_level_rec);
7019: g_msg_name := 'FA_RET_NO_FRAC_UNITS';
7020: /* Bug 6817771 - Ends */
7021: g_token1 := null;
7022: raise FND_API.G_EXC_ERROR;
7023: end if;
7024:
7025: -- check if distributions are valid
7026: if l_asset_dist_tbl.count >= 1 then

Line 7049: raise FND_API.G_EXC_ERROR;

7045: ) then
7046: -- Error: Unable to get distribution information
7047: g_msg_name := 'FA_EXP_FETCH_DH';
7048: g_token1 := null;
7049: raise FND_API.G_EXC_ERROR;
7050: end if;
7051:
7052: else -- if dist is null
7053: -- error out since dist_id can not be null

Line 7057: raise FND_API.G_EXC_ERROR;

7053: -- error out since dist_id can not be null
7054: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
7055: g_token1 := 'XMLTAG';
7056: g_value1 := 'DISTRIBUTION_ID';
7057: raise FND_API.G_EXC_ERROR;
7058: end if;
7059:
7060: end loop;
7061:

Line 7066: raise FND_API.G_EXC_ERROR;

7062: -- error out when the two values are not equal
7063: if (l_sum_units*-1) <> l_asset_retire_rec.units_retired then
7064: g_msg_name := 'FA_RET_UNIS_OUT_OF_BALANCE';
7065: g_token1 := null;
7066: raise FND_API.G_EXC_ERROR;
7067: end if;
7068:
7069: else
7070: -- error out: need at least one row in asset_dist_tbl type

Line 7075: raise FND_API.G_EXC_ERROR;

7071: -- if this is partial unit retirement
7072: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
7073: g_token1 := 'XMLTAG';
7074: g_value1 := 'ASSET_DIST_TBL_REC';
7075: raise FND_API.G_EXC_ERROR;
7076: end if;
7077:
7078: end if; -- units_retired
7079: end if; -- if g_ret or g_reinst

Line 7095: raise FND_API.G_EXC_ERROR;

7091: if l_asset_retire_rec.date_retired < l_period_rec.fy_start_date
7092: or l_asset_retire_rec.date_retired > l_period_rec.fy_end_date then
7093: g_msg_name := 'FA_RET_DATE_MUSTBE_IN_CUR_FY';
7094: g_token1 := null;
7095: raise FND_API.G_EXC_ERROR;
7096: end if;
7097:
7098: -- check if date_retired is a future date
7099: -- date_retired must not be in a future period

Line 7104: raise FND_API.G_EXC_ERROR;

7100: if l_asset_retire_rec.date_retired
7101: > l_period_rec.calendar_period_close_date then
7102: g_msg_name := 'FA_SHARED_CANNOT_FUTURE';
7103: g_token1 := null;
7104: raise FND_API.G_EXC_ERROR;
7105: end if;
7106:
7107: --Bug7589916: check that date_retired is not prior to dpis.
7108: if (l_asset_retire_rec.date_retired < l_asset_fin_rec.Date_Placed_In_Service) then

Line 7111: raise FND_API.G_EXC_ERROR;

7107: --Bug7589916: check that date_retired is not prior to dpis.
7108: if (l_asset_retire_rec.date_retired < l_asset_fin_rec.Date_Placed_In_Service) then
7109: g_msg_name := 'FA_INVALID_RETIRE_DATE';
7110: g_token1 := null;
7111: raise FND_API.G_EXC_ERROR;
7112: end if;
7113:
7114: end if;
7115:

Line 7128: raise FND_API.G_EXC_ERROR;

7124: or lv_asset_retire_rec.date_retired > l_period_rec.fy_end_date then
7125: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not reinstate assets that were retired in previous fiscal year', '', p_log_level_rec => p_log_level_rec); end if;
7126: g_msg_name := 'FA_RET_DATE_MUSTBE_IN_CUR_FY';
7127: g_token1 := null;
7128: raise FND_API.G_EXC_ERROR;
7129: end if;
7130:
7131: end if;
7132:

Line 7145: raise FND_API.G_EXC_ERROR;

7141: x_fiscal_year_name => fa_cache_pkg.fazcbc_record.fiscal_year_name, p_log_level_rec => p_log_level_rec) then
7142: g_msg_name := 'FA_RET_CANT_GET_RET_PRO_DATE';
7143: g_token1 := null;
7144:
7145: raise FND_API.G_EXC_ERROR;
7146: end if;
7147: end if;
7148:
7149: end if; -- date_retired/retirement_convention

Line 7166: raise FND_API.G_EXC_ERROR;

7162: CLOSE c_last_grp_reclass;
7163:
7164: if l_trx_date is not null then
7165: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
7166: raise FND_API.G_EXC_ERROR;
7167: end if;
7168:
7169: if p_period_rec.calendar_period_open_date
7170: > l_asset_retire_rec.date_retired then

Line 7172: raise FND_API.G_EXC_ERROR;

7168:
7169: if p_period_rec.calendar_period_open_date
7170: > l_asset_retire_rec.date_retired then
7171: g_msg_name := 'FA_NO_PRIOR_RET';
7172: raise FND_API.G_EXC_ERROR;
7173: end if;
7174:
7175: end if;
7176:

Line 7190: raise FND_API.G_EXC_ERROR;

7186: ,p_book => l_asset_hdr_rec.book_type_code
7187: , p_log_level_rec => p_log_level_rec) then
7188: g_msg_name := 'FA_REC_RETIRED';
7189: g_token1 := null;
7190: raise FND_API.G_EXC_ERROR;
7191: end if;
7192:
7193: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if the asset in extended life', '', p_log_level_rec => p_log_level_rec); end if;
7194: --Bug#8941124

Line 7204: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7200: ,p_mode => 'ABSOLUTE'
7201: ,px_period_of_addition => l_asset_hdr_rec.period_of_addition
7202: , p_log_level_rec => p_log_level_rec) then
7203:
7204: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7205: end if;
7206: if p_log_level_rec.statement_level then
7207: fa_debug_pkg.add(l_calling_fn, 'perid_of_addition_flag: ', l_asset_hdr_rec.period_of_addition, p_log_level_rec => p_log_level_rec);
7208: end if;

Line 7220: raise FND_API.G_EXC_ERROR;

7216: end if;
7217:
7218: g_msg_name := 'FA_JP_PRIOR_PD_RET_NOT_ALLOWED ';
7219: g_token1 := null;
7220: raise FND_API.G_EXC_ERROR;
7221: else
7222: open c_check_extended_deprn;
7223: fetch c_check_extended_deprn into l_chk_ext_deprn;
7224: close c_check_extended_deprn;

Line 7233: raise FND_API.G_EXC_ERROR;

7229: end if;
7230:
7231: g_msg_name := 'FA_JP_PRIOR_PD_RET_NOT_ALLOWED ';
7232: g_token1 := null;
7233: raise FND_API.G_EXC_ERROR;
7234: end if;
7235: end if;
7236:
7237: -- Bug 16168655 added the join of category book defaults in 2 queries below for

Line 7327: raise FND_API.G_EXC_ERROR;

7323: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn,
7324: 'Error: You can not perform this transaction.', '', p_log_level_rec => p_log_level_rec);
7325: end if;
7326: g_msg_name := 'FA_OVERLAP_FUL_RET';
7327: raise FND_API.G_EXC_ERROR;
7328: end if;
7329:
7330: /*Bug# 8527619 */
7331: if (l_asset_fin_rec.group_asset_id is not null) and

Line 7343: raise FND_API.G_EXC_ERROR;

7339: p_rsv_adj => l_asset_retire_rec.cost_retired,
7340: p_log_level_rec => g_log_level_rec) then
7341: g_msg_name := null;
7342: g_token1 := null;
7343: raise FND_API.G_EXC_ERROR;
7344: end if;
7345: end if;
7346: /*bug#16426081 starts*/
7347: if ( nvl(fa_cache_pkg.fazcdrd_record.rule_name,'ZZ') = 'YEAR END BALANCE WITH POSITIVE REDUCTION AMOUNT' and

Line 7354: raise FND_API.G_EXC_ERROR;

7350: fa_cache_pkg.fazccmt_record.deprn_basis_rule = 'NBV' and
7351: l_asset_retire_rec.cost_retired <> l_asset_fin_rec.cost
7352: ) then
7353: g_msg_name := 'FA_CCA_NO_PART_RET';
7354: raise FND_API.G_EXC_ERROR;
7355: end if;
7356: /*bug#16426081 ends*/
7357:
7358: elsif l_validation_type = g_reinstatement then

Line 7364: raise FND_API.G_EXC_ERROR;

7360: if lv_asset_retire_rec.status <> 'PROCESSED' then
7361: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec => p_log_level_rec); end if;
7362: g_msg_name := null;
7363: g_token1 := null;
7364: raise FND_API.G_EXC_ERROR;
7365: end if;
7366:
7367: SELECT nvl(max(transaction_header_id),0)
7368: INTO l_latest_ret_thid

Line 7379: raise FND_API.G_EXC_ERROR;

7375: if l_latest_ret_thid
7376: <> lv_asset_retire_rec.detail_info.transaction_header_id_in then
7377: g_msg_name := 'FA_CREATE_NOT_ALLOWED';
7378: g_token1 := null;
7379: raise FND_API.G_EXC_ERROR;
7380: end if;
7381:
7382: /*Bug# 8527619 */
7383: if l_asset_fin_rec.group_asset_id is not null then

Line 7394: raise FND_API.G_EXC_ERROR;

7390: p_rsv_adj => 0,
7391: p_log_level_rec => g_log_level_rec) then
7392: g_msg_name := null;
7393: g_token1 := null;
7394: raise FND_API.G_EXC_ERROR;
7395: end if;
7396: end if;
7397: /* Bug 8633654 */
7398: if (not fa_cache_pkg.fazccmt(l_asset_fin_rec.deprn_method_code,

Line 7406: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7402: fa_debug_pkg.add(l_calling_fn, 'Error calling', 'fa_cache_pkg.fazccmt'
7403: ,p_log_level_rec => p_log_level_rec);
7404: end if;
7405:
7406: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7407: end if;
7408:
7409: if ( nvl(fa_cache_pkg.fazcdrd_record.rule_name,'ZZ') = 'ENERGY PERIOD END BALANCE' and
7410: nvl(l_asset_fin_rec.tracking_method, 'NO TRACK') = 'ALLOCATE') then

Line 7416: raise FND_API.G_EXC_ERROR;

7412: (p_asset_retire_rec =>l_asset_retire_rec,
7413: p_asset_fin_rec => l_asset_fin_rec,
7414: p_log_level_rec => g_log_level_rec
7415: ) then
7416: raise FND_API.G_EXC_ERROR;
7417: end if;
7418: end if;
7419: /* Bug 8633654 ends */
7420:

Line 7428: raise FND_API.G_EXC_ERROR;

7424: if lv_asset_retire_rec.status not in ('PENDING','PARTIAL') then
7425: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec => p_log_level_rec); end if;
7426: g_msg_name := null;
7427: g_token1 := null;
7428: raise FND_API.G_EXC_ERROR;
7429: end if;
7430:
7431: /*---------------------------------------------------------------+
7432: | Bug 1577955. |

Line 7450: raise FND_API.G_EXC_ERROR;

7446: ,p_transaction_header_id_in => lv_asset_retire_rec.detail_info.transaction_header_id_in
7447: , p_log_level_rec => p_log_level_rec) then
7448: g_msg_name := 'FA_RET_CORP_PENDING_RETIREMENT';
7449: g_token1 := null;
7450: raise FND_API.G_EXC_ERROR;
7451: end if;
7452:
7453: elsif l_validation_type = g_undo_reinstatement then
7454:

Line 7459: raise FND_API.G_EXC_ERROR;

7455: if lv_asset_retire_rec.status not in ('REINSTATE') then
7456: if p_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec => p_log_level_rec); end if;
7457: g_msg_name := null;
7458: g_token1 := null;
7459: raise FND_API.G_EXC_ERROR;
7460: end if;
7461:
7462: end if;
7463:

Line 7486: when FND_API.G_EXC_ERROR then

7482: return TRUE;
7483:
7484: EXCEPTION
7485:
7486: when FND_API.G_EXC_ERROR then
7487:
7488: if g_token1 is null then
7489: fa_srvr_msg.add_message(calling_fn => l_calling_fn
7490: ,name => g_msg_name

Line 7504: when FND_API.G_EXC_UNEXPECTED_ERROR then

7500: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
7501: , p_log_level_rec => p_log_level_rec);
7502: return FALSE;
7503:
7504: when FND_API.G_EXC_UNEXPECTED_ERROR then
7505:
7506: fa_srvr_msg.add_message(calling_fn => l_calling_fn
7507: , p_log_level_rec => p_log_level_rec);
7508: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn

Line 7632: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7628: if not FA_UTIL_PVT.get_asset_cat_rec (
7629: p_asset_hdr_rec => px_asset_hdr_rec,
7630: px_asset_cat_rec => l_asset_cat_rec,
7631: p_date_effective => NULL, p_log_level_rec => p_log_level_rec) then
7632: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7633: end if;
7634:
7635: if not FA_UTIL_PVT.get_asset_type_rec (
7636: p_asset_hdr_rec => px_asset_hdr_rec,

Line 7639: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7635: if not FA_UTIL_PVT.get_asset_type_rec (
7636: p_asset_hdr_rec => px_asset_hdr_rec,
7637: px_asset_type_rec => l_asset_type_rec,
7638: p_date_effective => NULL, p_log_level_rec => p_log_level_rec) then
7639: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7640: end if;
7641:
7642: l_trans_rec := px_trans_rec;
7643: l_asset_hdr_rec := px_asset_hdr_rec;

Line 7667: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7663: if p_log_level_rec.statement_level then
7664: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', p_log_level_rec => p_log_level_rec);
7665: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, p_log_level_rec => p_log_level_rec);
7666: end if;
7667: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7668: end if;
7669:
7670: FA_TRANSACTION_HEADERS_PKG.UPDATE_ROW(
7671: X_Rowid => p_rowid,