标签:enable 批量导入 lis color esc replace arc structure end
--新增物料类别,必须在XIU_ITEMS这个弹性域值集里面先预设或者批量导入值集数据 DECLARE x_return_status VARCHAR2(1); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); x_errorcode VARCHAR2(30); l_cur_mfg_org_id NUMBER := 83; --Current Inv Organization l_user_id NUMBER := 1110; --User ID, Sysadmin here l_category_id NUMBER; l_CATEGORY_REC_TYPE INV_ITEM_CATEGORY_PUB.CATEGORY_REC_TYPE; BEGIN --Initialize first, or create_by will be -1 fnd_global.apps_initialize(user_id => 1110, resp_id => 50597, resp_appl_id => 20003); l_CATEGORY_REC_TYPE.STRUCTURE_ID := 101; l_CATEGORY_REC_TYPE.SEGMENT1 := ‘1‘; l_CATEGORY_REC_TYPE.SEGMENT2 := ‘12‘; l_CATEGORY_REC_TYPE.SEGMENT3 := ‘1206‘; l_CATEGORY_REC_TYPE.SEGMENT4 := ‘120606‘; l_CATEGORY_REC_TYPE.DESCRIPTION := ‘妆品.彩妆美颜.彩妆工具.画布‘; l_CATEGORY_REC_TYPE.ENABLED_FLAG := ‘Y‘; l_CATEGORY_REC_TYPE.SUPPLIER_ENABLED_FLAG := ‘Y‘; inv_item_category_pub.Create_Category(p_api_version => ‘1.0‘, p_init_msg_list => fnd_api.g_true, p_commit => fnd_api.g_false, x_return_status => x_return_status, x_errorcode => x_errorcode, x_msg_count => x_msg_count, x_msg_data => x_msg_data, p_category_rec => l_CATEGORY_REC_TYPE, x_category_id => l_category_id); IF x_return_status <> fnd_api.g_ret_sts_success THEN ROLLBACK; dbms_output.put_line(‘error code : ‘ || x_errorcode); fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data); dbms_output.put_line(‘error count : ‘ || to_char(x_msg_count)); dbms_output.put_line(REPLACE(x_msg_data, chr(0), ‘ ‘)); FOR i IN 2 .. x_msg_count LOOP x_msg_data := fnd_msg_pub.get; dbms_output.put_line(REPLACE(x_msg_data, chr(0), ‘ ‘)); END LOOP; IF (x_return_status = fnd_api.g_ret_sts_unexp_error) THEN RAISE fnd_api.g_exc_unexpected_error; ELSIF (x_return_status = fnd_api.g_ret_sts_error) THEN RAISE fnd_api.g_exc_error; END IF; ELSE COMMIT; dbms_output.put_line(‘Successfully.‘||‘l_category_id‘||l_category_id); END IF; END;
标签:enable 批量导入 lis color esc replace arc structure end
原文地址:https://www.cnblogs.com/lizicheng/p/9618355.html