DBA Data[Home] [Help]

APPS.FA_RETIREMENT_PUB dependencies on FND_API

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

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

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

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

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

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

Line 267: raise FND_API.G_EXC_UNEXPECTED_ERROR;

263: if (not g_log_level_rec.initialized) then
264: if (NOT fa_util_pub.get_log_level_rec (
265: x_log_level_rec => g_log_level_rec
266: )) then
267: raise FND_API.G_EXC_UNEXPECTED_ERROR;
268: end if;
269: end if;
270:
271: -- ****************************************************

Line 278: if not FND_API.compatible_api_call

274:
275: -- check version of the API
276: -- standard call to check for API call compatibility.
277:
278: if not FND_API.compatible_api_call
279: (G_API_VERSION
280: ,p_api_version
281: ,G_API_NAME
282: ,G_PKG_NAME) then

Line 283: raise FND_API.G_EXC_UNEXPECTED_ERROR;

279: (G_API_VERSION
280: ,p_api_version
281: ,G_API_NAME
282: ,G_PKG_NAME) then
283: raise FND_API.G_EXC_UNEXPECTED_ERROR;
284: end if;
285:
286: -- initialize message list if p_init_msg_list is set to TRUE.
287: if (FND_API.to_boolean(p_init_msg_list)) then

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

283: raise FND_API.G_EXC_UNEXPECTED_ERROR;
284: end if;
285:
286: -- initialize message list if p_init_msg_list is set to TRUE.
287: if (FND_API.to_boolean(p_init_msg_list)) then
288: -- initialize error message stack.
289: fa_srvr_msg.init_server_message;
290:
291: -- initialize debug message stack.

Line 333: raise FND_API.G_EXC_ERROR;

329: ,p_log_level_rec => g_log_level_rec);
330: if not l_ins_status then
331: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in FA_TRX_APPROVAL_PKG.faxcat', '', g_log_level_rec); end if;
332: -- g_msg_name := 'error msg name-after trx_app';
333: raise FND_API.G_EXC_ERROR;
334: end if;
335:
336: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'ret_id1 ', l_retirement_id, g_log_level_rec); end if;
337: -- ***********************************

Line 347: raise FND_API.G_EXC_UNEXPECTED_ERROR;

343:
344: -- call the cache for the primary transaction book
345: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
346: ,p_log_level_rec => g_log_level_rec) then
347: raise FND_API.G_EXC_UNEXPECTED_ERROR;
348: end if;
349:
350: -- l_book_class := fa_cache_pkg.fazcbc_record.book_class;
351: -- l_set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

Line 366: raise FND_API.G_EXC_UNEXPECTED_ERROR;

362: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
363: ,x_mrc_sob_type_code => l_reporting_flag
364: ,p_log_level_rec => g_log_level_rec)
365: then
366: raise FND_API.G_EXC_UNEXPECTED_ERROR;
367: end if;
368:
369: -- Error out if the program is submitted from the Reporting Responsibility
370: -- No transaction permitted directly on reporting books.

Line 374: raise FND_API.G_EXC_UNEXPECTED_ERROR;

370: -- No transaction permitted directly on reporting books.
371: if l_reporting_flag = 'R' then
372: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
373: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
374: raise FND_API.G_EXC_UNEXPECTED_ERROR;
375: end if;
376:
377:
378: end if; -- book_type_code

Line 400: raise FND_API.G_EXC_UNEXPECTED_ERROR;

396: if not FA_UTIL_PVT.get_asset_desc_rec
397: (p_asset_hdr_rec => l_asset_hdr_rec
398: ,px_asset_desc_rec => l_asset_desc_rec
399: ,p_log_level_rec => g_log_level_rec) then
400: raise FND_API.G_EXC_UNEXPECTED_ERROR;
401: end if;
402:
403: -- pop asset_type_rec
404: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_type_rec', '', g_log_level_rec); end if;

Line 410: raise FND_API.G_EXC_UNEXPECTED_ERROR;

406: (p_asset_hdr_rec => l_asset_hdr_rec
407: ,px_asset_type_rec => l_asset_type_rec
408: ,p_date_effective => NULL
409: ,p_log_level_rec => g_log_level_rec) then
410: raise FND_API.G_EXC_UNEXPECTED_ERROR;
411: end if;
412:
413: -- pop asset_fin_rec
414: -- get fa_books row where transaction_header_id_out is null

Line 422: raise FND_API.G_EXC_UNEXPECTED_ERROR;

418: ,px_asset_fin_rec => l_asset_fin_rec
419: ,p_transaction_header_id => NULL
420: ,p_mrc_sob_type_code => 'P'
421: ,p_log_level_rec => g_log_level_rec) then
422: raise FND_API.G_EXC_UNEXPECTED_ERROR;
423: end if;
424:
425: -- pop current period_rec info
426: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', g_log_level_rec); end if;

Line 431: raise FND_API.G_EXC_UNEXPECTED_ERROR;

427: if not FA_UTIL_PVT.get_period_rec
428: (p_book => l_asset_hdr_rec.book_type_code
429: ,x_period_rec => l_period_rec
430: ,p_log_level_rec => g_log_level_rec) then
431: raise FND_API.G_EXC_UNEXPECTED_ERROR;
432: end if;
433:
434:
435: -- get the current units of the asset from fa_asset_history table

Line 446: raise FND_API.G_EXC_UNEXPECTED_ERROR;

442: (p_calling_fn => l_calling_fn
443: ,p_asset_id => l_asset_hdr_rec.asset_id
444: ,x_current_units => l_asset_desc_rec.current_units
445: ,p_log_level_rec => g_log_level_rec) then
446: raise FND_API.G_EXC_UNEXPECTED_ERROR;
447: end if;
448:
449: -- *********************************************
450: -- ** Set default values unless provided

Line 541: raise FND_API.G_EXC_UNEXPECTED_ERROR;

537: p_asset_hdr_rec => l_asset_hdr_rec,
538: px_asset_cat_rec => l_asset_cat_rec,
539: p_date_effective => NULL,
540: p_log_level_rec => g_log_level_rec) then
541: raise FND_API.G_EXC_UNEXPECTED_ERROR;
542: end if;
543:
544: -- Initialize g_inv_trans_rec global variable
545: g_inv_trans_rec.invoice_transaction_id := to_number(null);

Line 568: raise FND_API.G_EXC_UNEXPECTED_ERROR;

564: if g_log_level_rec.statement_level then
565: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', g_log_level_rec);
566: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, g_log_level_rec);
567: end if;
568: raise FND_API.G_EXC_UNEXPECTED_ERROR;
569: end if;
570:
571: if (g_log_level_rec.statement_level) then
572: FA_DEBUG_PKG.ADD (fname=>'FAPRETB.pls',

Line 625: raise FND_API.G_EXC_UNEXPECTED_ERROR;

621: ,p_inv_tbl => l_inv_tbl
622: ,p_period_rec => l_period_rec
623: ,p_calling_fn => p_calling_fn
624: ,p_log_level_rec => g_log_level_rec) then
625: raise FND_API.G_EXC_UNEXPECTED_ERROR;
626: end if;
627:
628:
629: -- **********************************************

Line 645: raise FND_API.G_EXC_ERROR;

641: -- can only fully retire CIP assets unless source line retirement
642: if l_asset_type_rec.asset_type = 'CIP' and p_inv_tbl.count = 0
643: and l_asset_retire_rec.units_retired <> l_asset_desc_rec.current_units then
644: g_msg_name := 'FA_RET_WHOLE_CIP_ASSET';
645: raise FND_API.G_EXC_ERROR;
646: end if;
647:
648: else -- if units_retired is null
649:

Line 654: raise FND_API.G_EXC_ERROR;

650: -- can only fully retire CIP assets unless source line retirement
651: if l_asset_type_rec.asset_type = 'CIP' and p_inv_tbl.count = 0
652: and l_asset_retire_rec.cost_retired <> l_asset_fin_rec.cost then
653: g_msg_name := 'FA_RET_WHOLE_CIP_ASSET';
654: raise FND_API.G_EXC_ERROR;
655: end if;
656:
657: end if; -- partial retirement on CIP asset
658:

Line 664: raise FND_API.G_EXC_ERROR;

660: -- of retirement in FAXASSET(i.e. fa_retire_pkg.initialize).
661: -- ? not sure of the following code - need more investigation
662: if l_asset_desc_rec.unit_adjustment_flag = 'YES' then
663: g_msg_name := 'FA_RET_CHANGE_UNITS_TFR_FORM';
664: raise FND_API.G_EXC_ERROR;
665: end if;
666:
667: -- FYI: We don't allow unit retirements for TAX book
668: -- probably because TAX book does not have its own distributions

Line 674: raise FND_API.G_EXC_ERROR;

670: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
671: and l_asset_retire_rec.units_retired is not null then
672: g_msg_name := 'FA_RET_NO_PART_UNIT_IN_TAX';
673: -- ? can not find this message name in msg table
674: raise FND_API.G_EXC_ERROR;
675: end if;
676:
677: -- check if any adjustment is pending
678: -- Users cannot retire the asset if an adjustment is pending

Line 702: raise FND_API.G_EXC_UNEXPECTED_ERROR;

698:
699: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.cost_retired
700: ,x_book => l_asset_hdr_rec.book_type_code
701: ,p_log_level_rec => g_log_level_rec) then
702: raise FND_API.G_EXC_UNEXPECTED_ERROR;
703: end if;
704:
705: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'derived cost_retired: ', l_asset_retire_rec.cost_retired, g_log_level_rec); end if;
706:

Line 763: raise FND_API.G_EXC_ERROR;

759: p_calling_fn => 'FA_RETIREMENT_PUB.do_retirement',
760: p_log_level_rec => g_log_level_rec) then
761: g_msg_name := null;
762: g_token1 := null;
763: raise FND_API.G_EXC_ERROR;
764: end if;
765:
766: -- ***************************
767: -- ** Main

Line 790: raise FND_API.G_EXC_ERROR;

786: ,p_subcomp_tbl => l_subcomp_tbl
787: ,p_inv_tbl => l_inv_tbl
788: ,p_period_rec => l_period_rec
789: ,p_log_level_rec => g_log_level_rec) then
790: raise FND_API.G_EXC_ERROR;
791: end if;
792:
793: l_retirement_id := l_asset_retire_rec.retirement_id;
794:

Line 836: raise FND_API.G_EXC_UNEXPECTED_ERROR;

832: (x_corp_book => l_asset_hdr_rec.book_type_code
833: ,x_asset_type => l_asset_type_rec.asset_type
834: ,x_tax_book_tbl => l_tax_book_tbl
835: ,p_log_level_rec => g_log_level_rec) then
836: raise FND_API.G_EXC_UNEXPECTED_ERROR;
837: end if;
838:
839: for l_tax_index in 1..l_tax_book_tbl.count loop
840:

Line 859: raise FND_API.G_EXC_UNEXPECTED_ERROR;

855: else
856:
857: -- cache the book information for the tax book
858: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index)) then
859: raise FND_API.G_EXC_UNEXPECTED_ERROR;
860: end if;
861:
862: -- ? Excerpt from Brad's comment on this part - need more investigation:
863: -- 'May need to set the transaction date, trx_type, subtype here as well

