Oracle EBS OPM release step
--release_step生产批
--created by jenrry
SET serveroutput on DECLARE
x_return_status VARCHAR2 (1);
l_exception_material_tbl gme_common_pvt.exceptions_tab;
l_batch_step_rec gme_batch_steps%ROWTYPE;
l_in_batch_step_rec gme_batch_steps%ROWTYPE;
l_org_code VARCHAR2 (3);
l_batch_no VARCHAR2 (32);
l_ignore_exception VARCHAR2 (1);
l_val_ff VARCHAR2 (1);
x_message_count NUMBER;
x_message_list VARCHAR2 (2000);
l_user_name VARCHAR2 (80);
l_user_id NUMBER; CURSOR get_user_id (v_user_name IN VARCHAR2)
IS
SELECT user_id
FROM fnd_user
WHERE user_name = v_user_name; PROCEDURE display_messages (p_msg_count IN NUMBER)
IS
MESSAGE VARCHAR2 (2000);
dummy NUMBER;
l_api_name CONSTANT VARCHAR2 (30) := 'DISPLAY_MESSAGES';
BEGIN
FOR i IN 1 .. p_msg_count
LOOP
fnd_msg_pub.get (p_msg_index => i,
p_data => MESSAGE,
p_encoded => 'F',
p_msg_index_out => dummy
);
DBMS_OUTPUT.put_line ('Message ' || TO_CHAR (i) || ' ' || MESSAGE);
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
fnd_msg_pub.add_exc_msg ('wrapper for Release_Step ', l_api_name);
END display_messages;
BEGIN
DBMS_OUTPUT.ENABLE (20000);
l_user_name := 'PROCESS_OPS'; OPEN get_user_id (l_user_name); FETCH get_user_id
INTO l_user_id; IF get_user_id%NOTFOUND
THEN
DBMS_OUTPUT.put_line ('Invalid User ' || l_user_name); CLOSE get_user_id; RAISE NO_DATA_FOUND;
END IF; CLOSE get_user_id; fnd_profile.initialize (l_user_id);
fnd_global.apps_initialize (user_id => l_user_id,
resp_id => NULL,
resp_appl_id => NULL
);
l_in_batch_step_rec.batchstep_no := 10;
l_batch_no := '1511';
l_org_code := 'PR1';
l_in_batch_step_rec.actual_start_date :=
TO_DATE ('10-07-2005 08:00:00', 'MM-DD-YYYY HH24:MI:SS');
l_ignore_exception := fnd_api.g_true;
l_val_ff := fnd_api.g_true;
gme_api_pub.release_step
(p_api_version => 2.0,
p_validation_level => gme_common_pvt.g_max_errors,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_true,
x_message_count => x_message_count,
x_message_list => x_message_list,
x_return_status => x_return_status,
p_batch_step_rec => l_in_batch_step_rec,
p_batch_no => l_batch_no,
p_org_code => l_org_code,
p_ignore_exception => l_ignore_exception,
p_validate_flexfields => l_val_ff,
x_batch_step_rec => l_batch_step_rec,
x_exception_material_tbl => l_exception_material_tbl
);
DBMS_OUTPUT.put_line (SUBSTR ('x_return_status = ' || x_return_status,
1,
255
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.batch_id = '
|| TO_CHAR (l_batch_step_rec.batch_id)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.batchstep_id = '
|| TO_CHAR (l_batch_step_rec.batchstep_id)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.batchstep_no = '
|| TO_CHAR (l_batch_step_rec.batchstep_no)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.plan_start_date = '
|| TO_CHAR (l_batch_step_rec.plan_start_date,
'DD-MON-YYYY HH24:MI:SS'
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.plan_cmplt_date = '
|| TO_CHAR (l_batch_step_rec.plan_cmplt_date,
'DD-MON-YYYY HH24:MI:SS'
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.actual_start_date = '
|| TO_CHAR (l_batch_step_rec.actual_start_date,
'DD-MON-YYYY HH24:MI:SS'
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.actual_cmplt_date = '
|| TO_CHAR (l_batch_step_rec.actual_cmplt_date,
'DD-MON-YYYY HH24:MI:SS'
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.step_status = '
|| TO_CHAR (l_batch_step_rec.step_status)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.last_update_date = '
|| TO_CHAR (l_batch_step_rec.last_update_date,
'DD-MON-YYYY HH24:MI:SS'
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.last_updated_by = '
|| TO_CHAR (l_batch_step_rec.last_updated_by)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.creation_date = '
|| TO_CHAR (l_batch_step_rec.creation_date,
'DD-MON-YYYY HH24:MI:SS'
)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.created_by = '
|| TO_CHAR (l_batch_step_rec.created_by)
);
DBMS_OUTPUT.put_line ( 'l_batch_step_rec.last_update_login = '
|| TO_CHAR (l_batch_step_rec.last_update_login)
); FOR i IN 1 .. l_exception_material_tbl.COUNT
LOOP
DBMS_OUTPUT.put_line ('Record i = ' || TO_CHAR (i));
DBMS_OUTPUT.put_line
( 'l_exception_material_tbl(i).ORGANIZATION_ID = '
|| TO_CHAR
(l_exception_material_tbl (i).organization_id
)
);
DBMS_OUTPUT.put_line ( 'l_exception_material_tbl(i).BATCH_ID = '
|| TO_CHAR (l_exception_material_tbl (i).batch_id)
);
DBMS_OUTPUT.put_line
( 'l_exception_material_tbl(i).MATERIAL_DETAIL_ID = '
|| TO_CHAR
(l_exception_material_tbl (i).material_detail_id
)
);
DBMS_OUTPUT.put_line
( 'l_exception_material_tbl(i).PENDING_MOVE_ORDER_IND = '
|| TO_CHAR
(l_exception_material_tbl (i).pending_move_order_ind
)
);
DBMS_OUTPUT.put_line
( 'l_exception_material_tbl(i).PENDING_RESERVATIONS_IND = '
|| TO_CHAR
(l_exception_material_tbl (i).pending_reservations_ind
)
);
DBMS_OUTPUT.put_line
( 'l_exception_material_tbl(i).TRANSACTED_QTY = '
|| TO_CHAR
(l_exception_material_tbl (i).transacted_qty
)
);
DBMS_OUTPUT.put_line ( 'l_exception_material_tbl(i).EXCEPTION_QTY = '
|| TO_CHAR
(l_exception_material_tbl (i).exception_qty
)
);
END LOOP; DBMS_OUTPUT.put_line ('x_message_count = ' || TO_CHAR (x_message_count));
DBMS_OUTPUT.put_line (SUBSTR ('x_message_list = ' || x_message_list, 1,
255)
); IF x_message_count > 0
THEN
display_messages (x_message_count);
END IF;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error ' || TO_CHAR (SQLCODE) || ': ' || SQLERRM);
RAISE;
END;
/
Oracle EBS OPM release step的更多相关文章
- Oracle EBS OPM complete step
--complete_step --created by jenrry DECLARE x_return_status VARCHAR2 (1); l_exception_material_tbl g ...
- Oracle EBS OPM update material txn
--update_material_txn --created by jenrry DECLARE p_mmti_rec mtl_transactions_interface%ROWTYPE; p_m ...
- Oracle EBS OPM 生产批创建事务处理
--生产批创建事物处理 --created by jenrry DECLARE p_mmti_rec mtl_transactions_interface%ROWTYPE; p_mmli_tbl gm ...
- Oracle EBS OPM close batch
--close_batch --created by jenrry DECLARE x_message_count NUMBER; x_message_list VARCHAR2 (4000); x_ ...
- Oracle EBS OPM convert dtl reservation
--convert_dtl_reservation --created by jenrry DECLARE l_reservation_rec mtl_reservations%ROWTYPE; l_ ...
- Oracle EBS OPM reshedule batch
--reschedule_batch --created by jenrry DECLARE x_message_count NUMBER; x_message_list VARCHAR2 (2000 ...
- Oracle EBS OPM complete batch
--complete_batch --created by jenrry SET serveroutput on DECLARE x_return_status VARCHAR2 (1); l_exc ...
- Oracle EBS OPM 创建生产批
--创建生产批 --created by jenrry DECLARE x_message_count NUMBER; x_message_list VARCHAR2 (2000); x_return ...
- Oracle EBS OPM 发放生产批
--发放生产批 --created by jenrry DECLARE x_return_status VARCHAR2 (1); l_exception_material_tbl gme_commo ...
随机推荐
- Vue笔记:在项目中使用 SCSS
背景概述 1. CSS预处理器 css预处理器定义了一种新的编程语言,编译后成正常的CSS文件.为CSS增加一些编程的特性,无需考虑浏览器的兼容问题,让CSS更加简洁,适应性更强,可读性更佳,更易于代 ...
- 32-hadoop-hbase调优
1, 数据膨胀后, 才对region进行分区, 效率比较低, 所以需要预创建region, 进行负载均衡写入 package com.wenbronk.hbase; import org.apache ...
- Web前后端分离知识整理
Web研发模式的演变 职责分离(减少扯皮,开发效率),代码分离(可维护性) 简单明快的早期时代 后端为主的 MVC 时代 Ajax 带来的 SPA 时代 前端为主的 MV* 时代 Node 带来的全栈 ...
- [机器学习] 性能评估指标(精确率、召回率、ROC、AUC)
混淆矩阵 介绍这些概念之前先来介绍一个概念:混淆矩阵(confusion matrix).对于 k 元分类,其实它就是一个k x k的表格,用来记录分类器的预测结果.对于常见的二元分类,它的混淆矩阵是 ...
- 使用Vue的slot插槽分发父组件内容实现高度复用、更加灵活的组件
写在前面 之前写过一篇关于vue实现dialog会话框组件的文章http://www.cnblogs.com/fozero/p/8546883.html, 讲到了如何实现一个vue对话框组件,其中涉及 ...
- 浅析Java源码之Math.random()
从零自学java消遣一下,看书有点脑阔疼,不如看看源码!(๑╹◡╹)ノ""" JS中Math调用的都是本地方法,底层全是用C++写的,所以完全无法观察实现过程,Jav ...
- ASP.NET开发,从二层至三层,至面向对象 (5)
此是一系列博文,最后一篇了.也是面向初学者而作,望你们能有更好,更多对ASP.NET面向对编程了解与认识. 前一篇中<ASP.NET开发,从二层至三层,至面向对象 (4)>http://w ...
- WPF备忘录(5)怎样修改模板中的控件
首先,想问大家一个问题,你们如果要给一个Button添加背景图片会怎么做?(呵呵,这个问题又点小白哈) 是这样吗? <Button Height="57" Horizonta ...
- WinMain函数详解(转载再编辑)
在Windows应用程序中,我们可以认为 WinMain() 函数是程序的入口,WinMain()的原型如下: int WINAPI WinMain( HINSTANCE hInstance, HIN ...
- 从xml文件取值
假设有个 test.xml,包含以下字段: <config> <property name="login_protocol" value="http&q ...