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. js便签笔记(12)——浏览TOM大叔博客的学习笔记 part2

    1. 前言 昨天写了<js便签笔记(11)——浏览TOM大叔博客的学习笔记 part1>,简单记录了几个问题.part1的重点还是在于最后那个循环创建函数的问题,也就是多个子函数公用一个闭 ...

  2. canvas实现涂鸦板

    实现思路:监听鼠标按下.移动.松开事件,将鼠标按下的值赋值给moveTo的x和y值,作为起始位置.在移动事件中,将鼠标距离可视区x和y值赋给lineTo,再将路径闭合.以下是具体的代码 <!DO ...

  3. css box-reflect投影实例讲解

    box-reflect一共有以下几个属性: above: 指定倒影在对象的上边 below: 指定倒影在对象的下边 left: 指定倒影在对象的左边 right: 指定倒影在对象的右边 offset: ...

  4. MyCAT 源码解析 —— 分片结果合并(使用unsaferow)

    1. 概述 2. 多分片执行 SQL 3. 合并多分片结果 3.1 记录头(header) 3.2 记录行(row) 3.1 AbstractDataNodeMerge 3.2 DataNodeMer ...

  5. VS和Eclipse的调试功能哪个更强大?

    以前一直用VS 2012来调试C/C++代码,F5.F10.F11用起来甚是顺手,前面也写过一篇关于VS最好用的快捷键:Visual Studio最好用的快捷键(你最喜欢哪个), 所以对于调试C/C+ ...

  6. MYSQL查询语句大全集锦

    MYSQL查询语句大全集锦 1:使用SHOW语句找出在服务器上当前存在什么数据库: mysql> SHOW DATABASES; 2:2.创建一个数据库MYSQLDATA mysql> C ...

  7. office online server部署和简单操作

    office online server是Office Web Apps Server的升级版本,安装环境必须为 Windows Server 2012 R2 参考地址:https://technet ...

  8. SqlDataAdapter 对datagridview进行增删改(A)

    这种方法主要是双击datagridview单元格,直接进行添加,修改,删除,在实际开发中并不太常用,另一种方法下一次在具体陈述. using System; using System.Collecti ...

  9. Retrofit2+Rxjava+OkHttp的使用和网络请求

    Retrofit2+Rxjava+OkHttp的使用和网络请求 https://blog.csdn.net/huandroid/article/details/79883895 加入Rxjava 如果 ...

  10. mysql报错1105 -without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

    mysql报错1105 -without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER. 在本地正常,但是在服务 ...