Showing results for 
Search instead for 
Did you mean: 

DTW Stock with Serial Numbers

Former Member
0 Kudos

Hi all, I DTW'd some stock in through the GRPO template. I then AP'd the invoice. Due to some administrative issues I had to credit the Invoice thus reversing the stock. So the Serial Numbers are all reflecting as unavailable.

I need to re-import the stock with the same serial numbers and different costs. The DTW is giving me an error "(Serial Number) for item (Item Code) in line 1 already exists (in unique field)/Application defined or object defined error65171"

I realise that these serial numbers are already in the system, but if I manually capture these on the GRPO the the application asks me to confirm this already exists. There are almost 2000 items to capture. Please could someone advise if there is possibly a field on the DTW template (purchase delivery) I could populate that overides this error"

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I know it can be done, as I have had to perform the same task.

From memory, I had issues around the two serial number fields - Internal & System, and got it working when I removed the data from one of the fields - which one I removed I can't remember!

Former Member
0 Kudos

Thanks for the feedback Julie.

But my import schedules dont give me the option of two serial numbers. There is only the Internal serial number field.

Former Member
0 Kudos

Are you using the oInventoryGenEntry templates? The serial numbers template I have contains 3 serial numbers - Internal, Manufacturer & System. The system serial number is the unique key and is system generated.

Try the following to get a list of on hand stock with serial numbers:

{SELECT T0.ItemCode, T0.ItemName,

T1.WhsCode, CASE WHEN ISNULL(T2.SysSerial,-1) = -1 THEN T1.OnHand ELSE 1 END [Quantity], T0.AvgPrice,

T2.SysSerial, T2.IntrSerial


INNER JOIN OITW T1 ON T1.ItemCode = T0.ItemCode

LEFT OUTER JOIN OSRI T2 ON T2.ItemCode = T1.ItemCode AND T2.WhsCode = T1.WhsCode AND T2.[Status] = 0

WHERE T1.OnHand <> 0 and t0.ManSerNum = 'Y'

ORDER BY T0.ItemCode, T1.WhsCode, T2.SysSerial}

You may need to tweak it a bit for your eviironment.