cancel
Showing results for 
Search instead for 
Did you mean: 

UI - ComboBox in Matrix

Former Member
0 Kudos

Hello,

I would like to create a Combobox inside a matrix, in which i can choose for example a PriceList (i want to see the description but i want to store the code) ...

Someone can help me with an example ?

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes, you can add combo to matrix. First, you have to add a column:

oColumn = oColumns.Add("xxx", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)

oColumn.TitleObject.Caption = "yyyy"

oColumn.Width = 90

oColumn.Editable = True

oColumn.DisplayDesc = True

oColumn.DataBind.SetBound(True, "", "zzz")

Then, you have to add valid values to combo, but do it after you've added a first row to the matrix:

oMatrix.AddRow()

oComboBox = oMatrix.Columns.Item(XX).Cells.Item(1).Specific

rs.DoQuery("SELECT XXXXX")

If rs.RecordCount <> 0 Then

rs.MoveFirst()

Do Until rs.EoF

oComboBox.ValidValues.Add(rs.Fields.Item("XXX").Value, rs.Fields.Item("YYY").Value)

rs.MoveNext()

Loop

End If

rs - Recordset object

Best regards,

Mark

Answers (1)

Answers (1)

Former Member
0 Kudos

Ok thanks a lot ! It work great !

Andrea

Former Member
0 Kudos

Estimados, buen dia.

Favor, soy relativamente nuevo en SAP mas aun en desarrollo por SDK, leyendo algunos Post. veo que uds cuentan ya con alguna experiencia, dada aun mi ingnorancia en estos temas, creen pueda ser posible me puedan compartir agunos manuales o tutoriales como para iniciar en este mundo y tener conocimiento de ello para cuando se me lo requiera?

favor estimados su apoyo.

Dejo mi Mail charly416@hotmail.com

esperando contar con su comprensión quedo a la espera.