on 07-18-2018 1:20 PM
Hi Nikolaos - I already fix this issue thank you for your feedback.
if someone need this posting try this.
Dim oReconService As SAPbobsCOM.InternalReconciliationsService = oCompany.GetCompanyService().GetBusinessService(SAPbobsCOM.ServiceTypes.InternalReconciliationsService) Dim openTrans As SAPbobsCOM.InternalReconciliationOpenTrans = oReconService.GetDataInterface(SAPbobsCOM.InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationOpenTrans) Dim reconParams As SAPbobsCOM.InternalReconciliationParams = oReconService.GetDataInterface(SAPbobsCOM.InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationParams) For i As Integer = 0 To gridRecon.DataTable.Rows.Count - 1 If gridRecon.DataTable.GetValue("Select", gridRecon.GetDataTableRowIndex(i)) = "Y" Then SBO_Application.SetStatusBarMessage("Reconcilling Please wait...", SAPbouiCOM.BoMessageTime.bmt_Short, False) With openTrans 'For Incoming Payment '1st Line If gridRecon.DataTable.GetValue("Type", gridRecon.GetDataTableRowIndex(i)) = "RC" Then .InternalReconciliationOpenTransRows.Add() .InternalReconciliationOpenTransRows.Item(x).Selected = SAPbobsCOM.BoYesNoEnum.tYES .InternalReconciliationOpenTransRows.Item(x).TransId = gridRecon.DataTable.GetValue("TransId", gridRecon.GetDataTableRowIndex(i)) ' Journal Entry ID: TransId in OJDT .InternalReconciliationOpenTransRows.Item(x).TransRowId = 1 ' Journal Entry Line Number: Line_ID in JDT1 oIncomPayment = Math.Abs(gridRecon.DataTable.GetValue("Actual Amount", gridRecon.GetDataTableRowIndex(i))) ' MsgBox(oIncomPayment) 'oTotal = oARPayment - oIncomPayment .InternalReconciliationOpenTransRows.Item(x).ReconcileAmount = oARPayment 'gridRecon.DataTable.GetValue("Actual Amount", gridRecon.GetDataTableRowIndex(i)) ' This should always be positive value. But one line should be on Credit, one line is Debit. oTransId = gridRecon.DataTable.GetValue("TransId", gridRecon.GetDataTableRowIndex(i)) ' ElseIf gridRecon.DataTable.GetValue("Type", gridRecon.GetDataTableRowIndex(i)) = "JE" Then Else openTrans.CardOrAccount = SAPbobsCOM.CardOrAccountEnum.coaCard .InternalReconciliationOpenTransRows.Add() .InternalReconciliationOpenTransRows.Item(x).Selected = SAPbobsCOM.BoYesNoEnum.tYES .InternalReconciliationOpenTransRows.Item(x).TransId = gridRecon.DataTable.GetValue("TransId", gridRecon.GetDataTableRowIndex(i)) .InternalReconciliationOpenTransRows.Item(x).TransRowId = 0 ' Journal Entry Line Number: Line_ID in JDT1 .InternalReconciliationOpenTransRows.Item(x).ReconcileAmount = Math.Abs(gridRecon.DataTable.GetValue("Actual Amount", gridRecon.GetDataTableRowIndex(i))) ' This should always be positive value. But one line should be on Credit, one line is Debit. Console.WriteLine(Math.Abs(gridRecon.DataTable.GetValue("Actual Amount", gridRecon.GetDataTableRowIndex(i)))) If gridRecon.DataTable.GetValue("Type", gridRecon.GetDataTableRowIndex(i)) = "JE" Then oJeTranID = gridRecon.DataTable.GetValue("TransId", gridRecon.GetDataTableRowIndex(i)) olistPostedJE.Add(oJeTranID) End If End If If Not gridRecon.DataTable.GetValue("Type", gridRecon.GetDataTableRowIndex(i)) = "RC" Then oARPayment += Math.Abs(gridRecon.DataTable.GetValue("Actual Amount", i)) End If x = x + 1 End With End If Next Try reconParams = oReconService.Add(openTrans) Catch ex As Exception SAP_APP.SetMessage(ex.ToString, SAPbouiCOM.BoStatusBarMessageType.smt_Error) oWriteText(Now & " - " & "[Err] - " & ex.ToString, True) oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack) Return False End Try Try oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit) Catch ex As Exception End Try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
We are using the 9.3 PL04 version.
I'm reconcialiating only journal entries between them. I don't have payment or invoice in my case.
dsa_posting.InternalReconciliationOpenTransRows.Add()
dsa_posting.InternalReconciliationOpenTransRows.Item(i).Selected = SAPbobsCOM.BoYesNoEnum.tYES
dsa_posting.InternalReconciliationOpenTransRows.Item(i).TransId = dsa_recordset.Fields.Item(tbl_JournalEntries.fst_Code).Value
dsa_posting.InternalReconciliationOpenTransRows.Item(i).TransRowId = dsa_recordset.Fields.Item(tbl_JournalEntries_Lines.fst_LineNum).Value
dsa_posting.InternalReconciliationOpenTransRows.Item(i).ReconcileAmount = dsa_recordset.Fields.Item(tbl_JournalEntries_Lines.fst_Credit).Value + dsa_recordset.Fields.Item(tbl_JournalEntries_Lines.fst_Debit).Value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello guys,
I resolved my problem. In fact i was just forgotten to declare the transrowID in my reconciliation method. when i m doing that i don't have this error anymore but i have to declare only positive amount in the ReconcileAmount property. B1 sdk managed on its own the credit/debit according to the transrow ID.
hope that can help you.
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply.
I already declared the transrowID values, but I still get the error message.
I'm trying two different cases, one to reconcile an Invoice with a Payment and the second to reconcile a Journal Entry with a Payment.
Is there anything else you may have done?
Also, what version of B1 are you running? We're on 9.3 PL04HF.
Thank you in advance.
Hello Michael,
I experienced exactly the same problem. Have you any clue to solve it?
Best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Sébastien,
Thank you for all your help, I finally managed to complete the reconciliation without errors.
For anyone still wondering there is also the SAP note 2586911 that has some helpful info.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikolaos, Thanks - Indeed SAP Note 2586911 - DI API_New Service Is Exposed to Provide Internal Reconciliation Functions is a MANDATORY READ here.
Hello,
currently having the same problem.
Figured out we have to add the InternalReconciliationOpenTransParams in order to attach the CardCode or Account to reconcile, but still the same error occurs.
_IR_OT_Params.ReconDate = DateTime.Now;
_IR_OT_Params.CardOrAccount = SAPbobsCOM.CardOrAccountEnum.coaAccount;
//_IR_OT_Params.CardOrAccount = SAPbobsCOM.CardOrAccountEnum.coaCard;
_IR_OT_Params.AccountNo = AcountNum;
//_IR_OT_Params.InternalReconciliationBPs.Add();
//_IR_OT_Params.InternalReconciliationBPs.Item(0).BPCode = BPCode;
_IRservice.GetOpenTransactions(_IR_OT_Params);
_IRservice.Add(_IRopenTrans);
Still trying to solve this problem, but thought this could help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
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.