cancel
Showing results for 
Search instead for 
Did you mean: 

combo select from item master.

Former Member
0 Kudos

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

AddItemsToCombo(cmbItemCode)

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 ")

rs.MoveFirst()

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)

rs.MoveNext()

End While

End Sub

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

,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

What exactly is the issue ??

Vasu Natari.

Former Member
0 Kudos

thanks for reply ...

it was some type mistale...

when i select item from item master data taking a lot of time to open my FORM .

please solve this issue.

Edited by: john 09 on May 5, 2009 1:21 PM

Former Member
0 Kudos

Hi

Do you bind your combo at form load?

Thanks

Former Member
0 Kudos

Hi John,

It will take a lot of time as you are adding all the Items to the Combo box, So its better to use a Edit text and CFL rather than a combo box. If u use a CFL u'll be saving a lot of time.

Vasu Natari.