cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SerialNumbers with 2007 PL 47: BOM in documents does not work

Former Member
0 Kudos
416

Hi everybody.

I have the following problem: i need to create documents through DI API (2007 PL 47).

The items in document are BOM (sale type) with just one item as a child: this item child is managed with serial numbers.

When i try to create a delivery notes with DI API, i receive the following error:

"Found error:-10,You should use existing serial/batch numbers for this document type [(----) 29-51]".

The following code (VB . NET) is used for the insertion of the delivery (just one line with only one item BOM, with only one item child):

Dim nErr As Long

Dim errMsg As String = ""

Dim delivery As SAPbobsCOM.Documents

Dim deliveryLines As SAPbobsCOM.Document_Lines

Dim serialNumbers As SAPbobsCOM.SerialNumbers

delivery = oCompany.GetBusinessObject(BoObjectTypes.oDeliveryNotes)

delivery.DocObjectCode = BoObjectTypes.oDeliveryNotes

delivery.CardCode = "C0020"

delivery.DocDate = Today

delivery.DocDueDate = Today

delivery.TaxDate = Today

' CREATE A LINE WITH BOM

deliveryLines = delivery.Lines

deliveryLines.SetCurrentLine(0)

deliveryLines.ItemCode = "GARANZIA"

deliveryLines.WarehouseCode = "Mc"

deliveryLines.Quantity = 1

' ASSIGN A SERIAL NUMBER RELATED WITH CHILD ITEM IN A BOM

serialNumbers = deliveryLines.SerialNumbers

serialNumbers.SetCurrentLine(0)

serialNumbers.SystemSerialNumber = 2

delivery.Add()

oCompany.GetLastError(nErr, errMsg)

If (0 <> nErr) Then

MsgBox("Found error:" + Str(nErr) + "," + errMsg)

End If

Obviously the SystemSerialNumber used is available in a warehouse.

The process, through the BOne interface, work correctly.

The same code work correctly with the 2007 PL 42, but does not work with the 2007 PL 49.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello everybody,

I have the same problem that Marco has, still can't add the serial numbers for child items managed with serial numbers when the item in the document lines objet is a BOM, sale type.

I'm using SBO 2007 SP01 PL08 and I didn't try the code I'm using on a previous PL.

I wonder if any body has the solution.

Thanks in advance.

Former Member
0 Kudos

Hi Rodolfo,

bad news about this problem: i've opened a call to SAP. SAP answered me that is not possible manage the serial number in this situation with DI API.

This work correctly in B1 2005 PL 19 just because is an error into libraries DI API!!!

Incredible but real...

SAP wrote that this function could be implemented in a next version...

Regards

Former Member
0 Kudos

Hi Marco,

Thanks for your answer; I hope that SAP solves this problem in the near future. In the mean time, I would have to implement a solution to accomplish this lack of functionality.

Thanks again for your assistance

Former Member
0 Kudos

Hi Gorga!

Actually I'm facing the same problem with you.

SAP told you there was an error in DI-API about add serial no to the components of BOM.

Then do you know if they have fix the bug? I'm using SAP B1 90.

Could you please kindly to help me?

Billy

Former Member
0 Kudos

Hello,

ON the BOne client which SerialNUmber you select? Manufacturer serial number, or System Serial Number, or Internalserialnumber?

Check the Settings in the Administration\System Initialization\General Settings\Unique Serial Numbers by ?

Regards

J.

Former Member
0 Kudos

Hi Jonas,

in BOne client i use the System Serial Number: in "General Settings" the "Unique Serial Numbers by" is set to "Serial Number".