Line 892: raise FND_API.G_EXC_ERROR;

888: ,p_subcomp_tbl => l_subcomp_tbl
889: ,p_inv_tbl => l_inv_tbl
890: ,p_period_rec => l_period_rec
891: ,p_log_level_rec => g_log_level_rec) then
892: raise FND_API.G_EXC_ERROR;
893: end if;
894:
895:
896: -- BUG# 2376085, 2487707

Line 923: if l_calculate_gain_loss_flag = FND_API.G_TRUE then

919: end if;
920:
921: -- submit calculate_gain_loss programs if flag is set
922:
923: if l_calculate_gain_loss_flag = FND_API.G_TRUE then
924:
925: if g_log_level_rec.statement_level then
926: fa_debug_pkg.add
927: (fname => l_calling_fn,

Line 941: raise FND_API.G_EXC_UNEXPECTED_ERROR;

937: if not calculate_gain_loss
938: (p_retirement_id => l_retirement_id
939: ,p_mrc_sob_type_code => 'P'
940: ,p_log_level_rec => g_log_level_rec) then
941: raise FND_API.G_EXC_UNEXPECTED_ERROR;
942: end if;
943: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'right after calc gain/loss', '', g_log_level_rec); end if;
944:
945: end if;

Line 962: if FND_API.to_boolean(p_commit) then

958: p_log_level_rec => g_log_level_rec);
959:
960:
961: -- commit if p_commit is TRUE.
962: if FND_API.to_boolean(p_commit) then
963: COMMIT WORK;
964: end if;
965:
966: -- Standard call to get message count and if count is 1 get message info.

Line 976: x_return_status := FND_API.G_RET_STS_SUCCESS;

972: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
973: fnd_client_info.set_currency_context (g_orig_currency_context);
974:
975: -- return the status.
976: x_return_status := FND_API.G_RET_STS_SUCCESS;
977:
978: EXCEPTION
979:
980: when FND_API.G_EXC_ERROR then

Line 980: when FND_API.G_EXC_ERROR then

976: x_return_status := FND_API.G_RET_STS_SUCCESS;
977:
978: EXCEPTION
979:
980: when FND_API.G_EXC_ERROR then
981:
982: ROLLBACK TO do_retirement;
983:
984: x_return_status := FND_API.G_RET_STS_ERROR;

Line 984: x_return_status := FND_API.G_RET_STS_ERROR;

980: when FND_API.G_EXC_ERROR then
981:
982: ROLLBACK TO do_retirement;
983:
984: x_return_status := FND_API.G_RET_STS_ERROR;
985:
986: if g_token1 is null then
987: fa_srvr_msg.add_message(calling_fn => l_calling_fn
988: ,name => g_msg_name

Line 1005: when FND_API.G_EXC_UNEXPECTED_ERROR then

1001: -- set back to original environment when the procedure is finished
1002: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
1003: fnd_client_info.set_currency_context (g_orig_currency_context);
1004:
1005: when FND_API.G_EXC_UNEXPECTED_ERROR then
1006:
1007: ROLLBACK TO do_retirement;
1008:
1009: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1009: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1005: when FND_API.G_EXC_UNEXPECTED_ERROR then
1006:
1007: ROLLBACK TO do_retirement;
1008:
1009: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1010:
1011: fa_srvr_msg.add_message(calling_fn => l_calling_fn
1012: ,p_log_level_rec => g_log_level_rec);
1013: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 1024: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1020: when others then
1021:
1022: ROLLBACK TO do_retirement;
1023:
1024: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1025:
1026: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
1027: ,p_log_level_rec => g_log_level_rec);
1028: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 1131: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1127:
1128: -- call the cache for the primary transaction book
1129: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
1130: ,p_log_level_rec => p_log_level_rec) then
1131: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1132: end if;
1133:
1134: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
1135:

Line 1149: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1145: ,px_asset_fin_rec => l_asset_fin_rec
1146: ,p_transaction_header_id => NULL
1147: ,p_mrc_sob_type_code => 'P'
1148: ,p_log_level_rec => p_log_level_rec) then
1149: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1150: end if;
1151:
1152: -- pop current period_rec info
1153: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop period_rec', '', p_log_level_rec); end if;

Line 1159: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1155: (p_book => l_asset_hdr_rec.book_type_code
1156: ,p_effective_date => NULL
1157: ,x_period_rec => l_period_rec
1158: ,p_log_level_rec => p_log_level_rec) then
1159: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1160: end if;
1161:
1162: -- ***************************************************
1163: -- ** Do asset/book-level validation on transaction

Line 1201: raise FND_API.G_EXC_ERROR;

1197: /*
1198: if l_asset_hdr_rec.period_of_addition='Y' then
1199: -- error out since retirement is not allowed in period of addition
1200: g_msg_name := 'FA_RET_CANT_RET_NONDEPRN';
1201: raise FND_API.G_EXC_ERROR;
1202: end if;
1203: */
1204: else
1205: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1205: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1201: raise FND_API.G_EXC_ERROR;
1202: end if;
1203: */
1204: else
1205: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1206: end if;
1207: if g_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); end if;
1208:
1209: -- check if there is an add-to-asset transaction pending

Line 1218: raise FND_API.G_EXC_ERROR;

1214: ,p_book => l_asset_hdr_rec.book_type_code
1215: ,p_log_level_rec => p_log_level_rec) then
1216: -- Users must post their mass additions before they can retire the asset
1217: g_msg_name := 'FA_RET_CANT_RET_INCOMPLETE_ASS';
1218: raise FND_API.G_EXC_ERROR;
1219: end if;
1220:
1221: -- check if another retirement/reinstatement already pending
1222: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec); end if;

Line 1228: raise FND_API.G_EXC_ERROR;

1224: (p_asset_id => l_asset_hdr_rec.asset_id
1225: ,p_book => l_asset_hdr_rec.book_type_code
1226: ,p_log_level_rec => p_log_level_rec) then
1227: g_msg_name := 'FA_RET_PENDING_RETIREMENTS';
1228: raise FND_API.G_EXC_ERROR;
1229: end if;
1230:
1231: -- check if the asset has already been fully retired
1232: if g_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); end if;

Line 1238: raise FND_API.G_EXC_ERROR;

1234: (p_asset_id => l_asset_hdr_rec.asset_id
1235: ,p_book => l_asset_hdr_rec.book_type_code
1236: ,p_log_level_rec => p_log_level_rec) then
1237: g_msg_name := 'FA_REC_RETIRED';
1238: raise FND_API.G_EXC_ERROR;
1239: end if;
1240:
1241: -- check if date_retired is valid in terms of trx date
1242: if g_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); end if;

Line 1253: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1249: ,p_asset_id => l_asset_hdr_rec.asset_id
1250: ,p_book => l_asset_hdr_rec.book_type_code
1251: ,x_latest_trans_date => l_latest_trans_date
1252: ,p_log_level_rec => p_log_level_rec) then
1253: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1254: end if;
1255:
1256: if l_asset_retire_rec.date_retired < l_latest_trans_date then
1257: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';

Line 1258: raise FND_API.G_EXC_ERROR;

1254: end if;
1255:
1256: if l_asset_retire_rec.date_retired < l_latest_trans_date then
1257: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
1258: raise FND_API.G_EXC_ERROR;
1259: end if;
1260:
1261: -- BUG# 3575340
1262: -- need to prevent the backdate of a retirement not only

Line 1326: raise FND_API.G_EXC_ERROR;

1322: if not fa_cache_pkg.fazccvt
1323: (x_prorate_convention_code => l_asset_retire_rec.retirement_prorate_convention,
1324: x_fiscal_year_name => l_fiscal_year_name
1325: ,p_log_level_rec => p_log_level_rec) then
1326: raise FND_API.G_EXC_ERROR;
1327: end if;
1328:
1329: if not fa_cache_pkg.fazcdp
1330: (x_book_type_code => l_asset_hdr_rec.book_type_code

Line 1332: raise FND_API.G_EXC_ERROR;

1328:
1329: if not fa_cache_pkg.fazcdp
1330: (x_book_type_code => l_asset_hdr_rec.book_type_code
1331: ,p_log_level_rec => p_log_level_rec) then
1332: raise FND_API.G_EXC_ERROR;
1333: end if;
1334:
1335: if g_log_level_rec.statement_level then
1336: fa_debug_pkg.add(l_calling_fn, 'Get ret prorate_date...', '', p_log_level_rec);

Line 1363: raise FND_API.G_EXC_ERROR;

1359: -- added this for bug 3684222
1360: if (l_ret_prorate_date < l_latest_reval_date and
1361: l_ret_prorate_date < fa_cache_pkg.fazcdp_record.calendar_period_open_date) then
1362: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
1363: raise FND_API.G_EXC_ERROR;
1364: end if;
1365:
1366:
1367: end if; -- date_retired

Line 1377: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1373: fa_debug_pkg.add(l_calling_fn, 'Error calling', 'fa_cache_pkg.fazccmt'
1374: ,p_log_level_rec => p_log_level_rec);
1375: end if;
1376:
1377: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1378: end if;
1379:
1380: --
1381: -- Bug3254818: Lift this ristriction for FLAT method type

Line 1393: raise FND_API.G_EXC_ERROR;

1389: <> nvl(l_asset_fin_rec.period_counter_life_complete,99)
1390: then
1391:
1392: g_msg_name := 'FA_NO_TRX_WHEN_LIFE_COMPLETE';
1393: raise FND_API.G_EXC_ERROR;
1394:
1395: end if;
1396:
1397: end if; -- date_retired

Line 1420: raise FND_API.G_EXC_ERROR;

1416: ,p_log_level_rec => p_log_level_rec);
1417: end if;
1418:
1419: g_msg_name := 'FA_RET_COST_TOO_BIG';
1420: raise FND_API.G_EXC_ERROR;
1421: end if;
1422:
1423: end if; -- units_retired
1424:

Line 1440: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1436: -- round the converted amounts
1437: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.cost_retired
1438: ,x_book => l_asset_hdr_rec.book_type_code
1439: ,p_log_level_rec => p_log_level_rec) then
1440: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1441: end if;
1442:
1443: end if;
1444:

Line 1479: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1475: px_trans_rec => l_trans_rec,
1476: p_event_status => XLA_EVENTS_PUB_PKG.C_EVENT_INCOMPLETE,
1477: p_calling_fn => 'FA_RETIREMENT_PUB.do_all_books_retirement'
1478: ,p_log_level_rec => p_log_level_rec) then
1479: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1480: end if;
1481:
1482: -- ***************************
1483: -- ** Main

Line 1502: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1498: ,p_inv_tbl => l_inv_tbl
1499: ,p_period_rec => l_period_rec
1500: ,p_mrc_sob_type_code => 'P'
1501: ,p_log_level_rec => p_log_level_rec) then
1502: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1503: end if;
1504:
1505: if g_log_level_rec.statement_level then
1506: fa_debug_pkg.add(l_calling_fn, 'do_all_books_retirement: retirement_id: ', l_asset_retire_rec.retirement_id, p_log_level_rec);

