Filtering CFL on Matrix

Hi to all,
How can i filter the System CFL which is in Matrix Column. I have filtered the System CFL in Form but unable to do in CFL of Matrix.
What i am trying to do is Filtering The Project Code CFL in A/R Invoice
Here is the code i have
if (pVal.FormTypeEx == "133" & pVal.ColUID == "4")
                    if (pVal.InnerEvent & pVal.Before_Action)
                        BubbleEvent = false;
                        SAPbouiCOM.Form oForm;
                        SAPbouiCOM.Column oColumn;
                        SAPbouiCOM.ChooseFromList oCFL = null;
                        SAPbouiCOM.Conditions oCons = null;
                        try
                            oForm = SboApplication.Forms.Item(pVal.FormUID);
                            oCFL = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("26");
                            //AddChooseFromList();
                            oCons = oCFL.GetConditions();
                            if (oCons.Count == 0)
                                SAPbouiCOM.Condition oCon = null;
                                oCon = oCons.Add();
                                oCon.Alias = "PrjCode";
                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                oCon.CondVal = "000021";
                                oCFL.SetConditions(oCons);
                            BubbleEvent = true;
                        catch (Exception ex)
with regards
Bikram

hi maskey,
thanks for your reply, i have got the solution, the problem is due to the use same object in two different fields. i got the solutions.
regards
Bikram

