cancel
Showing results for 
Search instead for 
Did you mean: 

CFL in edit mode

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dilip,

What do you mean by Edit Mode. If you are talking about Update Mode or Find Mode.

If it is for Find mode then as far as I have seen the behavior of  CFL, it might not be possible.

But if it is other than this then need to check it.

Hope it helps.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Yes, I mean update mode. User searches a particular record , then alters it and saves it. In this mode, I am binding the matrix. The code of matrix binding is shown above. When I bind the matrxi, cfl disappers.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dilip,

The problem may be with the event at which you are binding the matrix and creating a CFL. What if you create a CFL on Form_Load Event ? Check it on Form_Load Event and reply.

Thanks & Regards

Ankit Chauhan

Former Member
0 Kudos

Refer the url,

http://motwanesales.com/cfl.bmp

This url explains the structure of the form.I have created cfl for three columns i.e. work center,operation name and Machine. User clicks on Find menu. The form and matrix gets cleared. User enters routing no. and clicks on the find button. After altering the record user saves it.

This same form is used for adding new routing and updating existing enteries.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dilip,

Can you do one thing for me ?

As you are saying you have designed your form on screen painter. Try to put the CFL through Screen Painter itself. Then check whether it behaves the same or something else.

Thanks & Regards

Ankit Chauhan

former_member191694
Participant
0 Kudos

hi Dilip ,

   remove the value in Textbox the tab the cfl will open .

cfl window will not appear if the value is in textbox ...

and place you code on Chosse From list event with before action is true .

Regards,

Mayank Shah.

Former Member
0 Kudos

I have integrated search functionality. When the user searches, the records are loaded in the matrix. So it is necessary to load values in the textbox having cfl. What is the other way to load a value in cfl in the edit mode ?