Line 1528: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1524: if not FA_CACHE_PKG.fazcrsob
1525: (x_book_type_code => l_asset_hdr_rec.book_type_code,
1526: x_sob_tbl => l_sob_tbl
1527: ,p_log_level_rec => p_log_level_rec) then
1528: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1529: end if;
1530:
1531: -- loop through each book starting with the primary and
1532: -- call sub routine for each

Line 1566: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1562: ,p_inv_tbl => l_inv_tbl
1563: ,p_period_rec => l_period_rec
1564: ,p_mrc_sob_type_code => 'R'
1565: ,p_log_level_rec => p_log_level_rec) then
1566: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1567: end if;
1568:
1569: end loop;
1570:

Line 1689: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1685: ,p_transaction_header_id => NULL
1686: ,p_mrc_sob_type_code => p_mrc_sob_type_code
1687:
1688: ,p_log_level_rec => p_log_level_rec) then
1689: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1690: end if;
1691:
1692: -- pop asset_cat_rec
1693: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec); end if;

Line 1699: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1695: (p_asset_hdr_rec => l_asset_hdr_rec
1696: ,px_asset_cat_rec => l_asset_cat_rec
1697: ,p_date_effective => NULL
1698: ,p_log_level_rec => p_log_level_rec) then
1699: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1700: end if;
1701:
1702: -- ***************************
1703: -- ** Do basic calculation

Line 1768: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1764: -- round the converted amounts
1765: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.cost_retired
1766: ,x_book => l_asset_hdr_rec.book_type_code
1767: ,p_log_level_rec => p_log_level_rec) then
1768: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1769: end if;
1770: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.proceeds_of_sale
1771: ,x_book => l_asset_hdr_rec.book_type_code
1772: ,p_log_level_rec => p_log_level_rec) then

Line 1773: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1769: end if;
1770: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.proceeds_of_sale
1771: ,x_book => l_asset_hdr_rec.book_type_code
1772: ,p_log_level_rec => p_log_level_rec) then
1773: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1774: end if;
1775: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.cost_of_removal
1776: ,x_book => l_asset_hdr_rec.book_type_code
1777: ,p_log_level_rec => p_log_level_rec) then

Line 1778: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1774: end if;
1775: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_mrc_rec.cost_of_removal
1776: ,x_book => l_asset_hdr_rec.book_type_code
1777: ,p_log_level_rec => p_log_level_rec) then
1778: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1779: end if;
1780:
1781: -- if transaction is full retirement
1782: -- then set cost_retired to full cost

Line 1812: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1808: ,p_inv_tbl => l_inv_tbl
1809: ,p_period_rec => l_period_rec
1810: ,p_mrc_sob_type_code => p_mrc_sob_type_code
1811: ,p_log_level_rec => p_log_level_rec) then
1812: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1813: end if;
1814:
1815: if l_asset_retire_rec.units_retired = l_asset_desc_rec.current_units
1816: or l_asset_retire_rec.units_retired is null then

Line 1852: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1848: p_mrc_sob_type_code => p_mrc_sob_type_code,
1849: p_calling_fn => 'DO_RETIREMENT.CGLFR_CR_ONLY'
1850: ,p_log_level_rec => p_log_level_rec) then
1851:
1852: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1853: end if;
1854: -- SLA
1855: -- else
1856: -- l_dist_trans_rec.transaction_header_id := NULL;

Line 1930: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1926: ,px_asset_hdr_rec => l_asset_hdr_rec
1927: ,px_asset_cat_rec_new => l_asset_cat_rec
1928: ,px_asset_dist_tbl => l_asset_dist_tbl
1929: ,p_log_level_rec => p_log_level_rec) then
1930: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1931: end if;
1932:
1933: end if;
1934:

Line 1942: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1938: -- call book cache to reset with right book
1939:
1940: -- call the cache for the book
1941: if not fa_cache_pkg.fazcbc(X_book => l_asset_hdr_rec.book_type_code) then
1942: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1943: end if;
1944:
1945: --
1946: -- If this is member asset and Recognize Gain Loss is set

Line 1969: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1965: p_mrc_sob_type_code => p_mrc_sob_type_code,
1966: p_calling_fn => l_calling_fn
1967: ,p_log_level_rec => p_log_level_rec) then
1968:
1969: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1970: end if;
1971:
1972: end if;
1973:

Line 2218: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2214: px_asset_fin_rec => l_asset_fin_rec,
2215: p_transaction_header_id => NULL,
2216: p_mrc_sob_type_code => p_mrc_sob_type_code
2217: ,p_log_level_rec => p_log_level_rec) then
2218: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2219: end if;
2220:
2221: if not FA_UTIL_PVT.get_asset_type_rec
2222: (p_asset_hdr_rec => l_asset_hdr_rec,

Line 2225: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2221: if not FA_UTIL_PVT.get_asset_type_rec
2222: (p_asset_hdr_rec => l_asset_hdr_rec,
2223: px_asset_type_rec => l_asset_type_rec
2224: ,p_log_level_rec => p_log_level_rec) then
2225: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2226: end if;
2227:
2228: if (p_mrc_sob_type_code <> 'R') then
2229:

Line 2279: raise FND_API.G_EXC_ERROR;

2275: 'FA_RETIREMENT_PUB.do_sub_regular_retirement'
2276: ,p_log_level_rec => p_log_level_rec) then
2277: g_msg_name := null;
2278: g_token1 := null;
2279: raise FND_API.G_EXC_ERROR;
2280: end if;
2281:
2282: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec); end if;
2283: fa_transaction_headers_pkg.insert_row

Line 2365: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2361: l_salvage_value_new := l_asset_fin_rec.salvage_value * l_fraction_remaining;
2362: if not FA_UTILS_PKG.faxrnd(x_amount => l_salvage_value_new,
2363: x_book => l_asset_hdr_rec.book_type_code
2364: ,p_log_level_rec => p_log_level_rec) then
2365: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2366: end if;
2367:
2368: end if;
2369:

