Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Allocating batches in Sales Order fails after deleting line (ODBC -2028)

Hi all,

When i try to make an allocating batches in Sales Order i got this error

<b>'No matching records found (ODBC -2028)'</b>

with SBO 2005 SP 01 PL31

this is the scenario to reproduce the error

<b>1-</b>Create a Sales Order with 7 lines or more

exemple:

-LineNum---ItemCode

-


0--


A001----

-


1--


A002----

-


2--


A003----

-


3--


A004----

-


4--


A005----

-


5--


A006----

-


6--


A007----

<b>2-</b> Save the Sales Order

<b>3-</b> Delete from a Sales Order, Line with LineNum =3

then on the RDR1 this Sales Order we will have the following lines

-LineNum---ItemCode

-


0--


A001----

-


1--


A002----

-


2--


A003----

-


4--


A005----

-


5--


A006----

-


6--


A007----

<b>4-</b> Save the Sales Order

<b>5-</b> Last step make an allocating batches in this Sales Order with this Code

If oDocOrd.GetByKey(161) Then

' here we set line to number 3

oDocOrd.Lines.SetCurrentLine(3)

Dim sTest As String

sTest = oDocOrd.Lines.ItemCode

' allocating batches

oDocOrd.Lines.BatchNumbers.BatchNumber = "20090630 - F18001 - N532"

oDocOrd.Lines.BatchNumbers.Quantity = 1

Dim lerr As Integer

Dim cherr As String

Try

lerr = oDocOrd.Update

If lerr <> 0 Then

GetSBO.SingleSignOn.oCompany.GetLastError(lerr, cherr)

Throw New Exception(CStr(cherr))

End If

Catch ex As Exception

GetSBO.SingleSignOn.SBO_Application.MessageBox("Error:" & lerr & "," & cherr)

End Try

End If

Message was edited by:

KOUACHI Hamza

Former Member
replied

It may be the same error referred in Note 1056519.

It is recently corrected in 2004C.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question