Skip to Content
0
Former Member
Mar 31, 2008 at 02:30 PM

Can't add a goods-issue with more than one item and one is serial managed.

45 Views

Hi,

We are trying to issue more than one item to a production order using the DI API. If none of the items is serial managed, they all are accepted and the goods-issue Add is successful. If one the items is batch-managed, the goods-issue Add is also successful. I am able to add the goods-receipt if I it contains only one item and it is serial-number managed. However, if I’m issuing more than one item and one or more of the items is serial number managed, then the DI API will not add the goods-issue. The error message that appears refers to an item that is not among the items being issued. The message is:

-10: (IGE1.WhsCode)(line: 3), ‘Item ‘A00006 ‘ with system serial 1 is not in stock.’

Again item A00006 is not even in the group of items being issued.

The code I am using for the serial number part is:

With oGoodsIssue.Lines.SerialNumbers

.SystemSerialNumber = rs.Fields.Item("SysSerial").Value

.ManufacturerSerialNumber = rs.Fields.Item("MfrSN").Value

.InternalSerialNumber = rs.Fields.Item("IntrSerial").Value

.SetCurrentLine(n)

.Add()

rs.MoveNext()

n += 1

End With

The rs is a recordset that the code is looping through as the serial numbers are being added.

The error message does not occur during this code. It occurs when it tries to add the full goods-receipt. Does anyone have any idea how I can fix this?

Thanks,

Mike

Edited by: Mike Angelastro on Mar 31, 2008 8:43 AM