cancel
Showing results for 
Search instead for 
Did you mean: 

INSERT ORDER - No matching records found

Former Member
0 Kudos

Hi,

When trying to enter a sales order, I got the error below:

No matching records found (ODBC -2028) Code -5002

Here my code block. Please, can anyone help?



Dim oSO As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)

        oSO.SalesPersonCode = 1

        oSO.DocDate = DateSerial(2009, 12, 13)

        oSO.CardCode = "C42000"

        oSO.GroupNumber = 25

        oSO.PaymentMethod = "BLT_BNE_01"

        oSO.Comments = "Teste DI API"

        oSO.DocDueDate = DateSerial(2009, 12, 13)

        oSO.Lines.ItemCode = "I00007"

        oSO.Lines.Quantity = 6.0

        oSO.Lines.Price = 35.0

        oSO.Lines.DiscountPercent = 0.0

        lRetCode = oSO.Add()

        If lRetCode <> 0 Then

            oCompany.GetLastError(lRetCode, sErrMsg)

            MessageBox.Show("Error: " & sErrMsg & "; Code: " & lRetCode)

        End If

SAP 9.01 (9.10.180) PL08

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

And what product are you using? I think you posted in an incorrect SCN Space. Check the Overview tab - it tells you what this Space is for...

- Ludek

Senior Support Engineer Product Support, Global Support Center Canada

Follow me on Twitter

Got Enhancement ideas? Use the SAP Idea Place