news 2026/4/15 7:16:59

Oracle EBS OM 销售订单信息更新API

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Oracle EBS OM 销售订单信息更新API

本文只是更新了头行销售员,其他字段可自行测试,另外只有未关闭的订单行才能进行更新

DECLARE -- Non-scalar parameters require additional processing p_header_rec oe_order_pub.header_rec_type; p_old_header_rec oe_order_pub.header_rec_type; p_header_val_rec oe_order_pub.header_val_rec_type; p_old_header_val_rec oe_order_pub.header_val_rec_type; p_header_adj_tbl oe_order_pub.header_adj_tbl_type; p_old_header_adj_tbl oe_order_pub.header_adj_tbl_type; p_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type; p_old_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type; p_header_price_att_tbl oe_order_pub.header_price_att_tbl_type; p_old_header_price_att_tbl oe_order_pub.header_price_att_tbl_type; p_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type; p_old_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type; p_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type; p_old_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type; p_header_scredit_tbl oe_order_pub.header_scredit_tbl_type; p_old_header_scredit_tbl oe_order_pub.header_scredit_tbl_type; p_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type; p_old_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type; p_header_payment_tbl oe_order_pub.header_payment_tbl_type; p_old_header_payment_tbl oe_order_pub.header_payment_tbl_type; p_header_payment_val_tbl oe_order_pub.header_payment_val_tbl_type; p_old_header_payment_val_tbl oe_order_pub.header_payment_val_tbl_type; p_line_tbl oe_order_pub.line_tbl_type; p_old_line_tbl oe_order_pub.line_tbl_type; p_line_val_tbl oe_order_pub.line_val_tbl_type; p_old_line_val_tbl oe_order_pub.line_val_tbl_type; p_line_adj_tbl oe_order_pub.line_adj_tbl_type; p_old_line_adj_tbl oe_order_pub.line_adj_tbl_type; p_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type; p_old_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type; p_line_price_att_tbl oe_order_pub.line_price_att_tbl_type; p_old_line_price_att_tbl oe_order_pub.line_price_att_tbl_type; p_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type; p_old_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type; p_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type; p_old_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type; p_line_scredit_tbl oe_order_pub.line_scredit_tbl_type; p_old_line_scredit_tbl oe_order_pub.line_scredit_tbl_type; p_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type; p_old_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type; p_line_payment_tbl oe_order_pub.line_payment_tbl_type; p_old_line_payment_tbl oe_order_pub.line_payment_tbl_type; p_line_payment_val_tbl oe_order_pub.line_payment_val_tbl_type; p_old_line_payment_val_tbl oe_order_pub.line_payment_val_tbl_type; p_lot_serial_tbl oe_order_pub.lot_serial_tbl_type; p_old_lot_serial_tbl oe_order_pub.lot_serial_tbl_type; p_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type; p_old_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type; p_action_request_tbl oe_order_pub.request_tbl_type; x_header_rec oe_order_pub.header_rec_type; x_header_val_rec oe_order_pub.header_val_rec_type; x_header_adj_tbl oe_order_pub.header_adj_tbl_type; x_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type; x_header_price_att_tbl oe_order_pub.header_price_att_tbl_type; x_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type; x_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type; x_header_scredit_tbl oe_order_pub.header_scredit_tbl_type; x_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type; x_header_payment_tbl oe_order_pub.header_payment_tbl_type; x_header_payment_val_tbl oe_order_pub.header_payment_val_tbl_type; x_line_tbl oe_order_pub.line_tbl_type; x_line_val_tbl oe_order_pub.line_val_tbl_type; x_line_adj_tbl oe_order_pub.line_adj_tbl_type; x_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type; x_line_price_att_tbl oe_order_pub.line_price_att_tbl_type; x_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type; x_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type; x_line_scredit_tbl oe_order_pub.line_scredit_tbl_type; x_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type; x_line_payment_tbl oe_order_pub.line_payment_tbl_type; x_line_payment_val_tbl oe_order_pub.line_payment_val_tbl_type; x_lot_serial_tbl oe_order_pub.lot_serial_tbl_type; x_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type; x_action_request_tbl oe_order_pub.request_tbl_type; p_header_customer_info_tbl oe_order_pub.customer_info_table_type; p_line_customer_info_tbl oe_order_pub.customer_info_table_type; p_org_id NUMBER; p_operating_unit NUMBER; p_api_version_number NUMBER := 1; p_init_msg_list VARCHAR2(2000); p_return_values VARCHAR2(2000); p_action_commit VARCHAR2(2000); x_return_status VARCHAR2(2000); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); l_msg_data VARCHAR2(3000); p_rtrim_data VARCHAR2(2000); p_validate_desc_flex VARCHAR2(2000); l_success_cnt NUMBER := 0; l_failed_cnt NUMBER := 0; CURSOR c_mass_upd IS SELECT t.* ,t.rowid ,h.org_id FROM cux.cux_om_mass_update_temp t ,oe_order_headers_all h WHERE 1 = 1 AND t.header_id = h.header_id --AND t.order_number = '451182452' AND nvl(t.status ,'xx') <> 'S' AND t.salesrep_id_new IS NOT NULL AND t.batch_no = 20250423001 ORDER BY t.header_id ,t.line_id; BEGIN dbms_output.put_line('Starting of script'); fnd_global.apps_initialize(user_id => 0 ,resp_id => 50947 ,resp_appl_id => 20003); mo_global.init('ONT'); dbms_output.put_line('Starting of API'); FOR r IN c_mass_upd LOOP oe_msg_pub.initialize; -- Header Record -- p_header_rec := oe_order_pub.g_miss_header_rec; p_header_rec.operation := oe_globals.g_opr_update; p_header_rec.header_id := r.header_id; -- 先头行销售员一起更新,再将失败记录行销售员更新一下 --p_header_rec.salesrep_id := r.salesrep_id_new; -- Line Record -- p_line_tbl(1) := oe_order_pub.g_miss_line_rec; p_line_tbl(1).operation := oe_globals.g_opr_update; p_line_tbl(1).line_id := r.line_id; p_line_tbl(1).salesrep_id := r.salesrep_id_new; p_org_id := r.org_id; -- Call the procedure oe_order_pub.process_order(p_org_id => p_org_id ,p_operating_unit => p_operating_unit ,p_api_version_number => p_api_version_number ,p_init_msg_list => p_init_msg_list ,p_return_values => p_return_values ,p_action_commit => p_action_commit ,x_return_status => x_return_status ,x_msg_count => x_msg_count ,x_msg_data => x_msg_data ,p_header_rec => p_header_rec ,p_old_header_rec => p_old_header_rec ,p_header_val_rec => p_header_val_rec ,p_old_header_val_rec => p_old_header_val_rec ,p_header_adj_tbl => p_header_adj_tbl ,p_old_header_adj_tbl => p_old_header_adj_tbl ,p_header_adj_val_tbl => p_header_adj_val_tbl ,p_old_header_adj_val_tbl => p_old_header_adj_val_tbl ,p_header_price_att_tbl => p_header_price_att_tbl ,p_old_header_price_att_tbl => p_old_header_price_att_tbl ,p_header_adj_att_tbl => p_header_adj_att_tbl ,p_old_header_adj_att_tbl => p_old_header_adj_att_tbl ,p_header_adj_assoc_tbl => p_header_adj_assoc_tbl ,p_old_header_adj_assoc_tbl => p_old_header_adj_assoc_tbl ,p_header_scredit_tbl => p_header_scredit_tbl ,p_old_header_scredit_tbl => p_old_header_scredit_tbl ,p_header_scredit_val_tbl => p_header_scredit_val_tbl ,p_old_header_scredit_val_tbl => p_old_header_scredit_val_tbl ,p_header_payment_tbl => p_header_payment_tbl ,p_old_header_payment_tbl => p_old_header_payment_tbl ,p_header_payment_val_tbl => p_header_payment_val_tbl ,p_old_header_payment_val_tbl => p_old_header_payment_val_tbl ,p_line_tbl => p_line_tbl ,p_old_line_tbl => p_old_line_tbl ,p_line_val_tbl => p_line_val_tbl ,p_old_line_val_tbl => p_old_line_val_tbl ,p_line_adj_tbl => p_line_adj_tbl ,p_old_line_adj_tbl => p_old_line_adj_tbl ,p_line_adj_val_tbl => p_line_adj_val_tbl ,p_old_line_adj_val_tbl => p_old_line_adj_val_tbl ,p_line_price_att_tbl => p_line_price_att_tbl ,p_old_line_price_att_tbl => p_old_line_price_att_tbl ,p_line_adj_att_tbl => p_line_adj_att_tbl ,p_old_line_adj_att_tbl => p_old_line_adj_att_tbl ,p_line_adj_assoc_tbl => p_line_adj_assoc_tbl ,p_old_line_adj_assoc_tbl => p_old_line_adj_assoc_tbl ,p_line_scredit_tbl => p_line_scredit_tbl ,p_old_line_scredit_tbl => p_old_line_scredit_tbl ,p_line_scredit_val_tbl => p_line_scredit_val_tbl ,p_old_line_scredit_val_tbl => p_old_line_scredit_val_tbl ,p_line_payment_tbl => p_line_payment_tbl ,p_old_line_payment_tbl => p_old_line_payment_tbl ,p_line_payment_val_tbl => p_line_payment_val_tbl ,p_old_line_payment_val_tbl => p_old_line_payment_val_tbl ,p_lot_serial_tbl => p_lot_serial_tbl ,p_old_lot_serial_tbl => p_old_lot_serial_tbl ,p_lot_serial_val_tbl => p_lot_serial_val_tbl ,p_old_lot_serial_val_tbl => p_old_lot_serial_val_tbl ,p_action_request_tbl => p_action_request_tbl ,x_header_rec => x_header_rec ,x_header_val_rec => x_header_val_rec ,x_header_adj_tbl => x_header_adj_tbl ,x_header_adj_val_tbl => x_header_adj_val_tbl ,x_header_price_att_tbl => x_header_price_att_tbl ,x_header_adj_att_tbl => x_header_adj_att_tbl ,x_header_adj_assoc_tbl => x_header_adj_assoc_tbl ,x_header_scredit_tbl => x_header_scredit_tbl ,x_header_scredit_val_tbl => x_header_scredit_val_tbl ,x_header_payment_tbl => x_header_payment_tbl ,x_header_payment_val_tbl => x_header_payment_val_tbl ,x_line_tbl => x_line_tbl ,x_line_val_tbl => x_line_val_tbl ,x_line_adj_tbl => x_line_adj_tbl ,x_line_adj_val_tbl => x_line_adj_val_tbl ,x_line_price_att_tbl => x_line_price_att_tbl ,x_line_adj_att_tbl => x_line_adj_att_tbl ,x_line_adj_assoc_tbl => x_line_adj_assoc_tbl ,x_line_scredit_tbl => x_line_scredit_tbl ,x_line_scredit_val_tbl => x_line_scredit_val_tbl ,x_line_payment_tbl => x_line_payment_tbl ,x_line_payment_val_tbl => x_line_payment_val_tbl ,x_lot_serial_tbl => x_lot_serial_tbl ,x_lot_serial_val_tbl => x_lot_serial_val_tbl ,x_action_request_tbl => x_action_request_tbl ,p_rtrim_data => p_rtrim_data ,p_validate_desc_flex => p_validate_desc_flex ,p_header_customer_info_tbl => p_header_customer_info_tbl ,p_line_customer_info_tbl => p_line_customer_info_tbl); --dbms_output.put_line('Completion of API'); --dbms_output.put_line('x_return_status: ' || x_return_status); IF x_return_status = fnd_api.g_ret_sts_success THEN UPDATE cux.cux_om_mass_update_temp c SET c.status = 'S' ,c.err_msg = NULL WHERE c.rowid = r.rowid; l_success_cnt := l_success_cnt + 1; COMMIT; /*dbms_output.put_line('Order Import Success : ' || x_header_rec.header_id);*/ ELSE /*dbms_output.put_line('Order Import failed v_msg_data:' || x_msg_data); dbms_output.put_line('Order Import failed v_msg_count:' || x_msg_count);*/ FOR i IN 1 .. oe_msg_pub.count_msg LOOP l_msg_data := oe_msg_pub.get(p_msg_index => i ,p_encoded => 'F'); --dbms_output.put_line(i || ') ' || x_msg_data); END LOOP; ROLLBACK; l_failed_cnt := l_failed_cnt + 1; UPDATE cux.cux_om_mass_update_temp c SET c.status = 'E' ,c.err_msg = l_msg_data WHERE c.rowid = r.rowid; COMMIT; END IF; END LOOP; COMMIT; dbms_output.put_line('SUCCESS Count: ' || l_success_cnt); dbms_output.put_line('FAILED Count: ' || l_failed_cnt); dbms_output.put_line('Completion of API'); EXCEPTION WHEN OTHERS THEN dbms_output.put_line(SQLCODE || '.' || SQLERRM); ROLLBACK; END;
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/14 12:12:07

