ORACLE EBS 价目表的导入功能-存储过程BUG
能模块:ERP价目表的批量导入
?
错误信息:
?
问题解决:
????? EBS在调用价目表批量导入功能(中文名---QP:成批导入价目表;英文名---)时,提示上图错误,调用的存储过程中包含:
????? QP_BULK_LOADER_PUB
????? qp_bulk_util
?
????? 问题出在qp_bulk_util中update_header对语言环境的查询,过程修改如下
procedure update_header(p_header_rec in out nocopy qp_bulk_loader_pub.header_rec_type) isbegin qp_bulk_loader_pub.write_log('Entering Update Header'); forall i in p_header_rec.list_header_id.first .. p_header_rec.list_header_id.last update qp_list_headers_b set last_update_date = sysdate, last_updated_by = fnd_global.user_id, last_update_login = fnd_global.conc_login_id, program_application_id = 661, program_id = null, program_update_date = null, request_id = p_header_rec.request_id(i), list_type_code = p_header_rec.list_type_code(i), start_date_active = fnd_date.canonical_to_date(p_header_rec.start_date_active(i)), end_date_active = fnd_date.canonical_to_date(p_header_rec.end_date_active(i)), automatic_flag = p_header_rec.automatic_flag(i), currency_code = p_header_rec.currency_code(i), rounding_factor = p_header_rec.rounding_factor(i), ship_method_code = p_header_rec.ship_method_code(i), freight_terms_code = p_header_rec.freight_terms_code(i), terms_id = p_header_rec.terms_id(i), comments = p_header_rec.comments(i), discount_lines_flag = p_header_rec.discount_lines_flag(i), gsa_indicator = p_header_rec.gsa_indicator(i), prorate_flag = p_header_rec.prorate_flag(i), source_system_code = p_header_rec.source_system_code(i), ask_for_flag = p_header_rec.ask_for_flag(i), active_flag = p_header_rec.active_flag(i), parent_list_header_id = p_header_rec.parent_list_header_id(i), start_date_active_first = p_header_rec.start_date_active_first(i), end_date_active_first = p_header_rec.end_date_active_first(i), active_date_first_type = p_header_rec.active_date_first_type(i), start_date_active_second = p_header_rec.start_date_active_second(i), end_date_active_second = p_header_rec.end_date_active_second(i), active_date_second_type = p_header_rec.active_date_second_type(i), context = p_header_rec.context(i), attribute1 = p_header_rec.attribute1(i), attribute2 = p_header_rec.attribute2(i), attribute3 = p_header_rec.attribute3(i), attribute4 = p_header_rec.attribute4(i), attribute5 = p_header_rec.attribute5(i), attribute6 = p_header_rec.attribute6(i), attribute7 = p_header_rec.attribute7(i), attribute8 = p_header_rec.attribute8(i), attribute9 = p_header_rec.attribute9(i), attribute10 = p_header_rec.attribute10(i), attribute11 = p_header_rec.attribute11(i), attribute12 = p_header_rec.attribute12(i), attribute13 = p_header_rec.attribute13(i), attribute14 = p_header_rec.attribute14(i), attribute15 = p_header_rec.attribute15(i), mobile_download = p_header_rec.mobile_download(i), currency_header_id = p_header_rec.currency_header_id(i), pte_code = p_header_rec.pte_code(i), list_source_code = p_header_rec.list_source_code(i), orig_system_header_ref = p_header_rec.orig_sys_header_ref(i), orig_org_id = p_header_rec.orig_org_id(i), global_flag = p_header_rec.global_flag(i) where (list_header_id = p_header_rec.list_header_id(i) or orig_system_header_ref = p_header_rec.orig_sys_header_ref(i)) and p_header_rec.process_status_flag(i) = 'P'; --IS NULL; forall i in p_header_rec.list_header_id.first .. p_header_rec.list_header_id.last update qp_list_headers_tl qlh set last_update_date = sysdate, last_updated_by = fnd_global.user_id, last_update_login = fnd_global.conc_login_id, language = nvl(p_header_rec.language(i), language), source_lang = nvl(p_header_rec.source_lang(i), source_lang), name = p_header_rec.name(i), description = p_header_rec.description(i), version_no = p_header_rec.version_no(i) where list_header_id = (select list_header_id from qp_list_headers_b qlh where (list_header_id = p_header_rec.list_header_id(i) or orig_system_header_ref = p_header_rec.orig_sys_header_ref(i)) --add by eric zhai--------------------- and language = p_header_rec.language(i) --add by erci zhai--------------------- ) and p_header_rec.process_status_flag(i) = 'P'; --IS NULL; qp_bulk_loader_pub.write_log('Header Records Updated: ' || sql%rowcount); qp_bulk_loader_pub.write_log('Leaving Update Header');exception when fnd_api.g_exc_unexpected_error then qp_bulk_loader_pub.write_log('UNEXCPECTED ERROR IN QP_BULK_UTIL.UPDATE_HEADER:' || sqlerrm); raise fnd_api.g_exc_unexpected_error; when others then qp_bulk_loader_pub.write_log('UNEXCPECTED ERROR IN QP_BULK_UTIL.UPDATE_HEADER:' || sqlerrm); raise fnd_api.g_exc_unexpected_error; end update_header;?