此订单已经退过货啦///
Solution
ANSWER:
========
It is likely this indicates the original order line was referenced for the item and quantity on an earlier RMA order line.
The following SQL select statements can be used to determine if this Order Item has already been "Returned"
by a previous RMA order line.
1. To get information on order lines which have referenced the original sales order line previously, run the following:
SQL > select line_id, ordered_quantity, reference_line_id
from oe_order_lines_all
where line_category_code = 'RETURN' and reference_line_id = &line_id ;
Please Note: The '&line_id' is replaced by the actual reference_line_id, which would be the line_id for the original sales order line.
2. Using the line_id's returned from sql #1, ('X' and 'Y'), you can find the other return type lines and header_id's they belong to;
SQL > select LINE_NUMBER, LINE_ID, LINE_TYPE_ID, HEADER_ID, REFERENCE_HEADER_ID,
LINE_CATEGORY_CODE, OPEN_FLAG, BOOKED_FLAG,
CANCELLED_FLAG, FLOW_STATUS_CODE
from OE_ORDER_LINES_ALL
where line_id in ('XXXXX','YYYYY');
3. The returned values for the header_id's ('N' and 'M') for the lines in sql #2, show status and type, so using the header_ids in the last select,
SQL > select ORDER_NUMBER, HEADER_ID, ORDER_TYPE_ID, CANCELLED_FLAG, OPEN_FLAG,
BOOKED_FLAG, ORDER_CATEGORY_CODE, FLOW_STATUS_CODE
from OE_ORDER_HEADERS_ALL
where header_id in ('NNNNN','MMMMM');
One can find the other separate orders. 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.
References
Note 133464.1 - OMSE11i.SQL release 11i script
Note 156860.1 - OMCHECK.SQL Oracle Order Management Diagnostic Tool
--------------------------------------------------------------------------------
Help us improve our service. Please email us your comments for this document. .
|