中文医学基准测试题库数据集:28万条标准化JSON格式医师考试题目与临床案例分析,覆盖28个医学专业领域,用于医学AI模型训练、临床决策支持系统开发、医学知识问答系统构建、医学教育辅助工具优化

中文医学基准测试题库数据集&#xff1a;28万条标准化JSON格式医师考试题目与临床案例分析&#xff0c;覆盖28个医学专业领域&#xff0c;用于医学AI模型训练、临床决策支持系统开发、医学知识问答系统构建、医学教育辅助工具优化 引言与背景 在人工智能技术快速发展的今天&a…

作者头像 李华
网站建设 2026/4/11 7:47:02

终极指南:m3u8下载器命令行工具,实现全自动视频批量采集

终极指南&#xff1a;m3u8下载器命令行工具&#xff0c;实现全自动视频批量采集 【免费下载链接】m3u8-downloader m3u8 视频在线提取工具 流媒体下载 m3u8下载 桌面客户端 windows mac 项目地址: https://gitcode.com/gh_mirrors/m3u8/m3u8-downloader 还在为重复下载m…

作者头像 李华
网站建设 2026/4/12 3:39:17

PowerShell install 一键部署Oracle26ai

Oracle26ai前言 Oracle Database 26i (正式名称为 Oracle AI Database 26ai )是 Oracle 基于 26ai 核心引擎推出的免费全功能入门级数据库,面向开发者、学习者与小型项目,支持本地 / 容器 / 云部署,核心能力与 26ai 对齐但有资源限制。 download Oracle oracle 26ai 需要…

