动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息



本月文章推荐
.Oracle 操作图片.
.Windows环境下Oracle监听服务启动.
.Oracle9中XML SQL Utility技术指.
.怎样在Oracle中创建维护图形大对.
.ORACLE SQL性能优化系列 (十二).
.Oracle 4月更新修复多个安全漏洞.
.Oracle 数据表分区的策略.
.如何在Linux下的安装Oracle.
.在多个目录之中自动搜索需要的文.
.使用dbms_repair修复块损坏的具体.
.超大型ORACLE数据库应用系统的设.
.对刚接触oracle的人比较有用的一.
.Oracle:10.0.1.2.0中的程序缺陷.
.Oracle 数据库复制常用脚本.
.Logminer in Action.
.PL/SQL学习之oracle排序系列二(上.
.面向对象的关系数据库设计.
.实例讲解sql_trace和access path.
.ORACLE碎片整理 (2).
.登入oracle程序的ip address.

销售订单单行状态不对订单不关闭的处理

发表日期:2008-2-9 |



  销售订单行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');
  
  Exception
  
  when others then
  
  rollback;
  
  dbms_output.put_line(substr(sqlerrm, 1, 240));
  
  End;
  
  /
  
  Prompt
  
  Prompt ===========================================================
  
  Prompt You must enter COMMIT to Save changes or ROLLBACK to Revert
  
  Prompt ===========================================================
  
  spool off
  
  ……………………………………………………………………………………
  
  $ sqlplus apps/apps @single.sql
  
  SQL*Plus: Release 8.0.6.0.0 - Production on Sat Aug 13 11:11:04 2005
  
  (c) Copyright 1999 Oracle Corporation. All rights reserved.
  
  Connected to:
  
  Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
  
  With the Partitioning option
  
  JServer Release 8.1.7.4.0 - Production
  
  Enter LINE_ID of the Line to Cancel : 858580
  
  Script run at Date/Time
  
  -------------------------
  
  13-AUG-2005 11:33:00
  
  ===========================================================
  
  You must enter COMMIT to Save changes or ROLLBACK to Revert
  
  ===========================================================
  
  SQL> commit;

  
  SQL>
  
  <span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'; mso-bidi-f
上一篇:A little test for index 人气:283
下一篇:本地分区索引如何确定表空间(1) 人气:915
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-7-25 WikyBlog v1.7.0.1 多国语言版
2008-7-25 乐彼网上开店系统(56770 Eshop)
2008-7-25 赛特网站管理系统sitecms v3.6.0
2008-7-25 Modoer多功能点评系统 v1.0.1 Bu
2008-7-25 Shangducms Teamsuit! v1.1.0 开
2008-7-25 幻影动漫网视频系统(Ppdong) v1.
2008-7-25 acteecompany企业网站建设系统 v
2008-7-25 恒浪整合管理系统 ims v4.1 ACCE
2008-7-25 艺术图库系统 v1.0 beta
2008-7-19 UltraEdit 简体中文增强版 14.10
2008-7-19 CentOS 5.2 i386 LiveCD
2008-7-19 Snapture多功能相机 v1.4
2008-7-19 iAcces中文输入法 v1.0Build016
2008-7-19 Cookbook烹饪秘籍 v2.5
2008-7-19 苹果专用DVD转换工具 v1.1.59汉化
2008-7-19 Modem修复软件ZiPhone修改版04.0
2008-7-19 AgileMessenger即时通讯工具美化
2008-7-19 Sketches画图软件 v0.7b6破解版


  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号