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. org.jeecgframework.core.common.exception.MyExceptionHandler]java.lang.NullPointerException

    问题原因:

  2. postman参数化 接口响应数据获取符合条件的内容参数化给后面的接口使用

    一:主要内容 从响应结果中找到满足条件的key,获取其value,参数化给后面的接口使用 二:参数化获取想要的value值,传给后面的接口使用 有时我们获取的响应数据,需要的那个字段可能在一个数组里面 ...

  3. linux wheel组

    wheel 组的概念 wheel 组的概念继承自 UNIX.当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限:而“wheel” 组就是一个包含这些特殊权限的用户池: ...

  4. Oracle sys 用户无密码文件无法登录

    1.安装时候,global database name  环境变量听ORACLE_SID不一致,生成的sys密码文件默认为global database name 一致,但在连接时候service n ...

  5. elasticSearch6源码分析(9)ActionModule

    1.ActionModule概述 /** * Builds and binds the generic action map, all {@link TransportAction}s, and {@ ...

  6. Android UI相关开源项目库汇总

    最近做了一个Android UI相关开源项目库汇总,里面集合了OpenDigg 上的优质的Android开源项目库,方便移动开发人员便捷的找到自己需要的项目工具等,感兴趣的可以到GitHub上给个st ...

  7. AssemblyInfo.cs 详解

    前言 ? .net工程(包括Web和WinForm)的Properties文件夹下自动生成一个名为AssemblyInfo.cs的文件,一般情况下我们很少直接改动该文件.但我们实际上通过另一个形式操作 ...

  8. php表单中如何获取单选按钮与复选按钮的值(示例)

    转载:http://www.php.cn/php-weizijiaocheng-360027.html php代码中获取表单中单选按钮的值:(单选按钮只能让我们选择一个,这里有一个“checked”属 ...

  9. Linux应用调试-strace命令

    1.strace简介 strace常用来跟踪进程执行时的系统调用和所接收的信号.通过strace可以知道应用程序打开了哪些文件,以及读写了什么内容,包括消耗的时间以及返回值等 2.安装strace命令 ...

  10. 乐字节-Java8新特性之方法引用

    上一篇小乐介绍了<Java8新特性-函数式接口>,大家可以点击回顾.这篇文章将接着介绍Java8新特性之方法引用. Java8 中引入方法引用新特性,用于简化应用对象方法的调用, 方法引用 ...