UDO + Matrix + CFL

Hi,
How can put to work together a matrix that links to an UDO that works with two user defined tables (a header and a detail), and a CFL two select values from the item table to put after in the matrix and update the UOD (and the table).
In Screen Painter I put the references, in the matrix, to the detail user table. By code I put the CFL and all works fine. But when I put the values from the CFL in the row's matrix, seems that the matrix loose the original DataSource instead the DataSource from the CFL.
Anybody knows how put to work this three objects together.
Thanks in advance,
Oscar S.M.

Hi
Seems that you have to control the values you are passing from and to the CFL.  You can do this by using the SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST event.  Also, try to evaluate the value of the cell on the lost_focus or validate event.
Does the value has any special formatting (such as serial number or gl account number)?
There's a sample on the SDK , C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\17.ChooseFromList that deals with assigning values to a control on the event!
Hope it helps

Similar Messages

  • Udo matrix -save problem

    Hi,
    i am creating a form by using UDO form generator.
    in that documet and doucument rows are existed. if user select the combobox value from the form, by taking that value and i am generating a query, i am generating a recordset. by using Userdatasources i am binding each column in matrix.
    i binded all values to the matrix successfully. but
    but when i press Add button, this matrix rows are not getting saved. and also if i have two rows, when i press add, in database only one row is adding with NULL values. how to save that matrix data?
    please help me urgent
    asap
    regards,
    nagababu

    I believe this is a duplicate of
    Udo matrix rows saving problem
    Pls read the guidelines. Don't duplicate requests, this just cause confusion and
    inefficiency in the forum. And pls remember that this is a community of very very
    busy developers, each of them with his/her "urgencies" ....

  • UDO matrix sort

    Hello All:
       Currently have a UDO that user users, as it get larger there is a need to have the matrix value sorted by a different way (default of course is alphabetically against code column).
       Aside from write a new form and handle data source of the matrix myself. Any easier I can resort the exist UDO matrix?
       Thank you for any help you can give me.
    Also.
        I am having a weired problem that when I change viewpanel, element does not change.
        I set the item's frompanel and topanel.. And I have the handling script that does "form.PaneLevel = " thing. I know it is something stupid as I done something like this before and stuck on this a bits before and fixed before. But that was several years ago. Can't remember what I did. Any obvious suggestion would be greatly appreciated. First part of this message is more important!
    Thank You!

    Matrix columns can be sort using this code
    yourmatrix.Columns.Item("yourcolumn").TitleObject.Sortable = true;
    when you click on matrix column header the column will sort automatically

  • Sorting UDO Matrix

    Hi,
    I need help in the following:
    1. How to sort or group UDO table(s) using conditions
    2. How to enable double-click on column header in UDO matrix
    I am using VB and 2004B. Your input will be greatly appreciated.

    To my knowlegde this can't be done yet. Not in SBO2004A or in SBO2005A... Sort was part of the planned release of 2005A but it didn't make it before the release. Now the plan is SBO2005A SP1... I don't know the release plan form the B-Cluster...

  • Dynamic condition in UDO Matrix's Column

    Hi all,
    I have a user form with a matrix. The matrix's first column has a CFL linked to another UDO MasterData Code (lets call it UDOCode).
    And on this matrix, the same UDOCode cannot be chosen more then once.
    So, I've been trying to code a dynamic CFL that filters the UDOCode's already chosen in the Column.
    Based on this thread I've achived this code:
    Select Case pVal.ItemUID
                        Case "mtx_ACORDO" '// The Matrix
                            oConds = New SAPbouiCOM.Conditions
                            With oForm.DataSources.DBDataSources.Item("@ADAT_ACORDOS1") '// The Matrix's DBDataSource
                                If .Size = 1 Then
                                    oCond = oConds.Add
                                    oCond.Alias = "Code"
                                    oCond.Operation = BoConditionOperation.co_NOT_NULL
                                Else
                                    For i As Integer = 0 To .Size - 1
                                        oCond = oConds.Add()
                                        oCond.BracketOpenNum = 1
                                        oCond.Alias = "Code"
                                        oCond.Operation = BoConditionOperation.co_NOT_EQUAL
                                        oCond.CondVal = .GetValue("U_EspPrcCd", i)
                                        oCond.BracketCloseNum = 1
                                        If i > 0 And i < .Size - 1 Then
                                            oCond.Relationship = BoConditionRelationship.cr_OR
                                        End If
                                    Next
                                End If
                            End With
                    End Select
    If Not oConds Is Nothing Then oCFL.SetConditions(oConds)
    In the matrix's first row I have no problem. All the values are there. But on the second row, no values are display in the DataTable.
    If I change the conditions from .Size -1 to .Size - 2, I get the correct values on the first and second rows, but on the third, again, no values are being display in the DataTable...
    Can anyone help me?
    Regads,
    Vítor Vieira
    Edited by: Rui Pereira on Dec 23, 2008 4:17 PM

    Hi, Erwine Sukardy
    Maybe it will be helpful if you have a specific task.
    All of items on a Form have it's own DBDataSources.
    For example, to get a table name and field name, that are Datasources to the ItemCode field in a Matrix in a  Purchase Order document, you can use this code:
    SAPbouiCOM.Matrix        tblSNs;
    SAPbouiCOM.Column      oColumnItems;           
    tblSNs = (SAPbouiCOM.Matrix)oPurDNForm.Items.Item("38").Specific;
    oColumnItems = (SAPbouiCOM.Column)tblSNs.Columns.Item("1");
    string tableName = oColumnItems.DataBind.TableName;
    string fieldName = oColumnItems.DataBind.Alias;
    HTH!

  • SAP B1 UDO: Bind CFL to the same form UDO

    Hi,
    I have created an UDO which is bound to a master data user defined table. Now, I have created a form for that master data, where in a matrix, I need to add some of the entries from the same master table, sort of like a tree structure. I have created a CFL which I have bounded to the object type of "MyUDO". The code on after choose from list is given below.
    try
                            Matrix oMatrix_upsell = (Matrix)form.Items.Item("mtx_upsell").Specific;
                            DBDataSource oDBDataSource = (DBDataSource)form.DataSources.DBDataSources.Item("@PRODUPSELLS");
                            DataTable oDataTable = null;
                            oDataTable = oCFLEvent.SelectedObjects;
                                if (form.Mode == BoFormMode.fm_ADD_MODE | form.Mode == BoFormMode.fm_OK_MODE | form.Mode == BoFormMode.fm_UPDATE_MODE)
                                    if (pVal.Row == oMatrix_upsell.RowCount)
                                        oDBDataSource.SetValue("LineId", oDBDataSource.Size - 1, null);
                                        oDBDataSource.SetValue("U_SKU", oDBDataSource.Size - 1, null);
                                        //oDBDataSource.SetValue("U_CatId", oDBDataSource.Size - 1, null);
                                        oDBDataSource.InsertRecord(oDBDataSource.Size - 1);
                                string Query = null;
                                Query = "select Name, U_Web_Id from [@WITM] where U_SKU =N'" + System.Convert.ToString(oDataTable.GetValue("U_SKU", 0)) + "'";
    Recordset RSet = (Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
                                RSet.DoQuery(Query);
                                oDBDataSource.SetValue("U_SKU", pVal.Row - 1, System.Convert.ToString(oDataTable.GetValue("U_SKU", 0)));
                                oDBDataSource.SetValue("U_Name", pVal.Row - 1, RSet.Fields.Item("Name").Value.ToString().Trim());
                                oDBDataSource.SetValue("U_WebId", pVal.Row - 1, RSet.Fields.Item("U_Web_Id").Value.ToString().Trim());
                                oMatrix_upsell.LoadFromDataSource();
                                oDBDataSource = null;
                        catch (Exception ex)
                            B1Connections.theAppl.SetStatusBarMessage(ex.ToString(), BoMessageTime.bmt_Medium, true);
    The problem is that, when I select an item in the matrix, the data of the other fields in the form gets loaded for the selected object from the CFL. Is there a way to create a cfl and bind it to the same table on which the form is operating?

    Hi Philip,
    in SFP When you develop a form you have the interface mapped/assigned to it right.
    So here you have the source fields on the left hand side (the output parameters of your interface) and the form context on the right hand side.
    So lets say your interface gives you several data where employee list (EMP_LIST) is a internal table.
    so now if you drag and drop this EMP_LIST from left to right.
    when you do it again it will have the name EMP_LIST_1 and so on.
    Now if you go to layout tab you will see the form design area, here if you go to data view on the left hand side, you can see all the fields available for your form. since you have the EMP_LIST of 3 instances you will see all 3 of them.
    So now on the form as required have the 3 tables in different pages or so as you like, do the data binding to the 3 different data instances.
    since the actual actual source of the 3 lists is still the same the data presented in thhese tables is also same nothing different.
    you can have your script to individual tables for presentation nothing changes (all is well).
    Now when it comes to matter of support on your developments, when a new developer carries your work, he can see the context and understand that its the same. no need to investigate any scripts or such.
    Hope this makes you clear,
    Cheers,
    Sai

  • Udo matrix rows saving problem

    Hi,
    i am creating a form by using UDO form generator.
    in that documet and doucument rows are existed. if user select the combobox value from the form, by taking that value and i am generating a query, i am generating a recordset. by using Userdatasources i am binding each column in matrix.
    i binded all values to the matrix successfully. but
    but when i press Add button, this matrix rows are not getting saved. and also if i have two rows, when i press add, in database only one row is adding with NULL values. how to save that matrix data?
    i am sending my code here. plz help me
    ds = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
    ds.DoQuery("select a.code as Code,b.Itemname as Desc1,a.quantity as Quantity from itt1 a,oitm b where a.code=b.Itemcode and a.code=' " & oComboBox.Selected.Value & ' "")
    'User datasources creation
    oForm = SBO_Application.Forms.Item("TBL_JOBWORK_")
    oUserDataSource = oForm.DataSources.UserDataSources.Add("dsItemcode", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
    oUserDataSource = oForm.DataSources.UserDataSources.Add("dsItemdesc", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
    oUserDataSource = oForm.DataSources.UserDataSources.Add("dsQuantity", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
    ds.MoveFirst()
    oForm = SBO_Application.Forms.Item("TBL_JOBWORK_")
    oItem = oForm.Items.Item("mtx_0")
    oMatrix = oItem.Specific
    oColumns = oMatrix.Columns
    Dim oColumn1 As SAPbouiCOM.Column
    Dim oColumn2 As SAPbouiCOM.Column
    Dim oColumn3 As SAPbouiCOM.Column
    ' Dim oColumn4 As SAPbouiCOM.Column
    oColumn1 = oColumns.Item("col_0")
    oColumn2 = oColumns.Item("col_1")
    oColumn3 = oColumns.Item("col_2")
    ' oColumn3 = oColumns.Item("col_3")
    While Not ds.EoF
    oMatrix.FlushToDataSource()
    oForm.DataSources.UserDataSources.Item("dsItemcode").Value = ds.Fields.Item("Code").Value
    oColumn1.DataBind.SetBound(True, "", "dsItemcode")
    oForm.DataSources.UserDataSources.Item("dsItemdesc").Value = ds.Fields.Item("Desc1").Value
    oColumn2.DataBind.SetBound(True, "", "dsItemdesc")
    oForm.DataSources.UserDataSources.Item("dsquantity").Value = ds.Fields.Item("Quantity").Value
    oColumn3.DataBind.SetBound(True, "", "dsQuantity")
    oMatrix.AddRow()
    ds.MoveNext()
    End While
    plz help me any suggesions. in that. i want to save that matrix data in to tables. plz help me   urgent asap
    regards,
    nagababu.

    Hi,
    UDOs don't save data from UserDataSources (UDS) (and BTW: your code is wrong: you mustn't bind the UDSs to to columns time after time in the loop; that's just wrong). YOu have to handle such data in your code.
    Regards,
    Frank

  • Matrix CFL problem

    Hello
    I have a following problem:
    I want to make one column in matrix editable and CFL(from OITM).
    If I bind it with userdatasource, the chosen value cannot be changed later.
    If I bind it with DBdatasource, when I choose the proper value in CFL, I get an error :Bad form Value.
    I made very similar thing but not with columns(with form items) and then I could bind an item with EditText field and everything was cool.  edittext1 = (SAPbouiCOM.EditText)oItem.Specific;
    But now I cannot convert a column to EditText object 
    Anybody help me, please?

    Could you send me more code to look for the problem?
    Regards,
    J:

  • Matrix with UDO

    Hi,
    I've just created an UDO Matrix. The problem I've got is I can't add data without creating a Botton to insert.
    If realized if I create the same Matrix without UDO all the fields are editable.
    Is there anything I'm doing wrong or is it a limitation for UDO objects???
    Thanks in advance.

    You must use the button, and handle the click event. Here is the code that i´m using:
             oDS.InsertRecord(oDS.Size)
            oDS.Offset = oDS.Size - 1
            oMatrix.AddRow(1, oDS.Size - 1)
    Unfortunelly, I haven´t found any other way yet.  Maybe in the SDK 2005 it is possible to handle events of the right mouse button for the matrix, but you will still need the code.
    Thanks,
    Christiano.

  • CFL to UDO

    Hi,
    I am trying to assign the  UDO to CFL. While i am trying to assess the CFL It will throw Internal Error
    oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "DSS_UDO1"
                oCFLCreationParams.UniqueID = "CFL6"
                oCFL = oCFLs.Add(oCFLCreationParams)
    oEdit = objForm.Items.Item("4").Specific
                oEdit.ChooseFromListUID = "CFL6"
                oEdit.ChooseFromListAlias = "U_BPProjec"
    i am using SAP 2007 A Patch 00.
    if anyone having solutions pls let me know.
    Thanks in advance
    Senthil Kumar

    Hi Senthil,
    Did you define the finding items in the UDO.if you didnt, when you open the CFL
    it will throws an error.
    First Go to Update the UDO.
    Give me reward points,
    Regards,
    G.Suresh

  • UDO Form as CFL  in the same UDO Form

    Hi,
    I have created a user-defined form using UDO. In the same form I am using it as CFL  bound to a textbox.  I am unable to get the selected data in the textbox. I have written the CFL  event to capture the data in the textbox. Please let me know if its possible to use the same form(UDO) as CFL in the same form(UDO) or not ?  Any help is appreciated.
    Regards,
    Noor Hussain

    Hi Janos,
    I am able to create the CFL. But the selected value is not being copied to my textbox from the CFL. My code is as below.
    Private Sub AddCMSBPChooseFromList()
            'Choose From List Collection object to store the collection
            Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
            'Conditions object to set the conditons
            Dim oCons As SAPbouiCOM.Conditions
            'Condition object to set the conditons
            Dim oCon As SAPbouiCOM.Condition
            'Getting the Form Choose From Lists
            oCFLs = oForm.ChooseFromLists
            'Choose From List object to store the ChooseFromList
            Dim oCFL As SAPbouiCOM.ChooseFromList
            'ChooseFromListCreationParams to create the parameters for the CFL
            Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
            oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
            oCFLCreationParams.MultiSelection = False
            oCFLCreationParams.ObjectType = "IS_CMS_BP"
            oCFLCreationParams.UniqueID = "CFL_3"
            oCFL = oCFLs.Add(oCFLCreationParams)      
        End Sub
    oEdit = oForm.Items.Item("txtConsAcc").Specific
                oEdit.ChooseFromListUID = "CFL_4"
                oEdit.ChooseFromListAlias = "U_ConAcc"
    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                            Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
                            oCFLEvento = pVal
                            Dim sCFL_ID As String
                            sCFL_ID = oCFLEvento.ChooseFromListUID
                            oForm = SBO_Application.Forms.GetForm(pVal.FormTypeEx, pVal.FormTypeCount)
                            Dim oCFL As SAPbouiCOM.ChooseFromList
                            oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
                            If oCFLEvento.BeforeAction = False Then
                                Dim oDataTable As SAPbouiCOM.DataTable = oCFLEvento.SelectedObjects
                                Dim val As String
                                Try                              
                                    If pVal.ItemUID = "txtConsAcc" And oCFL.UniqueID = "CFL_4" Then
                                        With oForm.DataSources.DBDataSources.Item("@IS_CMS_BP") '@TABLE is the name of the DBDataSource the form's connect to
                                            .SetValue("U_ConAcc", .Offset, oDataTable.GetValue(0, 0)) 'U_txtGRNNo is the id of the field the EditText is connected to.
                                        End With
                                    End If                                                                               
    Catch ex As Exception
                                End Try
                            End If
                        End If
    Regards,
    Noor
    Edited by: noor_023 on Jun 17, 2010 10:59 AM
    Edited by: noor_023 on Jun 17, 2010 11:00 AM

  • BubbleChecker  show  false  for matrix on  AfterChooseFromList event

    Hi expert,
    i have UDO form with a text field and matrix .Added CFL in both field  .Bubblechecker tools  show
    true for text  field and false(error)  for matrix column .please  help why bubblechecker tools  show false only for matrix CFL.
    [B1Listener(BoEventTypes.et_CHOOSE_FROM_LIST, false, new string[] {
                        "SBOeConnectUDO"})]
            public virtual void OnAfterChooseFromList(ItemEvent pVal)
                bool ActionSuccess = pVal.ActionSuccess;
                Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                // ADD YOUR ACTION CODE HERE ...
                EditText ET_itmcd = (EditText)form.Items.Item("ET_itmcd").Specific;
                IChooseFromListEvent oCFLEvent = (IChooseFromListEvent)pVal;
                if (oCFLEvent.BeforeAction == false && oCFLEvent.SelectedObjects != null)
    //for text field
    DataTable oDataTable = null;
                            oDataTable = oCFLEvent.SelectedObjects;
                            DBDataSource oDBDataSource = null;
                            oDBDataSource = form.DataSources.DBDataSources.Item("OITB");
                            oDBDataSource.SetValue("ItmsGrpNam", pVal.Row, System.Convert.ToString(oDataTable.GetValue(1, 0)));
    ///for matrix code
    if (oCFLEvent.ChooseFromListUID == "CFL_web")
                        try
                            Matrix oMatrix_web = (Matrix)form.Items.Item("mtx1").Specific;
                            DBDataSource oDBDataSource = (DBDataSource)form.DataSources.DBDataSources.Item("@Table1");
                            DataTable oDataTable = null;
                            oDataTable = oCFLEvent.SelectedObjects;
                            if (form.Mode == BoFormMode.fm_ADD_MODE | form.Mode == BoFormMode.fm_OK_MODE | form.Mode == BoFormMode.fm_UPDATE_MODE)
                                if (pVal.Row == oMatrix_web.RowCount)
                                    oDBDataSource.SetValue("LineId", oDBDataSource.Size - 1, null);
                                    oDBDataSource.SetValue("U_SitCd", oDBDataSource.Size - 1, null);
                                    oDBDataSource.SetValue("U_SitNam", oDBDataSource.Size - 1, null);
                                    oDBDataSource.InsertRecord(oDBDataSource.Size - 1);
                            oDBDataSource.SetValue("U_SitCd", pVal.Row - 1, System.Convert.ToString(oDataTable.GetValue("U_Code", 0)));
                            oDBDataSource.SetValue("U_SitNam", pVal.Row - 1, System.Convert.ToString(oDataTable.GetValue("U_Name", 0)));
                            oMatrix_web.LoadFromDataSource();
                        catch (Exception ex)
                            B1Connections.theAppl.SetStatusBarMessage(ex.Message, BoMessageTime.bmt_Medium, false);

    It's already a reported issue: Resize of grid controls
    A fix is due to be made in PL07 according to the note references in that thread: https://websmp130.sap-ag.de/sap/support/notes/1610013
    Also I think you got hit by a network issue and posted the thread twice

  • I am Using Two Matrixs in one screen

    Dear All,
    I am working on UDO Concepts,I created one screen same as PurchaseOrder Screen Item type and service type document in this i am taking one matrix for item document and one matrix for service document  every thing is fine but while adding document  I selected Item information (Itemcode and related information) then clicked on ADD button it displaying operation completed successfully. but while using navigation buttons it showing empty information in Item matrix. For Service Document it's working fine what is the reason for this type of cases.
    Please give me the solution  ASAP
    Thanks & Regards
    Naresh

    am using only one Child table for two matrixs.Is there any problem using one child for two matrixs.
    This is your problem.
    Unless you want the matrices to be absolutely identical (including data), you will need to specify an own child table for each of them, and to databind them accordingly. Every UDO matrix should be filled from a child table.
    EDIT: I have just tried putting two matrices on a UDO-based form and they worked well. If one of your matrices isn't pupulated correctly, there must be a problem with binding.
    Edited by: Anton Shepelev on Apr 14, 2009 3:17 PM

  • UDO data adding policy

    Hello Everyone,
    I've noticed that in my UDO matrix only visible & active columns are being saved in the DB, although i do manage and set values in some fields which are not represented on matrix, through the DBDataSource. Is there any way to make it save these fields values also?
    Thanks
    Mosh

    Hello
    Yes. from B1 2007 PL 46 you have DI API Interface for UDO.
    You may try this interface.
    sample code from help
    Dim oGeneralService As SAPbobsCOM.GeneralService
    Dim oGeneralData As SAPbobsCOM.GeneralData
    Dim oChild As SAPbobsCOM.GeneralData
    Dim oChildren As SAPbobsCOM.GeneralDataCollection
    Dim oGeneralParams As SAPbobsCOM.GeneralDataParams
    'Get GeneralService (oCmpSrv is the CompanyService)
    Set oGeneralService = oCmpSrv.GetGeneralService("MainUDO")
    'Create data for new row in main UDO
    Set oGeneralData = oGeneralService.GetDataInterface(gsGeneralData)
    oGeneralData.SetProperty "Code", "First"
    oGeneralData.SetProperty "U_Data", "my data"
    'Create data for a row in the child table
    Set oChildren = oGeneralData.Child("ChildUDO")
    Set oChild = oChildren.Add
    oChild.SetProperty "U_Data", "child data"
    oChild.SetProperty "U_Type", 6
    'Add the new row, including children, to database
    oGeneralService.Add oGeneralData
    Regards,
    J

  • Multiple Condition in CFL

    Dear friends,
    I am trying to filter the CFL. But it does not show any data when use this snippet.
    If OCT_Company.Connected Then
                            Dim oCon As SAPbouiCOM.Condition = Nothing
                            Dim oRs As SAPbobsCOM.Recordset = OCT_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                            oRs.DoQuery("SELECT DISTINCT CODE FROM [@FPSM]")
                            For i As Integer = 0 To oRs.RecordCount - 1
                                oCon = oCons.Add()
                                oCon.BracketOpenNum = 1
                                oCon.Alias = "Code"
                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                                oCon.CondVal = oRs.Fields.Item("Code").Value
                                oCon.BracketCloseNum = 1
                                oRs.MoveNext()
                                If i >= 1 And i <= oRs.RecordCount - 1 Then
                                    oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR
                                End If
                            Next
                            chlFICI.SetConditions(oCons)
                        Else
                            OCT_Application.StatusBar.SetText("You are not connected to company", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                        End If
    Can anybody point out the bug.....
    HOW TO USE CONTAINS OPERATOR INSTEAD OF EQUAL IN OPERATION PROPERTY

    Hi Manish
    Try this
    If OCT_Company.Connected Then
    Dim oCon As SAPbouiCOM.Condition = Nothing
    Dim oRs As SAPbobsCOM.Recordset = OCT_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
    oRs.DoQuery("SELECT DISTINCT CODE FROM @FPSM")
    i = 0
    While Not oRS.EoF
        If i > 0 Then
            oCondition.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR
        End If
       oCon = oCons.Add()
       oCon.Alias = "Code"
       oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
       oCon.CondVal = oRs.Fields.Item(0).Value
       oRs.MoveNext()
       i+=1
    End While
    chlFICI.SetConditions(oCons)
    Else
    OCT_Application.StatusBar.SetText("You are not connected to company", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
    End If
    Also check these threads
    Error: Matrix CFL With Query Condition
    Filter list of customers in document form
    Regards
    Arun

Maybe you are looking for

  • How to populate the sales order as a cost object in cost element posting

    When posting sales to a cost element the error comes up stating Account ******** requires an assignment to a CO object. This comes from the sales (repair) order and I would like to pass the sales order and line as a cost object. Could someone please

  • Safari or IPhone issue with Website ..

    Hey guys, .. question.. I have a Win 2003 Server and setup IIS. I've designed a website. Firast I had many *.png and a wallpaper with a size of 500K. I had issues with getting the page loaded, which mean that 2 images were loaded and the rest not. no

  • In iMessage, why does a contact name come up red?

    When I'm in iMessage, what does it mean when the contact name comes up red?

  • I can't use WebDav

    Hi! When I try to connect to WebDav via Windows Explorer I obtain the following error: "Server configuration properties could not be obtained" <?hda version="10.1.3.3.2 (071031)" jcharset=UTF8 encoding=utf-8?> @Properties LocalData StatusCode=-1 Stat

  • Using an Alesis HD24 with Logic 9

    Hello All I have tracks already laid down on the HD24. I want to use Logic 9 to edit, mix, and master these tracks. Is it possible to merely hook up the HD24's adat output via lightpipe to the Mac's optical input and have Logic "see" the individual t