cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid valid value '1 ' in Enum 'BoYesNoEnum', the valid values are 'N','Y

Former Member
0 Kudos

I get the above error when I update a quotation with the sdk.

The only fields I adjust are the price and unitprice fields.

This doesn't happen with all my quotations tho just with a few.

I can still manually update them in SAP but can't do any update of the quotation using the sdk.

When I duplicate the quotation the error remains.

Code:

Dim oDoc As SAPbobsCOM.Documents = Nothing

oDoc = sapCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oQuotations)

If oDoc.GetByKey(Docentry) = False Then Return False

oDoc.Lines.SetCurrentLine(mRs.Fields.Item("visorder").Value)

oDoc.Lines.Price = JoroFunctions.IsNull(mRs.Fields.Item("tot").Value, 0)

oDoc.Lines.UnitPrice = JoroFunctions.IsNull(mRs.Fields.Item("tot").Value, 0)

If oDoc.Update <> 0 Then

MessageBox.Show(sapCompany.GetLastErrorDescription)

end if

Any idea what might be causing this error?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved the problem

It was due to a y/n field being set to 1 for half the lines in the quotation.

Had to manually look it all up and found that field 'UseBaseUn' was set to 1 for the first half of the quotation

Former Member
0 Kudos

Hello

This is a documented function, in between SAP Notes.

I mean the Price and UnitPrice field usage.....

See SAP Note: 1334050

Regards,

J.

Former Member
0 Kudos

Although it's an interesting read it doesn't solve my problem.

The only thing that could have been relevant is the text about "calculate the row total using the unit price" but I can't find this option anywhere.

I tested it now with only setting the unitprice and the error still remains.

Any other idea as to what might be causing this?