Skip to Content
Former Member
Jun 08, 2010 at 07:26 AM

How to make a choose list with UDF



I want add a choose list in matrix

this choose list is a sql

"SELECT Code,Name FROM ""@SIR_COMPOSANT"" ORDER BY Name" for example

my code is

            Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
            Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
            Dim oCFL As SAPbouiCOM.ChooseFromList

            oCFLs = oform.ChooseFromLists

            oCFLCreationParams = SBO_application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
            oCFLCreationParams.MultiSelection = False
            oCFLCreationParams.ObjectType = "????????"
            oCFLCreationParams.UniqueID = "CFL1"

            oCFL = oCFLs.Add(oCFLCreationParams)

            oform.Items.Item("4").Specific.ChooseFromListUID = "CFL1"

            Dim oEditText As SAPbouiCOM.EditText = oform.Items.Item("4").Specific
            oEditText.ChooseFromListUID = "CFL1"
            oEditText.ChooseFromListAlias = "????????" 

Can you help me please

Thank you