订单应用暂挂

You can apply hold on existing order by populating the order import interface with the following :

OE_HEADERS_IFACE_ALL
 ORDER_SOURCE_ID
 ORIG_SYS_DOCUMENT_REF
 OPERATION_CODE => 'UPDATE'
 ORG_ID
 ORDER_TYPE_ID
 CREATED_BY
 CREATION_DATE
 LAST_UPDATED_BY
 LAST_UPDATE_DATE

OE_ACTIONS_IFACE_ALL
 ORDER_SOURCE_ID,
 ORIG_SYS_DOCUMENT_REF,
 ORG_ID,
 HOLD_ID,
 HOLD_TYPE_CODE,
 HOLD_TYPE_ID,
 OPERATION_CODE => 'APPLY_HOLD'

HOLD_ID is the type of hold that should be applied.
HOLD_ID from OE_HOLD_DEFINITIONS

HOLD_TYPE_CODE is the entity code for the hold source to be created.
C: Customer hold source
S: Bill To or Ship To hold source
I: Item hold source
O: Order hold source
W: Warehouse Hold Source

HOLD_TYPE_ID value depends on value you populate in HOLD_TYPE_CODE,
for example, when you populate HOLD_TYPE_CODE = 'C', HOLD_TYPE_ID would be the customer_number.

A sample call to the process_order API to apply hold is given below.