Similar Messages

  • Cfl in matrix

    Please any one help me how to add the cfl this matrix.
    oNewItem = oOrderForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
            oNewItem.Left = 100
            oNewItem.Width = 350
            oNewItem.Top = oItem.Top + (i - 1) * 25
            oNewItem.Height = 100
            oNewItem.Visible = True
            oMatrix = oNewItem.Specific
            oColumns = oMatrix.Columns
            oNewItem.FromPane = 9
            oNewItem.ToPane = 9
            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "#"
            oColumn.Width = 30
            oColumn.Editable = False
            '// Add a column for BP Card Code
            oColumn = oColumns.Add("DSCardCode", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
            oColumn.TitleObject.Caption = "Item Code"
            oColumn.Width = 150
            oColumn.Editable = True
            oColumn.DataBind.SetBound(True, "opr1", "U_Code")

    Dear lakshmi narayanan,
    First you need add the CFL before using it
               Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                oCFLs = oForm.ChooseFromLists
                Dim oCFL As SAPbouiCOM.ChooseFromList
                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "2"
                oCFLCreationParams.UniqueID = "CFL1"
                oCFL = oCFLs.Add(oCFLCreationParams)
    then add the CLF into the Column
           ' Adding a User Data Source
            oForm.DataSources.UserDataSources.Add("EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
           ' Bind the Column with the UserDataSources
            oColumn.DataBind.SetBound(True, "", "EditDS")
            oColumn.ChooseFromListUID = "CFL1"
            oColumn.ChooseFromListAlias = "CardCode"
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • CFL and Matrix

    Hello,Team
    I want to use CFL (object-id =171 emp details)  in matrix column.
    It is not getting copied values from CFL  into matrix cell i used to do in normal textbox(not in matrix) but i dont know how to do with matrix
    i trie like this.
    If oCFL.UniqueID = "EMP" Then
       oDH.setvalue ("U_Name", 0,oDT.GetValue("lastName", 0))
    but not working
    In normal text box this code is working.
    By
    Firos.C
    Edited by: firoz101 on Jul 31, 2009 11:28 AM
    Edited by: firoz101 on Jul 31, 2009 11:29 AM

    Firoz
    after setting the data to dbdatasource, call a SetLineData() or LoadFromDataSource() method for the matrix object.
    Anoop

  • CFL in matrix + manual values adding

    Hi experts
    I've got a matrix with CFL column. I can choose items via CFL but I would also like to write an item index manually. When I do so and press TAB I cannot lost focus on particular cell in the column, beacuse the program does not recognize the index. I bind the column with DBDataSource.
    Shall I change sth in CFL creation parameters or do what?
    Thanks in advance

    Well it works with any item in the form, but when it comes to matrix it doesn't.
    I must bind column with DbDataSource and maybe that's the reason. However I cannot  bind it with userdatasource, beacuse then I cannot change once written value - the source stays with 1st version.
    So I suppose DBdatasource is necessary, though as I mentioned I cannot put values manually then.
    Am I doing something wrong or what?

  • Copied down row entries by CFL in Matrix

    hello expert
    i created one form which have one matrix and one add row button.matrix have three colum like name,lname and age.name colum have CFL.when i added one then one more row and selected contend of cfl in it work fine but after adding two row when i go to change the content of first row by cfl . its copied the entries of down row not select the coosing entries .pls help me sir
                                                                       thanx a lot

    Hello expert
       for CFL i used this coading
                            If oCFL.UniqueID = "CFL_17" Then
                                Dim i As Integer
                                Dim j As Integer
                                Dim val1 As String
                                Dim val2 As String
                                Dim val3, val4 As String
                                Dim val5 As Integer
                                Dim oRecordSet As SAPbobsCOM.Recordset = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                oMatrix = oForm.Items.Item("orad1").Specific
                                val1 = oDataTable.GetValue("Code", 0)
                                val2 = oDataTable.GetValue("U_TName", 0)
                                val3 = oDataTable.GetValue("U_TName", 0)
                                val4 = oDataTable.GetValue("U_TType", 0)
                                val5 = 1
                                For i = 0 To oDataTable.Rows.Count - 1
                                    oMatrix.FlushToDataSource()
                                    oForm.DataSources.DBDataSources.Add("@PACK8")
                                    oForm.DataSources.DBDataSources.Item("@PACK8").SetValue("U_IRid", pVal.Row - 1, val1)
                                    oForm.DataSources.DBDataSources.Item("@PACK8").SetValue("U_IRName", pVal.Row - 1, val2.ToString.Trim())
                                    oForm.DataSources.DBDataSources.Item("@PACK8").SetValue("U_IRDesc", pVal.Row - 1, val3.ToString.Trim())
                                    oForm.DataSources.DBDataSources.Item("@PACK8").SetValue("U_IRType", pVal.Row - 1, val4.ToString.Trim())
                                    oForm.DataSources.DBDataSources.Item("@PACK8").SetValue("U_Qty", pVal.Row - 1, val5)
                                    Dim RS As SAPbobsCOM.Recordset
                                    RS = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                    RS.DoQuery("Select T2.ListName,T0.PriceList,T0.Price from ITM1 T0,OITM T1,OPLN T2 where T0.ItemCode = T1.ItemCode and T2.BASE_NUM=T0.PriceList and T1.ItemName='" & val4 & "' ")
                                    RS.MoveFirst()
                                    If (colItemRPriceList.ValidValues.Count <= 0) Then
                                        While RS.EoF = False
                                            Dim a, b As String
                                            a = RS.Fields.Item("PriceList").Value
                                            b = RS.Fields.Item("Price").Value
                                            colItemRPriceList.ValidValues.Add(RS.Fields.Item("ListName").Value, RS.Fields.Item("Price").Value)
                                            'colItemPriceList.Columns.Item("V_7").Cells.Item(pVal.Row).Specific.ValidValues.Add(RS.Fields.Item("PriceList").Value, RS.Fields.Item("Price").Value)
                                            RS.MoveNext()
                                        End While
                                    End If
                                    oMatrix.LoadFromDataSource()
                                    oMatrix.SetLineData(pVal.Row)
                                    If Not i = oDataTable.Rows.Count - 1 Then
                                        oMatrix.AddRow()
                                    End If
                                Next
                            End If

  • Cfl for matrix

    hi friends
    i had created a form with a matrix and an editbox. i can apply the cfl for the editbox but i cant use the same for the first column of the  matrix...can anyone provide any sample coding for this process
    thanks and regards
    manoj nagaraj

    Hi
    Look this. I think this code is complete.
    Best regards
    Sierdna S.
    Public Sub SBO_CreateForm(...)
    '... add controls to form, matrix, matrix columns,...
      Call AddChooseFromList(oForm)
      oForm.Visible = True
    End Sub
    Private Sub AddChooseFromList(ByRef oForm As SAPbouiCOM.Form)
      Try
        Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
        Dim oCons As SAPbouiCOM.Conditions
        Dim oCon As SAPbouiCOM.Condition
        oCFLs = oForm.ChooseFromLists
        Dim oCFL As SAPbouiCOM.ChooseFromList
        Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
        oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
        ' CFL for Items ------------------------------
        oCFLCreationParams.MultiSelection = False
        oCFLCreationParams.ObjectType = 4
        ' Item Code
        oCFLCreationParams.UniqueID = "cflIC"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' Item Name
        oCFLCreationParams.UniqueID = "cflIN"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' CFL button
        oCFLCreationParams.UniqueID = "cflIB"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        Catch ex As Exception
          ' log exception
        Finally
          System.GC.Collect() 'Release the handle to the table
        End Try
    End Function
    Public Sub ManageItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean)
      Dim oForm As SAPbouiCOM.Form
      oForm = SBO_Application.Forms.Item(FormUID)
      Select Case pVal.EventType
        Case BoEventTypes.et_CHOOSE_FROM_LIST
          If Not pVal.BeforeAction Then
         Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
         oCFLEvento = pVal
         Dim sCFL_ID As String
         sCFL_ID = oCFLEvento.ChooseFromListUID
         Dim oCFL As SAPbouiCOM.ChooseFromList
         oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
         Dim oDataTable As SAPbouiCOM.DataTable
         oDataTable = oCFLEvento.SelectedObjects
         Dim sCode As String = ""
         Dim sName As String = ""
         Try
           sCode = oDataTable.GetValue(0, 0) ' Code
           sName = oDataTable.GetValue(1, 0) ' Name
         Catch ex As Exception
           sCode = ""
           sName = ""
           ' log exception
         End Try
         ' Rows
         If (pVal.ColUID = "colICode") Or (pVal.ColUID = "colIName") Then
           oForm.DataSources.DBDataSources.Item("@USER_TABLE").SetValue("U_ItemCode", pVal.Row, sCode)
           oForm.DataSources.DBDataSources.Item("@USER_TABLE").SetValue("U_ItemName", pVal.Row, sName)
           Call UpdateCells(oForm, pVal.Row, sCode, sName)
         End If
          End If
      End Select
      oForm = Nothing
    End Sub
    Private Function UpdateCells(ByRef oForm As SAPbouiCOM.Form, ByVal iRow As Integer, _
                        ByVal sCode As String, ByVal sName As String) As Boolean
      Dim b As Boolean = True
      Try
        Dim oMatrix As SAPbouiCOM.Matrix
        Dim oColumn As SAPbouiCOM.Column
        Dim oCell As SAPbouiCOM.Cell
        Dim oEdit As SAPbouiCOM.EditText
        ' MatrixID
        oMatrix = oForm.Items.Item(MatrixID).Specific
        oColumn = oMatrix.Columns.Item("colICode")
        oCell = oColumn.Cells.Item(iRow)
        oEdit = oCell.Specific
        oEdit.String = sCode
        oColumn = Nothing
        oCell = Nothing
        oEdit = Nothing
        oColumn = oMatrix.Columns.Item("colIName")
        oCell = oColumn.Cells.Item(iRow)
        oEdit = oCell.Specific
        oEdit.String = sName
        oColumn = Nothing
        oCell = Nothing
        oEdit = Nothing
        oMatrix = Nothing
      Catch ex As Exception
        b = False
        ' log exception
      Finally
        System.GC.Collect() 'Release the handle to the table  
      End Try
      Return b
    End Function

  • Filtering CFL on System Form

    hello to all,
    Is it possible to filter the contents of CFL which is in System Form. For Example Project CFL in AR invoice. i.e i need to only show the limited Projects, not all which is in OPRJ Table.
    Regards
    Bikram

    Hi vasu,
    the code you have given me is working on Sales Order, but the same code is not working on A/R Invoice CFL for Project Code.
    the only difference in mine n urs condition is mine CFL is in Matrix Column and urs in Form.
    Here is my Code:
    If pVal.FormType = 133 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                If pVal.ItemUID = "39" And pVal.ColUID="4" Then
                    If pVal.InnerEvent And pVal.Before_Action Then
                        BubbleEvent = False
                        Dim oForm As SAPbouiCOM.Form
                        oForm = SBO_Application.Forms.Item(FormUID)
                        Dim oCons As SAPbouiCOM.Conditions                   
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        'oCFL = oCFLs.Add(oCFLCreationParams)
                        oCFL = oForm.ChooseFromLists.Item("26")
                        oCons = oCFL.GetConditions()
                        'Note: Add the condition only once.
                        If 0 = oCons.Count Then
                            Dim oCon As SAPbouiCOM.Condition
                            oCon = oCons.Add()
                            oCon.Alias = "PrjCode"
                            oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                            oCon.CondVal = "000000"
                            'Set your own condition here instead of the system conditions
                            oCFL.SetConditions(oCons)
                        End If
                        BubbleEvent = True
                    End If
                End If
            End If

  • CFL on matrix

    Hi all,
    Can someone help me?
    When  i select the row on my CFL popup i get nothing on my edit Textbox (it's a matrix column). At beginning i got the error "La référence d'objet n'est pas définie à une instance d'un objet" but now this error has desappear.
    I have used screen painter to add the CFL.
    Regards.

    Hi,
    I don't get the error message now but when i click on select button in the A/R Invoice popup i don't get something in my matrix column.
    This is my choosefromlist item event code :
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                            Dim oEdit As SAPbouiCOM.EditText
                            Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
                            oCFLEvento = pVal
                            Dim sCFL_ID As String
                            sCFL_ID = oCFLEvento.ChooseFromListUID
                            Dim oCFL As SAPbouiCOM.ChooseFromList
                            oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
                            If oCFLEvento.BeforeAction = False Then
                                Dim oDataTable As SAPbouiCOM.DataTable
                                oDataTable = oCFLEvento.SelectedObjects
                                'Dim val As String
                                Try
                                    With oForm.DataSources.DBDataSources.Item("@FTACT")
                                        .SetValue("U_Fact", .Offset, oDataTable.GetValue(0, 0))
                                    End With
                                Catch ex As Exception
                                End Try
                                If (pVal.ItemUID = "mtx_13") And (pVal.ColUID = "V_2") Then
                                    Try
                                        oEdit = oForm.Items.Item("V_2").Specific
                                        oEdit.Value = oDataTable.GetValue(0, 0)
                                    Catch ex As Exception
                                    End Try
                                End If
                            End If
                        End If
    Regards.

  • Filtering values in Matrix

    Hi All,
    We have a UDO with three tables. In fact it contains a Mater table, a child table and child to child. But in UDO we defined the  third table as a child to master itself.
    We created a  form in which we have header part for master table and two matrix for child tables.
    The problem we facing is that  when user selects a record in first matrix, he should be able to enter data related to that row in the second matrix. When he moves to the next row in first matrix, second matrix should hide existing data and should be ready to accept data related to current row in first matrix without loosing the earlier entered data related to first row. The same should happen while updation also.
    Please help
    Thanks in Advance
    Ajith G

    Hi Satish,
    This is Toms on behalf of Mr Ajith. on the above query.
    The functionality is like this:
    We want to create an Item Property master screen.
    Defining new properties and its applicability to Item Groups and  its values
    applicable to each Item Group.
    Property:.......Item group...........Values
    Colour.........   Refrigerator.........Silver
    .. ...........................................Steel
    .. ...........................................Red
    .. ...........................................Grey etc.
    .....................TV.... ................Black
    ..............................................Silver etc.
    Here, Item Groups are in the 1st matrix, and Applicable Values corresponding to the Property is in the 2nd matrix.
    There are 3 tables, one for the property, other one for the Applicable Item groups
    and the third one for the applicable property values corresponding to each Item group.
    Regards,
    Toms
    Edited by: TomsPA on Jan 29, 2010 1:27 PM

  • CFL in Matrix tab event

    Hi All,
              In my addon i hava a matix.In that first column when i press tab a list of items window should be get opened(from ITEM MASTER DATA) in a CFL,can anybody suggest me some coding for this????
    regards,
    shangai.

    Hi
    oForm.Freeze(True)
                                        Dim cflevent As SAPbouiCOM.ChooseFromListEvent = pVal
                                        Dim oCFLEvento As SAPbouiCOM.ChooseFromList
                                        Dim strUid As String = cflevent.ChooseFromListUID
                                        oCFLEvento = oForm.ChooseFromLists.Item(strUid)
                                        Dim oDataTable As SAPbouiCOM.DataTable = cflevent.SelectedObjects
                                        Try
                                            If strUid = CFL1 Then
                                                Try
                                                    oMatrix.Columns.Item("col0").Cells.Item(pVal.Row).Specific.string = oDataTable.GetValue(0, 0)
                                                Catch ex As Exception
                                                End Try
                                            End If
    Thanks..

  • CFL in matrix columns for A/R Invoice

    Hi experts,
    This my xml form code.
    Can someone show me where i have done an error. I have 2 CFL on 2 columns
    Regards.
    Edited by: Olivier KPOLO on Apr 1, 2010 12:51 PM

    Hello freind where is xml code and what is problem

  • Query cfl problem in matrix

    hi all good morning.... i have one problem i assigned query cfl for matrix field. the value fetch based on header level.... the query fetch the data but its not show the CFL window..here i pasted my code
    Case "matvariant"
                            Select Case pVal.ColUID
                                Case "Col_Colour"
                                    Select Case pVal.EventType
                                        Case SAPbouiCOM.BoEventTypes.et_GOT_FOCUS
                                            Dim oForm As SAPbouiCOM.Form = gonAppApplication.Forms.Item("VARAINT")
                                            Dim sQuery As String = "SELECT  T1.[U_U_COLOR] FROM [dbo].[@ITEMCOLOR_DETAIL]  T0 inner join [dbo].[@ITEMCOLOR_HEADER]  T1 on t0.docentry=t1.docentry WHERE T0.[U_Itmcode] !='' and T0.[U_Avail] ='y' and T0.[U_Itmcode] = '" & oForm.Items.Item("txticode").Specific.Value & "'"
                                           oGeneral.SetConditionToCFL1(oForm, "COLITEMCFL1", "U_ID", sQuery)
                                                                               Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                                            Dim bonCflEvents As SAPbouiCOM.ChooseFromListEvent
                                            Dim bonDTTable As SAPbouiCOM.DataTable
                                            Dim bonCflList As SAPbouiCOM.ChooseFromList
                                            Dim bnnstrUID As String
                                            bonCflEvents = pVal
                                            bnnstrUID = bonCflEvents.ChooseFromListUID
                                            bonDTTable = bonCflEvents.SelectedObjects
                                            bonCflList = lonConvForm.ChooseFromLists.Item(bnnstrUID)
                                            If Not (bonDTTable Is Nothing) Then
                                                If bonCflList.UniqueID = "COLITEMCFL1" Then
                                                    gonMatConvMatrix.GetLineData(pVal.Row)
                                                    gonMatConvMatrix.GetLineData(pVal.Row)
                                                    lonDetailDatasource.SetValue("U_Col_COLOR", lonDetailDatasource.Offset, bonDTTable.GetValue("U_COLOR_NAME", 0))
                                                    gonMatConvMatrix.SetLineData(pVal.Row)
                                                    If pVal.Row = gonMatConvMatrix.VisualRowCount Then
                                                        lonDetailDatasource.SetValue("U_Col_COLOR", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("U_Col_LENGTH", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("U_Col_WIDTH", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("U_Col_THICK", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("U_Col_SIZE", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("U_Col_Desc", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("U_Col_Price", lonDetailDatasource.Offset, "")
                                                        lonDetailDatasource.SetValue("LineId", lonDetailDatasource.Offset, pVal.Row + 1)
                                                        gonMatConvMatrix.AddRow()
                                                        gonMatConvMatrix.SetLineData(pVal.Row + 1)
                                                        gonMatConvMatrix.FlushToDataSource()
                                                    End If
                                                Else
                                                End If
                                            End If
                                    End Select
                            End Select
    Edited by: narain.balan on Oct 26, 2010 7:02 AM

    Hi
    Please post the function code  oGeneral.SetConditionToCFL1(oForm, "COLITEMCFL1", "U_ID", sQuery)
    I think the problem is with choose from list condition.
    Regards
    Arun

  • [no replies since 2days] problem when doing line total in matrix?

    hi everyone...
    i have a user form in which ihave a matrix with few columns and for a particular column there is CFL...when i select a CFL my matrix is feeding with data in other columns as well.....
    in my form there is a edit box called Tax...in to which iam supposed to calculate the line total of a column in my matrix... as soon as when i enter CFL....
    here is the code which i have written in item event
    oMatrix2.FlushToDataSource()
    oDBDataSource6.SetValue("U_Tax", pVal.Row - 1, oCFLEvent.SelectedObjects.GetValue(0, 0))
    oDBDataSource6.SetValue("U_Tax_Amount", pVal.Row - 1, oCFLEvent.SelectedObjects.GetValue(2, 0))
    oMatrix2.LoadFromDataSource()
                                                oMatrix2.Columns.Item("V_7").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    ''for Tax
    taxTotal = oForm.Items.Item("33").Specific.value
    taxAmount = oMatrix2.Columns.Item("V_7").Cells.Item(pVal.Row).Specific.value
    tax = taxTotal + taxAmount
    oForm.Items.Item("33").Specific.value = tax
    '' end for Tax
    the above is code is working perfect...but,
    there are 2 problems....
    1. if i remove "oMatrix2.Columns.Item("V_7").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular)" line from my code there is an error called
    " Application has a problem. Diagnostic file C:
    some path..dump was created...plz attach the file...etc etc..."
    2. in my matrix column if i re-enter any other CFL data...my Tax is adding again with same value again...i.e i'm not getting the correct line total...
    plz provide me the solution for both the questions...
    thanks in advance
    Edited by: Shenaz Sultana on Jan 7, 2010 12:29 PM

    Hi,
    For your 1st question, y should you remove that line?  If it works fine with that line, leave it as it is.  Its afterall placing the focus in that column right?
    w.r.t your 2nd question, the reason why the same value is being considered for tax calculation is that, the same old datasource is not cleared.  So you clear the datasource manually and this problem will be solved.
    Eg: Try to clear the data source as below.
    oForm.DataSources.DBDataSources.Item("@Table_Name").Clear();
    Hope this helps.
    Regards,
    Satish.

  • Choose from List in A matrix for choosing two or more rows at same time

    Hi Friends,
    Actually I m using choose from list to select Items in a row, i can select Two or more rows from the List but while clicking choose it is taking only one value.
    The no of rows are not activated tat i m choosing from list.
    Thanks in advance
    Vivek

    Hi.
    Here is a [link|https://forums.sdn.sap.com/click.jspa?searchID=12829558&messageID=5584893] where are you can find on of my example on CFL on matrix column.
    I think, you need to made some changes in code from these lines...
        Dim oDataTable As SAPbouiCOM.DataTable
        oDataTable = oCFLEvento.SelectedObjects
        for ...
        end for
    Reply if this guideline was usefull for you.
    Bye

  • Error in Choose from list  on Matrix

    Hi all,
       I am using CFL in matrix for my user define form, When i choose a value from CFL , i am getting the following error
    <b>" Item -Can't set value on item because the item can't get focus [66000-153]"</b>
    <u>the code i used is given below</u>
    <u>this is in Item Event</u>
                                        Try
                If FormUID = ("FRMIGRP") Then
                    If pVal.Before_Action = False Then
                        If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) Then
                            ' If pVal.EventType = SAPbouiCOM.BoEventTypes.et_GOT_FOCUS Then
                            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
                                Dim val As String
                                Dim val1 As String
                                Dim val2 As String
                                Dim val3 As String
                                Try
                                    val = oDataTable.GetValue(0, 0)
                                    val1 = oDataTable.GetValue(1, 0)
                                Catch ex As Exception
                                    MessageBox.Show(ex.Message)
                                End Try
                                Try
                                    If (pVal.ItemUID = "txtcode") Then
                                        Dim oDS As SAPbouiCOM.DBDataSource
                                        oDS = oForm.DataSources.DBDataSources.Item("@PSSIT_GRPHDR") 'add your dbdatasource here
                                        oDS.SetValue("U_grpcode", oDS.Offset, val)  ' val1 is the value you are setting
                                        oDS.SetValue("U_grpname", oDS.Offset, val1)
                                    End If
                                Catch ex As Exception
                                    MessageBox.Show(ex.Message)
                                End Try                      
                                Try
                                    val2 = oDataTable.GetValue(0, 0)
                                    val3 = oDataTable.GetValue(1, 0)
                                    If (pVal.ItemUID = "matr") And (pVal.ColUID = "supp") Then
                                       Dim oEdit As SAPbouiCOM.EditText
                                        oMatrix.FlushToDataSource()
                                        oForm.DataSources.UserDataSources.Item("EditDS2").ValueEx = val2.ToString
                                        oEdit = subcol.Cells.Item(pVal.Row).Specific
                                        oEdit.Value = val2.ToString
                                        oEdit = subname.Cells.Item(pVal.Row).Specific
                                        oEdit.Value = val3.ToString
                                        ("EditDS2").ValueEx = Nothing
                                    End If
                                Catch ex As Exception
                                    MessageBox.Show(ex.Message)
                                End Try
                            End If
    And i used data source also to set the value using below code, but for that also value is not set in to the field
    Dim oEdit As SAPbouiCOM.EditText
                                        Dim oDS As SAPbouiCOM.DBDataSource
                                        oDS = oForm.DataSources.DBDataSources.Item("@PSSIT_GRPDTL") 'add your dbdatasource here
                                        oDS.SetValue("U_supcode", oDS.Offset, val2)  ' val1 is the value you are setting
                                        oDS.SetValue("U_supname", oDS.Offset, val3)
    SOmebody can help me to solve this issue
    Regards
    Suresh R

    Suresh,
    Try this one,
    Here i have used for check the dulpicate entry also, that is if we choose one item in the first row in second row or third we cant able to choose the same. If u no need just neglect it.
    Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.BeforeAction = False
                        Dim oCFLE As SAPbouiCOM.IChooseFromListEvent
                        oCFLE = pVal
                        Dim CFLID As String
                        CFLID = oCFLE.ChooseFromListUID
                        PI_Frm = app.Forms.Item(FormUID)
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        oCFL = PI_Frm.ChooseFromLists.Item(CFLID)
    oCFL.UniqueID = "CFL2" Then
                            Dim oDT As SAPbouiCOM.DataTable
                            oDT = oCFLE.SelectedObjects
                            Try
                                Dim oMat As SAPbouiCOM.Matrix
                                Dim t, t1 As String
                                Dim Rec, Rec1, Rec2 As SAPbobsCOM.Recordset
                                oMat = PI_Frm.Items.Item("m_det").Specific
                                t = oDT.GetValue(0, 0)
                                t1 = oDT.GetValue(1, 0)
                                If Trim(HEAD_oDBds.GetValue("U_pid", 0)).Equals("") = False Then
                                    oMat.Columns.Item("rate").Editable = False
                                Else
                                    oMat.Columns.Item("rate").Editable = True
                                End If
                                Dim Bool As Boolean = False
                                For i As Integer = 1 To oMat.VisualRowCount
                                    oMat.GetLineData(i)
                                    If Trim(DETAIL_oDBds.GetValue("U_itno", (i - 1))).Equals(Trim(oDT.GetValue(0, 0))) = True Then
                                        Bool = False
                                        Exit For
                                    Else
                                        Bool = True
                                    End If
                                Next
                                If Bool = True Then
                                    If pVal.Row = oMat.VisualRowCount Then
                                        oMat.AddRow()
                                        oMat.FlushToDataSource()
                                        Me.SetEmptyRow(DETAIL_oDBds.Size)
                                    End If
                                    Rec = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                    Rec1 = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                    Rec2 = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                    Rec.DoQuery("select BuyUnitMsr from OITM where ItemCode ='" & Trim(oDT.GetValue(0, 0)) & "'")
                                    DETAIL_oDBds.Offset = (pVal.Row - 1)
                                    DETAIL_oDBds.SetValue("LineId", DETAIL_oDBds.Offset, pVal.Row)
                                    DETAIL_oDBds.SetValue("U_itno", DETAIL_oDBds.Offset, oDT.GetValue(0, 0))
                                    DETAIL_oDBds.SetValue("U_itdesc", DETAIL_oDBds.Offset, oDT.GetValue(1, 0))
                                    DETAIL_oDBds.SetValue("U_unit", DETAIL_oDBds.Offset, Rec.Fields.Item(0).Value)
                                    DETAIL_oDBds.SetValue("U_poqty", DETAIL_oDBds.Offset, "0")
                                    DETAIL_oDBds.SetValue("U_qnos", DETAIL_oDBds.Offset, "0")
                                    DETAIL_oDBds.SetValue("U_pur", DETAIL_oDBds.Offset, "")
                                    Rec1.DoQuery("select U_basicrate from [@RATE_MASTER_DETAIL] where U_itemid='" & oDT.GetValue(0, 0) & "'")
                                    DETAIL_oDBds.SetValue("U_rate", DETAIL_oDBds.Offset, Rec1.Fields.Item(0).Value)
                                    Rec2.DoQuery("select a.OnHand ,b.ItemCode,b.DfltWH,a.WhsCode from OITW a,OITM b where a.ItemCode=b.ItemCode and b.DfltWH=a.WhsCode and b.DfltWH='01' and b.ItemCode='" & oDT.GetValue(0, 0) & "'")
                                    DETAIL_oDBds.SetValue("U_stx", DETAIL_oDBds.Offset, Rec2.Fields.Item(0).Value)
                                    oMat.SetLineData(pVal.Row)
                                End If
    If it helps give me reward points.
    Regards,
    Anitha

Maybe you are looking for

  • Not able to clear GR/IR accont

    Hi, We are executing transaction code F.13 to clear GR/IR account. However, still there are some documents appearing in the account as uncleared. For all the documents unclaered, two accounts are involved: one for GR and other one for IR. We tried tr

  • Can't import photos from DVD

    I have a DVD-ROM with a bunch of images on it. Works fine if I drag the folder(s) from it to my hard drive - but - trying to import in Aperture doesn't seem to work... There's one folder on the DVD & a bunch of subfolders in that. The import window i

  • PPP Mulilink problem

    Need Help! Got problem with ppp multilink. Set up it, but the interface show down, like that in both side: Serial4:0                  unassigned      YES manual down                  down Serial5:0                  unassigned      YES manual down    

  • OWB and DB2

    I have connected Oracle 9i and DB2 v7 and query DB2 in SQL Plus is fine. However, it doesn't for the connection between OWB and DB2. Anyone can help? Thanks!

  • SAP Portal server node identifier

    Hi: We have SAP Portals installed in two server nodes with a load balancer. I know SAP gives a unique internal identifier (number) by server. I want to know, where can I find this identifier ? Thanks, Felipe Mendivil Ortiz