cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal reconciliation does not work

egilberto-axap
Newcomer
0 Kudos
497

Hi everyone,

I am currently making a function to perform an internal reconciliation, however it gives me the following error:

"No existen registros coincidentes (ODBC -2028)"

I have checked the parameter values and everything is in order. I don't know what might be missing or happening.

It would be helpful if anyone has been through the same thing.

Thank you.

 public static void Reconciliar(string CardCode)
        {

            InternalReconciliationsService service = (InternalReconciliationsService)Utiles.Company.GetCompanyService().GetBusinessService(ServiceTypes.InternalReconciliationsService);
            InternalReconciliationOpenTransParams transParams = (InternalReconciliationOpenTransParams)service.GetDataInterface(InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationOpenTransParams);
            InternalReconciliationParams _Parametros = (InternalReconciliationParams)service.GetDataInterface(InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationParams);

            transParams.CardOrAccount = CardOrAccountEnum.coaCard;

            transParams.InternalReconciliationBPs.Add();
            transParams.InternalReconciliationBPs.Item(0).BPCode = CardCode;

            try
            {
                InternalReconciliationOpenTrans openTrans = (InternalReconciliationOpenTrans)service.GetDataInterface(InternalReconciliationsServiceDataInterfaces.irsInternalReconciliationOpenTrans);

                openTrans.ReconDate = DateTime.Now;

                openTrans.InternalReconciliationOpenTransRows.Add();
                openTrans.InternalReconciliationOpenTransRows.Item(0).Selected = SAPbobsCOM.BoYesNoEnum.tYES;
                openTrans.InternalReconciliationOpenTransRows.Item(0).TransId = 2222;
                openTrans.InternalReconciliationOpenTransRows.Item(0).TransRowId = 0;
                openTrans.InternalReconciliationOpenTransRows.Item(0).ReconcileAmount = 7600;


                openTrans.InternalReconciliationOpenTransRows.Add();
                openTrans.InternalReconciliationOpenTransRows.Item(1).Selected = SAPbobsCOM.BoYesNoEnum.tYES;
                openTrans.InternalReconciliationOpenTransRows.Item(1).TransId = 3069;
                openTrans.InternalReconciliationOpenTransRows.Item(1).TransRowId = 1;
                openTrans.InternalReconciliationOpenTransRows.Item(1).ReconcileAmount = -7600;


                _Parametros = service.Add(openTrans);
            }
            catch (Exception ex)
            {
                string _Error = ex.Message;
            }
        }

Accepted Solutions (0)

Answers (1)

Answers (1)

jitin_chawla
Product and Topic Expert
Product and Topic Expert

Hi,

Can you double confirm the Transid and Line_ID taken for both rows, whether they are correct or not?

You can check the below thread as well:

https://answers.sap.com/questions/13744922/diapi-to-create-internal-reconciliations-failing.html

Kr,

Jitin