RE: Delete all serialized inventory from a site
That really depends on what is your end target of the correction. Let me go through several scenarios with my personal assumption on each of them
First scenario, supposing that you want to remove those "incorrect" serial number for a specific item/s, and re-enter the correct serial number;
- You first need to release the item from the tracking option, in order to withdraw all the incorrect quantities with one adjustment out without specifying mass serial number. The following statement will update the tracking option to "None"
UPDATE IV00101
SET ITMTRKOP = 1
WHERE ITEMNMBR = '#ItemNumber'
- Now that the item tracking option is removed, you need to empty the IV00200 (Item Serial Number Master) and IV30400 (Item Serial and Lot history) tables from incorrect serial numbers
DELETE FROM IV00200
WHERE ITEMNMBR = '#ItemNumber' AND
SERLNMBR IN (SerialNo#1,SerialNo#1)
DELETE FROM IV30400
WHERE ITEMNMBR = '#ItemNumber' AND
DOCNUMBR = 'AdjustmentNo#'
- Now run check links for the following series (Item Master, Inventory Transaction Work), Reconcile (for the selected item/s)
- Post one adjustment out (for all the incorrect quantities entered for a specific item/s), you will not be asked to choose serial numbers at all.
- Now, you need to update the item tracking option, to be "Serial Number". Run the following script
UPDATE IV00101
SET ITMTRKOP = 2
WHERE ITEMNMBR = '#ItemNumber'
- Now when you go to inventory transaction window, you will be asked to enter the serial numbers all over again, as the tracking option has been reset to "serial number". Enter your serial numbers, and post.
- Repeat the check links and reconcile step as a quality check.
Another scenario, supposing that you want to remove both the tracking option and the incorrect serial number, and leave the item/s with "None" tracking option.
You could go through the steps above, and never run the final update statement which returns the tracking option to "serial", which will leave your item with "None" tracking option.
Most importantly, I never recommend running such update or delete on live environment . As long as such a suggestion is derived from my own experience, you could run them on a test environment to ensure their validity. As always, back up is a must.
Hope this helps,