DECLARE

l_api_version_number NUMBER := 1;
l_return_status VARCHAR2(2000);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000); /*****************INPUT VARIABLES FOR PROCESS_ORDER API*************************
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; /*****************OUT VARIABLES FOR PROCESS_ORDER API***************************
l_header_rec_out oe_order_pub.header_rec_type;
l_header_val_rec_out oe_order_pub.header_val_rec_type;
l_header_adj_tbl_out oe_order_pub.header_adj_tbl_type;
l_header_adj_val_tbl_out oe_order_pub.header_adj_val_tbl_type;
l_header_price_att_tbl_out oe_order_pub.header_price_att_tbl_type;
l_header_adj_att_tbl_out oe_order_pub.header_adj_att_tbl_type;
l_header_adj_assoc_tbl_out oe_order_pub.header_adj_assoc_tbl_type;
l_header_scredit_tbl_out oe_order_pub.header_scredit_tbl_type;
l_header_scredit_val_tbl_out oe_order_pub.header_scredit_val_tbl_type;
l_line_tbl_out oe_order_pub.line_tbl_type;
l_line_val_tbl_out oe_order_pub.line_val_tbl_type;
l_line_adj_tbl_out oe_order_pub.line_adj_tbl_type;
l_line_adj_val_tbl_out oe_order_pub.line_adj_val_tbl_type;
l_line_price_att_tbl_out oe_order_pub.line_price_att_tbl_type;
l_line_adj_att_tbl_out oe_order_pub.line_adj_att_tbl_type;
l_line_adj_assoc_tbl_out oe_order_pub.line_adj_assoc_tbl_type;
l_line_scredit_tbl_out oe_order_pub.line_scredit_tbl_type;
l_line_scredit_val_tbl_out oe_order_pub.line_scredit_val_tbl_type;
l_lot_serial_tbl_out oe_order_pub.lot_serial_tbl_type;
l_lot_serial_val_tbl_out oe_order_pub.lot_serial_val_tbl_type;
l_action_request_tbl_out oe_order_pub.request_tbl_type; l_msg_index NUMBER;
l_data VARCHAR2(2000);
l_loop_count NUMBER;
l_debug_file VARCHAR2(200); BEGIN
/*****************INITIALIZE DEBUG INFO*************************************/ l_debug_file := OE_DEBUG_PUB.Set_Debug_Mode('FILE');
oe_debug_pub.initialize;
oe_debug_pub.setdebuglevel(5);
Oe_Msg_Pub.initialize; /*****************INITIALIZE ENVIRONMENT*************************************/
fnd_global.apps_initialize(user_id,responsibility_id ,application_id); -- pass in user_id, responsibility_id, and application_id /*****************INITIALIZE HEADER RECORD******************************/
l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC; /*****************POPULATE REQUIRED ATTRIBUTES **********************************/ l_header_rec.operation := OE_GLOBALS.G_OPR_Create;
l_header_rec.order_type_id := ;
l_header_rec.sold_to_org_id := ;
l_header_rec.price_list_id := ; /*****************INITIALIZE ACTION REQUEST RECORD*************************************/ l_action_request_tbl(1) := OE_ORDER_PUB.G_MISS_REQUEST_REC; /*****************INITIALIZE LINE RECORD********************************
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC; /*****************CALLTO PROCESS orDER API*********************************/ OE_Order_PUB.Process_Order( p_api_version_number => l_api_version_number,
p_header_rec => l_header_rec,
p_line_tbl => l_line_tbl,
p_action_request_tbl => l_action_request_tbl,
-- OUT variables
x_header_rec => l_header_rec_out,
x_header_val_rec => l_header_val_rec_out,
x_header_adj_tbl => l_header_adj_tbl_out,
x_header_adj_val_tbl => l_header_adj_val_tbl_out,
x_header_price_att_tbl => l_header_price_att_tbl_out,
x_header_adj_att_tbl => l_header_adj_att_tbl_out,
x_header_adj_assoc_tbl => l_header_adj_assoc_tbl_out,
x_header_scredit_tbl => l_header_scredit_tbl_out,
x_header_scredit_val_tbl => l_header_scredit_val_tbl_out,
x_line_tbl => l_line_tbl_out,
x_line_val_tbl => l_line_val_tbl_out,
x_line_adj_tbl => l_line_adj_tbl_out,
x_line_adj_val_tbl => l_line_adj_val_tbl_out,
x_line_price_att_tbl => l_line_price_att_tbl_out,
x_line_adj_att_tbl => l_line_adj_att_tbl_out,
x_line_adj_assoc_tbl => l_line_adj_assoc_tbl_out,
x_line_scredit_tbl => l_line_scredit_tbl_out,
x_line_scredit_val_tbl => l_line_scredit_val_tbl_out,
x_lot_serial_tbl => l_lot_serial_tbl_out,
x_lot_serial_val_tbl => l_lot_serial_val_tbl_out,
x_action_request_tbl => l_action_request_tbl_out,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data); /*****************CHECK RETURN STATUS***********************************/ if l_return_status = FND_API.G_RET_STS_SUCCESS then
dbms_output.put_line('success');
commit;
else
dbms_output.put_line('failure');
rollback;
end if; /*****************DISPLAY RETURN STATUS FLAGS****************************** DBMS_OUTPUT.PUT_LINE('process orDER ret status IS: ' || l_return_status);
DBMS_OUTPUT.PUT_LINE('process orDER msg data IS: ' || l_msg_data);
DBMS_OUTPUT.PUT_LINE('process orDER msg COUNT IS: ' || l_msg_count);
DBMS_OUTPUT.PUT_LINE('header.order_number IS: ' || to_char(l_header_rec_out.order_number));
DBMS_OUTPUT.PUT_LINE('header.return_status IS: ' || l_header_rec_out.return_status);
DBMS_OUTPUT.PUT_LINE('header.booked_flag IS: ' || l_header_rec_out.booked_flag);
DBMS_OUTPUT.PUT_LINE('header.header_id IS: ' || l_header_rec_out.header_id);
DBMS_OUTPUT.PUT_LINE('header.order_source_id IS: ' || l_header_rec_out.order_source_id);
DBMS_OUTPUT.PUT_LINE('header.flow_status_code IS: ' || l_header_rec_out.flow_status_code); /*****************DISPLAY ERROR MSGS*************************************/ 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_data
,p_msg_index_out => l_msg_index); DBMS_OUTPUT.PUT_LINE('message is: ' || l_data);
DBMS_OUTPUT.PUT_LINE('message index is: ' || l_msg_index); END LOOP; dbms_output.put_line(' www.dezai.cn');
DBMS_OUTPUT.PUT_LINE('Debug = ' || OE_DEBUG_PUB.G_DEBUG);
DBMS_OUTPUT.PUT_LINE('Debug Level = ' || to_char(OE_DEBUG_PUB.G_DEBUG_LEVEL));
DBMS_OUTPUT.PUT_LINE('Debug File = ' || OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);
DBMS_OUTPUT.PUT_LINE('****************************************************'); OE_DEBUG_PUB.DEBUG_OFF;
END; -------------------------------------------------------------------------------- To create an RMA order that references an existing order: Please use the script below to insert the header and lines by populating the order import interface Insert INTO OE_HEADERS_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,creation_date
,created_by
,last_update_date
,last_updated_by
,operation_code
,sold_to_org_id
,order_type_id
,booked_flag
)
VALUES (
1227 --order_source_id
,'123456' --orig_sys_document_ref
,sysdate --creation_date
,-1 --created_by
,sysdate --last_update_date
,-1 --last_updated_by
,'Insert' --operation_code
,1005 --sold_to_org_id
,1436 --order_type_id
,'Y' --booked_flag
);
Insert INTO OE_LINES_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,orig_sys_line_ref
,inventory_item_id
,ordered_quantity
,operation_code
,created_by
,creation_date
,last_updated_by
,last_update_date
,return_reason_code
,return_context
,return_attribute1
,return_attribute2
)
VALUES (
1227 --order_source_id
,'123456' --orig_sys_document_ref
,'1' --orig_sys_line_ref
,249 --inventory_item_id
,10 --ordered_quantity
,'Insert' --operation_code
,-1 --created_by
,sysdate --creation_date
,-1 --last_updated_by
,sysdate --last_update_date
,'CANCELLATION' --return_reason_code
,'ORDER' --referencing a sales order
,'157638' --header_id of referenced order
,'256619' --line_id of referenced line
);
commit;

  

