cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Number already in use

Former Member
0 Kudos
649

hi, dear experts, i'm trying to do a Goods Issue on SDK using serial numbers,, but I keep getting this message "10001155 - Serial number fa_r1 already in use; select a new serial number"

'fa_r1' is the name of the serial number i'm using, this serial number I resently created it, so I don't understand why I get the message, thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Finally I found the error, the correct code is:

                    SAPbobsCOM.Documents goodsIssue = (SAPbobsCOM.Documents)Form1.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit);

                    goodsIssue.DocDate = DateTime.Today;

                    goodsIssue.TaxDate = DateTime.Today;

                    foreach (string s in fimts)  //this foreach contains all the item_codes

                    {

                        int c = 0; //integer that will count the amount of serial numbers for an item_code

                        goodsIssue.Lines.ItemCode = s;

                        goodsIssue.Lines.WarehouseCode = worigen.Warehouse_Code;

                        goodsIssue.Lines.VatGroup = "50000001"; //actdet.CuentaAF.Account_Code;

                        foreach (Release t in rll) //this foreach contains all the serial numbers

                        {

                            if (s == t.SerialNumber.Item_Code)

                            {

                                goodsIssue.Lines.Price = t.SerialNumber.Cost;

                                goodsIssue.Lines.SerialNumbers.SystemSerialNumber =                                 t.SerialNumber.SerialNo;

                                goodsIssue.Lines.SerialNumbers.Add();

                                c++;

                            }

                        }

                        goodsIssue.Lines.Quantity = c;

                        goodsIssue.Lines.Add();

                    }

                    goodsIssue.Add() == 0;

the error was on the first line type oInventoryGenEntry instead of oInventoryGenExit

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please check the status of the serial number, it should be always 'ESTO' to issue the stock.

Regards

Vijay

Former Member
0 Kudos

It's not that, directly using SBO I can do the procedure, but when using the following code the error appears:

                    SAPbobsCOM.Documents goodsIssue = (SAPbobsCOM.Documents)Form1.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry);

                    goodsIssue.DocDate = DateTime.Today;

                    goodsIssue.TaxDate = DateTime.Today;

                    foreach (string s in fimts)  //this foreach contains all the item_codes

                    {

                        int c = 0; //integer that will count the amount of serial numbers for an item_code

                        goodsIssue.Lines.ItemCode = s;

                        goodsIssue.Lines.WarehouseCode = worigen.Warehouse_Code;

                        goodsIssue.Lines.VatGroup = "50000001"; //actdet.CuentaAF.Account_Code;

                        foreach (Release t in rll) //this foreach contains all the serial numbers

                        {

                            if (s == t.SerialNumber.Item_Code)

                            {

                                goodsIssue.Lines.Price = t.SerialNumber.Cost;

                                goodsIssue.Lines.SerialNumbers.SystemSerialNumber =                                 t.SerialNumber.SerialNo;

                                goodsIssue.Lines.SerialNumbers.Add();

                                c++;

                            }

                        }

                        goodsIssue.Lines.Quantity = c;

                        goodsIssue.Lines.Add();

                    }

                    goodsIssue.Add() == 0;