OE_ORDER_PUB.PROCESS_ORDER to Apply hold on a sales order
PURPOSE:
This post is to provide a sample script to Apply hold on a sales order using an API OE_ORDER_PUB.PROCESS_ORDER.
TEST INSTANCE: R12.1.1
SCRIPT:
DECLARE
v_api_version_number NUMBER := 1;
v_return_status VARCHAR2 (2000);
v_msg_count NUMBER;
v_msg_data VARCHAR2 (2000);
-- IN Variables --
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;
v_line_adj_tbl oe_order_pub.line_adj_tbl_type;
-- OUT Variables --
v_header_rec_out oe_order_pub.header_rec_type;
v_header_val_rec_out oe_order_pub.header_val_rec_type;
v_header_adj_tbl_out oe_order_pub.header_adj_tbl_type;
v_header_adj_val_tbl_out oe_order_pub.header_adj_val_tbl_type;
v_header_price_att_tbl_out oe_order_pub.header_price_att_tbl_type;
v_header_adj_att_tbl_out oe_order_pub.header_adj_att_tbl_type;
v_header_adj_assoc_tbl_out oe_order_pub.header_adj_assoc_tbl_type;
v_header_scredit_tbl_out oe_order_pub.header_scredit_tbl_type;
v_header_scredit_val_tbl_out oe_order_pub.header_scredit_val_tbl_type;
v_line_tbl_out oe_order_pub.line_tbl_type;
v_line_val_tbl_out oe_order_pub.line_val_tbl_type;
v_line_adj_tbl_out oe_order_pub.line_adj_tbl_type;
v_line_adj_val_tbl_out oe_order_pub.line_adj_val_tbl_type;
v_line_price_att_tbl_out oe_order_pub.line_price_att_tbl_type;
v_line_adj_att_tbl_out oe_order_pub.line_adj_att_tbl_type;
v_line_adj_assoc_tbl_out oe_order_pub.line_adj_assoc_tbl_type;
v_line_scredit_tbl_out oe_order_pub.line_scredit_tbl_type;
v_line_scredit_val_tbl_out oe_order_pub.line_scredit_val_tbl_type;
v_lot_serial_tbl_out oe_order_pub.lot_serial_tbl_type;
v_lot_serial_val_tbl_out oe_order_pub.lot_serial_val_tbl_type;
v_action_request_tbl_out oe_order_pub.request_tbl_type;
BEGIN
DBMS_OUTPUT.PUT_LINE('Starting of script');
-- Setting the Enviroment --
fnd_global.apps_initialize (user_id => 1450,
resp_id => 50675,
resp_appl_id => 700);
oe_msg_pub.initialize;
mo_global.set_org_context (p_org_id_char => 81,
p_sp_id_char => null,
p_appl_short_name => 'ONT');
--THIS IS TO APPLY HOLD AN ORDER HEADER
v_action_request_tbl (1) := oe_order_pub.g_miss_request_rec;
v_action_request_tbl (1).entity_id := 333351; -- Header ID of the order
v_action_request_tbl (1).entity_code := OE_GLOBALS.G_ENTITY_HEADER;
v_action_request_tbl (1).request_type := OE_GLOBALS.G_APPLY_HOLD;
v_action_request_tbl (1).param1 := 1041; -- hold_id
v_action_request_tbl (1).param2 := 'O'; -- indicator that it is an order hold
v_action_request_tbl (1).param3 := 333351; -- Header ID of the order
/*
--THIS IS TO APPLY HOLD AN ORDER LINE
v_action_request_tbl (1) := oe_order_pub.g_miss_request_rec;
v_action_request_tbl (1).entity_id := 286897; -- LINE ID of the order
v_action_request_tbl (1).entity_code := OE_GLOBALS.G_ENTITY_LINE;
v_action_request_tbl (1).request_type := OE_GLOBALS.G_APPLY_HOLD;
v_action_request_tbl (1).param1 := 1041; -- hold_id
v_action_request_tbl (1).param2 := 'O'; -- indicator that it is an order hold
v_action_request_tbl (1).param3 := 286897; -- LINE ID of the order
*/
DBMS_OUTPUT.PUT_LINE('Starting of API');
-- CALLING THE API TO APPLY HOLD ON EXISTING ORDER --
OE_ORDER_PUB.PROCESS_ORDER (
p_api_version_number => v_api_version_number
, p_header_rec => v_header_rec
, p_line_tbl => v_line_tbl
, p_action_request_tbl => v_action_request_tbl
, p_line_adj_tbl => v_line_adj_tbl
-- OUT variables
, x_header_rec => v_header_rec_out
, x_header_val_rec => v_header_val_rec_out
, x_header_adj_tbl => v_header_adj_tbl_out
, x_header_adj_val_tbl => v_header_adj_val_tbl_out
, x_header_price_att_tbl => v_header_price_att_tbl_out
, x_header_adj_att_tbl => v_header_adj_att_tbl_out
, x_header_adj_assoc_tbl => v_header_adj_assoc_tbl_out
, x_header_scredit_tbl => v_header_scredit_tbl_out
, x_header_scredit_val_tbl => v_header_scredit_val_tbl_out
, x_line_tbl => v_line_tbl_out
, x_line_val_tbl => v_line_val_tbl_out
, x_line_adj_tbl => v_line_adj_tbl_out
, x_line_adj_val_tbl => v_line_adj_val_tbl_out
, x_line_price_att_tbl => v_line_price_att_tbl_out
, x_line_adj_att_tbl => v_line_adj_att_tbl_out
, x_line_adj_assoc_tbl => v_line_adj_assoc_tbl_out
, x_line_scredit_tbl => v_line_scredit_tbl_out
, x_line_scredit_val_tbl => v_line_scredit_val_tbl_out
, x_lot_serial_tbl => v_lot_serial_tbl_out
, x_lot_serial_val_tbl => v_lot_serial_val_tbl_out
, x_action_request_tbl => v_action_request_tbl_out
, x_return_status => v_return_status
, x_msg_count => v_msg_count
, x_msg_data => v_msg_data
);
DBMS_OUTPUT.PUT_LINE('Completion of API');
IF v_return_status = fnd_api.g_ret_sts_success THEN
COMMIT;
DBMS_OUTPUT.put_line ('Applying Hold on Sales Order is Success ');
ELSE
DBMS_OUTPUT.put_line ('Applying Hold on Sales Order failed:'||v_msg_data);
ROLLBACK;
FOR i IN 1 .. v_msg_count
LOOP
v_msg_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');
dbms_output.put_line( i|| ') '|| v_msg_data);
END LOOP;
END IF;
FOR i IN 1 .. v_msg_count
LOOP
v_msg_data := oe_msg_pub.get( p_msg_index => i, p_encoded => 'F');
dbms_output.put_line( i|| ') '|| v_msg_data);
END LOOP;
END;
来自 <http://www.shareoracleapps.com/2010/06/oeorderpubprocessorder-to-apply-hold-on.html>
OE_ORDER_PUB.PROCESS_ORDER to Apply hold on a sales order的更多相关文章
- OE_ORDER_PUB.PROCESS_ORDER to Release a hold on sales order in R12
PURPOSE: This post is to provide a sample script to Release a hold on sales order using an API OE_OR ...
- RMA Sales Order – Stuck with “Awaiting Return Disposition”
RMA Sales Order – Stuck with "Awaiting Return Disposition" Action : (P ...
- RMA Sales Order – Stuck with “Awaiting Return Disposition”
RMA Sales Order – Stuck with “Awaiting Return Disposition” Action : (Prod) ð Login to Unix ð su – ...
- magento app/design/adminhtml/default/default/template/sales/order/view/info.phtml XSS Vul
catalogue . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 Relevant Link: http://www.freebuf. ...
- 转:Internal Sales Order (ISO) Process Flow
本文介绍下内部销售订单Internal Sales Order(ISO)在Oracle EBS中的流程,内部销售订单和组织间转移(Inter-Organization Transfer,IOT)的作用 ...
- SAP Cloud for Customer里Sales Order和Sales Quote的建模方式
SAP Cloud for Customer的Sales工作中心里有Sales Quote和Sales Order两个视图,一个用于销售报价单,另一个用于销售订单. 流程上是先有报价单 ,报价单是一份 ...
- SAP Cloud for Customer Sales Order Requested Date的业务含义和实现
我们在创建Sales order销售订单时,需要指定一个RequestedDate: 这个字段绑定到了BO字段:CustomerQuote.RequestedFulfillmentPeriod.Tim ...
- ABAP术语-Sales Order
Sales Order 原文:http://www.cnblogs.com/qiangsheng/archive/2008/03/14/1104979.html A customer request ...
- 使用ABAP代码创建S/4HANA里的Sales Order
下图是使用ABAP代码创建的S/4HANA的Sales Order的截图: 其中红色区域的值是我代码里硬编码的,而蓝色是函数SD_SALESDOCUMENT_CREATE自己创建的. 来看下代码: D ...
随机推荐
- 解决: httpclient ssl 验证导致死锁问题
线上图片下载服务器平时运行正常,最近突然出现一种比较奇怪的现象,只接受请求,但却没有处理请求,最开始怀疑下载线程挂掉了,dump 项目线程后发现异常: "pool-2-thread-1&qu ...
- HEER-Easing Embedding Learning by Comprehensive Transcription of Heterogeneous Information Networks
来源:KDD 2018 原文:HEER code:https://github.com/GentleZhu/HEER 注: 若有错误,欢迎指正 这篇KDD’18的文章,没有按照常规的方法将所有的n ...
- P2327
code[class*="language-"] { padding: .1em; border-radius: .3em; white-space: normal; backgr ...
- HDU 4768: Flyer
题意: 有N个社团,每个社团三个属性A,B,C,表示会向编号A+k*C的同学发传单(k=0,1,2... && A+k*C <= B).题目保证最多有一个人收到的传单数是奇数. ...
- IntelJ IDEA 进行Java Web开发+热部署+一些开发上的问题
基本上像放弃MyEclipse或者Eclipse了,因为IDEA现在也有对应的版本旗舰版和社区版了,而且使用更贴心,更给力,为什么还要选一个难用的要死的东西呢? 最近要开发一个Java Web项目,所 ...
- intellij idea 无法创建类文件,方法。
- JQuery 获取页面某一元素的位置
获取页面某一元素的绝对X,Y坐标 var X = $('#ElementID').offset().top; var Y = $('#ElementID').offset().left; 获取相对(父 ...
- 关于在C#中对函数重载理解
函数重载是个什么概念,才接触的这个概念的时候我也是完全昏了,还在自己看看了书后就理解了.那什么是函数重载呢?我个人理解的是在同一个作用域下有多个同名的函数,但是他们的形参的类型是不同的,或者参数个数是 ...
- Sql Server递归查询(转)
有如下数据表 假如我们要查询ID为003的数据的所有子节点我们可以使用CTE 递归查询完成... if OBJECT_ID('tb','N') is not null drop table tb; c ...
- Bootstrap新版里的a标签点击后出现下划线解决办法
其实我从失去焦点后发现了下划线消失了就应该知道 Bootstrap对a标签进行了 focus焦点事件. 所以解决办法就是一句:a:focus{text-decoration: none}. 一个笑笑的 ...