cancel
Showing results for 
Search instead for 
Did you mean: 

Create CFL in matrix

Former Member
0 Kudos

Dear  Experts   

              How to create CFL in matrix column  for add-on modules ,Is possible to create. how to create CFL in matrix and i need step for this

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Try this

If (pVal.Before_Action = True) Then

                Dim oitem1 As SAPbouiCOM.Item

                oitem1 = oForm.Items.Item("57")

                radio3 = oitem1.Specific

                radio1 = oForm.Items.Item("58").Specific

                radio2 = oForm.Items.Item("56").Specific

               

              

                If radio1.Selected = True Then

                    doctype = "A"

                End If

            Else

                If doctype = "A" Then

                    Debug.Print("A")

                    If pVal.ItemUID = "71" Then

                        Debug.Print("71")

                        Dim text As SAPbouiCOM.EditText

                        mat = oForm.Items.Item("71").Specific

                        text = mat.Columns.Item("UDF").Cells.Item(pVal.Row).Specific

                        AddChooseFromList()

                        text.ChooseFromListUID = "CFL1"

                        text.ChooseFromListAlias = "Code"

                    End If

                End If

end if

Method AddChooseFromList() is as follows:

Private Sub AddChooseFromList()

        Try

            Dim oCFLs As SAPbouiCOM.ChooseFromListCollection

            oCFLs = oForm.ChooseFromLists

            'this part for CFL1

            Dim oCFL As SAPbouiCOM.ChooseFromList

            Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams

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

            ' Adding CFL, one for the button and one for the edit text.

            oCFLCreationParams.MultiSelection = False

            oCFLCreationParams.ObjectType = "UDT"

           

            oCFLCreationParams.UniqueID = "CFL1"

            oCFL = oCFLs.Add(oCFLCreationParams)

        Catch

            MsgBox(Err.Description)

        End Try

    End Sub

Hope it helps

Thanks