Line 2462: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2458: -- rounding values
2459: if not FA_UTILS_PKG.faxrnd(x_amount => l_recoverable_cost_new,
2460: x_book => l_asset_hdr_rec.book_type_code
2461: ,p_log_level_rec => p_log_level_rec) then
2462: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2463: end if;
2464:
2465: if not FA_UTILS_PKG.faxrnd(x_amount => l_unrevalued_cost_new,
2466: x_book => l_asset_hdr_rec.book_type_code

Line 2468: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2464:
2465: if not FA_UTILS_PKG.faxrnd(x_amount => l_unrevalued_cost_new,
2466: x_book => l_asset_hdr_rec.book_type_code
2467: ,p_log_level_rec => p_log_level_rec) then
2468: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2469: end if;
2470:
2471: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.eofy_reserve,
2472: x_book => l_asset_hdr_rec.book_type_code

Line 2474: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2470:
2471: if not FA_UTILS_PKG.faxrnd(x_amount => l_asset_retire_rec.eofy_reserve,
2472: x_book => l_asset_hdr_rec.book_type_code
2473: ,p_log_level_rec => p_log_level_rec) then
2474: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2475: end if;
2476:
2477: if not FA_UTILS_PKG.faxrnd(x_amount => l_eofy_reserve_new,
2478: x_book => l_asset_hdr_rec.book_type_code

Line 2480: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2476:
2477: if not FA_UTILS_PKG.faxrnd(x_amount => l_eofy_reserve_new,
2478: x_book => l_asset_hdr_rec.book_type_code
2479: ,p_log_level_rec => p_log_level_rec) then
2480: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2481: end if;
2482:
2483: if not FA_UTILS_PKG.faxrnd(x_amount => l_reval_amort_basis_new,
2484: x_book => l_asset_hdr_rec.book_type_code

Line 2486: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2482:
2483: if not FA_UTILS_PKG.faxrnd(x_amount => l_reval_amort_basis_new,
2484: x_book => l_asset_hdr_rec.book_type_code
2485: ,p_log_level_rec => p_log_level_rec) then
2486: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2487: end if;
2488:
2489: --
2490: -- Processing member asset if Recognize Gain Loss is NO.

Line 2558: raise FND_API.G_EXC_UNEXPECTED_ERROR; -- ENERGY

2554: -- ENERGY
2555: if not FA_UTILS_PKG.faxrnd(x_amount => l_reserve_retired, -- ENERGY
2556: x_book => l_asset_hdr_rec.book_type_code
2557: ,p_log_level_rec => p_log_level_rec) then -- ENERGY
2558: raise FND_API.G_EXC_UNEXPECTED_ERROR; -- ENERGY
2559: end if; -- ENERGY
2560: -- ENERGY
2561: l_asset_retire_rec.reserve_retired := l_reserve_retired; -- ENERGY
2562:

Line 2656: raise FND_API.G_EXC_UNEXPECTED_ERROR;

2652: -- calling FA_CALC_DEPRN_BASIS1_PKG.CALL_DEPRN_BASIS.
2653: if not FA_UTILS_PKG.faxrnd(x_amount => l_adjusted_cost_new,
2654: x_book => l_asset_hdr_rec.book_type_code
2655: ,p_log_level_rec => p_log_level_rec) then
2656: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2657: end if;
2658:
2659: if p_log_level_rec.statement_level then
2660: fa_debug_pkg.add(l_calling_fn, 'l_adjusted_cost_new', l_adjusted_cost_new

Line 3016: when FND_API.G_EXC_UNEXPECTED_ERROR then

3012: EXCEPTION
3013: /*
3014: * Added for Group Asset uptake
3015: */
3016: when FND_API.G_EXC_UNEXPECTED_ERROR then
3017: fa_srvr_msg.add_message(calling_fn => l_calling_fn
3018: ,p_log_level_rec => p_log_level_rec);
3019:
3020: return FALSE;

Line 3067: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3063: ,p_log_level_rec => p_log_level_rec);
3064: end if;
3065:
3066: if l_return_status > 0 then
3067: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3068: end if;
3069:
3070: return TRUE;
3071:

Line 3074: when FND_API.G_EXC_UNEXPECTED_ERROR then

3070: return TRUE;
3071:
3072: EXCEPTION
3073:
3074: when FND_API.G_EXC_UNEXPECTED_ERROR then
3075: fa_srvr_msg.add_message(calling_fn => l_calling_fn
3076: ,p_log_level_rec => p_log_level_rec);
3077:
3078: return FALSE;

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

3096: -----------------------------------------------------------------------------
3097:
3098: PROCEDURE undo_retirement
3099: (p_api_version in NUMBER
3100: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
3101: ,p_commit in VARCHAR2 := FND_API.G_FALSE
3102: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
3103: ,p_calling_fn in VARCHAR2
3104: ,x_return_status out NOCOPY VARCHAR2

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

3097:
3098: PROCEDURE undo_retirement
3099: (p_api_version in NUMBER
3100: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
3101: ,p_commit in VARCHAR2 := FND_API.G_FALSE
3102: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
3103: ,p_calling_fn in VARCHAR2
3104: ,x_return_status out NOCOPY VARCHAR2
3105: ,x_msg_count out NOCOPY NUMBER

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

3098: PROCEDURE undo_retirement
3099: (p_api_version in NUMBER
3100: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
3101: ,p_commit in VARCHAR2 := FND_API.G_FALSE
3102: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
3103: ,p_calling_fn in VARCHAR2
3104: ,x_return_status out NOCOPY VARCHAR2
3105: ,x_msg_count out NOCOPY NUMBER
3106: ,x_msg_data out NOCOPY VARCHAR2

Line 3150: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3146: if (not g_log_level_rec.initialized) then
3147: if (NOT fa_util_pub.get_log_level_rec (
3148: x_log_level_rec => g_log_level_rec
3149: )) then
3150: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3151: end if;
3152: end if;
3153:
3154: -- initialize message list if p_init_msg_list is set to TRUE.

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

3151: end if;
3152: end if;
3153:
3154: -- initialize message list if p_init_msg_list is set to TRUE.
3155: if (FND_API.to_boolean(p_init_msg_list)) then
3156: -- initialize error message stack.
3157: fa_srvr_msg.init_server_message;
3158:
3159: -- initialize debug message stack.

Line 3191: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3187: if not FA_UTIL_PVT.get_asset_retire_rec
3188: (px_asset_retire_rec => l_asset_retire_rec,
3189: p_mrc_sob_type_code => 'P'
3190: ,p_log_level_rec => g_log_level_rec) then
3191: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3192: end if;
3193:
3194: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
3195: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 3202: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3198: (p_asset_hdr_rec => l_asset_hdr_rec
3199: ,px_asset_type_rec => l_asset_type_rec
3200: ,p_date_effective => NULL
3201: ,p_log_level_rec => g_log_level_rec) then
3202: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3203: end if;
3204:
3205: if l_asset_hdr_rec.book_type_code is not null then
3206:

Line 3210: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3206:
3207: -- call the cache for the primary transaction book
3208: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
3209: ,p_log_level_rec => g_log_level_rec) then
3210: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3211: end if;
3212:
3213: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
3214: lv_asset_hdr_rec := l_asset_hdr_rec;

Line 3222: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3218: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
3219: ,x_mrc_sob_type_code => l_reporting_flag
3220: ,p_log_level_rec => g_log_level_rec)
3221: then
3222: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3223: end if;
3224:
3225: -- Error out if the program is submitted from the Reporting Responsibility
3226: -- No transaction permitted directly on reporting books.

Line 3230: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3226: -- No transaction permitted directly on reporting books.
3227: if l_reporting_flag = 'R' then
3228: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
3229: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
3230: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3231: end if;
3232:
3233:
3234: end if; -- book_type_code

Line 3266: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3262: ,p_inv_tbl => l_inv_tbl
3263: ,p_period_rec => l_period_rec
3264: ,p_calling_fn => p_calling_fn
3265: ,p_log_level_rec => g_log_level_rec) then
3266: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3267: end if;
3268:
3269:
3270: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_validation', '', g_log_level_rec); end if;

Line 3284: raise FND_API.G_EXC_ERROR;

3280: (p_trans_rec => l_trans_rec
3281: ,p_asset_hdr_rec => l_asset_hdr_rec
3282: ,px_asset_retire_rec => l_asset_retire_rec
3283: ,p_log_level_rec => g_log_level_rec) then
3284: raise FND_API.G_EXC_ERROR;
3285: end if;
3286:
3287: -- BUG# 2376085, 2487707
3288: -- reset GL sob id to original value before moving to next book

Line 3307: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3303: (x_corp_book => l_asset_hdr_rec.book_type_code
3304: ,x_asset_type => l_asset_type_rec.asset_type
3305: ,x_tax_book_tbl => l_tax_book_tbl
3306: ,p_log_level_rec => g_log_level_rec) then
3307: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3308: end if;
3309:
3310: for l_tax_index in 1..l_tax_book_tbl.count loop
3311:

Line 3324: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3320: else
3321:
3322: -- cache the book information for the tax book
3323: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index)) then
3324: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3325: end if;
3326:
3327: lv_trans_rec.transaction_header_id := null;
3328: lv_asset_retire_rec := null;

Line 3343: raise FND_API.G_EXC_ERROR;

3339: (p_trans_rec => lv_trans_rec -- tax
3340: ,p_asset_hdr_rec => lv_asset_hdr_rec -- tax
3341: ,px_asset_retire_rec => lv_asset_retire_rec -- tax
3342: ,p_log_level_rec => g_log_level_rec) then
3343: raise FND_API.G_EXC_ERROR;
3344: end if;
3345:
3346: -- BUG# 2376085, 2487707
3347: -- reset GL sob id to original value before moving to next book

Line 3362: if FND_API.to_boolean(p_commit) then

3358: end if; -- book_class
3359:
3360:
3361: -- commit if p_commit is TRUE.
3362: if FND_API.to_boolean(p_commit) then
3363: COMMIT WORK;
3364: end if;
3365:
3366: -- Standard call to get message count and if count is 1 get message info.

Line 3376: x_return_status := FND_API.G_RET_STS_SUCCESS;

3372: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
3373: fnd_client_info.set_currency_context (g_orig_currency_context);
3374:
3375: -- return the status.
3376: x_return_status := FND_API.G_RET_STS_SUCCESS;
3377:
3378: EXCEPTION
3379:
3380: when FND_API.G_EXC_ERROR then

Line 3380: when FND_API.G_EXC_ERROR then

3376: x_return_status := FND_API.G_RET_STS_SUCCESS;
3377:
3378: EXCEPTION
3379:
3380: when FND_API.G_EXC_ERROR then
3381:
3382: ROLLBACK TO undo_retirement;
3383:
3384: x_return_status := FND_API.G_RET_STS_ERROR;

Line 3384: x_return_status := FND_API.G_RET_STS_ERROR;

3380: when FND_API.G_EXC_ERROR then
3381:
3382: ROLLBACK TO undo_retirement;
3383:
3384: x_return_status := FND_API.G_RET_STS_ERROR;
3385:
3386: if g_token1 is null then
3387: fa_srvr_msg.add_message(calling_fn => l_calling_fn
3388: ,name => g_msg_name

Line 3405: when FND_API.G_EXC_UNEXPECTED_ERROR then

3401: -- set back to original environment when the procedure is finished
3402: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
3403: fnd_client_info.set_currency_context (g_orig_currency_context);
3404:
3405: when FND_API.G_EXC_UNEXPECTED_ERROR then
3406:
3407: ROLLBACK TO undo_retirement;
3408:
3409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 3409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3405: when FND_API.G_EXC_UNEXPECTED_ERROR then
3406:
3407: ROLLBACK TO undo_retirement;
3408:
3409: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3410:
3411: fa_srvr_msg.add_message(calling_fn => l_calling_fn
3412: ,p_log_level_rec => g_log_level_rec);
3413: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 3424: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3420: when others then
3421:
3422: ROLLBACK TO undo_retirement;
3423:
3424: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3425:
3426: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
3427: ,p_log_level_rec => g_log_level_rec);
3428: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 3501: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3497: if not FA_UTIL_PVT.get_asset_retire_rec
3498: (px_asset_retire_rec => l_asset_retire_rec,
3499: p_mrc_sob_type_code => 'P'
3500: ,p_log_level_rec => p_log_level_rec) then
3501: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3502: end if;
3503:
3504: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
3505: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 3510: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3506:
3507: -- call the cache for the primary transaction book
3508: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
3509: ,p_log_level_rec => p_log_level_rec) then
3510: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3511: end if;
3512:
3513: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
3514:

Line 3527: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3523: (p_book => l_asset_hdr_rec.book_type_code
3524: ,p_effective_date => NULL
3525: ,x_period_rec => l_period_rec
3526: ,p_log_level_rec => p_log_level_rec) then
3527: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3528: end if;
3529:
3530: -- ***************************************************
3531: -- ** Do asset/book-level validation on transaction

Line 3549: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3545: p_transaction_header_id => l_asset_retire_rec.detail_info.transaction_header_id_in,
3546: p_book_type_code => l_asset_hdr_rec.book_type_code,
3547: p_calling_fn => 'fa_retirement_pub.undo_all_books_retirement'
3548: ,p_log_level_rec => p_log_level_rec) then
3549: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3550: end if;
3551:
3552:
3553: -- ***************************

Line 3566: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3562: ,p_asset_hdr_rec => l_asset_hdr_rec
3563: ,px_asset_retire_rec => l_asset_retire_rec
3564: ,p_mrc_sob_type_code => 'P'
3565: ,p_log_level_rec => p_log_level_rec) then
3566: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3567: end if;
3568:
3569: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
3570: ,p_log_level_rec => p_log_level_rec) then

Line 3605: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3601: ,p_asset_hdr_rec => l_asset_hdr_rec
3602: ,px_asset_retire_rec => l_asset_retire_rec
3603: ,p_mrc_sob_type_code => 'R'
3604: ,p_log_level_rec => p_log_level_rec) then
3605: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3606: end if;
3607:
3608:
3609: end loop;

Line 3726: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3722: if not FA_UTIL_PVT.get_asset_retire_rec
3723: (px_asset_retire_rec => l_asset_retire_rec,
3724: p_mrc_sob_type_code => p_mrc_sob_type_code
3725: ,p_log_level_rec => p_log_level_rec) then
3726: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3727: end if;
3728:
3729: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
3730: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 3738: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3734: if not FA_UTIL_PVT.get_asset_desc_rec
3735: (p_asset_hdr_rec => l_asset_hdr_rec
3736: ,px_asset_desc_rec => l_asset_desc_rec
3737: ,p_log_level_rec => p_log_level_rec) then
3738: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3739: end if;
3740:
3741: -- pop asset_fin_rec
3742: -- get fa_books row where transaction_header_id_out is null

Line 3750: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3746: ,px_asset_fin_rec => l_asset_fin_rec
3747: ,p_transaction_header_id => NULL
3748: ,p_mrc_sob_type_code => p_mrc_sob_type_code
3749: ,p_log_level_rec => p_log_level_rec) then
3750: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3751: end if;
3752:
3753: if g_log_level_rec.statement_level then
3754: fa_debug_pkg.add(l_calling_fn, 'after pop asset_fin_rec', '', p_log_level_rec);

Line 3814: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3810: p_set_of_books_id => l_asset_hdr_rec.set_of_books_id,
3811: p_mrc_sob_type_code => p_mrc_sob_type_code,
3812: p_calling_fn => l_calling_fn
3813: ,p_log_level_rec => p_log_level_rec) then
3814: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3815: end if;
3816: end if;
3817: /*** End of uptake ***/
3818:

Line 3838: raise FND_API.G_EXC_UNEXPECTED_ERROR;

