BOM*创建工艺路线
--工艺路线
DECLARE
-- 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(1) := NULL;
l_msg_count NUMBER := 0;
l_cnt NUMBER := 1; -- WHO columns
l_user_id NUMBER := -1;
l_resp_id NUMBER := -1;
l_application_id NUMBER := -1;
l_row_cnt NUMBER := 1;
l_user_name VARCHAR2(30) := 'HAND_CW'; BEGIN FOR c IN (SELECT t.*
FROM cux.cux_update_routing_temp t
WHERE 1 = 1
AND t.p_session_id = '')
LOOP /*-- 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
l_application_id := 702;
l_resp_id := 50723;*/ -- Initialize applications information
fnd_global.apps_initialize(1510,
50761,
401);
-- 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 := '';
l_rtg_header_rec.organization_code := 'A01';
l_rtg_header_rec.alternate_routing_code := NULL;
l_rtg_header_rec.transaction_type := 'UPDATE'; l_operation_tbl(l_cnt).assembly_item_name := '';
l_operation_tbl(l_cnt).organization_code := 'A01';
l_operation_tbl(l_cnt).alternate_routing_code := NULL;
--l_operation_tbl(l_cnt).department_code := 'AR';
l_operation_tbl(l_cnt).operation_sequence_number := '';
l_operation_tbl(l_cnt).operation_type := 1;
l_operation_tbl(l_cnt).start_effective_date := SYSDATE;
l_operation_tbl(l_cnt).standard_operation_code := c.p_operation_code;
l_operation_tbl(l_cnt).transaction_type := 'UPDATE'; --l_operation_tbl(l_cnt).option_dependent_flag := c.p_option_dependent_flag;
l_operation_tbl(l_cnt).count_point_type := c.p_count_point_flag;
-- l_operation_tbl(l_cnt).count_point_type := c.p_autocharge_flag;
l_operation_tbl(l_cnt).backflush_flag := c.p_backflush_flag;
l_operation_tbl(l_cnt).attribute1 := c.p_attribute1;
l_operation_tbl(l_cnt).attribute2 := c.p_attribute2;
l_operation_tbl(l_cnt).attribute3 := c.p_attribute3;
l_operation_tbl(l_cnt).attribute4 := c.p_attribute4;
l_operation_tbl(l_cnt).attribute5 := c.p_attribute5;
l_operation_tbl(l_cnt).attribute6 := c.p_attribute6;
l_operation_tbl(l_cnt).attribute7 := c.p_attribute7;
l_operation_tbl(l_cnt).attribute8 := c.p_attribute8;
l_operation_tbl(l_cnt).attribute9 := c.p_attribute9;
l_operation_tbl(l_cnt).attribute10 := c.p_attribute10;
l_operation_tbl(l_cnt).attribute11 := c.p_attribute11;
l_operation_tbl(l_cnt).attribute12 := c.p_attribute12;
l_operation_tbl(l_cnt).attribute13 := c.p_attribute13;
l_operation_tbl(l_cnt).attribute14 := c.p_attribute14;
l_operation_tbl(l_cnt).attribute15 := c.p_attribute15; /*
l_op_resource_tbl(l_cnt).assembly_item_name := '102021101011000007';
l_op_resource_tbl(l_cnt).organization_code := 'A01';
l_op_resource_tbl(l_cnt).alternate_routing_code := NULL;
l_op_resource_tbl(l_cnt).operation_sequence_number := '20';
l_op_resource_tbl(l_cnt).usage_rate_or_amount := 3;
l_op_resource_tbl(l_cnt).transaction_type := 'UPDATE';
l_op_resource_tbl(l_cnt).resource_sequence_number := '10';
l_op_resource_tbl(l_cnt).op_start_effective_date := to_date( '2014/5/29 18:58:26',
'YYYY-MM-DD hh24:mi:ss' );*/ 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 1 .. 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('======================================================='); l_cnt := l_cnt + 1;
END LOOP; EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Exception Occured :');
dbms_output.put_line(SQLCODE || ':' || SQLERRM);
dbms_output.put_line('=======================================================');
RAISE;
END;
创建工艺路线
--标准工序
没有相关标准api
BOM*创建工艺路线的更多相关文章
- Oracle EBS-SQL (BOM-18):检查BOM与工艺路线对照.sql
/*有工艺路线,无BOM清单*/ select msi.segment1, msi.description from apps.BOM_OPERATIONAL_ROUTINGS bor, apps.m ...
- Oracle EBS-SQL (BOM-7):检查有BOM无工艺路线的子装配件或成品.sql
select msi.segment1, msi.description, msi.item_typefrom inv.mtl_system_items_b msiwher ...
- PO ITEM_BOM_工艺路线SQL
---物料主数据接口 SELECT count(*)PO_MARA FROM STG.PO_MARA; SELECT count(*)PO_MARC FROM STG.PO_MARC; SELECT ...
- Oracle EBS-SQL (BOM-14):检查工艺路线明细.sql
select msi.segment1 装配件编码, msi.description ...
- EBS API及接口清单
https://www.cnblogs.com/lizicheng/p/9521742.html 模块 应用场景 类型 API/接口 AP 付款核销 API ap_pay_invoice_pkg.ap ...
- 所有标准API
序号 系统版本 模块 应用场景 类型 API/接口 参数规格 样例代码 备注 登记者 登记时间 关键字 1 12.1.3 AP 付款核销 API ap_pay_invoice_pkg.ap_pay_i ...
- 关于结构化BOM的思考
参加了今天的"自主生产音箱类产品BOM结构问题"(即非采购而是制造的音箱)会议,我发现大家在会议上呈现的产品结构对生产计划的层级需求已上升到5层的需求了,又找段会胜要了各位前期就此 ...
- BOM(制造数据管理)
--工艺路线 DECLARE -- API input variables l_operation_tbl bom_rtg_pub.operation_tbl_type := bom_rtg_pub. ...
- BOM设计的一些问题及解决方案探讨----合版BOM
BOM是ERP的核心资料,也是比较难的一块,不仅涉及的内容多,要求准确性高,时效性也要求高.但传统的ERP在处理BOM时有不少问题,因此也有些软件公司引入了各种BOM类型,像"标准BOM&q ...
随机推荐
- Eclipse下使用Stanford CoreNLP的方法
源码下载地址:CoreNLP官网. 目前release的CoreNLP version 3.5.0版本仅支持java-1.8及以上版本,因此有时需要为Eclipse添加jdk-1.8配置,配置方法如下 ...
- pat 打印沙漏
本题要求你写个程序把给定的符号打印成沙漏的形状.例如给定17个“*”,要求按下列格式打印 ***** *** * *** ***** 所谓“沙漏形状”,是指每行输出奇数个符号:各行符号中心对齐:相邻两 ...
- python输入输出入门 A+B
描述 求两个整数之和. 输入 输入数据只包括两个整数A和B. 输出 两个整数的和. 样例输入 1 2 样例输出 3 a=input().split() print(int(a[0])+int(a[1 ...
- bzoj 2286
第一道"虚树"题目(好吧,我也不知道这是不是虚树,但和虚树的思想肯定是一样的,都是简化树结构) 这一类算法核心思想都是简化树结构,只取我们必须的节点和一些信息,然后在简化后的树结构 ...
- tomcat使用Eclipse进行远程调试(线上调试)
什么是远程调试,就是在A机器上利用Eclipse单步跟踪调试B机器上的Web应用,当然调试A机器上Web应用也是没有问题的,90%我都是调试本机的Web应用,远程调试的意义我想我不用说了,大家都会想到 ...
- nodejs 导入导出模块module.exports向外暴露多个模块 require导入模块
.moudel.exports 导出模块 导出单个模块 // user.js moudel.exports = 函数名或者变量名: //app.js 导入 require('user.js') 当然. ...
- <摘录>io端口和io内存
linux中的 IO端口映射和IO内存映射 (一)地址的概念 1)物理地址:CPU地址总线传来的地址,由硬件电路控制其具体含义.物理地址中很大一部分是留给内存条中的内存的,但也常被映射到其他存储器上 ...
- 我弄的一些TASKER配置
http://tieba.baidu.com/p/2184969007 我弄的一些配置,需要的童鞋们找自己想要的吧,有些配置感觉还是很繁琐,请高手不吝赐教才好,图片太多,就发链接了. ◆保持屏幕开启, ...
- Wix使用整理(二)
1) 安装卸载时进行日志记录 Wix 制作的 Installer 的调试很麻烦,没有直接的 Bug 工具,可以通过记录安装日志的方式进行间接调试.命令为 msiexec /i pack ...
- Wix使用整理(一)
由于工作需要,学习了一段时间Wix,总算小有起色.鉴于国内Wix 的普及和使用有限,这里将个人遇到得问题和解决方案记录下来,以便交流和相互促进. Wix :全称 Windows Installer ...