Skip to Content

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

combo select from item master.

i have used a combobox in a form. i want to select item code and item name from oitm. i have lot of item like 5000.

when i select those item from will show taking 2 minuties. but i am not selecting those item no problem at all...

please suggest me......or advice me....

oItem = oForm.Items.Add("ItemVal", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)

oItem.Left = 112

oItem.Width = 120

oItem.Top = 85

'oItem.LinkTo = "CustTxt"

oItem.Enabled = True

oItem.AffectsFormMode = True

cmbItemCode = oItem.Specific


cmbItemCode.DataBind.SetBound(True, "@VTPR", "U_Itemno")

Private Sub AddItemsToCombo(ByVal ocombo As SAPbouiCOM.ComboBox)

ocombo.ValidValues.Add("", "")

Dim rs As SAPbobsCOM.Recordset

Dim i As Integer

rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

rs.DoQuery(" SELECT Itemcode ,ItemName FROM OITM ")


While rs.EoF = False

Dim sName As String = rs.Fields.Item("ItemName").Value.ToString()

If sName.Length > 50 Then sName = sName.Substring(0, 50)

ocombo.ValidValues.Add(rs.Fields.Item("ItemCode").Value, sName)


End While

End Sub

please help ....... how could i solve this issue.


Former Member
Not what you were looking for? View more on this topic or Ask a question