--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的更多相关文章

  1. Oracle EBS OPM close batch

    --close_batch --created by jenrry DECLARE x_message_count NUMBER; x_message_list VARCHAR2 (4000); x_ ...

  2. Oracle EBS OPM complete batch

    --complete_batch --created by jenrry SET serveroutput on DECLARE x_return_status VARCHAR2 (1); l_exc ...

  3. Oracle EBS OPM update material txn

    --update_material_txn --created by jenrry DECLARE p_mmti_rec mtl_transactions_interface%ROWTYPE; p_m ...

  4. Oracle EBS OPM 创建生产批

    --创建生产批 --created by jenrry DECLARE x_message_count NUMBER; x_message_list VARCHAR2 (2000); x_return ...

  5. Oracle EBS OPM 生产批创建事务处理

    --生产批创建事物处理 --created by jenrry DECLARE p_mmti_rec mtl_transactions_interface%ROWTYPE; p_mmli_tbl gm ...

  6. Oracle EBS OPM convert dtl reservation

    --convert_dtl_reservation --created by jenrry DECLARE l_reservation_rec mtl_reservations%ROWTYPE; l_ ...

  7. Oracle EBS OPM complete step

    --complete_step --created by jenrry DECLARE x_return_status VARCHAR2 (1); l_exception_material_tbl g ...

  8. Oracle EBS OPM release step

    --release_step生产批 --created by jenrry SET serveroutput on DECLARE x_return_status VARCHAR2 (1); l_ex ...

  9. Oracle EBS OPM 发放生产批

    --发放生产批 --created by jenrry DECLARE x_return_status VARCHAR2 (1); l_exception_material_tbl gme_commo ...

随机推荐

  1. vue实现短信验证码登录

    无论是移动端还是pc端登录或者注册界面都会见到手机验证码登录这个功能,输入手机号,得到验证码,最后先服务器发送请求,保存登录的信息,一个必不可少的功能 思路 1,先判断手机号和验证是否为空, 2,点击 ...

  2. [Python 从入门到放弃] 6. 文件与异常(二)

    本章所用test.txt文件可以在( [Python 从入门到放弃] 6. 文件与异常(一))找到并自行创建 现在有个需求,对test.txt中的文本内容进行修改: (1)将期间的‘:’改为‘ sai ...

  3. rabbitmq 生产环境配置

    目录 一 rabbitmq 生产部署 1.1 rabbitmq.conf 1.2 advanced.config 1.3 rabbitmq-env.conf 1.4 在生产环境中不适用的策略. 一 r ...

  4. docker(一)

    一.docker 概述 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 linux 机器上,也可以实现虚拟化.容器是完全使用沙箱 ...

  5. linux开机自启动设置,自定义开机启动模版,nginx开机自启动服务

    /etc/init.d 目录,我们把shell脚本放在这个目录下来作为启动脚本 都是用来放服务脚本的,当Linux启动时,会寻找这些目录中的服务脚本,并根据脚本的run level确定不同的启动级别. ...

  6. Makefile中.PHONY的作用

    单词phony (即phoney)的意思是:伪造的,假的.来自collins的解释是: If you describe something as phoney, you disapprove of i ...

  7. 读jQuery源码释疑笔记3

    1.在jQuery.fn=jQuery.prototype中定义了方法:init, map, each , toArray, get, pushStack,   ready,  slice,first ...

  8. Python之pymysql的使用

    在python3.x中,可以使用pymysql来MySQL数据库的连接,并实现数据库的各种操作,本次博客主要介绍了pymysql的安装和使用方法. PyMySQL的安装 一..windows上的安装方 ...

  9. C#编译和运行过程图例

    一张图,描述C#编译和运行过程,比较容易记忆理解

  10. RESTful API入门

      RESTful是一种设计风格,并不是一种标准. 简短的去概括的话,就是:1.URL 定位资源 资源,就是数据.比如newsfeed,friends,order等 2.用 HTTP 动词描述操作. ...