DECLARE
   l_header_rec                 oe_order_pub.header_rec_type;
   l_line_tbl                   oe_order_pub.line_tbl_type;
   l_action_request_tbl         oe_order_pub.request_tbl_type;
   l_header_adj_tbl             oe_order_pub.header_adj_tbl_type;
   l_line_adj_tbl               oe_order_pub.line_adj_tbl_type;
   l_header_scr_tbl             oe_order_pub.header_scredit_tbl_type;
   l_line_scredit_tbl           oe_order_pub.line_scredit_tbl_type;
   l_request_rec                oe_order_pub.request_rec_type;
   l_return_status              VARCHAR2(1000);
   l_msg_count                  NUMBER;
   l_msg_data                   VARCHAR2(1000);
   p_api_version_number         NUMBER := 1.0;
   p_init_msg_list              VARCHAR2(10) := fnd_api.g_false;
   p_return_values              VARCHAR2(10) := fnd_api.g_false;
   p_action_commit              VARCHAR2(10) := fnd_api.g_false;
   x_return_status              VARCHAR2(1);
   x_msg_count                  NUMBER;
   x_msg_data                   VARCHAR2(100);
   v_header_rec                 oe_order_pub.header_rec_type;
   v_line_tbl                   oe_order_pub.line_tbl_type;
   v_action_request_tbl         oe_order_pub.request_tbl_type;
   p_header_rec                 oe_order_pub.header_rec_type := oe_order_pub.g_miss_header_rec;
   p_old_header_rec             oe_order_pub.header_rec_type := oe_order_pub.g_miss_header_rec;
   p_header_val_rec             oe_order_pub.header_val_rec_type := oe_order_pub.g_miss_header_val_rec;
   p_old_header_val_rec         oe_order_pub.header_val_rec_type := oe_order_pub.g_miss_header_val_rec;
   p_header_adj_tbl             oe_order_pub.header_adj_tbl_type := oe_order_pub.g_miss_header_adj_tbl;
   p_old_header_adj_tbl         oe_order_pub.header_adj_tbl_type := oe_order_pub.g_miss_header_adj_tbl;
   p_header_adj_val_tbl         oe_order_pub.header_adj_val_tbl_type := oe_order_pub.g_miss_header_adj_val_tbl;
   p_old_header_adj_val_tbl     oe_order_pub.header_adj_val_tbl_type := oe_order_pub.g_miss_header_adj_val_tbl;
   p_header_price_att_tbl       oe_order_pub.header_price_att_tbl_type := oe_order_pub.g_miss_header_price_att_tbl;
   p_old_header_price_att_tbl   oe_order_pub.header_price_att_tbl_type := oe_order_pub.g_miss_header_price_att_tbl;
   p_header_adj_att_tbl         oe_order_pub.header_adj_att_tbl_type := oe_order_pub.g_miss_header_adj_att_tbl;
   p_old_header_adj_att_tbl     oe_order_pub.header_adj_att_tbl_type := oe_order_pub.g_miss_header_adj_att_tbl;
   p_header_adj_assoc_tbl       oe_order_pub.header_adj_assoc_tbl_type := oe_order_pub.g_miss_header_adj_assoc_tbl;
   p_old_header_adj_assoc_tbl   oe_order_pub.header_adj_assoc_tbl_type := oe_order_pub.g_miss_header_adj_assoc_tbl;
   p_header_scredit_tbl         oe_order_pub.header_scredit_tbl_type := oe_order_pub.g_miss_header_scredit_tbl;
   p_old_header_scredit_tbl     oe_order_pub.header_scredit_tbl_type := oe_order_pub.g_miss_header_scredit_tbl;
   p_header_scredit_val_tbl     oe_order_pub.header_scredit_val_tbl_type := oe_order_pub.g_miss_header_scredit_val_tbl;
   p_old_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type := oe_order_pub.g_miss_header_scredit_val_tbl;
   p_line_tbl                   oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
   p_old_line_tbl               oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
   p_line_val_tbl               oe_order_pub.line_val_tbl_type := oe_order_pub.g_miss_line_val_tbl;
   p_old_line_val_tbl           oe_order_pub.line_val_tbl_type := oe_order_pub.g_miss_line_val_tbl;
   p_line_adj_tbl               oe_order_pub.line_adj_tbl_type := oe_order_pub.g_miss_line_adj_tbl;
   p_old_line_adj_tbl           oe_order_pub.line_adj_tbl_type := oe_order_pub.g_miss_line_adj_tbl;
   p_line_adj_val_tbl           oe_order_pub.line_adj_val_tbl_type := oe_order_pub.g_miss_line_adj_val_tbl;
   p_old_line_adj_val_tbl       oe_order_pub.line_adj_val_tbl_type := oe_order_pub.g_miss_line_adj_val_tbl;
   p_line_price_att_tbl         oe_order_pub.line_price_att_tbl_type := oe_order_pub.g_miss_line_price_att_tbl;
   p_old_line_price_att_tbl     oe_order_pub.line_price_att_tbl_type := oe_order_pub.g_miss_line_price_att_tbl;
   p_line_adj_att_tbl           oe_order_pub.line_adj_att_tbl_type := oe_order_pub.g_miss_line_adj_att_tbl;
   p_old_line_adj_att_tbl       oe_order_pub.line_adj_att_tbl_type := oe_order_pub.g_miss_line_adj_att_tbl;
   p_line_adj_assoc_tbl         oe_order_pub.line_adj_assoc_tbl_type := oe_order_pub.g_miss_line_adj_assoc_tbl;
   p_old_line_adj_assoc_tbl     oe_order_pub.line_adj_assoc_tbl_type := oe_order_pub.g_miss_line_adj_assoc_tbl;
   p_line_scredit_tbl           oe_order_pub.line_scredit_tbl_type := oe_order_pub.g_miss_line_scredit_tbl;
   p_old_line_scredit_tbl       oe_order_pub.line_scredit_tbl_type := oe_order_pub.g_miss_line_scredit_tbl;
   p_line_scredit_val_tbl       oe_order_pub.line_scredit_val_tbl_type := oe_order_pub.g_miss_line_scredit_val_tbl;
   p_old_line_scredit_val_tbl   oe_order_pub.line_scredit_val_tbl_type := oe_order_pub.g_miss_line_scredit_val_tbl;
   p_lot_serial_tbl             oe_order_pub.lot_serial_tbl_type := oe_order_pub.g_miss_lot_serial_tbl;
   p_old_lot_serial_tbl         oe_order_pub.lot_serial_tbl_type := oe_order_pub.g_miss_lot_serial_tbl;
   p_lot_serial_val_tbl         oe_order_pub.lot_serial_val_tbl_type := oe_order_pub.g_miss_lot_serial_val_tbl;
   p_old_lot_serial_val_tbl     oe_order_pub.lot_serial_val_tbl_type := oe_order_pub.g_miss_lot_serial_val_tbl;
   p_action_request_tbl         oe_order_pub.request_tbl_type := oe_order_pub.g_miss_request_tbl;
   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_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_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;
   x_debug_file                 VARCHAR2(100);
   l_msg_index_out              NUMBER(10);
