Skip to Content
0
Former Member
Jul 15, 2014 at 02:21 PM

Error with external reconciliation.

42 Views

Hello everybody.

I have a problem with a GL account reconciliation.

I have two journal entries on account 555000 and I want to reconcile them.

I do it with the external reconciliation service, but it gives an error and can not find any help to resolve it.

This is my code:

Dim ExtReconSvc As SAPbobsCOM.ExternalReconciliationsService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ExternalReconciliationsService)

Dim ExtReconciliation As SAPbobsCOM.ExternalReconciliation = ExtReconSvc.GetDataInterface(SAPbobsCOM.ExternalReconciliationsServiceDataInterfaces.ersExternalReconciliation)

ExtReconciliation.ReconciliationAccountType = SAPbobsCOM.ReconciliationAccountTypeEnum.rat_GLAccount ' default is GL Account

Dim jeLine1 As SAPbobsCOM.ReconciliationJournalEntryLine = ExtReconciliation.ReconciliationJournalEntryLines.Add()

jeLine1.TransactionNumber = oRecordSet.Fields.Item("TransId").Value

jeLine1.LineNumber = oRecordSet.Fields.Item("LineNum").Value

Dim jeLine2 As SAPbobsCOM.ReconciliationJournalEntryLine = ExtReconciliation.ReconciliationJournalEntryLines.Add()

jeLine2.TransactionNumber = Cru.Fields.Item("TransId").Value

jeLine2.LineNumber = Cru.Fields.Item("LineNum").Value

ExtReconSvc.Reconcile(ExtReconciliation)

And the error:

"Internal error (-5002) occurred"

Thanks in advanced