3834: ,x_current_units => l_old_units
3835: ) then
3836: g_msg_name := null;
3837: g_token1 := null;
3838: raise FND_API.G_EXC_UNEXPECTED_ERROR;
3839: end if; */
3840:
3841: --bug 5489382
3842: OPEN get_units_before_ret(l_asset_retire_rec.detail_info.transaction_header_id_in,

Line 4110: when FND_API.G_EXC_UNEXPECTED_ERROR then

4106: EXCEPTION
4107: /*
4108: * Added for Group Asset uptake
4109: */
4110: when FND_API.G_EXC_UNEXPECTED_ERROR then
4111: -- Make sure to close curosr opened for source line retirement
4112: if c_inv_trx_id%ISOPEN then
4113: CLOSE c_inv_trx_id;
4114: end if;

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

4149: -- asset_id/book parameter.
4150:
4151: PROCEDURE do_reinstatement
4152: (p_api_version in NUMBER
4153: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
4154: ,p_commit in VARCHAR2 := FND_API.G_FALSE
4155: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
4156: ,p_calling_fn in VARCHAR2
4157: ,x_return_status out NOCOPY VARCHAR2

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

4150:
4151: PROCEDURE do_reinstatement
4152: (p_api_version in NUMBER
4153: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
4154: ,p_commit in VARCHAR2 := FND_API.G_FALSE
4155: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
4156: ,p_calling_fn in VARCHAR2
4157: ,x_return_status out NOCOPY VARCHAR2
4158: ,x_msg_count out NOCOPY NUMBER

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

4151: PROCEDURE do_reinstatement
4152: (p_api_version in NUMBER
4153: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
4154: ,p_commit in VARCHAR2 := FND_API.G_FALSE
4155: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
4156: ,p_calling_fn in VARCHAR2
4157: ,x_return_status out NOCOPY VARCHAR2
4158: ,x_msg_count out NOCOPY NUMBER
4159: ,x_msg_data out NOCOPY VARCHAR2

Line 4229: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4225: if (not g_log_level_rec.initialized) then
4226: if (NOT fa_util_pub.get_log_level_rec (
4227: x_log_level_rec => g_log_level_rec
4228: )) then
4229: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4230: end if;
4231: end if;
4232:
4233: -- initialize message list if p_init_msg_list is set to TRUE.

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

4230: end if;
4231: end if;
4232:
4233: -- initialize message list if p_init_msg_list is set to TRUE.
4234: if (FND_API.to_boolean(p_init_msg_list)) then
4235: -- initialize error message stack.
4236: fa_srvr_msg.init_server_message;
4237:
4238: -- initialize debug message stack.

Line 4265: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4261: if not FA_UTIL_PVT.get_asset_retire_rec
4262: (px_asset_retire_rec => l_asset_retire_rec,
4263: p_mrc_sob_type_code => 'P'
4264: ,p_log_level_rec => g_log_level_rec) then
4265: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4266: end if;
4267:
4268: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
4269: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 4295: raise FND_API.G_EXC_ERROR;

4291: ,p_log_level_rec => g_log_level_rec);
4292: if not l_ins_status then
4293: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'failed in FA_TRX_APPROVAL_PKG.faxcat', '', g_log_level_rec); end if;
4294: -- g_msg_name := 'error msg name-after trx_app';
4295: raise FND_API.G_EXC_ERROR;
4296: end if;
4297: -- ***********************************
4298: -- ** Call the cache for book
4299: -- ** and do initial MRC validation

Line 4310: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4306:
4307: -- call the cache for the primary transaction book
4308: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
4309: ,p_log_level_rec => g_log_level_rec) then
4310: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4311: end if;
4312:
4313: -- l_book_class := fa_cache_pkg.fazcbc_record.book_class;
4314: -- l_set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;

Line 4335: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4331: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
4332: ,x_mrc_sob_type_code => l_reporting_flag
4333: ,p_log_level_rec => g_log_level_rec)
4334: then
4335: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4336: end if;
4337:
4338: -- Error out if the program is submitted from the Reporting Responsibility
4339: -- No transaction permitted directly on reporting books.

Line 4343: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4339: -- No transaction permitted directly on reporting books.
4340: if l_reporting_flag = 'R' then
4341: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
4342: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
4343: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4344: end if;
4345:
4346:
4347: end if; -- book_type_code

Line 4359: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4355: (p_book => l_asset_hdr_rec.book_type_code
4356: ,p_effective_date => NULL
4357: ,x_period_rec => l_period_rec
4358: ,p_log_level_rec => g_log_level_rec) then
4359: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4360: end if;
4361:
4362: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'passed pop period_rec', '', g_log_level_rec); end if;
4363:

Line 4371: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4367: (p_asset_hdr_rec => l_asset_hdr_rec
4368: ,px_asset_type_rec => l_asset_type_rec
4369: ,p_date_effective => NULL
4370: ,p_log_level_rec => g_log_level_rec) then
4371: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4372: end if;
4373:
4374: -- **********************************************
4375: -- ** Do asset-level validation on transaction

Line 4421: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4417: ,p_inv_tbl => l_inv_tbl
4418: ,p_period_rec => l_period_rec
4419: ,p_calling_fn => p_calling_fn
4420: ,p_log_level_rec => g_log_level_rec) then
4421: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4422: end if;
4423:
4424: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after validation', '', g_log_level_rec); end if;
4425:

Line 4442: raise FND_API.G_EXC_ERROR;

4438: ,p_subcomp_tbl => l_subcomp_tbl
4439: ,p_inv_tbl => l_inv_tbl
4440: ,p_period_rec => l_period_rec
4441: ,p_log_level_rec => g_log_level_rec) then
4442: raise FND_API.G_EXC_ERROR;
4443: end if;
4444:
4445: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'after do_all_books_reinstatement', '', g_log_level_rec); end if;
4446:

Line 4473: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4469: (x_corp_book => l_asset_hdr_rec.book_type_code
4470: ,x_asset_type => l_asset_type_rec.asset_type
4471: ,x_tax_book_tbl => l_tax_book_tbl
4472: ,p_log_level_rec => g_log_level_rec) then
4473: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4474: end if;
4475:
4476: for l_tax_index in 1..l_tax_book_tbl.count loop
4477:

Line 4496: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4492: else
4493:
4494: -- cache the book information for the tax book
4495: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index)) then
4496: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4497: end if;
4498:
4499: -- ? Excerpt from Brad's comment on this part - need more investigation:
4500: -- 'May need to set the transaction date, trx_type, subtype here as well

Line 4530: raise FND_API.G_EXC_ERROR;

4526: ,p_subcomp_tbl => l_subcomp_tbl
4527: ,p_inv_tbl => l_inv_tbl
4528: ,p_period_rec => l_period_rec
4529: ,p_log_level_rec => g_log_level_rec) then
4530: raise FND_API.G_EXC_ERROR;
4531: end if;
4532:
4533:
4534: -- BUG# 2376085, 2487707

Line 4551: if l_calculate_gain_loss_flag = FND_API.G_TRUE then

4547: end if; -- book_class
4548:
4549: -- submit calculate_gain_loss programs if flag is set
4550:
4551: if l_calculate_gain_loss_flag = FND_API.G_TRUE then
4552:
4553: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'submit calculate gain/loss program', '', g_log_level_rec); end if;
4554: if not calculate_gain_loss
4555: (p_retirement_id => l_retirement_id

Line 4558: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4554: if not calculate_gain_loss
4555: (p_retirement_id => l_retirement_id
4556: ,p_mrc_sob_type_code => 'P'
4557: ,p_log_level_rec => g_log_level_rec) then
4558: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4559: end if;
4560:
4561: end if;
4562:

Line 4564: if FND_API.to_boolean(p_commit) then

4560:
4561: end if;
4562:
4563: -- commit if p_commit is TRUE.
4564: if FND_API.to_boolean(p_commit) then
4565: COMMIT WORK;
4566: end if;
4567:
4568: -- Standard call to get message count and if count is 1 get message info.

Line 4578: x_return_status := FND_API.G_RET_STS_SUCCESS;

4574: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
4575: fnd_client_info.set_currency_context (g_orig_currency_context);
4576:
4577: -- return the status.
4578: x_return_status := FND_API.G_RET_STS_SUCCESS;
4579:
4580: EXCEPTION
4581:
4582: when FND_API.G_EXC_ERROR then

Line 4582: when FND_API.G_EXC_ERROR then

4578: x_return_status := FND_API.G_RET_STS_SUCCESS;
4579:
4580: EXCEPTION
4581:
4582: when FND_API.G_EXC_ERROR then
4583:
4584: ROLLBACK TO do_reinstatement;
4585:
4586: x_return_status := FND_API.G_RET_STS_ERROR;

Line 4586: x_return_status := FND_API.G_RET_STS_ERROR;

4582: when FND_API.G_EXC_ERROR then
4583:
4584: ROLLBACK TO do_reinstatement;
4585:
4586: x_return_status := FND_API.G_RET_STS_ERROR;
4587:
4588: if g_token1 is null then
4589: fa_srvr_msg.add_message(calling_fn => l_calling_fn
4590: ,name => g_msg_name

Line 4607: when FND_API.G_EXC_UNEXPECTED_ERROR then

4603: -- set back to original environment when the procedure is finished
4604: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
4605: fnd_client_info.set_currency_context (g_orig_currency_context);
4606:
4607: when FND_API.G_EXC_UNEXPECTED_ERROR then
4608:
4609: ROLLBACK TO do_reinstatement;
4610:
4611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 4611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

4607: when FND_API.G_EXC_UNEXPECTED_ERROR then
4608:
4609: ROLLBACK TO do_reinstatement;
4610:
4611: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4612:
4613: fa_srvr_msg.add_message(calling_fn => l_calling_fn
4614: ,p_log_level_rec => g_log_level_rec);
4615: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 4626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

4622: when others then
4623:
4624: ROLLBACK TO do_reinstatement;
4625:
4626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4627:
4628: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
4629: ,p_log_level_rec => g_log_level_rec);
4630: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 4719: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4715:
4716: -- call the cache for the primary transaction book
4717: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
4718: ,p_log_level_rec => p_log_level_rec) then
4719: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4720: end if;
4721:
4722: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
4723:

Line 4735: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4731: (p_book => l_asset_hdr_rec.book_type_code
4732: ,p_effective_date => NULL
4733: ,x_period_rec => l_period_rec
4734: ,p_log_level_rec => p_log_level_rec) then
4735: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4736: end if;
4737:
4738: -- ***************************************************
4739: -- ** Do asset/book-level validation on transaction

Line 4754: raise FND_API.G_EXC_ERROR;

4750: ,p_book => l_asset_hdr_rec.book_type_code
4751: ,p_log_level_rec => p_log_level_rec) then
4752: -- Users must post their mass additions before they can retire the asset
4753: g_msg_name := 'FA_RET_CANT_RET_INCOMPLETE_ASS';
4754: raise FND_API.G_EXC_ERROR;
4755: end if;
4756:
4757: -- check if another retirement/reinstatement already pending
4758: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check if another retirement/reinstatement already pending', '', p_log_level_rec); end if;

Line 4764: raise FND_API.G_EXC_ERROR;

4760: (p_asset_id => l_asset_hdr_rec.asset_id
4761: ,p_book => l_asset_hdr_rec.book_type_code
4762: ,p_log_level_rec => p_log_level_rec) then
4763: g_msg_name := 'FA_SHARED_PENDING_RETIREMENT';
4764: raise FND_API.G_EXC_ERROR;
4765: end if;
4766:
4767: -- check if date_retired is valid in terms of trx date
4768: if g_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); end if;

