not_date_found类似于空指针异常,没找到数据,根据用户是否需要抛出对应的异常
-- 校验是否存在采购组信息
BEGIN
SELECT mpd.pur_organization_code
INTO v_pur_organization_code
FROM mtl_pur_organizations_detl mpd
WHERE mpd.item_id = v_pur_lines_all.item_id
AND mpd.inv_organization_id = v_pur_lines_all.inv_organization_id
AND rownum = 1;
EXCEPTION
WHEN no_data_found THEN
SELECT io.description
INTO v_inv_organization_desc
FROM inv_organizations_vl io
WHERE io.inv_organization_id = v_pur_lines_all.inv_organization_id;
SELECT msi.item_name,msi.display_item_code
INTO v_item_name,v_item_code
FROM mtl_system_items_vl msi
WHERE msi.item_id = v_pur_lines_all.item_id;
-- RAISE e_no_ability_err;
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '[配送中心' ||
v_inv_organization_desc || ']商品[' || v_item_name ||
']商品编码['||v_item_code||']未匹配到采购组信息,请确认!',
p_created_by => p_user_id,
p_package_name => 'PUR_PO_PKG',
p_procedure_function_name => 'release_po_line');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
END;
oracle not_date_found
最新推荐文章于 2021-04-14 23:20:04 发布