cancel
Showing results for 
Search instead for 
Did you mean: 

Error code -1013

Former Member
0 Kudos

I've tried to update an user field, but sometimes it returns the error code -1013, with the message: Found error, code=-1013,msg=Invalid valid value 'A' in Enum 'BoYesNoEnum'

the code is the following:

Dim lRetCode As Integer

Dim lErrCode As Long

Dim RstStatus As SAPbobsCOM.Documents

Dim nErr As Long

Dim errMsg As String

Set RstStatus = oCompany.GetBusinessObject(oInvoices)

If RstStatus.GetByKey("15") = True Then

RstStatus.UserFields.Fields.Item(0).Value = "1"

lRetCode = RstStatus.Update

If lRetCode <> 0 Then

Call oCompany.GetLastError(nErr, errMsg)

If (nErr <> 0) Then

MsgBox ("Found error, code=" + Str(nErr) + ",msg=" + errMsg)

End If

End If

End If

tks!

Luciano

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try

RstStatus.UserFields.Fields.Item("U_MYUDF").Value = "1"

HTH

Juha

Former Member
0 Kudos

I opened a message in SAP Portal, so they answered me:

"This is a known bug, see the note 997730.

This issue is planned to be fixed in the coming January patch. "

tks!

Luciano Firpo

Answers (0)