12
返回列表 发新帖
楼主: hxq

Cancel 的PO如何做倉退

[复制链接]
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
11#
发表于 2004-10-15 12:11 | 只看该作者
偶們也碰到一樣的問題,

也問過Oracle了,他們說沒有辦法了

一定要做就只能改Database

但是一旦改過Database之後,Oracle不做任何後續的Support

那個consultant還偷偷寄了一個script給我,

她建議儘量不要做Cancel的動作,如果需要的話,用close就可以了,有問題還能在開.

script也給大家分享一下,希望有點幫助

set echo off
set head off
set verify off
set feed off
declare
header_id    po_headers.po_header_id%type;
line_id      po_lines.po_line_id%type;
begin
select poh.po_header_id, pol.po_line_id
into header_id, line_id
from po_headers_all poh
,    po_lines pol
where poh.segment1 = &1
and   poh.po_header_id = pol.po_header_id
and   pol.line_num = &2;
update po_headers_all
set cancel_flag = null
where po_header_id = header_id;
update po_lines_all
set cancel_flag = null
,   cancelled_by = null
,   cancel_reason = null
,   cancel_date = null
where po_line_id = line_id
and po_header_id = header_id;
update po_line_locations_all
set cancel_flag = null
,   cancelled_by = null
,   cancel_date = null
,   cancel_reason = null
,   quanntity_cancelled  = 0
where po_line_id = line_id
and po_header_id = header_id;
end;

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表