作者头像 李华
网站建设 2026/4/13 5:18:15

Git撤销命令revert与reset区别

今天有同事问我Git的撤销命令revert与reset有什么区别&#xff1f;特意整理了一下&#xff0c;做个比较全面的对比。总体来说&#xff0c;git revert 和 git reset 都是用于撤销更改的 Git 命令&#xff0c;但它们的工作方式和用途都有显著区别。核心区别对比特性git revertgit…

作者头像 李华
网站建设 2026/4/11 15:24:33

Volumio 2高保真音乐播放器:打造极致听觉体验的完整指南

Volumio 2高保真音乐播放器&#xff1a;打造极致听觉体验的完整指南 【免费下载链接】Volumio2 Volumio 2 - Audiophile Music Player 项目地址: https://gitcode.com/gh_mirrors/vo/Volumio2 Volumio 2是一款专为音乐发烧友设计的开源高保真音乐播放器&#xff0c;支持…

作者头像 李华
网站建设 2026/4/15 6:24:49

如何选择最佳蛋白质语言模型:5大性能指标终极对比指南

如何选择最佳蛋白质语言模型&#xff1a;5大性能指标终极对比指南 【免费下载链接】esm2_t33_650M_UR50D 项目地址: https://ai.gitcode.com/hf_mirrors/facebook/esm2_t33_650M_UR50D 你在蛋白质序列分析项目中是否面临这样的困境&#xff1a;选择轻量模型担心精度不足…

作者头像 李华