Oracle EBS OPM reshedule batch
--reschedule_batch
--created by jenrry DECLARE
x_message_count NUMBER;
x_message_list VARCHAR2 (2000);
x_return_status VARCHAR2 (2000);
x_batch_header gme_batch_header%ROWTYPE;
p_batch_header_rec gme_batch_header%ROWTYPE;
p_use_workday_cal VARCHAR2 (100) := fnd_api.g_false;
p_contiguity_override VARCHAR2 (100) := fnd_api.g_true;
p_org_code VARCHAR2 (3);
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 Reschedule_Batch', 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
);
p_batch_header_rec.batch_id := 819043;
p_batch_header_rec.batch_no := '138177';
p_batch_header_rec.batch_type := 0;
p_batch_header_rec.plan_start_date :=
TO_DATE ('09-FEB-2009 01:01:01', 'DD-MON-YYYY HH24:MI:SS');
--p_batch_header_rec.actual_start_date := TO_DATE('');
--p_batch_header_rec.due_date := TO_DATE('');
--p_batch_header_rec.plan_cmplt_date := TO_DATE('10-FEB-2009 10:00:00','DD-MON-YYYY HH24:MI:SS');
--p_batch_header_rec.actual_cmplt_date := TO_DATE('');
p_batch_header_rec.batch_status := 1; gme_api_pub.reschedule_batch
(p_api_version => 2,
p_validation_level => 100,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_true,
p_org_code => 'PR1',
p_use_workday_cal => p_use_workday_cal,
p_contiguity_override => p_contiguity_override,
x_message_count => x_message_count,
x_message_list => x_message_list,
x_return_status => x_return_status,
p_batch_header_rec => p_batch_header_rec,
x_batch_header_rec => x_batch_header
);
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)
);
DBMS_OUTPUT.put_line (SUBSTR ('x_return_status = ' || x_return_status,
1,
255
)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.batch_id = '
|| TO_CHAR (x_batch_header.batch_id)
);
DBMS_OUTPUT.put_line (SUBSTR ( 'x_batch_header.batch_no = '
|| x_batch_header.batch_no,
1,
255
)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.batch_type = '
|| TO_CHAR (x_batch_header.batch_type)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.plan_start_date = '
|| TO_CHAR (x_batch_header.plan_start_date)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.actual_start_date = '
|| TO_CHAR (x_batch_header.actual_start_date)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.due_date = '
|| TO_CHAR (x_batch_header.due_date)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.plan_cmplt_date = '
|| TO_CHAR (x_batch_header.plan_cmplt_date)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.actual_cmplt_date = '
|| TO_CHAR (x_batch_header.actual_cmplt_date)
);
DBMS_OUTPUT.put_line ( 'x_batch_header.batch_status = '
|| TO_CHAR (x_batch_header.batch_status)
); IF x_message_count > 1
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 reshedule batch的更多相关文章
- Oracle EBS OPM close batch
--close_batch --created by jenrry DECLARE x_message_count NUMBER; x_message_list VARCHAR2 (4000); x_ ...
- Oracle EBS OPM complete batch
--complete_batch --created by jenrry SET serveroutput on DECLARE x_return_status VARCHAR2 (1); l_exc ...
- 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 x_message_count NUMBER; x_message_list VARCHAR2 (2000); x_return ...
- Oracle EBS OPM 生产批创建事务处理
--生产批创建事物处理 --created by jenrry DECLARE p_mmti_rec mtl_transactions_interface%ROWTYPE; p_mmli_tbl gm ...
- Oracle EBS OPM convert dtl reservation
--convert_dtl_reservation --created by jenrry DECLARE l_reservation_rec mtl_reservations%ROWTYPE; l_ ...
- Oracle EBS OPM complete step
--complete_step --created by jenrry DECLARE x_return_status VARCHAR2 (1); l_exception_material_tbl g ...
- Oracle EBS OPM release step
--release_step生产批 --created by jenrry SET serveroutput on DECLARE x_return_status VARCHAR2 (1); l_ex ...
- Oracle EBS OPM 发放生产批
--发放生产批 --created by jenrry DECLARE x_return_status VARCHAR2 (1); l_exception_material_tbl gme_commo ...
随机推荐
- 【JAVA】异常笔记
自定义异常需要注意: 所有异常都必须是 Throwable 的子类. 如果希望写一个检查性异常类,则需要继承 Exception 类. 如果你想写一个运行时异常类,那么需要继承 RuntimeExce ...
- 快速选择算法/Select 寻找第k大的数
参考算法导论9.3节的内容和这位大神的博客:http://blog.csdn.net/v_JULY_v上对这一节内容代码的实现进行了学习 尝试实现了以查找中位数为前提的select算法. 算法功能:可 ...
- MutationObserver DOM变化的观察
简单的给MutationObserver做个测试及总结笔记. MutationObserver,window上的一个(构造)函数,可以通过其创建的观察者(观察对象)达到观察DOM的变化的效果. 可适用 ...
- 在商城系统中使用设计模式----策略模式之在spring中使用策略模式
1.前言: 这是策略模式在spring中的使用,对策略模式不了解对同学可以移步在商城中简单对使用策略模式. 2.问题: 在策略模式中,我们创建表示各种策略的对象和一个行为,随着策略对象改变而改变的 c ...
- 详解C#泛型(一)
一.C#中的泛型引入了类型参数的概念,类似于C++中的模板,类型参数可以使类型或方法中的一个或多个类型的指定推迟到实例化或调用时,使用泛型可以更大程度的重用代码.保护类型安全性并提高性能:可以创建自定 ...
- centos7 安装配置zookeeper
https://blog.csdn.net/AaronLin6/article/details/78438877 https://www.cnblogs.com/sxdcgaq8080/p/74924 ...
- [Python学习笔记-001] 内置函数getattr()
如果某个实例foo有多个方法, 当对foo的每一个方法我们都需要使用try ... except ...进行包装的时候,内置函数getattr()可以用来精简代码. 1. getattr()的用法 # ...
- WPF中的Visual Tree和Logical Tree与路由事件
1.Visual Tree和Logical TreeLogical Tree:逻辑树,WPF中用户界面有一个对象树构建而成,这棵树叫做逻辑树,元素的声明分层结构形成了所谓的逻辑树!!Visual Tr ...
- Linux QT 连接 Sqlite数据库
#include <QApplication> #include <QDebug> #include <QSqlQuery> #include <QSqlDa ...
- Deep learning with Python 学习笔记(6)
本节介绍循环神经网络及其优化 循环神经网络(RNN,recurrent neural network)处理序列的方式是,遍历所有序列元素,并保存一个状态(state),其中包含与已查看内容相关的信息. ...