I have created a user defined objects. Then I have created a CFL for this user defined objects. I have created a user defined form using screen painter and I have integrated this CFL in the matrix. This CFL works when the form is in add mode. But in the edit mode this CFL does not work.The code for cfl is as follows,
Public Sub AddMacCFL()
Dim intI As Integer
Dim objCFLsName As SAPbouiCOM.ChooseFromListCollection
Dim objParaName As SAPbouiCOM.ChooseFromListCreationParams
Dim objCFLName As SAPbouiCOM.ChooseFromList
Try
For intI = 0 To objRouting.DataSources.UserDataSources.Count - 1
If objRouting.DataSources.UserDataSources.Item(intI).UID = "Mac_Name" Then
Exit Sub
End If
Next
objRouting.DataSources.UserDataSources.Add("Mac_Name", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100)
objCFLsName = objRouting.ChooseFromLists
objParaName = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
objParaName.MultiSelection = False
objParaName.UniqueID = "CFL"
objParaName.ObjectType = "Machine"
objCFLName = objCFLsName.Add(objParaName)
Catch ex As Exception
WriteLog(SBO_Application.Company.ServerDate & ":" & SBO_Application.Company.ServerTime & ":" & "AddMacCFL()=" & ex.Message)
End Try
End Sub
I am calling AddMacCFL() in the add mode.I have created a function for binding the matrix. The code for binding the cfl is as follows,
objColumn = objColumns.Item("Mac_Name")
objColumn.DataBind.Bind("objDTRT", "Mac_Name")
objColumn.ChooseFromListUID = "CFL"
objColumn.ChooseFromListAlias = "Name"
objColumn.Editable = True
In the edit mode in am calling the bind function. The data is getting loaded in the matrix but the cfl is not working. The circular image of cfl does not appear for the textbox.