BEGIN
   dbms_output.enable(1000000);
   fnd_global.apps_initialize(1370, 50717, 20005); -- pass in user_id, responsibility_id, and application_id
   oe_msg_pub.initialize;
   oe_debug_pub.initialize;
   mo_global.init('ONT');
   mo_global.set_policy_context(p_access_mode => 'S', p_org_id => 81);
   x_debug_file := oe_debug_pub.set_debug_mode('FILE');
   dbms_output.put_line('file :' || x_debug_file);
   oe_debug_pub.add('debug statement', 1);
   oe_debug_pub.setdebuglevel(5);
   dbms_output.put_line('START OF NEW DEBUG');
   --This is to release hold an order header
   l_request_rec.entity_id    := 431001;
   l_request_rec.entity_code  := oe_globals.g_entity_header;
   l_request_rec.request_type := oe_globals.G_APPLY_HOLD;
   -- hold_id must be passed
   l_request_rec.param1 := 2001;--销售未确认-暂挂
   -- indicator that it is an order hold
   l_request_rec.param2 := 'O';
   -- Header ID of the order
   l_request_rec.param3 := 431001; --60002
   --l_request_rec.param4 := 'OA_APPROVAL';
   --l_request_rec.param5 :=' ';
   l_action_request_tbl(1) := l_request_rec;
   -- CALL TO PROCESS ORDER API
   oe_order_pub.process_order(p_api_version_number => 1.0,
                              p_init_msg_list      => fnd_api.g_false,
                              p_return_values      => fnd_api.g_false,
                              p_action_commit      => fnd_api.g_false,
                              x_return_status      => l_return_status,
                              x_msg_count          => l_msg_count,
                              x_msg_data           => l_msg_data,
                              p_org_id             => 82,
                              p_header_rec         => l_header_rec,
                              p_line_tbl           => l_line_tbl,
                              p_action_request_tbl => l_action_request_tbl
                              -- OUT PARAMETERS
                             ,
                              x_header_rec             => v_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_line_tbl               => v_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_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);
   dbms_output.put_line('OM Debug file: ' || oe_debug_pub.g_dir || '/' ||
                        oe_debug_pub.g_file);
   -- Retrieve messages
   FOR i IN 1 .. l_msg_count LOOP
      oe_msg_pub.get(p_msg_index     => i,
                     p_encoded       => fnd_api.g_false,
                     p_data          => l_msg_data,
                     p_msg_index_out => l_msg_index_out);
      dbms_output.put_line('message is: ' || l_msg_data);
      dbms_output.put_line('message index is: ' || l_msg_index_out);
   END LOOP;
   -- Check the return status
   IF l_return_status = fnd_api.g_ret_sts_success THEN
      dbms_output.put_line('Process Order Success');
   ELSE
      dbms_output.put_line('Failed');
   END IF;
END;
时间: 2024-10-02 04:37:26

订单应用暂挂的相关文章

多线程编程-设计模式之保护性暂挂(Guarded Suspesion)模式

Guarded Suspension模式的架构 核心是一个受保护方法(Guarded Method).该方法需要执行其所要真正执行的操作时需要满足特定的条件(Predicate,以下称之为保护条件).当该条件不满足时,执行受保护方法的线程会被挂起进入等待状态,直到该条件满足时该线程才会继续运行.此时,受保护方法才会正在执行其所要执行的操作(目标操作).GuardedObject:包含受保护方法的对象.主要方法和职责如下:-guardedMethod:受保护方法.-stateChanged:改变G

EBS并发管理器启动失败,系统暂挂,在重置计数器之前修复管理程序

今天EBS安装补丁之后,因为停并发管理器的时候,因为关闭EBS应用时,并发管理器没有在前台停止,就直接停了应用服务,导致启动时,并发管理器直接起不来了,使用adcmctl.sh也没有办法启动. 进入系统管理员->管理并发管理器 查看并发管理器状态,发现并发管理器都处于 System Hold, Fix Manager before resetting counters 系统暂挂,在重置计数器之前修复管理程序 的状态. 解决方法: 先终止最上面的标准并发管理器,等待所有并发管理器完全停止之后,再使

