Skip to Content
0
Feb 18, 2011 at 08:39 AM

Problem with a ChooseFromlist

130 Views

Hi everybody,

I'm trying to put a choosefromlist and i can't:

I have some functions as:

1. CreateDataSource:

oFormDVD.DataSources.UserDataSources.Add("USD_Cfl", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)

2.AddCFL:

Dim oCFLs As SAPbouiCOM.ChooseFromListCollection

Dim oCFL As SAPbouiCOM.ChooseFromList

Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams

oCFLs = oFormDVD.ChooseFromLists

oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)

oCFLCreationParams.MultiSelection = False

oCFLCreationParams.ObjectType = "1"

oCFLCreationParams.UniqueID = "DVDCFL"

oCFL = oCFLs.Add(oCFLCreationParams)

3.AddEditTextToForm:

oItem = oFormDVD.Items.Add("ETxName", SAPbouiCOM.BoFormItemTypes.it_EDIT)

oItem.Left = 90

oItem.Width = 163

oItem.Top = 10

oItem.Height = 14

oEditText = oItem.Specific

4. BindDataToForm:

oEditText = oFormDVD.Items.Item("ETxName").Specific

oEditText.DataBind.SetBound(True, "", "USD_Cfl")

oEditText.ChooseFromListUID = "DVDCFL"

But don't work.

What' the matter? Why the CFL does not appear in edittext? Is missing something?

Thans and excuse me for my english

Carles