Skip to Content

Inventory Gen Entry Error

Hello,

I have been trying to create an Inventory Gen Entry but keep getting the same error:

"Internal Error (-5002) occurred."

I would really appreciate if someone could help me!

Thanks!

Here's my code:

Dim oInvoiceDoc As SAPbobsCOM.Documents             
oInvoiceDoc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
oInvoiceDoc.Series = 22
oInvoiceDoc.DocCurrency = USD
oInvoiceDoc.Reference2 = "Ref2"
oInvoiceDoc.GroupNumber = -1
oInvoiceDoc.Lines.ItemCode = "LIC-AXWAY-0039"                     
oInvoiceDoc.Lines.Quantity = 1
oInvoiceDoc.Lines.UnitPrice = 100.0
oInvoiceDoc.Lines.AccountCode = "_SYS00000000239" 
oInvoiceDoc.Lines.WarehouseCode = 1                     
oInvoiceDoc.Lines.CostingCode = "VG" 
oInvoiceDoc.Lines.Add() 
Dim nAddResult As Long
nAddResult = oInvoiceDoc.Add
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 05, 2017 at 01:55 AM
    ,

    Hi,

    Can you try removing the oInvoiceDoc.Lines.Add()?
    Other than that, can you create the GenEntry for this item manually from SAP ?

    Regards

    Edy

    Add comment
    10|10000 characters needed characters exceeded