Fixed delivery incorrectly Cancelled sales order lines:
Incorrectly Cancelled Sales order lines,
having delivery status as Open, Pick Selection program pick such Lines again
which are not eligible for Picking , in order to improve the performance for
standard SRS Program, we updated delivery to Cancelled (D) of such Sales order
lines with Requested Qty Zero.
Below are some such scenarios:
Lines Cancelled and delivery status is backordered
Lines Cancelled and delivery status is Ready to Release
Lines Cancelled and delivery status is Released to warehouse
select distinct
wdd.source_header_number "Order Number", wdd.org_id,
wdd.source_line_id,
wdd.delivery_detail_id,wdd.released_status,wdd.creation_date,
ol.flow_status_code,
ol.shipping_interfaced_flag , ol.ordered_quantity ,
ol.cancelled_quantity ,
wdd.src_requested_quantity ,
wdd.requested_quantity
FROM apps.wsh_delivery_details
wdd, apps.oe_order_lines_all ol
WHERE wdd.source_line_id =
ol.line_id
and delivery_detail_id in
(select wdd.delivery_detail_id
from apps.wsh_delivery_details
wdd , apps.oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.released_status in
('S','R','B','N')
and wdd.source_line_id =
ol.line_id
and nvl(wdd.oe_interfaced_flag,
'N') in ('N','P')
and ol.open_flag = 'N');
In Order to Fix this issue use below Script.
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,
serial_number = null,
locator_id = null,
lot_number = null,
revision = null,
inv_interfaced_flag = 'X',
oe_interfaced_flag = 'X'
WHERE delivery_detail_id in
(select wdd.delivery_detail_id
from wsh_delivery_details wdd, oe_order_lines_all ol
where wdd.source_line_id = ol.line_id
and wdd.source_code = 'OE'
and wdd.released_status in ('S','R','B','N')
and wdd.source_line_id = ol.line_id
and ol.open_flag = 'N');
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,
serial_number = null,
locator_id = null,
lot_number = null,
revision = null,
inv_interfaced_flag = 'X',
oe_interfaced_flag = 'X'
WHERE delivery_detail_id in
(select wdd.delivery_detail_id
from wsh_delivery_details wdd, oe_order_lines_all ol
where wdd.source_line_id = ol.line_id
and wdd.source_code = 'OE'
and wdd.released_status in ('S','R','B','N')
and wdd.source_line_id = ol.line_id
and ol.open_flag = 'N');
Commit;
Thanks
Sunil Singh Sikarwar

No comments:
Post a Comment