Line 4779: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4775: ,p_asset_id => l_asset_hdr_rec.asset_id
4776: ,p_book => l_asset_hdr_rec.book_type_code
4777: ,x_latest_trans_date => l_latest_trans_date
4778: ,p_log_level_rec => p_log_level_rec) then
4779: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4780: end if;
4781:
4782: -- Bug3130595
4783: -- Removing following check since we need to allow reinstatement

Line 4788: -- raise FND_API.G_EXC_ERROR;

4784: -- of retirement even there are another trx in between ret and reinstatement
4785: --
4786: --if l_asset_retire_rec.date_retired < l_latest_trans_date then
4787: -- g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
4788: -- raise FND_API.G_EXC_ERROR;
4789: --end if;
4790:
4791: end if; -- date_retired
4792:

Line 4822: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4818: ,p_period_rec => l_period_rec
4819: ,p_rate => l_rate
4820: ,p_mrc_sob_type_code => 'P'
4821: ,p_log_level_rec => p_log_level_rec) then
4822: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4823: end if;
4824:
4825:
4826: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code

Line 4916: raise FND_API.G_EXC_UNEXPECTED_ERROR;

4912: ,p_period_rec => l_period_rec
4913: ,p_rate => l_rate
4914: ,p_mrc_sob_type_code => 'R'
4915: ,p_log_level_rec => p_log_level_rec) then
4916: raise FND_API.G_EXC_UNEXPECTED_ERROR;
4917: end if;
4918:
4919: -- ? may need to call MC_FA_UTILITIES_PKG.insert_books_rates procedure
4920: -- to process invoice trx

Line 5026: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5022: ,px_asset_fin_rec => l_asset_fin_rec
5023: ,p_transaction_header_id => NULL
5024: ,p_mrc_sob_type_code => p_mrc_sob_type_code
5025: ,p_log_level_rec => p_log_level_rec) then
5026: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5027: end if;
5028:
5029: -- pop asset_retire_rec
5030: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_retire_rec', '', p_log_level_rec); end if;

Line 5035: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5031: if not FA_UTIL_PVT.get_asset_retire_rec
5032: (px_asset_retire_rec => l_asset_retire_rec,
5033: p_mrc_sob_type_code => p_mrc_sob_type_code
5034: ,p_log_level_rec => p_log_level_rec) then
5035: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5036: end if;
5037:
5038: -- pop asset_cat_rec
5039: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'pop asset_cat_rec', '', p_log_level_rec); end if;

Line 5045: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5041: (p_asset_hdr_rec => l_asset_hdr_rec
5042: ,px_asset_cat_rec => l_asset_cat_rec
5043: ,p_date_effective => NULL
5044: ,p_log_level_rec => p_log_level_rec) then
5045: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5046: end if;
5047:
5048: -- ***************************
5049: -- ** Do basic calculation

Line 5070: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5066: ,p_inv_tbl => l_inv_tbl
5067: ,p_period_rec => l_period_rec
5068: ,p_mrc_sob_type_code => p_mrc_sob_type_code
5069: ,p_log_level_rec => p_log_level_rec) then
5070: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5071: end if;
5072:
5073: /*************************************************************
5074: * Partial unit reinstatement will be handled

Line 5135: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5131: ,px_asset_hdr_rec => l_asset_hdr_rec
5132: ,px_asset_cat_rec_new => l_asset_cat_rec
5133: ,px_asset_dist_tbl => l_asset_dist_tbl
5134: ,p_log_level_rec => p_log_level_rec) then
5135: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5136: end if;
5137:
5138: end if;
5139: ********************************/

Line 5161: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5157: p_period_rec => l_period_rec,
5158: p_mrc_sob_type_code => p_mrc_sob_type_code,
5159: p_calling_fn => l_calling_fn
5160: ,p_log_level_rec => p_log_level_rec) then
5161: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5162: end if;
5163:
5164: end if;
5165:

Line 5333: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5329: px_trans_rec => l_trans_rec,
5330: p_event_status => l_event_status,
5331: p_calling_fn => 'FA_RETIREMENT_PUB.do_sub_regular_reinstatement',
5332: p_log_level_rec => p_log_level_rec) then
5333: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5334: end if;
5335:
5336: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'do fa_transaction_headers_pkg.insert_row', '', p_log_level_rec); end if;
5337:

Line 5477: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5473: p_inv_tbl => l_inv_tbl,
5474: p_rowid => l_rowid,
5475: p_calling_fn => l_calling_fn
5476: ,p_log_level_rec => p_log_level_rec) then
5477: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5478: end if;
5479:
5480: end if; -- (l_invoice_transaction_id is not null)
5481:

Line 5488: when FND_API.G_EXC_UNEXPECTED_ERROR then

5484: EXCEPTION
5485: /*
5486: * Added for Group Asset uptake
5487: */
5488: when FND_API.G_EXC_UNEXPECTED_ERROR then
5489: -- Make sure to close curosr opened for source line retirement
5490: if c_inv_trx_id%ISOPEN then
5491: CLOSE c_inv_trx_id;
5492: end if;

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

5523: -- 1. delete into TH
5524: -- 2. update RET
5525: PROCEDURE undo_reinstatement
5526: (p_api_version in NUMBER
5527: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
5528: ,p_commit in VARCHAR2 := FND_API.G_FALSE
5529: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
5530: ,p_calling_fn in VARCHAR2
5531: ,x_return_status out NOCOPY VARCHAR2

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

5524: -- 2. update RET
5525: PROCEDURE undo_reinstatement
5526: (p_api_version in NUMBER
5527: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
5528: ,p_commit in VARCHAR2 := FND_API.G_FALSE
5529: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
5530: ,p_calling_fn in VARCHAR2
5531: ,x_return_status out NOCOPY VARCHAR2
5532: ,x_msg_count out NOCOPY NUMBER

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

5525: PROCEDURE undo_reinstatement
5526: (p_api_version in NUMBER
5527: ,p_init_msg_list in VARCHAR2 := FND_API.G_FALSE
5528: ,p_commit in VARCHAR2 := FND_API.G_FALSE
5529: ,p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL
5530: ,p_calling_fn in VARCHAR2
5531: ,x_return_status out NOCOPY VARCHAR2
5532: ,x_msg_count out NOCOPY NUMBER
5533: ,x_msg_data out NOCOPY VARCHAR2

Line 5577: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5573: if (not g_log_level_rec.initialized) then
5574: if (NOT fa_util_pub.get_log_level_rec (
5575: x_log_level_rec => g_log_level_rec
5576: )) then
5577: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5578: end if;
5579: end if;
5580:
5581: -- initialize message list if p_init_msg_list is set to TRUE.

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

5578: end if;
5579: end if;
5580:
5581: -- initialize message list if p_init_msg_list is set to TRUE.
5582: if (FND_API.to_boolean(p_init_msg_list)) then
5583: -- initialize error message stack.
5584: fa_srvr_msg.init_server_message;
5585:
5586: -- initialize debug message stack.

Line 5609: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5605: if not FA_UTIL_PVT.get_asset_retire_rec
5606: (px_asset_retire_rec => l_asset_retire_rec,
5607: p_mrc_sob_type_code => 'P'
5608: ,p_log_level_rec => g_log_level_rec) then
5609: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5610: end if;
5611:
5612: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
5613: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 5620: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5616: (p_asset_hdr_rec => l_asset_hdr_rec
5617: ,px_asset_type_rec => l_asset_type_rec
5618: ,p_date_effective => NULL
5619: ,p_log_level_rec => g_log_level_rec) then
5620: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5621: end if;
5622:
5623: if l_asset_hdr_rec.book_type_code is not null then
5624:

Line 5631: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5627:
5628: -- call the cache for the primary transaction book
5629: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
5630: ,p_log_level_rec => g_log_level_rec) then
5631: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5632: end if;
5633:
5634: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
5635: lv_asset_hdr_rec := l_asset_hdr_rec;

Line 5652: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5648: (x_set_of_books_id => l_asset_hdr_rec.set_of_books_id
5649: ,x_mrc_sob_type_code => l_reporting_flag
5650: ,p_log_level_rec => g_log_level_rec)
5651: then
5652: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5653: end if;
5654:
5655: -- Error out if the program is submitted from the Reporting Responsibility
5656: -- No transaction permitted directly on reporting books.

Line 5660: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5656: -- No transaction permitted directly on reporting books.
5657: if l_reporting_flag = 'R' then
5658: FND_MESSAGE.set_name('GL','MRC_OSP_INVALID_BOOK_TYPE');
5659: FND_FILE.PUT_LINE(fnd_file.log,fnd_message.get);
5660: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5661: end if;
5662:
5663:
5664: end if; -- book_type_code

Line 5695: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5691: ,p_inv_tbl => l_inv_tbl
5692: ,p_period_rec => l_period_rec
5693: ,p_calling_fn => p_calling_fn
5694: ,p_log_level_rec => g_log_level_rec) then
5695: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5696: end if;
5697:
5698: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'end do_validation', '', g_log_level_rec); end if;
5699:

Line 5705: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5701: (p_trans_rec => l_trans_rec
5702: ,p_asset_hdr_rec => l_asset_hdr_rec
5703: ,px_asset_retire_rec => l_asset_retire_rec
5704: ,p_log_level_rec => g_log_level_rec) then
5705: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5706: end if;
5707:
5708: -- BUG# 2376085, 2487707
5709: -- reset GL sob id to original value before moving to next book

Line 5730: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5726: (x_corp_book => l_asset_hdr_rec.book_type_code
5727: ,x_asset_type => l_asset_type_rec.asset_type
5728: ,x_tax_book_tbl => l_tax_book_tbl
5729: ,p_log_level_rec => g_log_level_rec) then
5730: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5731: end if;
5732:
5733: for l_tax_index in 1..l_tax_book_tbl.count loop
5734:

Line 5752: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5748: else
5749:
5750: -- cache the book information for the tax book
5751: if not fa_cache_pkg.fazcbc(x_book => l_tax_book_tbl(l_tax_index)) then
5752: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5753: end if;
5754:
5755: lv_trans_rec.transaction_header_id := null;
5756: lv_asset_retire_rec := null;

Line 5773: raise FND_API.G_EXC_ERROR;

5769: (p_trans_rec => lv_trans_rec -- tax
5770: ,p_asset_hdr_rec => lv_asset_hdr_rec -- tax
5771: ,px_asset_retire_rec => lv_asset_retire_rec -- tax
5772: ,p_log_level_rec => g_log_level_rec) then
5773: raise FND_API.G_EXC_ERROR;
5774: end if;
5775:
5776: -- BUG# 2376085, 2487707
5777: -- reset GL sob id to original value before moving to next book

Line 5792: if FND_API.to_boolean(p_commit) then

5788: end if; -- book_class
5789:
5790:
5791: -- commit if p_commit is TRUE.
5792: if FND_API.to_boolean(p_commit) then
5793: COMMIT WORK;
5794: end if;
5795:
5796: -- Standard call to get message count and if count is 1 get message info.

Line 5806: x_return_status := FND_API.G_RET_STS_SUCCESS;

5802: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
5803: fnd_client_info.set_currency_context (g_orig_currency_context);
5804:
5805: -- return the status.
5806: x_return_status := FND_API.G_RET_STS_SUCCESS;
5807:
5808: EXCEPTION
5809:
5810: when FND_API.G_EXC_ERROR then

