Having inventory allocated must be a very good thing, you are going to sell and will be in your Accounts Receivables soon.
But, how about if for some reason, you have inventory allocated and cannot be sold because it is in an order that got stranded, cannot be opened in GP or deleted and your customer service cannot sell it, then is a terrible issue, you bought it for the luxury of having inventory on the shelf.
That will take my sleep.
The following script will detect not just Sales Documents with allocated inventory but all stranded documents:
WARNING: Might not be phantom, might be a user entering an order, so make sure no one is in the system or in the SOP Module before running this script to provide accurate results
SELECT Hdr.SOPTYPE, Hdr.SOPNUMBE,
Sum(Det.ATYALLOC * Det. UNITCOST) PhantomCost
FROM SOP10100 Hdr
JOIN SOP10200 Det ON Hdr.SOPTYPE = Det.SOPTYPE
AND Hdr.SOPNUMBE = Det.SOPNUMBE
WHERE Hdr.BCHSOURC = ”
GROUP BY Hdr.SOPTYPE, Hdr.SOPNUMBE
NOTE: You might need also to check for phantom inventory transaction records in IV10001 and SOP10200 (Check with your partner)
Let’s recover that inventory and make it available.
As every GP consultant will tell you, do not write directly to the database, in some situations, SOP Transaction Entry will not allow you to even open the document so it can be deleted, this script will ONLY allow you to open the document so you can delete/void them.
NOTE: Before you run this update statement, make a note from the previous script the orders that have the problem so you can remove them
SET BCHSOURC =‘Sales Entry’
WHERE BCHSOURC = ” AND CUSTNMBR = ”
This will not delete the orders, just allow you to open the orders in the SOP Transaction Entry and you can dispose them, it is GP who needs to unallocated the orders.
TGP Trick (This is for customers with TitaniumGP)
Pasting this sample template in the SOP Transaction Entry window. will allow you to void or delete Sales documents in GP: