Oracle erp销售订单订单行状态不对导致订单无法关闭之解决方案!
日期:2007年7月21日 作者: 查看:[大字体 中字体 小字体]-
销售订单行booked后,挑库到待发库,突然决定不再发货,对订单行作backordered,但是订单行的状态没有变为cancle,仍然是picked,导致整个订单无法关闭!
具体操作步骤:
### Steps to ReprodUCe ###
1)om/order organizer /new sale order i create an sale order ,entry order line ordered item:C.BT.250-100G-2.8.J
02 qty: is 11
2) om/ship transaction/pick release reserved 11.and transer to satged subinventory 'DFK'.
3) later,i don't want to ship it to custmer, in ship transaction form, i do backordered,delivery is clos
ed,but order line status is
picked, in ship transaction form, query it ,line pick status is staged, reserved is not released.Souliton:
Dwon the script from Metalink
REM $Header: single.sql 115.0 2000/06/15 01:55:37 ysinha noship $
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;set ver off
set feed off
set serveroutput on size 500000
Prompt
accept order_line_id number prompt 'Enter LINE_ID of the Line to Cancel : '
spool &order_line_id
col dtime format a25 heading 'Script run at Date/Time' ;
select to_char(sysdate, 'DD-MON-YYYY HH:MI:SS') dtime from dual;
Declare
l_line_id number := &order_line_id;
l_user_id number;
l_resp_id number;
l_resp_appl_id number;
l_wf_exists varchar2(1) := 'Y';
Begin
update oe_order_lines_all
set ordered_quantity = 0
, cancelled_quantity = nvl(cancelled_quantity, 0) + ordered_quantity
, cancelled_flag = 'Y'
, open_flag = 'N'
, flow_status_code = 'CANCELLED'
, last_updated_by = -2564702
, last_update_date = sysdate
where line_id = l_line_id;
Begin
select number_value
into l_user_id
from wf_item_attribute_values
where item_type = 'OEOL'
and item_key = to_char(l_line_id)
and name = 'USER_ID';
select number_value
into l_resp_id
from wf_item_attribute_values
where item_type = 'OEOL'
and item_key = to_char(l_line_id)
and name = 'RESPONSIBILITY_ID';
select number_value
into l_resp_appl_id
from wf_item_attribute_values
where item_type = 'OEOL'
and item_key = to_char(l_line_id)
and name = 'APPLICATION_ID';
Exception
When No_Data_Found Then
l_wf_exists := 'N';
End;
If l_wf_exists = 'Y' Then
fnd_global.apps_initialize(l_user_id, l_resp_id, l_resp_appl_id);
wf_engine.handleerror( OE_Globals.G_WFI_LIN
, to_char(l_line_id)
, 'CLOSE_LINE'
, 'RETRY'
, 'CANCEL'
);
End If;
update wsh_delivery_assignments
set delivery_id = null
, parent_delivery_detail_id = null
, last_updated_by = -2564702
, last_update_date = sysdate
where delivery_detail_id in
(select wdd.delivery_detail_id
from wsh_delivery_details wdd, oe_order_lines_all oel
where wdd.source_line_id = l_line_id
and wdd.source_code = 'OE'
and oel.open_flag = 'N'
and oel.shipped_quantity is null
and oel.ordered_quantity = 0
and released_status <> 'D');
update wsh_delivery_details
set released_status = 'D'
, src_requested_quantity = 0
, requested_quantity = 0
, shipped_quantity = 0
, cycle_count_quantity = 0
, cancelled_quantity = decode(requested_quantity,0,cancelled_quantity,requested_quantity)
, subinventory = null
, locator_id = null
, lot_number = null
, serial_number = null
, revision = null
, ship_set_id = null
, inv_interfaced_flag = 'X'
, oe_interfaced_flag = 'X'
, last_updated_by = -2564702
, last_update_date = sysdate
where delivery_detail_id in
(select wdd.delivery_detail_id
from wsh_delivery_details wdd, oe_order_lines_all oel
where wdd.source_line_id = l_line_id
and wdd.source_code = 'OE'
and oel.open_flag = 'N'
and oel.shipped_quantity is null
and oel.ordered_quantity = 0
and released_status <> 'D');
- [1] [2] [3] 下一页
-
- Oracle erp销售订单订单行状态不对导致订单无法关闭之解决方案! 相关文章:
- ·Oracle erp销售订单订单行状态不对导致订单无法关闭之解决方案!
- Oracle erp销售订单订单行状态不对导致订单无法关闭之解决方案! 相关软件
- 特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作
- 者.文章版权归文章原始作者所有.对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转
- 载的文章有版权问题请联系编辑人员,我们尽快予以更正. 转载请注明来源:http://www.hackhome.com
上一篇:SQL*Report 1.1 Error Messages And Codes
下一篇:堆与栈的区别
精品推荐
热点TOP10
- ·9istatspack使用手册
- ·ORACLE UPDATE 语句语法与性能分析的一点看法
- ·ORACLE备份&恢复案例--ORACLE BACKUP&RESTORE SCHEME
- ·关于oracle日期函数的介绍和使用
- ·Oracle的SQL*PLUS命令的使用大全
- ·oracle函数之常见单行字符串函数
- ·ORACLE傻瓜手册长篇连载
- ·详细介绍ORACLE sqlplus命令
- ·Decode 函数的用法
- ·ORACLE 培训教程(1)
- ·Oracle 游标使用大全
- ·把Oracle数据库移植到Microsoft SQL Server 7.0
- ·Oracle数据库检查死锁的sql
- ·Oracle的SQL语句执行效率问题查找与解决方法
- ·Oracle常用的OCI函数
- ·用正则表达式函数验证身份证号码合法性
- ·oracle中pro*c的学习
- ·VMware下RedHat安装Oracle 9i RAC全攻略
- ·Oracle 9i 分析函数参考手册
- ·数据库备份与恢复测试(8)
特别推荐
- ·Oracle环境下APACHE虚拟服务器如何设置
- ·常见Oracle HINT的用法
- ·ORA-00257: archiver error. Connect internal only, until freed.
- ·oracle的update问题
- ·小议索引的使用
- ·oracle产品服务和技术级别介绍,OrACLE服务
- ·Oracle 数据类型
- ·Oracle数据库检查死锁的sql
- ·怎样将冷备份移植到另一台Solaris机器上
- ·Oracle 动态SQL返回单条结果和结果集
- ·手动建立 Oracle9i 数据库
- ·Oracle内存结构(二)----Shared Pool的详细信息
- ·DELPHI 调用 Oracle 存储过程并返回数据集的例子.
- ·关于block中行数据的存储与空间重组三
- ·Sybase及SQL Anywhere SQL语句小结
- ·ORACLE备份&恢复案例--ORACLE BACKUP&RESTORE SCHEME
- ·Oracle ERP 11业务调研报告-AP应付帐
- ·在 Oracle 数据库上构建 .NET 应用程序
- ·Oracle的SQL语句执行效率问题查找与解决方法
- ·oracle中pro*c的学习
