--工艺路线

 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

最新文章

  1. Java设置session超时(失效)的三种方式
  2. 数据存储与IO(二)
  3. 添加ModelGoon插件Eclipse自动生成UML图
  4. iOS 数据类型
  5. apache solr简单搭建
  6. css布局学习笔记之max-width
  7. Mysql数据库启动
  8. 图片上传webuploader
  9. Javascript设计模式系列二
  10. suds库使用说明官方文档
  11. day1 python基础知识
  12. MFC与Webbrower交互(通过JS)
  13. vue-组件注册
  14. flask中利用from来进行对修改修改时旧密码的验证
  15. 详解大数据采集引擎之Sqoop&amp;采集oracle数据库中的数据
  16. 配置idea
  17. 浏览器对js运行时间的限制
  18. 自己写的一些Excel及WordVBA函数[原创]
  19. Atcoder #014 agc014_D 树形DP+nim变形
  20. String类的一些常用操作方法

热门文章

  1. Codeforces Beta Round #7 A. Kalevitch and Chess 水题
  2. Codeforces Round #194 (Div. 1) A. Secrets 数学
  3. hdu 4114 Disney&#39;s FastPass 状压dp
  4. uoj 41 【清华集训2014】矩阵变换 婚姻稳定问题
  5. IntelliJ IDEA导出设置
  6. XPath教程
  7. java内存泄露补充样例
  8. 虚拟机安装Linux过程和踩坑
  9. SharePoint 在中国为什么吃不开?
  10. Junit初级篇