on 06-25-2008 9:53 AM
can anybody send me a code that How to get combo value from the database
its urgent
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);
oRec.DoQuery(sQuery);
while (!oRec.EoF)
{
oCombobox.ValidValues.Add(oRec.Fields.Item("SlpCode").Value.ToString(), oRec.Fields.Item("SlpName").Value.ToString());
oRec.MoveNext();
}
Hope i help you
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.