Skip to Content
Former Member
Nov 08, 2007 at 10:19 AM

Removing a ValidValue from a system ComboBox


In the sales order form, I want to remove a valid value from the 'series' combobox.

I did this:

    Dim Series As SAPbouiCOM.ComboBox = Form.Items.Item("88").Specific ' the Series combobox
    For i As Integer = 0 To Series.ValidValues.Count - 1
      SBO_UI.MessageBox(Series.ValidValues.Item(i).Value & ": " & Series.ValidValues.Item(i).Description)

And saw the value -1, which is the 'manual' series.

I tried to remove it:

Series.ValidValues.Remove(-1, SAPbouiCOM.BoSearchKey.psk_ByValue)

but I got 'invalid value' exception.

Does that mean that removing combobox validvalues is not supported on system forms?

btw, I didnt manage to add a validvalue to that combobox...