Skip to Content

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

Load dropdown

I have created a form through screen painter.I have added a dropdown in the form and I want to load items in it.I want to set itemcode as its value and itemname as its text.I as able to access this dropdown an as,

Dim ddlGroup As SAPbouiCOM.ComboBox

ddlGroup = objForm.Items.Item("11").Specific

How can I load values in this dropdown ?Datasource property is missing in for dropdown.

Former Member
Former Member replied


Try this

Rec = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

CQ_Frm = app.Forms.ActiveForm

qry = "Select itemcode,itemname from OITM"


oCmb = CQ_Frm.Items.Item("c_item").Specific


If oCmb.ValidValues.Count = 0 Then

For i = 0 To Rec.RecordCount - 1

oCmb.ValidValues.Add(Rec.Fields.Item(0).Value, Rec.Fields.Item(1).Value)



oCmb.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)

End If

If this answer is helpful give me reward points.

Thanks & Regards,


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