Hi, I mistakenly canceled the work before the put was made. The picks are complete. Can I move the inventory? How do I wave my shipment again.
Hi, I mistakenly canceled the work before the put was made. The picks are complete. Can I move the inventory? How do I wave my shipment again.
Hi,
Please use this script to cancel the work and then run a concistency check
please not that this script has been made as a standard under warehouse management > periodic > Clean up > cancel work
Regards,
Mehdi
declare @partition bigint = 5637144576
declare @dataareaid nvarchar(4) = 'AAA'
declare @workid nvarchar(20) = 'USMF-088395'
-- Update WHSLOADLINE.WORKCREATEDQTY
;with CreatedQtys as
(
select wl.LOADLINEREFRECID, sum(wl.INVENTQTYWORK) as CREATEDQTY, wl.DATAAREAID, wl.PARTITION from WHSWORKLINE wl
where wl.PARTITION = @partition and wl.DATAAREAID = @dataareaid and wl.WORKID = @workid
and wl.WORKTYPE = 1/*pick*/
and wl.LINENUM < (select min(LINENUM) from WHSWORKLINE where DATAAREAID = wl.DATAAREAID and [PARTITION] = wl.PARTITION and WORKID = wl.WORKID and WORKTYPE = 2/*put*/)
group by wl.PARTITION, wl.DATAAREAID, wl.LOADLINEREFRECID
)
update ll
set ll.WORKCREATEDQTY = ll.WORKCREATEDQTY - q.CREATEDQTY
from WHSLOADLINE ll
join CreatedQtys q on q.LOADLINEREFRECID = ll.RECID and q.DATAAREAID = ll.DATAAREAID and q.PARTITION = ll.PARTITION
-- List items that need on-hand consistency check
;select
t.ITEMID
from WHSWORKINVENTTRANS wt
join INVENTTRANSORIGIN o on (o.INVENTTRANSID = wt.INVENTTRANSIDFROM or o.INVENTTRANSID = wt.INVENTTRANSIDTO) and o.DATAAREAID = wt.DATAAREAID and o.PARTITION = wt.PARTITION
join INVENTTRANS t on t.INVENTTRANSORIGIN = o.RECID and t.DATAAREAID = o.DATAAREAID and t.PARTITION = o.PARTITION
where wt.WORKID = @workid and wt.DATAAREAID = @dataareaid and wt.PARTITION = @partition
group by t.ITEMID
-- Delete inventory transactions
delete t
from WHSWORKINVENTTRANS wt
join INVENTTRANSORIGIN o on (o.INVENTTRANSID = wt.INVENTTRANSIDFROM or o.INVENTTRANSID = wt.INVENTTRANSIDTO) and o.DATAAREAID = wt.DATAAREAID and o.PARTITION = wt.PARTITION
join INVENTTRANS t on t.INVENTTRANSORIGIN = o.RECID and t.DATAAREAID = o.DATAAREAID and t.PARTITION = o.PARTITION
where wt.WORKID = @workid and wt.DATAAREAID = @dataareaid and wt.PARTITION = @partition
-- Delete InventTransOrigin
delete o
from WHSWORKINVENTTRANS wt
join INVENTTRANSORIGIN o on (o.INVENTTRANSID = wt.INVENTTRANSIDFROM or o.INVENTTRANSID = wt.INVENTTRANSIDTO) and o.DATAAREAID = wt.DATAAREAID and o.PARTITION = wt.PARTITION
where wt.WORKID = @workid and wt.DATAAREAID = @dataareaid and wt.PARTITION = @partition
-- Delete WHSWorkInventTrans
delete wt
from WHSWORKINVENTTRANS wt
where wt.WORKID = @workid and wt.DATAAREAID = @dataareaid and wt.PARTITION = @partition
-- Delete WHSDimTracking
delete dt
from WHSDIMTRACKING dt
where dt.WORKID = @workid and dt.DATAAREAID = @dataareaid and dt.PARTITION = @partition
-- Update WHSWorkLineStatus to cancelled
update wl
set wl.WORKSTATUS = 5 -- Cancelled
from WHSWORKLINE wl
where wl.WORKID = @workid and wl.DATAAREAID = @dataareaid and wl.PARTITION = @partition
-- Update WHSWorkTable Status to cancelled
update w
set w.WORKSTATUS = 5 -- Cancelled
from WHSWORKTABLE w
where w.WORKID = @workid and w.DATAAREAID = @dataareaid and w.PARTITION = @partition
Wow, I just read my response again, and I apologize for all the grammatical errors and typos. I am a bit distracted today.
the full situation is that the all picks but one were picked, the put was closed, and the remaining open pick shows as needing replenishment, though the replenishment has occurred. I think there are two bugs. The put should not have been available, and the picks is blocked by a replenishment requirement that no longer existis.
Hi, and thank you for taking the time to answer. I don't believe we can move the inventory to the target license plate, because the license plate is at a pack location. The error is "Containers can't be moved to a different packing station than the one they were created at."
I saw this happening in the past in a similar constellation:
Pick - Closed
Pick - Closed
Pick - Canceled
Put - Open
There must be a bug deeply in the system.
It is not possible to get rid of such a work (maybe with the new Cancel function from the Preview in August?)
We ended up manipulating the data with jobs and custom "table browsers".
Hi Brian,
How did you cancel it? because UI doesn't allow as the last closed status must be Put for work to be cancelled or entire work has to be opened. i tried through emulator and it didn't allow the cancellation either.
Anyway, what you can do is look up your target license plate and there you will see the on-hand inventory. you can try to manually move the license plate to baydoor or your put location. I don't think you will be able to do anything with work, but you should be able to close out the SO like you do it regularly.
Thanks,
Satish Panwar
Please take time to click 'Yes' against the answers that help you guide in right direction to help other community members.
André Arnaud de Cal...
292,927
Super User 2025 Season 1
Martin Dráb
231,793
Most Valuable Professional
nmaenpaa
101,156
Moderator