第一次作业-2班-时宇 PTA第四次作业暂挂

PTA第一次作业 第一题 计算两个数的和与差: 1.设计思路 (1)算法 定义四个浮点型的标识符a,b,sum,diff,对a,b分别赋值,函数调用. a的值传递给op1,b的值传递给op2,sum的地址传递给指针变量psum,diff的地址传递给指针变量pdiff:输出两个数的和与差. 代码如下: 2.实验代码 ```void sum_diff( float op1, float op2, float *psum, float *pdiff ){ *psum=op1+op2; *pdiff=o

OM模块功能&API详解

(一)销售订单概述 1.1   与车间模块关系 当使用ATO类型订单时,订单管理模块会直接在车间模块中产生任务 1.2   与库存模块关系 在销售订单中使用的物料,单位等信息均来自库存模块,在订单执行过程中,按订单保留及销售发运等功能也会对库存模块起作用 1.3   与应收模块关系 销售完成后,订单管理模块会在应收接口中产生INVOICE信息,影响应收模块中销售订单对应的应收INVOICE处理操作 1.4   与采购模块关系 在直发流程,背对背等销售流程中,订单模块会在采购模块中产生对应的采购需

如何判断暂存采购订单(EKKO-MEMORY)

ME21N创建采购订单时,可以通过点击暂存按钮将PO保存成暂存订单. <img class="alignnone size-full wp-image-6557" src="http://www.baidusap.com/wp-content/uploads/2019-06-21_11-09-23.jpg" width="454" height="149" /> 暂存订单的EKKO-MEMORY字段

订单捕获-销售订单自定义

订单捕获-销售订单自定义 你可以自定义销售订单窗口外观来满足需求.所有订单和行块(包含查找窗口)都是作为文件夹块来设计的.你可以隐藏.显示和更改你文件夹的外观. 允许的自定义 您可以从这些可能的自定义选择. 隐藏一个项目(文本项目,复选框,弹出列表,选项组) 注意:如果你想要在销售订单头区域窗口(单个行文件夹块)显示一个当前隐藏的字段,你应该先隐藏一个当前显示的字段.在单个行文件夹块中,显示字段操作在当前光标所在的字段下放置一个新字段. 注意:在多个行文件夹块中,显示字段操作在当前光标所在的字段

Oracle EBS 中直发订单Drop Ship流程的系统操作记录

Oracle EBS 中直发订单Drop Ship流程的系统操作记录 应用场景: A公司向客户B销售产品,但是自己不生产该产品,而是向供应商C来采购,并且通常是要供应商C直接把货发到B客户处,属于贸易型企业经常用到的业务流程,有些集团公司下的子公司销售业务也用这种方式. 在实际业务中,并非所有的销售都是企业内部发出的,为了节约成本.提高周转效率.甚至应急销售,企业往往将外部企业也作为自己销售供货的来源之一,通过采购后直接发货的方式,将其他企业的货物直接销往自己的客户.这种销售业务模式,系统中称之

安装sql server提示挂起报错

在安装sql server时出现“以前的某个程序安装已在安装计算机上创建挂起的文件操作.运行安装程序之前必须重新启动计算机”错误.无法进行下去. 参考有关资料后,以下步骤基本可以解决: 1)添加/删除程序中彻底删除sql server. 2)将没有删除的sql server目录也删除掉.3)点击 开始 运行 输入:regedit打开注册表,找到如下目录在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ Session Manager中找到P

windows server 2012r2 快速启动模式部署remoteapp,检查兼容性,显示有挂起的重新启动

windows server 2012r2 快速启动模式部署remoteapp,检查兼容性,显示有挂起的重新启动. 解决方法: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager中找到PendingFileRenameOperations,删除 或者删除CurrentControlSet 下的相应表项 ⒈在"开始/运行"中输入Regedit就可打开注册表编辑器,对注册表进行查看或修改 ⒉打开注册表编辑器,在HK