Showing results for 
Search instead for 
Did you mean: 

get combo value from database

Former Member
0 Kudos

can anybody send me a code that How to get combo value from the database

its urgent

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Puneeth,

I hope that it was the good thing you want :

SAPbouiCOM.ComboBox oCombobox;

oCombobox = (SAPbouiCOM.ComboBox)oForm.Items.Item("18").Specific;

oCombobox.ValidValues.Add("L", "Devise interne");

oCombobox.ValidValues.Add("S", "Devise système");

oCombobox.ValidValues.Add("C", "Devise du partenaire");

oForm.DataSources.DBDataSources.Item("@IFC_AFF_ENT").SetValue("U_IFC_DEV", 0, "L");

oCombobox = (SAPbouiCOM.ComboBox)oForm.Items.Item("72").Specific;

oCombobox.ValidValues.Add("", "");

string sQuery = "SELECT SlpCode, SlpName FROM OSLP";

SAPbobsCOM.Recordset oRec;

oRec = (SAPbobsCOM.Recordset)SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);


while (!oRec.EoF)


oCombobox.ValidValues.Add(oRec.Fields.Item("SlpCode").Value.ToString(), oRec.Fields.Item("SlpName").Value.ToString());



Hope i help you


Answers (0)