cancel
Showing results for 
Search instead for 
Did you mean: 

Check Account not sending DI API / DI SERVER

info0000
Discoverer
0 Kudos

Hello experts,

I am experiencing a very unusual issue when trying to add an incoming payment in SAP B1. The problem is that when I attempt to add this payment via DI API or DI Server, the check account is not being recorded correctly, even though I am sending it in the XML or assigning it in DI API. There is a default account assigned in that field that is automatically added, even if I am sending a completely different one. If I remove the default account, both DI API and DI Server return the same error: "No matching records found (ODBC -2028)" when recording an incoming payment or if it is a payment draft, it does not return an error; it only leaves the check account field empty. When attempting to convert the draft to a regular payment manually with the check account field empty, it gives the same error in SAP: "No matching records found (ODBC -2028)." Therefore, we assume that the error returned when trying to record the received payment is due to the check account field being left empty. If I go through the process manually, it allows me to change the account when entering the Payment Means window and the checks tab. This is the XML I am sending to the DI Server.

<?xml version="1.0" encoding="UTF-16"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header> <SessionID>[SESSION_ID]</SessionID> </env:Header> <env:Body> <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add Payment Draft"> <BOM> <BO> <AdmInfo> <Object>oPaymentsDrafts</Object> </AdmInfo> <Payments> <row> <DocObjectCode>24</DocObjectCode> <Series>14</Series> <DocType>rCustomer</DocType> <DocDate>2024-01-08</DocDate> <CardCode>C99998</CardCode> <DocCurrency>QTZ</DocCurrency> <CashSum></CashSum> <TransferSum></TransferSum> <TransferDate></TransferDate> <TransferReference>Pruebas Inforum</TransferReference> <TransferAccount></TransferAccount> <CounterReference>0000000</CounterReference> <Remarks>Pruebas inforum 202020</Remarks> </row> </Payments> <Payments_Checks> <row> <DueDate>2024-01-08</DueDate> <CheckNumber>99999</CheckNumber> <CheckSum>50</CheckSum> <CountryCode>GT</CountryCode> <BankCode>BI</BankCode> <CheckAccount>11101001-00-00</CheckAccount> </row> </Payments_Checks> </BO> </BOM> </dis:AddObject> </env:Body></env:Envelope>

We are testing with payment drafts, but the same scenario occurs when recording a regular payment.

And this is the routine I use when performing the process with DI API.

If Not String.IsNullOrEmpty(oDTP.Rows.Item(iContPagoP)("CheckSum")) Then
    If oDTP.Rows.Item(iContPagoP)("CheckSum") <> 0 Then
        If iContPagoP > 0 Then
            oPagoRecibido.Checks.Add()
        End If

        oPagoRecibido.Checks.CountryCode = "SV"
        oPagoRecibido.Checks.CheckNumber = oDTP.Rows.Item(iContPagoP)("CheckNumber").ToString
        oPagoRecibido.Checks.BankCode = oDTP.Rows.Item(iContPagoP)("BankCode").ToString
        oPagoRecibido.Checks.CheckSum = oDTP.Rows.Item(iContPagoP)("CheckSum")
        oPagoRecibido.Checks.CheckAccount = sPagoCuentaCheque
    End If
End If
It's worth mentioning that all the other fields are being recorded correctly.

We have not been able to understand the reason for the error, and we have also tried sending the format code of the account, obtaining the same result. This was tested in both SAP 9.3 and SAP 10. If any of you have experienced a similar case or have any suggestions, it would greatly help us to resolve this issue. Thank you very much, and please feel free to leave any questions below.

Accepted Solutions (0)

Answers (1)

Answers (1)

info0000
Discoverer
0 Kudos

I see that the XML was not added correctly to my question. I will leave it here as a .xml. Sorry

payment.xml