[Oracle EBS APIs]import Flow routing and DJ routing using BOM_RTG_PUB.PROCESS_RTG APIs
DJ routing --BOM模块的工艺路线
Flow routing -- Flow Manufacturing 模块使用的工艺路线,导入 Flow routing时先导入Line Operation,然后在导入Event.
CREATE OR REPLACE PROCEDURE SU_PROCESS_RTG_TEST AS /*
* Note:
* bom_rtg_globals.G_OPR_CREATE ==> 'CREATE';
* bom_rtg_globals.G_OPR_UPDATE ==> 'UPDATE';
* bom_rtg_globals.G_OPR_DELETE ==> 'DELETE';
* CFM_Routing_Flag: 1==>Flow Routing,2==>DJ Routing
* Operation_Type: 1==>Event,3==>Line Operation 2==>Process
* import order: Line Operation => Event =>Process
*/
-- API input variables
l_operation_tbl Bom_Rtg_Pub.Operation_Tbl_Type := Bom_Rtg_Pub.G_MISS_OPERATION_TBL;
l_rtg_header_rec Bom_Rtg_Pub.Rtg_Header_Rec_Type := Bom_Rtg_Pub.G_MISS_RTG_HEADER_REC;
l_rtg_revision_tbl Bom_Rtg_Pub.Rtg_Revision_Tbl_Type := Bom_Rtg_Pub.G_MISS_RTG_REVISION_TBL;
l_op_resource_tbl Bom_Rtg_Pub.Op_Resource_Tbl_Type := Bom_Rtg_Pub.G_MISS_OP_RESOURCE_TBL;
l_sub_resource_tbl Bom_Rtg_Pub.Sub_Resource_Tbl_Type := Bom_Rtg_Pub.G_MISS_SUB_RESOURCE_TBL;
l_op_network_tbl Bom_Rtg_Pub.Op_Network_Tbl_Type := Bom_Rtg_Pub.G_MISS_OP_NETWORK_TBL; -- API output variables
x_rtg_header_rec Bom_Rtg_Pub.Rtg_Header_Rec_Type; -- routing header record
x_rtg_revision_tbl Bom_Rtg_Pub.Rtg_Revision_Tbl_Type; -- routing revisions
x_operation_tbl Bom_Rtg_Pub.Operation_Tbl_Type; -- routing operations
x_op_resource_tbl Bom_Rtg_Pub.Op_Resource_Tbl_Type; -- oepration resources
x_sub_resource_tbl Bom_Rtg_Pub.Sub_Resource_Tbl_Type; -- sub operation resources
x_op_network_tbl Bom_Rtg_Pub.Op_Network_Tbl_Type; -- operation networks
x_message_list Error_Handler.Error_Tbl_Type; -- Other API variables
l_return_status VARCHAR2() := NULL;
l_msg_count NUMBER := ;
l_cnt NUMBER := ; -- WHO columns
l_user_id NUMBER := -;
l_resp_id NUMBER := -;
l_application_id NUMBER := -;
l_row_cnt NUMBER := ;
l_user_name VARCHAR2() := 'xxxxxx';
l_resp_name VARCHAR2() := 'xxxxx'; BEGIN -- Get the user_id
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name = l_user_name; -- Get the application_id and responsibility_id
SELECT application_id, responsibility_id
INTO l_application_id, l_resp_id
FROM fnd_responsibility
WHERE responsibility_key = l_resp_name; -- Initialize applications information
FND_GLOBAL.APPS_INITIALIZE(l_user_id, l_resp_id, l_application_id); -- Mfg / Mfg & Dist Mgr / INV
dbms_output.put_line('Initialized applications context: ' || l_user_id || ' ' ||
l_resp_id || ' ' || l_application_id); -- Create the routing header
l_rtg_header_rec.Assembly_Item_Name := 'TEST20160811';
l_rtg_header_rec.Organization_Code := 'HAD';
l_rtg_header_rec.Alternate_Routing_Code := NULL;
l_rtg_header_rec.CFM_Routing_Flag := ; ---==>Flow Routing,==>DJ Routing
l_rtg_header_rec.Line_Code := 'LHA420';
l_rtg_header_rec.mixed_model_map_flag := ;
--l_rtg_header_rec.Completion_Subinventory := 'FGI';
l_rtg_header_rec.Transaction_Type := bom_rtg_globals.G_OPR_CREATE;
l_rtg_header_rec.Attribute1 := 'STD';
l_rtg_header_rec.eng_routing_flag := ;
-- Create the routing operations
--Line operation
l_operation_tbl(l_cnt).Assembly_Item_Name := 'TEST20160811';
l_operation_tbl(l_cnt).Organization_Code := 'HAD';
l_operation_tbl(l_cnt).Alternate_Routing_Code := NULL;
l_operation_tbl(l_cnt).Operation_Sequence_Number := '';
l_operation_tbl(l_cnt).Standard_Operation_Code := '';
l_operation_tbl(l_cnt).Operation_Type := ; ---Operation_Type:==>Event,==>Line Operation
l_operation_tbl(l_cnt).Start_Effective_Date := SYSDATE - ;
l_operation_tbl(l_cnt).Yield := 0.87;
l_operation_tbl(l_cnt).reference_flag :=;
l_operation_tbl(l_cnt).Transaction_Type := bom_rtg_globals.G_OPR_CREATE; --Line operation
l_cnt := l_cnt + ;
l_operation_tbl(l_cnt).Assembly_Item_Name := 'TEST20160811';
l_operation_tbl(l_cnt).Organization_Code := 'HAD';
l_operation_tbl(l_cnt).Alternate_Routing_Code := NULL;
l_operation_tbl(l_cnt).Operation_Sequence_Number := '';
l_operation_tbl(l_cnt).Standard_Operation_Code := '';
l_operation_tbl(l_cnt).Operation_Type := ;---Operation_Type:==>Event,==>Line Operation
l_operation_tbl(l_cnt).Start_Effective_Date := SYSDATE - ; -- should match timestamp for UPDATE
l_operation_tbl(l_cnt).Yield := 1.0;
l_operation_tbl(l_cnt).reference_flag :=;
l_operation_tbl(l_cnt).Transaction_Type := bom_rtg_globals.G_OPR_CREATE; --Event1
l_cnt := l_cnt + ;
l_operation_tbl(l_cnt).Assembly_Item_Name := 'TEST20160811';
l_operation_tbl(l_cnt).Organization_Code := 'HAD';
l_operation_tbl(l_cnt).Alternate_Routing_Code := NULL;
l_operation_tbl(l_cnt).Operation_Sequence_Number := '';
l_operation_tbl(l_cnt).Standard_Operation_Code := '';
l_operation_tbl(l_cnt).Operation_Type := ; ---Operation_Type:==>Event,==>Line Operation
l_operation_tbl(l_cnt).Line_Op_Seq_Number := ;
l_operation_tbl(l_cnt).Line_Op_Code := '';
l_operation_tbl(l_cnt).Start_Effective_Date := SYSDATE - ;
l_operation_tbl(l_cnt).Yield := 0.87;
l_operation_tbl(l_cnt).reference_flag :=;
l_operation_tbl(l_cnt).Transaction_Type := bom_rtg_globals.G_OPR_CREATE;
--Event2
l_cnt := l_cnt + ;
l_operation_tbl(l_cnt).Assembly_Item_Name := 'TEST20160811';
l_operation_tbl(l_cnt).Organization_Code := 'HAD';
l_operation_tbl(l_cnt).Alternate_Routing_Code := NULL;
l_operation_tbl(l_cnt).Operation_Sequence_Number := '';
l_operation_tbl(l_cnt).Standard_Operation_Code := '';
l_operation_tbl(l_cnt).Operation_Type := ; ---Operation_Type:==>Event,==>Line Operation
l_operation_tbl(l_cnt).Line_Op_Seq_Number := ;
l_operation_tbl(l_cnt).Line_Op_Code := '';
l_operation_tbl(l_cnt).Start_Effective_Date := SYSDATE - ;
l_operation_tbl(l_cnt).Yield := 0.87;
l_operation_tbl(l_cnt).reference_flag :=;
l_operation_tbl(l_cnt).Transaction_Type := bom_rtg_globals.G_OPR_CREATE; -- initialize error stack for logging errors
Error_Handler.initialize; -- call API to create / update routing
DBMS_OUTPUT.PUT_LINE('=======================================================');
DBMS_OUTPUT.PUT_LINE('Calling Bom_Rtg_Pub.Process_Rtg API'); BOM_RTG_PUB.PROCESS_RTG(p_bo_identifier => 'RTG',
p_api_version_number => '1.0',
p_init_msg_list => TRUE,
p_rtg_header_rec => l_rtg_header_rec,
p_rtg_revision_tbl => l_rtg_revision_tbl,
p_operation_tbl => l_operation_tbl,
p_op_resource_tbl => l_op_resource_tbl,
p_sub_resource_tbl => l_sub_resource_tbl,
p_op_network_tbl => l_op_network_tbl,
x_rtg_header_rec => x_rtg_header_rec,
x_rtg_revision_tbl => x_rtg_revision_tbl,
x_operation_tbl => x_operation_tbl,
x_op_resource_tbl => x_op_resource_tbl,
x_sub_resource_tbl => x_sub_resource_tbl,
x_op_network_tbl => x_op_network_tbl,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
p_debug => 'N',
p_output_dir => '/usr/tmp/',
p_debug_filename => 'rtg_bo_debug.log'); DBMS_OUTPUT.PUT_LINE('=======================================================');
DBMS_OUTPUT.PUT_LINE('Return Status: ' || l_return_status); IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
dbms_output.put_line('x_msg_count:' || l_msg_count); Error_Handler.GET_MESSAGE_LIST(x_message_list => x_message_list);
DBMS_OUTPUT.PUT_LINE('Error Message Count :' || x_message_list.COUNT);
FOR i IN .. x_message_list.COUNT LOOP
DBMS_OUTPUT.PUT_LINE(to_char(i) || ':' || x_message_list(i)
.entity_index || ':' || x_message_list(i)
.table_name);
DBMS_OUTPUT.PUT_LINE(to_char(i) || ':' || x_message_list(i)
.message_text);
END LOOP;
END IF;
DBMS_OUTPUT.PUT_LINE('======================================================='); EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Exception Occured :');
DBMS_OUTPUT.PUT_LINE(SQLCODE || ':' || SQLERRM);
DBMS_OUTPUT.PUT_LINE('=======================================================');
RAISE;
END;
[Oracle EBS APIs]import Flow routing and DJ routing using BOM_RTG_PUB.PROCESS_RTG APIs的更多相关文章
- Oracle EBS R12 WIP Component Issue&Return Process
oracleassemblytransactionscomponentsjobsreference 目录(?)[-] 定义BOM 定义Routing 定义WIP Discrete Job 发料 Mat ...
- Oracle EBS应用笔记整理 (转自IT++ flyingkite)
***************************************************** Author: Flyingkite Blog: http://space.itpub. ...
- Oracle EBS Form Builder使用Java beans创建窗体
最近有个项目,需要研究一下Oracle的E-Business Sutie(EBS),对于以前没接触此套件的我来说,简直太痛苦了.在网上找了一堆资料,试着进行Form二次开发,也遇到各类奇葩问题.目前遇 ...
- Oracle Order Management DropShip Flow for R12
Oracle Order Management DropShip Flow for R12 Email ThisBlogThis!Share to TwitterShare to FacebookSh ...
- Oracle EBS 12.2.6 on VirtualBox
Back in May, Oracle announced the general availability of Oracle VM Virtual Appliance for E-Business ...
- Oracle EBS WMS功能介绍(二)
Oracle EBS WMS功能介绍(二) (版权声明,本人原创或者翻译的文章如需转载,如转载用于个人学习,请注明出处.否则请与本人联系,违者必究) 出货物流逻辑主要包括 1. 打包.能够进 ...
- Oracle EBS Model Function Technical
♡.Oracle EBS(ERP)Oracle 是公司名字,这个我估计大家都知道.EBS是E-Business Suite的缩写,简单的说,就是Oracle做的一个企业级的信息化软件或者系统,里面包含 ...
- BPM与 SAP & Oracle EBS集成解决方案分享
一.需求分析 SAP和Oracle EBS都是作为全球顶级的的ERP产 品,得到了众多客户的青睐.然而由于系统庞大.价格昂贵以及定位不同,客户在实施过程中经常会面临以下困惑: 1.SAP如何实现&qu ...
- Oracle EBS - Doc
Oracle EBS spec.: http://vianet/IT/IT%20Dept/IT%20Project%20Update2/Active%20Projects%20%20Manufactu ...
随机推荐
- Node.js 数据库实时监控库 node-dbmon
node-dbmon 是一个 Node.js 数据库实时监控库,如果你希望在数据库表数据更改后,或者是文件修改后能更新 GUI,那么这个库正好适合你. https://github.com/strap ...
- 能够提高开发效率的 Eclipse 实用操作
工欲善其事,必先利其器.对于程序员来说,Eclipse便是其中的一个“器”.本文会从Eclipse快捷键和实用技巧这两个篇章展开介绍.Eclipse快捷键用熟后,不用鼠标,便可进行编程开发,避免鼠标分 ...
- homework_06 围棋程序改进
1) 把程序编译通过, 跑起来. 读懂程序,在你觉得比较难懂的地方加上一些注释,这样大家就能比较容易地了解这些程序在干什么. 把正确的 playPrev(GoMove) 的方法给实现了. 注释见Git ...
- 使用Core Data应避免的十个错误
原文:Avoiding Ten Big Mistakes iOS Developers Make with Core Data http://www.cocoachina.com/applenew ...
- [iOS基础控件 - 6.9] 聊天界面Demo
A.需求 做出一个类似于QQ.微信的聊天界面 1.每个cell包含发送时间.发送人(头像).发送信息 2.使用对方头像放在左边,我方头像在右边 3.对方信息使用白色背景对话框,我方信息使用蓝色背景对话 ...
- HDU 4461 The Power of Xiangqi (水题)
题意:给定一些字母,每个字母都代表一值,如果字母中没有B,或者C,那么就在总值大于1的条件下删除1,然后比较大小. 析:没什么好说的,加起来比较就好了. 代码如下: #pragma comment(l ...
- PHP- Windows无法在本地计算机启动Apache的解决方法
装好了WAMP,开始可以进行我的PHP学习了.可是装后却打不开locahost. 百度后如下解决了:"Windows不能在本地计算机启动Apache2.有关更多信息,查阅系统事件日志.如果这 ...
- [置顶] Jquery中DOM操作(详细)
Jquery中的DOM操作 为了能全面的讲解DOM操作,首先需要构建一个网页. HTML代码: <%@ page language="java" import="j ...
- c# 实现IComparable、IComparer接口、Comparer类的详解
在默认情况下,对象的Equals(object o)方法(基类Object提供),是比较两个对象变量是否引用同一对象.我们要必须我自己的对象,必须自己定义对象比较方式.IComparable和ICom ...
- linux信号量超过系统限制
部署一台新服务器,信号量报错,观察也没有key冲突,错误分析及解决如下: 创建一个不存在的信号量集返回参数错误的报错,因为信号量集的信号量数量超过了系统限制. 系统默认 /home/poc#ipcs ...