Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1797023
  • 博文数量: 334
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 3452
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-18 10:19
个人简介

路虽弥,不行不至;事虽少,不做不成。

文章分类

全部博文(334)

文章存档

2013年(4)

2012年(19)

2011年(27)

2010年(71)

2009年(45)

2008年(15)

2007年(84)

2006年(69)

分类: Oracle

2008-11-18 11:21:35

文件: Quantity cannot be greater than original quantity Error When Booking RMA Order.rar
大小: 189KB
下载: 下载

 

Error: ‘Quantity cannot be greater than original quantity’ Message When Booking RMA Order

 

RMA#600435, Reference sales order# 368571

 

Solutions:

Step1: To get information on order lines which have referenced the original sales order line previously;

Step2: To get information on order header_id via reference_line_id;

 

Step3: To get order header information via header_id;

 

   ITEM

PI# / RMA#

 

  PI# 368571

RMA# 369932

RMA# 600435

PJ513D

5

-5

-3

PJ513DB

10

-10

-2

 

So, If one has a return line which is either 'Booked' (Awaiting Return), or 'Closed', then there is already a valid return for the original order item and qty, and no additional returns can reference the same sales order and line item qty. . Be sure the ordered item qty and the returned item qty are the same, or there can be additional return lines created for the remaining quantity.

 
 
===========================可以使用下面sql scripts=================================
SELECT ooh1.order_number A1, ool1.ordered_item A2, ool1.line_number A3,
       ool1.ordered_quantity A4, ooh1.flow_status_code A5, ooh2.order_number B1,
       ool2.line_number B1, ool2.ordered_quantity B3, ooh2.flow_status_code B4,
       ooh3.order_number C1, ool3.line_number C2, ool3.ordered_quantity C3,
       ooh3.flow_status_code C4
  FROM ont.oe_order_headers_all ooh1,
       ont.oe_order_lines_all ool1,
       ont.oe_order_lines_all ool2,
       ont.oe_order_headers_all ooh2,
       ont.oe_order_lines_all ool3,
       ont.oe_order_headers_all ooh3
 WHERE ooh1.header_id = ool1.header_id
   AND ool1.line_category_code = 'RETURN'
   AND ooh1.order_number = '&order_number'  --当前的订单编号
   AND ool1.reference_line_id = ool2.line_id
   AND ooh2.header_id = ool2.header_id
   AND ool1.reference_line_id = ool3.reference_line_id(+)
   AND ooh3.header_id(+) = ool3.header_id
   AND ooh1.order_number <> ooh3.order_number
 
注:A,B,C区域分别代表:当前退单号,原订单编号,之前退单号/
阅读(3326) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~