cancel
Showing results for 
Search instead for 
Did you mean: 

CFL Window

Former Member
0 Kudos

I am having two matrix in my screen.. In the first matrix document numbers loaded in the first column...... In the second matrix item loaded in the first column....... In the first matrix, without selecting tab cfl, when i entered the document number and press tab corresponding details will be loaded in the other columns...... but in the item matrix when i enter the item as "item01" ( this is available in the item cfl) and press the tab means, a new CFL window opens..... Wat the reason...?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In the choose from list two things are very important one is alias name and another one is Objcet id Pls select these properly

Former Member
0 Kudos

Hi Sanjay,

I had given that correctly... so only i got the cfl window

Former Member
0 Kudos

Sridhar,

in the following code:


Dim CFLevents As SAPbouiCOM.ChooseFromListEvent = pVal
            Dim CFLList As SAPbouiCOM.ChooseFromList
            Dim StrUID As String = bonCFLevents.ChooseFromListUID
            Dim DT As SAPbouiCOM.DataTable = bonCFLevents.SelectedObjects

what is bonCFLevents?

should not it be CFLevents ?

the block should be something like


 Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
                    oCFLEvento = pVal
                    Dim sCFL_ID As String
                    sCFL_ID = oCFLEvento.ChooseFromListUID
                    Dim oForm As SAPbouiCOM.Form
                    oForm =sbo_Application.Forms.Item(FormUID)
                    Dim oCFL As SAPbouiCOM.ChooseFromList
                    oCFL = oform.ChooseFromLists.Item(sCFL_ID)
                    If oCFLEvento.BeforeAction = False Then
                        Dim oDataTable As SAPbouiCOM.DataTable
                        oDataTable = oCFLEvento.SelectedObjects
                        If oDataTable Is Nothing Then
                            Exit Sub
                        End If

regards,

Binita

Former Member
0 Kudos

Hi Binita,

I had altered the code... by mistake the cflevents changed as boncfl events... but in my original source it vl be cflevents only....

Former Member
0 Kudos

Sridhar,

In your code, I still don't see filter for matrix and column Id. may be you have given it before you have written the above chunk. if not, try giving that. if that does not lead anywhere, last thing, try commenting the attachment of CFL for the matrix for which it is working.

regards,

Binita

Former Member
0 Kudos

Hi

I think the problem here is not the CFL itself. This problem occured to me before.I think he types the Existing item value in the text box in matrix as "Item01" and then presses tab.I discouraged the user to select the item instead of typing it.

HTH

Ram

Former Member
0 Kudos

Yes, u r correct Mr.Raghu..Tats the problem.... when i type "Item01" in matrix and then if i press the tab means, a new cfl windows opens........

Former Member
0 Kudos

But, if by any means , your CFL contains "Item01" , whether you type it or copy it , it should not open New CFL window with empty matrix.

atleast, mine never does.

Former Member
0 Kudos

Thats k ... Whether u had taken any steps regarding this issue...

Former Member
0 Kudos

Nothing special. just a usual CFL handling.

have a look at:

there it is for multiple selection. but, you can change that property to False and use it the same way as given.

Binita

Former Member
0 Kudos

Hi Binita,

Til Now my problem is not solved...Anyhow the particular issue is dropped..... Thanks for ur valuble responses..... And also thanks for all.....

Former Member
0 Kudos

But, Its not solved yet. so you could have still kept it open. without giving me any points .

Answers (3)

Answers (3)

Former Member
0 Kudos

Please post ur code.

Regards,

Mahendra

Former Member
0 Kudos

Above source code is mine......

Former Member
0 Kudos

For the first matrix it working well.... but for item mtriix, a new cfl window is opened....

Former Member
0 Kudos

Sridhar,

the CFL that you are using for both the matrix are same? try filtering the CFL with pval.ItemUID at the beginning of the CFL event. that would be your matrix id.

regards,

Binita

Former Member
0 Kudos

Hi Binita,

My first CFL is DOCCFL with object type = "Document" which loads the document number.. my second CFL is ITEMCFL with object type = "4", which loads the item in matrix........

Former Member
0 Kudos

Sridhar,

what is your Itemcode column bound to in screen painter? and in form, wht type of user datasource it is attached to? post your choose from list event code.

Binita

Former Member
0 Kudos

This is my source



   Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                                        Dim CFLevents As SAPbouiCOM.ChooseFromListEvent = pVal
                                        Dim CFLList As SAPbouiCOM.ChooseFromList
                                        Dim StrUID As String = bonCFLevents.ChooseFromListUID
                                        Dim DT As SAPbouiCOM.DataTable = bonCFLevents.SelectedObjects
                                        Dim ISBool As Boolean = False
                                        Dim IncomingItem As String
                                        Dim Count As Integer
                                        CFLList = Form.ChooseFromLists.Item(StrUID)
                                        If Not (DT Is Nothing) Then
                                            For Count = 1 To Matrix.VisualRowCount
                                                Matrix.GetLineData(Count)
                                                IncomingItem = DBDatasource.GetValue("U_itemid", DBDatasource.Offset).Trim
                                                If IncomingItem = DT.GetValue(0, 0) Then
                                                    ISBool = True
                                                    [ DUPLICATE ITEM MESSAGE]
                                                    Exit For
                                                Else
                                                    ISBool = False
                                                End If
                                            Next
                                            If ISBool = False Then
                                                If pVal.Row = Matrix.VisualRowCount Then
                                                    DBDatasource.Offset = DBDatasource.Size - 1
                                                    DBDatasource.SetValue("U_itemid", DBDatasource.Offset, "")
                                                    DBDatasource.SetValue("U_itemdesc", DBDatasource.Offset, "")
                                                    DBDatasource.SetValue("U_Cost", DBDatasource.Offset, "")
                                                    Matrix.AddRow()
                                                    Matrix.SetLineData(DBDatasource.Size)
                                                    Matrix.FlushToDataSource()
                                                End If
                                                DBDatasource.SetValue("U_itemid", DBDatasource.Offset, DT.GetValue(0, 0))
                                                DBDatasource.SetValue("U_itemdesc", DBDatasource.Offset, DT.GetValue(1, 0))
                                                Matrix.SetLineData(pVal.Row)
                                                Matrix.FlushToDataSource()
                                            End If
                                        End If

Former Member
0 Kudos

Hello,

please have a second look to the CFL-ObjectID. Is it realy linked with ObjectID = 4 (this is for Items-masterdata)?

kind regards

Christian

Former Member
0 Kudos

S.......