Line 5810: when FND_API.G_EXC_ERROR then

5806: x_return_status := FND_API.G_RET_STS_SUCCESS;
5807:
5808: EXCEPTION
5809:
5810: when FND_API.G_EXC_ERROR then
5811:
5812: ROLLBACK TO undo_reinstatement;
5813:
5814: x_return_status := FND_API.G_RET_STS_ERROR;

Line 5814: x_return_status := FND_API.G_RET_STS_ERROR;

5810: when FND_API.G_EXC_ERROR then
5811:
5812: ROLLBACK TO undo_reinstatement;
5813:
5814: x_return_status := FND_API.G_RET_STS_ERROR;
5815:
5816: if g_token1 is null then
5817: fa_srvr_msg.add_message(calling_fn => l_calling_fn
5818: ,name => g_msg_name

Line 5835: when FND_API.G_EXC_UNEXPECTED_ERROR then

5831: -- set back to original environment when the procedure is finished
5832: fnd_profile.put('GL_SET_OF_BKS_ID', g_orig_set_of_books_id);
5833: fnd_client_info.set_currency_context (g_orig_currency_context);
5834:
5835: when FND_API.G_EXC_UNEXPECTED_ERROR then
5836:
5837: ROLLBACK TO undo_reinstatement;
5838:
5839: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 5839: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

5835: when FND_API.G_EXC_UNEXPECTED_ERROR then
5836:
5837: ROLLBACK TO undo_reinstatement;
5838:
5839: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5840:
5841: fa_srvr_msg.add_message(calling_fn => l_calling_fn
5842: ,p_log_level_rec => g_log_level_rec);
5843: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 5854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

5850: when others then
5851:
5852: ROLLBACK TO undo_reinstatement;
5853:
5854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5855:
5856: fa_srvr_msg.add_sql_error(calling_fn => l_calling_fn
5857: ,p_log_level_rec => g_log_level_rec);
5858: FND_MSG_PUB.count_and_get(p_count => x_msg_count

Line 5928: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5924: if not FA_UTIL_PVT.get_asset_retire_rec
5925: (px_asset_retire_rec => l_asset_retire_rec,
5926: p_mrc_sob_type_code => 'P'
5927: ,p_log_level_rec => p_log_level_rec) then
5928: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5929: end if;
5930:
5931: l_asset_hdr_rec.asset_id := l_asset_retire_rec.detail_info.asset_id;
5932: l_asset_hdr_rec.book_type_code := l_asset_retire_rec.detail_info.book_type_code;

Line 5937: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5933:
5934: -- call the cache for the primary transaction book
5935: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
5936: ,p_log_level_rec => p_log_level_rec) then
5937: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5938: end if;
5939:
5940: l_asset_hdr_rec.set_of_books_id := fa_cache_pkg.fazcbc_record.set_of_books_id;
5941:

Line 5953: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5949: (p_book => l_asset_hdr_rec.book_type_code
5950: ,p_effective_date => NULL
5951: ,x_period_rec => l_period_rec
5952: ,p_log_level_rec => p_log_level_rec) then
5953: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5954: end if;
5955:
5956: -- ***************************************************
5957: -- ** Do asset/book-level validation on transaction

Line 5975: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5971: p_transaction_header_id => l_asset_retire_rec.detail_info.transaction_header_id_out,
5972: p_book_type_code => l_asset_hdr_rec.book_type_code,
5973: p_calling_fn => 'fa_retirement_pub.undo_all_books_reinstatement'
5974: ,p_log_level_rec => p_log_level_rec) then
5975: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5976: end if;
5977:
5978: -- ***************************
5979: -- ** Main

Line 5991: raise FND_API.G_EXC_UNEXPECTED_ERROR;

5987: ,p_asset_hdr_rec => l_asset_hdr_rec
5988: ,px_asset_retire_rec => l_asset_retire_rec
5989: ,p_mrc_sob_type_code => 'P'
5990: ,p_log_level_rec => p_log_level_rec) then
5991: raise FND_API.G_EXC_UNEXPECTED_ERROR;
5992: end if;
5993:
5994: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
5995: ,p_log_level_rec => p_log_level_rec) then

Line 6029: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6025: ,p_asset_hdr_rec => l_asset_hdr_rec
6026: ,px_asset_retire_rec => l_asset_retire_rec
6027: ,p_mrc_sob_type_code => 'R'
6028: ,p_log_level_rec => p_log_level_rec) then
6029: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6030: end if;
6031:
6032: end loop;
6033:

Line 6098: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6094: if not FA_UTIL_PVT.get_asset_retire_rec
6095: (px_asset_retire_rec => l_asset_retire_rec,
6096: p_mrc_sob_type_code => p_mrc_sob_type_code
6097: ,p_log_level_rec => p_log_level_rec) then
6098: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6099: end if;
6100:
6101: l_asset_retire_rec.status := 'PROCESSED';
6102:

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

6202: X_Status => l_asset_retire_rec.status,
6203: X_Last_Update_Date => l_trans_rec.who_info.last_update_date,
6204: X_Last_Updated_By => l_trans_rec.who_info.last_updated_by,
6205: X_Ret_Prorate_Convention => l_asset_retire_rec.retirement_prorate_convention,
6206: X_Transaction_Header_Id_Out => FND_API.G_MISS_NUM,--bug fix 4088953
6207: X_Units => l_asset_retire_rec.units_retired,
6208: X_Cost_Of_Removal => l_asset_retire_rec.cost_of_removal,
6209: X_Nbv_Retired => l_asset_retire_rec.detail_info.nbv_retired,
6210: X_Gain_Loss_Amount => l_asset_retire_rec.detail_info.gain_loss_amount,

Line 6259: when FND_API.G_EXC_UNEXPECTED_ERROR then

6255: EXCEPTION
6256: /*
6257: * Added for Group Asset uptake
6258: */
6259: when FND_API.G_EXC_UNEXPECTED_ERROR then
6260: -- Make sure to close curosr opened for source line retirement
6261: if c_inv_trx_id%ISOPEN then
6262: CLOSE c_inv_trx_id;
6263: end if;

Line 6385: raise FND_API.G_EXC_ERROR;

6381: -- msg_text: Invalid value for <>. <> is a required field.
6382: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6383: g_token1 := 'XMLTAG';
6384: g_value1 := 'ASSET_ID and BOOK_TYPE_CODE';
6385: raise FND_API.G_EXC_ERROR;
6386: end if;
6387: end if;
6388:
6389: -- check if asset is attached to hierarchy and see if it can

Line 6427: raise FND_API.G_EXC_ERROR;

6423: -- msg_text: Invalid value for <>. <> is a required field.
6424: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6425: g_token1 := 'XMLTAG';
6426: g_value1 := 'ASSET_ID/BOOK_TYPE_CODE or RETIREMENT_ID';
6427: raise FND_API.G_EXC_ERROR;
6428: end if;
6429: end if;
6430:
6431: -- check if retirement type exists in fa_lookups if it is provided

Line 6442: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6438: ,p_log_level_rec => p_log_level_rec) then
6439: g_msg_name := null;
6440: g_token1 := null;
6441: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: Retirement type is invalid', '', p_log_level_rec); end if;
6442: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6443: end if;
6444: end if;
6445: end if;
6446:

Line 6455: raise FND_API.G_EXC_ERROR;

6451: if g_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); end if;
6452: if l_asset_hdr_rec.asset_id=l_asset_retire_rec.trade_in_asset_id then
6453: g_msg_name := 'FA_RET_INVALID_TRADE_IN';
6454: g_token1 := null;
6455: raise FND_API.G_EXC_ERROR;
6456: end if;
6457:
6458: -- check if the trade-in asset exists in Oracle Assets
6459: if g_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); end if;

Line 6465: raise FND_API.G_EXC_ERROR;

6461: (p_asset_id => l_asset_hdr_rec.asset_id
6462: ,p_log_level_rec => p_log_level_rec) then
6463: g_msg_name := 'FA_RET_TRADE_IN_NONEXISTENT';
6464: g_token1 := null;
6465: raise FND_API.G_EXC_ERROR;
6466: end if;
6467:
6468: end if; -- trade-in asset
6469: end if; -- g_retirement

Line 6480: raise FND_API.G_EXC_ERROR;

6476: if g_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); end if;
6477: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6478: g_token1 := 'XMLTAG';
6479: g_value1 := 'UNITS_RETIRED or COST_RETIRED';
6480: raise FND_API.G_EXC_ERROR;
6481: end if;
6482: end if;
6483:
6484: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'check units', '', p_log_level_rec); end if;

Line 6492: raise FND_API.G_EXC_ERROR;

6488: -- check to make sure that units_retired is positive
6489: if l_asset_retire_rec.units_retired < 0 then
6490: g_msg_name := 'FA_SHARED_GREATER_THAN_ZERO';
6491: g_token1 := null;
6492: raise FND_API.G_EXC_ERROR;
6493: end if;
6494:
6495: -- get the current units of the asset from fa_asset_history table
6496: if not FA_UTIL_PVT.get_current_units

Line 6503: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6499: ,x_current_units => l_asset_desc_rec.current_units
6500: ,p_log_level_rec => p_log_level_rec) then
6501: g_msg_name := null;
6502: g_token1 := null;
6503: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6504: end if;
6505:
6506: -- check if units_retired exceeds current units
6507: if l_asset_retire_rec.units_retired > l_asset_desc_rec.current_units then

Line 6510: raise FND_API.G_EXC_ERROR;

6506: -- check if units_retired exceeds current units
6507: if l_asset_retire_rec.units_retired > l_asset_desc_rec.current_units then
6508: g_msg_name := 'FA_RET_UNITS_TOO_BIG';
6509: g_token1 := null;
6510: raise FND_API.G_EXC_ERROR;
6511: end if;
6512:
6513: end if;
6514: end if;

Line 6532: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6528: p_mrc_sob_type_code => 'P'
6529: ,p_log_level_rec => p_log_level_rec) then
6530: g_msg_name := null;
6531: g_token1 := null;
6532: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6533: end if;
6534: -- At this point, lv_asset_retire_rec has the previous retirement info.
6535: end if;
6536:

Line 6552: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6548:
6549: -- call the cache for the transaction book
6550: if not fa_cache_pkg.fazcbc(x_book => l_asset_hdr_rec.book_type_code
6551: ,p_log_level_rec => p_log_level_rec) then
6552: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6553: end if;
6554:
6555: if g_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); end if;
6556: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'

Line 6563: raise FND_API.G_EXC_ERROR;