Oracle EBS 创建 RMA的更多相关文章

  1. Oracle EBS 创建资产报错

    Solution:设置资产弹性域 随便输入一个值 再冻结

  2. Oracle EBS Form Builder使用Java beans创建窗体

    最近有个项目,需要研究一下Oracle的E-Business Sutie(EBS),对于以前没接触此套件的我来说,简直太痛苦了.在网上找了一堆资料,试着进行Form二次开发,也遇到各类奇葩问题.目前遇 ...

  3. Oracle EBS应用笔记整理 (转自IT++ flyingkite)

    ***************************************************** Author: Flyingkite Blog:   http://space.itpub. ...

  4. Oracle EBS进化史

    https://blogs.oracle.com/ptian/entry/oracle_ebs%E8%BF%9B%E5%8C%96%E5%8F%B2 通过图表总结了下Oracle EBS的进化历史,回 ...

  5. Oracle Ebs R12 SLA与GL关系变化

    http://www.cnblogs.com/bruce_zhao/p/3809886.html Oracle Ebs R12 SLA与GL关系变化 SLA概念:SLA(Subledger Accou ...

  6. 第7篇 ORACLE EBS DEMO虚拟机环境的安装

    ERP信息系统的实施不仅要求懂得道理方面的知识,更要侧重于应用实践.为了有一个稳定的测试环境.初学者可以自己搭建一个EBS DEMO环境.本节介绍EBS DEMO环境虚拟机的安装.一. 安装前的准备( ...

  7. [转]oracle EBS 基础100问

    from:http://www.cnblogs.com/xiaoL/p/3593691.html  http://f.dataguru.cn/thread-51057-1-1.html 1001 OR ...

  8. 转:oracle ebs po模块一揽子采购协议小结

    转自:http://yedward.net/?id=193 oracle ebs po模块一揽子采购协议小结 本文总结oracle ebs采购订单(po)模块一揽子采购协议的相关知识,总结如下: 1. ...

  9. Oracle EBS 如何月结、对账[Z]

    在Oracle系统处理月结业务时,需要遵循一定的操作顺序.这些业务,牵涉到相应的模块,包括:应付模块.采购模块.库存模块.应收模块.薪资模块.固定资产和总帐模块等 在Oracle系统中,总帐模块处于财 ...

随机推荐

  1. 解决 Error: ENOSPC: System limit for number of file watchers reached

    manjaro 18.0 kde版本 运行 yarn test报错 Error: ENOSPC: System limit for number of file watchers reached 解决 ...

  2. Vue + Element UI 实现权限管理系统 前端篇(三):工具模块封装

    封装 axios 模块 封装背景 使用axios发起一个请求是比较简单的事情,但是axios没有进行封装复用,项目越来越大,会引起越来越多的代码冗余,让代码变得越来越难维护.所以我们在这里先对 axi ...

  3. 如何自定义Tomcat Realm实现我们的用户认证需求

    导读 Tomcat对于J2EE或Java web开发者而言绝不陌生,但说到Realm,可能有些人不太清楚甚至没有听说过,那么到底什么是Realm?简单一句话就是:Realm是Tomcat中为web应用 ...

  4. Sublime Text shift+ctrl 妙用

    1 :按住shift+ctrl然后按←或→可快速选中一行中的某一部分,相当于双击鼠标选中. 当你想在代码末尾加注释的话,这个方法很好用 输入文字 -> 光标移到文字末尾 -> 按住shif ...

  5. Mysql的select in会自动过滤重复的数据

    默认使用 SELECT 语句: 当加上in范围后,结果如下图: in范围内的数据,如果有重复的,只会选择第一个数据. 所以如果不是直接使用SQL语句来查询,而是在代码中来查询时,记得使用 distin ...

  6. 学了近一个月的java web 感想

    对于每天学习的新知识进行一定的总结,是有必要的. 之前我学的每一门知识,我都没有怎么总结自己的问题,也没有怎么去想想该怎样才能学的更好,把知识掌握的更牢固.从现在开始呢,我会每半个月,或每一个月总结总 ...

  7. php 冒泡排序的两种思路以及优化

    php冒泡排序,两种思路,时间复杂度都是O(n^2),当然最优的时间复杂度就是O(n),以下说的都是正序排列(倒序的话,把内层循环的大于号换成小于号就好了) 第一种冒泡排序 思路就是把第一个数跟所有的 ...

  8. Ubuntu下opencv的安装及IDEA开发配置

    Ubuntu下opencv的安装及IDEA开发配置 环境配置  这篇博客主要介绍Ubuntu下opencv的安装编译,以及IDEA对opencv进行Java开发的环境配置 安装opencv 首先安装o ...

  9. Silverlight 在ie8 下 报2152 错误

    前几天改别人的一个silverlight程序,在项目属性上 选中了 “通过使用应用程序库缓存减小XAP 大小”,编译无错,发布无错误. 放服务器上测试: 站点绑定域名,使用ie9.ie10 都没有问题 ...

  10. 虚方法virtual详解(转载)

    从C#的程序编译的角度来看,它和其它一般的函数有什么区别呢?一般函数在编译时就静态地编译到了执行文件中,其相对地址在程序运行期间是不发生变化的,也就是写死了的!而虚函数在编译期间是不被静态编译的,它的 ...