cancel
Showing results for 
Search instead for 
Did you mean: 

Internal reconciliation posting using sdk

Hi Experts!

Internal Reconciliation using SDK. I already used SAP 9.3 PL04 some error i experience

like

-- Multiple GL Account

-- No Matching OBDC

see attach screen shots.

and my encountered error.

0 Kudos

Dim oParam As SAPbobsCOM.InternalReconciliationParams Dim oReconService As SAPbobsCOM.InternalReconciliationsService Dim oOposting As SAPbobsCOM.InternalReconciliationOpenTrans oReconService = oCompany.GetCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.InternalReconciliationsService) oParam = oReconService.GetDataInterface(SAPbobsCOM.InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationParams) oOposting = oReconService.GetDataInterface(SAPbobsCOM.InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationOpenTrans) ' oReconService.Add(oOposting) With oOposting .CardOrAccount = SAPbobsCOM.CardOrAccountEnum.coaCard .InternalReconciliationOpenTransRows.Add() .InternalReconciliationOpenTransRows.Item(0).Selected = SAPbobsCOM.BoYesNoEnum.tYES .InternalReconciliationOpenTransRows.Item(0).TransId = 803 .InternalReconciliationOpenTransRows.Item(0).TransRowId = 1 .InternalReconciliationOpenTransRows.Item(0).ReconcileAmount = 738.38 'gridRecon.DataTable.GetValue("Actual Amount", gridRecon.GetDataTableRowIndex(i)) .InternalReconciliationOpenTransRows.Add() .InternalReconciliationOpenTransRows.Item(1).Selected = SAPbobsCOM.BoYesNoEnum.tYES .InternalReconciliationOpenTransRows.Item(1).TransId = 4510 .InternalReconciliationOpenTransRows.Item(1).TransRowId = 0 .InternalReconciliationOpenTransRows.Item(1).ReconcileAmount = -738.38 Try oParam = oReconService.Add(oOposting) Catch ex As Exception End Try

0 Kudos

Anyone can help me

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (5)

Answers (5)

sbastien_dubourdieu
Participant

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
sbastien_dubourdieu
Participant

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

0 Kudos

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.

sbastien_dubourdieu
Participant

Hello Michael,

I experienced exactly the same problem. Have you any clue to solve it?

Best regards,

0 Kudos

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.

former_member186605
Active Contributor
0 Kudos

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.