6559: -- we do not support this transaction
6560: if g_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); end if;
6561: g_msg_name := null;
6562: g_token1 := null;
6563: raise FND_API.G_EXC_ERROR;
6564:
6565: end if;
6566:
6567: elsif l_validation_type in (g_reinstatement

Line 6576: raise FND_API.G_EXC_UNEXPECTED_ERROR;

6572: if not fa_cache_pkg.fazcbc(x_book => lv_asset_retire_rec.detail_info.book_type_code
6573: ,p_log_level_rec => p_log_level_rec) then
6574: g_msg_name := null;
6575: g_token1 := null;
6576: raise FND_API.G_EXC_UNEXPECTED_ERROR;
6577: end if;
6578:
6579: if fa_cache_pkg.fazcbc_record.book_class = 'TAX'
6580: and l_asset_type_rec.asset_type = 'CIP' then

Line 6586: raise FND_API.G_EXC_ERROR;

6582: -- we do not support this transaction
6583: if g_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); end if;
6584: g_msg_name := null;
6585: g_token1 := null;
6586: raise FND_API.G_EXC_ERROR;
6587:
6588: end if;
6589:
6590: end if; -- check CIP on TAX

Line 6607: raise FND_API.G_EXC_ERROR;

6603: -- check to make sure that units_retired is negative
6604: if l_asset_retire_rec.units_retired > 0 then
6605: g_msg_name := 'FA_SHARED_LESS_THAN_ZERO'; -- ? may need to add to msg table
6606: g_token1 := null;
6607: raise FND_API.G_EXC_ERROR;
6608: end if;
6609:
6610: -- check to make sure that units_retired for reinstatement
6611: -- does not exceed the units_retired in retirement row.

Line 6616: raise FND_API.G_EXC_ERROR;

6612: if (-1 * l_asset_retire_rec.units_retired)
6613: > lv_asset_retire_rec.units_retired then
6614: g_msg_name := 'FA_RET_UNITS_TOO_BIG'; -- Is this correct message even for reinstatement ?
6615: g_token1 := null;
6616: raise FND_API.G_EXC_ERROR;
6617: end if;
6618:
6619: end if;
6620:

Line 6643: raise FND_API.G_EXC_ERROR;

6639:
6640: -- g_msg_name := 'VALUE_MUST_BE_POSITIVE_INT'; -- this must be generic enough to be also good for reinstatement since units_retired for reinstatement should be negative.
6641: g_msg_name := null;
6642: g_token1 := null;
6643: raise FND_API.G_EXC_ERROR;
6644: end if;
6645:
6646: -- check if distributions are valid
6647: if l_asset_dist_tbl.count >= 1 then

Line 6668: raise FND_API.G_EXC_ERROR;

6664: ,p_dist_id => l_asset_dist_tbl(i).distribution_id) then
6665: -- Error: Unable to get distribution information
6666: g_msg_name := 'FA_EXP_FETCH_DH';
6667: g_token1 := null;
6668: raise FND_API.G_EXC_ERROR;
6669: end if;
6670:
6671: else -- if dist is null
6672: -- error out since dist_id can not be null

Line 6676: raise FND_API.G_EXC_ERROR;

6672: -- error out since dist_id can not be null
6673: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6674: g_token1 := 'XMLTAG';
6675: g_value1 := 'DISTRIBUTION_ID';
6676: raise FND_API.G_EXC_ERROR;
6677: end if;
6678:
6679: end loop;
6680:

Line 6685: raise FND_API.G_EXC_ERROR;

6681: -- error out when the two values are not equal
6682: if (l_sum_units*-1) <> l_asset_retire_rec.units_retired then
6683: g_msg_name := 'FA_RET_UNIS_OUT_OF_BALANCE';
6684: g_token1 := null;
6685: raise FND_API.G_EXC_ERROR;
6686: end if;
6687:
6688: else
6689: -- error out: need at least one row in asset_dist_tbl type

Line 6694: raise FND_API.G_EXC_ERROR;

6690: -- if this is partial unit retirement
6691: g_msg_name := 'FA_API_SHARED_INVALID_NOTNULL';
6692: g_token1 := 'XMLTAG';
6693: g_value1 := 'ASSET_DIST_TBL_REC';
6694: raise FND_API.G_EXC_ERROR;
6695: end if;
6696:
6697: end if; -- units_retired
6698: end if; -- if g_ret or g_reinst

Line 6714: raise FND_API.G_EXC_ERROR;

6710: if l_asset_retire_rec.date_retired < l_period_rec.fy_start_date
6711: or l_asset_retire_rec.date_retired > l_period_rec.fy_end_date then
6712: g_msg_name := 'FA_RET_DATE_MUSTBE_IN_CUR_FY';
6713: g_token1 := null;
6714: raise FND_API.G_EXC_ERROR;
6715: end if;
6716:
6717: -- check if date_retired is a future date
6718: -- date_retired must not be in a future period

Line 6723: raise FND_API.G_EXC_ERROR;

6719: if l_asset_retire_rec.date_retired
6720: > l_period_rec.calendar_period_close_date then
6721: g_msg_name := 'FA_SHARED_CANNOT_FUTURE';
6722: g_token1 := null;
6723: raise FND_API.G_EXC_ERROR;
6724: end if;
6725:
6726: end if;
6727:

Line 6742: raise FND_API.G_EXC_ERROR;

6738: fa_debug_pkg.add(l_calling_fn, 'Error: You can not reinstate assets that were retired in previous fiscal year', '', p_log_level_rec);
6739: end if;
6740: g_msg_name := 'FA_RET_DATE_MUSTBE_IN_CUR_FY';
6741: g_token1 := null;
6742: raise FND_API.G_EXC_ERROR;
6743: end if;
6744:
6745: end if;
6746:

Line 6760: raise FND_API.G_EXC_ERROR;

6756: ,p_log_level_rec => p_log_level_rec) then
6757: g_msg_name := 'FA_RET_CANT_GET_RET_PRO_DATE';
6758: g_token1 := null;
6759:
6760: raise FND_API.G_EXC_ERROR;
6761: end if;
6762: end if;
6763:
6764: end if; -- date_retired/retirement_convention

Line 6781: raise FND_API.G_EXC_ERROR;

6777: CLOSE c_last_grp_reclass;
6778:
6779: if l_trx_date is not null then
6780: g_msg_name := 'FA_SHARED_OTHER_TRX_FOLLOW';
6781: raise FND_API.G_EXC_ERROR;
6782: end if;
6783:
6784: if p_period_rec.calendar_period_open_date
6785: > l_asset_retire_rec.date_retired then

Line 6787: raise FND_API.G_EXC_ERROR;

6783:
6784: if p_period_rec.calendar_period_open_date
6785: > l_asset_retire_rec.date_retired then
6786: g_msg_name := 'FA_NO_PRIOR_RET';
6787: raise FND_API.G_EXC_ERROR;
6788: end if;
6789:
6790: end if;
6791:

Line 6807: raise FND_API.G_EXC_ERROR;

6803: ,p_book => l_asset_hdr_rec.book_type_code
6804: ,p_log_level_rec => p_log_level_rec) then
6805: g_msg_name := 'FA_REC_RETIRED';
6806: g_token1 := null;
6807: raise FND_API.G_EXC_ERROR;
6808: end if;
6809:
6810: elsif l_validation_type = g_reinstatement then
6811:

Line 6816: raise FND_API.G_EXC_ERROR;

6812: if lv_asset_retire_rec.status <> 'PROCESSED' then
6813: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;
6814: g_msg_name := null;
6815: g_token1 := null;
6816: raise FND_API.G_EXC_ERROR;
6817: end if;
6818:
6819: SELECT nvl(max(transaction_header_id),0)
6820: INTO l_latest_ret_thid

Line 6831: raise FND_API.G_EXC_ERROR;

6827: if l_latest_ret_thid
6828: <> lv_asset_retire_rec.detail_info.transaction_header_id_in then
6829: g_msg_name := 'FA_CREATE_NOT_ALLOWED';
6830: g_token1 := null;
6831: raise FND_API.G_EXC_ERROR;
6832: end if;
6833:
6834: elsif l_validation_type = g_undo_retirement then
6835:

Line 6841: raise FND_API.G_EXC_ERROR;

6837: if lv_asset_retire_rec.status not in ('PENDING','PARTIAL') then
6838: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;
6839: g_msg_name := null;
6840: g_token1 := null;
6841: raise FND_API.G_EXC_ERROR;
6842: end if;
6843:
6844: /*---------------------------------------------------------------+
6845: | Bug 1577955. |

Line 6863: raise FND_API.G_EXC_ERROR;

6859: ,p_transaction_header_id_in => lv_asset_retire_rec.detail_info.transaction_header_id_in
6860: ,p_log_level_rec => p_log_level_rec) then
6861: g_msg_name := 'FA_RET_CORP_PENDING_RETIREMENT';
6862: g_token1 := null;
6863: raise FND_API.G_EXC_ERROR;
6864: end if;
6865:
6866: elsif l_validation_type = g_undo_reinstatement then
6867:

Line 6872: raise FND_API.G_EXC_ERROR;

6868: if lv_asset_retire_rec.status not in ('REINSTATE') then
6869: if g_log_level_rec.statement_level then fa_debug_pkg.add(l_calling_fn, 'Error: You can not perform this transaction.', '', p_log_level_rec); end if;
6870: g_msg_name := null;
6871: g_token1 := null;
6872: raise FND_API.G_EXC_ERROR;
6873: end if;
6874:
6875: end if;
6876:

Line 6901: when FND_API.G_EXC_ERROR then

6897: return TRUE;
6898:
6899: EXCEPTION
6900:
6901: when FND_API.G_EXC_ERROR then
6902:
6903: if g_token1 is null then
6904: fa_srvr_msg.add_message(calling_fn => l_calling_fn
6905: ,name => g_msg_name

Line 6917: when FND_API.G_EXC_UNEXPECTED_ERROR then

6913: end if;
6914:
6915: return FALSE;
6916:
6917: when FND_API.G_EXC_UNEXPECTED_ERROR then
6918:
6919: fa_srvr_msg.add_message(calling_fn => l_calling_fn
6920: ,p_log_level_rec => p_log_level_rec);
6921: return FALSE;

Line 7045: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7041: p_asset_hdr_rec => px_asset_hdr_rec,
7042: px_asset_cat_rec => l_asset_cat_rec,
7043: p_date_effective => NULL
7044: ,p_log_level_rec => p_log_level_rec) then
7045: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7046: end if;
7047:
7048: if not FA_UTIL_PVT.get_asset_type_rec (
7049: p_asset_hdr_rec => px_asset_hdr_rec,

Line 7053: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7049: p_asset_hdr_rec => px_asset_hdr_rec,
7050: px_asset_type_rec => l_asset_type_rec,
7051: p_date_effective => NULL
7052: ,p_log_level_rec => p_log_level_rec) then
7053: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7054: end if;
7055:
7056: l_trans_rec := px_trans_rec;
7057: l_asset_hdr_rec := px_asset_hdr_rec;

Line 7081: raise FND_API.G_EXC_UNEXPECTED_ERROR;

7077: if g_log_level_rec.statement_level then
7078: fa_debug_pkg.add(l_calling_fn, 'Error Calling FA_INVOICE_PVT.INVOICE_ENGINE', '', p_log_level_rec);
7079: fa_debug_pkg.add(l_calling_fn, 'SQLERRM: ', SQLERRM, p_log_level_rec);
7080: end if;
7081: raise FND_API.G_EXC_UNEXPECTED_ERROR;
7082: end if;
7083:
7084: FA_TRANSACTION_HEADERS_PKG.UPDATE_ROW(
7085: X_Rowid => p_rowid,