Total Pageviews

December 7, 2016

12/07/2016 04:17:00 PM

Oracle Order management Shipped issues
Workflow stuck in Ship Confirm, Trip Stop fails OM interface

In some of the scenarios  where the entire order line was shipped 
but Trip Stop failed interfacing to OM and workflow would not progress past Ship Confirm.
When I got he same issue across t

To work around the issue prepared the below script. 
Use it for a single stuck OM line at a time and only if there are going to be no more partial shipments for it :


declare
cursor c is
select line_id from
 oe_order_lines_all where line_id in (
select distinct(source_line_id) from wsh_delivery_details where delivery_detail_id in (147432,147710)
and flow_status_code='AWAITING_SHIPPING'
);
begin
FOR r in c loop
-- progress the workflow
wf_engine.CompleteActivity('OEOL', to_char(r.line_id),'SHIP_LINE', 'SHIP_CONFIRM');

--mark shipment as itnerfaced to OM so you can run Trip Stop for Inventory
update wsh_delivery_details set oe_interfaced_flag='Y' where source_line_id=r.line_id;

-- update order line with quantity shipped so that it can be invoiced,
-- leaving this out would result in Invoice Interface not Eligible and no invoice
update oe_order_lines_all set shipped_quantity=
(select sum(shipped_quantity) from wsh_delivery_details where  source_line_id=r.line_id)
where line_id=r.line_id;

dbms_output.put_line(r.line_id||' processed');
end loop;
Exception
when others then null;

end;


Source Courtesy: Blog content Owner
 
Related Posts Plugin for WordPress, Blogger...