on 02-03-2015 2:58 PM
Hi Brenden,
Try the ExternalReconciliationsService.
//Get business service.
SAPbobsCOM.CompanyService oCompanyService = Cmpy.GetCompanyService();
SAPbobsCOM.ExternalReconciliationsService ExtReconSvc =
(SAPbobsCOM.ExternalReconciliationsService)oCompanyService.GetBusinessService
(SAPbobsCOM.ServiceTypes.ExternalReconciliationsService);
SAPbobsCOM.ExternalReconciliation ExtReconciliation =
(SAPbobsCOM.ExternalReconciliation)ExtReconSvc.GetDataInterface(SAPbobsCOM.ExternalReconciliationsServiceDataInterfaces.ersExternalReconciliations);
ExtReconciliation.ReconciliationAccountType = SAPbobsCOM.ReconciliationAccountTypeEnum.rat_BusinessPartner; // default is GL Account
//Reconcile object.
SAPbobsCOM. ReconciliationJournalEntryLine jeLine1 = (SAPbobsCOM. ReconciliationJournalEntryLine)ExtReconciliation.ReconciliationJournalEntryLines.Add();
jeLine1.TransactionNumber = "1";
jeLine1.LineNumber = 1;
SAPbobsCOM.ReconciliationJournalEntryLine jeLine2 = (SAPbobsCOM. ReconciliationJournalEntryLine)ExtReconciliation.ReconciliationJournalEntryLines.Add();
jeLine2.TransactionNumber = "2";
jeLine2.LineNumber = 2;
SAPbobsCOM.ReconciliationBankStatementLine bstLine1 = (SAPbobsCOM. ReconciliationBankStatementLine)ExtReconciliation. ReconciliationBankStatementLines.Add();
bstLine1.BankStatementAccountCode = "C1";
bstLine1.Sequence = 1;
SAPbobsCOM. ReconciliationBankStatementLine bstLine2 = (SAPbobsCOM. ReconciliationBankStatementLine)ExtReconciliation. ReconciliationBankStatementLines.Add();
bstLine2.BankStatementAccountCode = " C1";
bstLine2.Sequence = 2;
ExtReconSvc.Reconcile(ExtReconciliation);
//Get object.
SAPbobsCOM.ExternalReconciliationParams ExtReconParam =
(SAPbobsCOM.ExternalReconciliationParams)ExtReconSvc.GetDataInterface(SAPbobsCOM.ExternalReconciliationsServiceDataInterfaces.ersExternalReconciliationParams);
ExtReconParam.AccountCode = "100012";
ExtReconParam.ReconciliationNo = "2";
ExtReconciliation = ExtReconSvc.GetReconciliation(ExtReconParam);
//Get Reconcile List.
SAPbobsCOM.ExternalReconciliationsParamsCollection ExtReconsParamsCollection = (SAPbobsCOM. ExternalReconciliationsParamsCollection)ExtReconSvc.GetDataInterface(SAPbobsCOM.ExternalReconciliationsServiceDataInterfaces.ersExternalReconciliationsParamsCollection);
SAPbobsCOM.ExternalReconciliationFilterParams ExtReconFilteredParams =
(SAPbobsCOM.ExternalReconciliationFilterParams)ExtReconSvc.GetDataInterface(SAPbobsCOM.ExternalReconciliationsServiceDataInterfaces.ersExternalReconciliationFilterParams);
ExtReconFilteredParams.ReconciliationAccountType = SAPbobsCOM.ReconciliationAccountTypeEnum.rat_GLAccount;//"G/L Account"
ExtReconFilteredParams.AccountCodeFrom = "11200000-01-001-01";
ExtReconFilteredParams.AccountCodeTo = "12400000-01-001-01";
ExtReconFilteredParams.ReconciliationDateFrom = "05/03/11";
ExtReconFilteredParams.ReconciliationDateTo = "06/03/11";
ExtReconFilteredParams.ReconciliationNoFrom = 1;
ExtReconFilteredParams.ReconciliationNoTo = 2;
ExtReconsParamsCollection = ExtReconSvc.GetReconciliationList(ExtReconFilteredParams);
//Cancel reconciliations.
foreach (SAPbobsCOM.ExternalReconciliationParams ExtReconParam in ExtReconsParamsCollection)
{
ExtReconSvc.CancelReconciliation(ExtReconParam);
}
The above is form the SDK Help Center.
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pedro,
The better explanation would be:
Because I do not pull in the values into OBNK I cannot use the External Recon and there fore I must use the Manual Recon which does not have a object.
So I will rather pull in the Statement into the OBNK table so I do not have to use the manual Recon.
Does the a OBNK object exist to pull in the Bank Statement values ?
Kind Regards,
Brenden Draper
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
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.