on 2017 Jan 04 9:16 PM - last edited on 2024 Feb 03 8:13 PM by postmig_api_4
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to create an exit when I deleted the line that assigned the warehouse code.
Checked the item code configuration and it doesn't have a default warehouse assigned.
If I have stock in two different warehouses, it assignes warehouse 01.
It is really important for me to indicate a specific warehouse.
Thanks for your help!
User | Count |
---|---|
113 | |
9 | |
8 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.