cancel
Showing results for 
Search instead for 
Did you mean: 

oPurchaseInvoices and dDocument_Service

former_member603668
Discoverer
0 Kudos

i'm trying to add a new invoice and getting "Internal Error (-5002) occurred"

Really dont know why

SAP B1 9.3 pl 07

I Made a simple PurchaseInvoice Add, and got same error

SAPbobsCOM.Documents oNota = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices);

oNota.CardCode = "F004083";

oNota.DocDate = DateTime.Now;

oNota.DocType = BoDocumentTypes.dDocument_Service;

oNota.Lines.AccountCode = "1.01.01.01.01";

oNota.Lines.ItemDescription = "test";

oNota.Lines.TaxCode = "SEM_IMP";

oNota.Lines.LineTotal = 50;

oNota.Lines.Add();

if (oNota.Add() != 0)

{

string erro = oCompany.GetLastErrorDescription();

throw new Exception(erro);

}

tried also with Lines.ExpenseType, same error.

Accepted Solutions (0)

Answers (0)