Error clicking Choose from list

Hi,Experts
1) Im added two fields on BOM also added choose from list for that.
2)I have written code for event type choose from list
3)But it is showing error exception while clicking on raw choose from list(Already existing raw choose from list)
4) But created choose from list working perfectly
I have written code like this
Try
            If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                sboForm = SBO_Application.Forms.Item(FormUID)
                Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
                oCFLEvento = pVal
                Dim sCFL_ID As String
                sCFL_ID = oCFLEvento.ChooseFromListUID
                Dim oCFL As SAPbouiCOM.ChooseFromList
                oCFL = sboForm.ChooseFromLists.Item(sCFL_ID)
                If oCFLEvento.BeforeAction = False Then
                    Dim oDataTable As SAPbouiCOM.DataTable
                    oDataTable = oCFLEvento.SelectedObjects
                    Dim val As String
                    Try
                        val = oDataTable.GetValue(0, 0)
                    Catch ex As Exception
                    End Try
                    If (pVal.ItemUID = "slsText") Then
                        sboForm.DataSources.UserDataSources.Item("UDCFL").ValueEx = val
                    ElseIf (pVal.ItemUID = "slsText1") Then
                        sboForm.DataSources.UserDataSources.Item("UDCFL1").ValueEx = val
                    End If
                End If
            End If
            If (FormUID = "CFL1") Or (FormUID = "CFL2") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) Then
                Windows.Forms.Application.Exit()
            End If
            If pVal.EventType = SAPbouiCOM.BoEventTypes.et_PICKER_CLICKED Then
                sboForm = SBO_Application.Forms.Item(FormUID)
                oItem = sboForm.Items.Item(pVal.ItemUID)
                oEdit = oItem.Specific
                SBO_Application.StatusBar.SetText("Picker Clicked of type " & oEdit.PickerType.ToString, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
            End If
        Catch ex As Exception   ///Error is shows this exception
            MessageBox.Show(ex.Message)
        End Try

hi

Similar Messages

  • 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

  • "Choose from list" / "giving up after" error

    I have the following included in my script:
    set whattodolist to {"Tag with iDentify", "Add to iTunes", "Cancel"}
    set my_choice to choose from list whattodolist with prompt ("MP4 Detected: " & this_text)
    It works as expected with the script. I'd like to add a way for the script to dismiss itself after a set interval if the user doesn't take any action. So, I tried this:
    set whattodolist to {"Tag with iDentify", "Add to iTunes", "Cancel"}
    set my_choice to choose from list whattodolist with prompt ("MP4 Detected: " & this_text) giving up after 30
    Note that I added the "giving up after..." to the end of the prompt. However, it won't compile. I get an error stating "Expected end of line, but found identifier". Any advice?

    The standard display dialog command actually supports three options, so you might be able to fit your near-term needs with that:
    display dialog "MP4 Detected. What would you like to do?" buttons {"Cancel", "Tag with iDentify", "Add to iTunes"} default button 3 giving up after 30
    Once you get past three choices your options are limited...

  • Choose From List Cancel Button Throws Exception

    Hi all,
    When I click the "Cancel" Button on my CFL, I get an error....
    EXCEPTION: Matrix__EBS_FRM_CRDCLM__64.OnAfterChooseFromList raised
    No matching records found (ODBC -2028)
    Any ideas???

    Hi
    in your choose from list  event add this  condition
    If Not pval.SelectedObjects Is Nothing Then
    'write your code in this if condition
    end if
    hope it will help u.
    Regards,
    Mithun.

  • Choose from list in find mode

    I have a form build in Screen painter and i have added a Choose from list to that form. I have asocieted the CFL with a EdiText. It work perfectly in add mode, but i cannot open the CFL when the form is in find mode.(I cannot even see the button to press for oppening the CFL). Can someone help me?

    I am in the phase of binding the edittext, comoboxes and other controls on my form. I want to search by parameters. For instance i want to find all the entrys from a business partener.
    I would like to know if I can choose from a list of business partener when i am in a find mode using CFL .
    My problem it is not when i click find button but when i complete the fields, how can i select a business partener from a list?

  • Choose From list in Matrix UDF

    i create a UDF in Sales Order Row, I want to assign choose From list in the Matrix for the UDF once user click on tab button.
    How can i assign the Choose from list for the UDF column?

    Hi,
    Try this code for adding CFL.             
                   SAPbouiCOM.ChooseFromListCollection oCFLs = null;
                    SAPbouiCOM.Conditions oCons = null;
                    SAPbouiCOM.Condition oCon = null;
                    oCFLs = oForm.ChooseFromLists;
                    SAPbouiCOM.ChooseFromList oCFL = null;
                    SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
                    oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
                    oCFLCreationParams.MultiSelection = false;
                    oCFLCreationParams.ObjectType = "object id ";
                    oCFLCreationParams.UniqueID = "CFL1";
                    oCFL = oCFLs.Add( oCFLCreationParams );
                   oColumn.ChooseFromListUID = "CFL1";
                  //where oColumn is the instance of that column.
    Hope u will get help....
    Thanks and Regards,
    Lalit

  • 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

  • Addon in choose from list

    Dear All Technical Experts,
    I would like to add new field in choose from list window that is run from production order --> issue for production --> click production order button.
    I could not find out how to add new information or filter field there. is it possible for me using addon ? The information I need available is remarks (OWOR.remarks). If yes, will it be UI addon or UI/DI ?
    I appreciate your answer. TIA
    Rgds,

    Hi,
    First create the srf which has two buttons- Choose and Cancel
    code for creating the grid :- you have to pass the SQL query as a paramter in the below function .In query you choose as many as fields from the table ,at run time columns will  automatically created corresponds to your query.
         private bool CreateGrid(string sSQL)
                        try
                        SAPbouiCOM.Item oItem;
                        oItem = oform.Items.Add("Grid", SAPbouiCOM.BoFormItemTypes.it_GRID);
                        oItem.Left = 7;
                        oItem.Width = 387;
                        oItem.Top = 47;
                        oItem.Height = 188;
                        oform.DataSources.DataTables.Add("dtLookUpTable");
                        oDataTable = oform.DataSources.DataTables.Item("dtLookUpTable");
                        oDataTable.Clear();
                        oDataTable.ExecuteQuery(sSQL);
                        oGrid = (SAPbouiCOM.Grid)oItem.Specific;
                    oGrid.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single ;
                        oGrid.DataTable = oDataTable;
                                            if(oGrid.Rows.Count > 0)
                             oGrid.Rows.SelectedRows.Add(0);
                    for (int iColCounter = 0; iColCounter < oGrid.Columns.Count; iColCounter++)
                        oGrid.Columns.Item(iColCounter).Width = 50;
                        oGrid.Columns.Item(iColCounter).Editable = false;
                        oGrid.AutoResizeColumns();
                        return true;
                   catch(Exception ex)
                        oform.Freeze(false);
                        throw ex;
    choose the value on pressing the button 'Choose'
         protected override void ITEMPRESS_AFTERACTION(ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent, SAPbouiCOM.Application oSboApplication, SAPbobsCOM.Company oCompany)
                   BubbleEvent = true;
                    if (pVal.ItemUID == "choosebuttonuid")
                        if (oGrid.Rows.SelectedRows.Count > 0)
                            SAPbouiCOM.DataTable oReturnTable = null;
                            oform.DataSources.DataTables.Add("dtReturnTable");
                            oReturnTable = oform.DataSources.DataTables.Item("dtReturnTable");
                            oReturnTable.CopyFrom(oDataTable);
                            for (int iRowIndex = 0; iRowIndex < oReturnTable.Rows.Count; iRowIndex++)
                                oReturnTable.Rows.Remove(iRowIndex);
                            int iRow = oGrid.GetDataTableRowIndex(oGrid.Rows.SelectedRows.Item(0, SAPbouiCOM.BoOrderType.ot_RowOrder));
                            oReturnTable.Rows.Add(1);
                            //for (int iColIndex = 0; iColIndex < oReturnTable.Columns.Count; iColIndex++)
                            //    oReturnTable.SetValue(iColIndex, 0, oDataTable.GetValue(iColIndex, iRow));
                            oReturnTable.SetValue(0, 0, oDataTable.GetValue(0, iRow ));
                            oReturnTable.SetValue(1, 0, oDataTable.GetValue(1, iRow));
                            SBOAppAddOn.mLookupForms.Remove(oform.UniqueID.ToString());
    then u have to send the oReturnTable with parentuid( issue for production) to the baseform.
                       example->     SendData(oReturnTable, strParentFormUID, oSboApplication, oCompany);
                            oform.Close();
    More:-
    You have to include the Doubleclick faclity on the grid
    You have to include  the find functionality  also.

  • Reagrding the choose from list using user tables

    Hi
       I need to link <b>the choose from List to my user defined table</b> and not to system tables. 
    for eg., i have created a  table namely opp. Now i want to link choose from list to this table.
    can anyone help me??
    its very urgent...
    thanks in advance
    Lee

    hi Adele 
      thanks for your concern.i have used this code
                Dim OCFLS As SAPbouiCOM.ChooseFromListCollection
                Dim OConds As SAPbouiCOM.Conditions
                Dim OCond As SAPbouiCOM.Condition
                OCFLS = OForm.ChooseFromLists
                Dim OCFL As SAPbouiCOM.ChooseFromList
                Dim OCPack As SAPbouiCOM.ChooseFromListCreationParams
                OCPack = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                OCPack.MultiSelection = False
                OCPack.UniqueID = "CFL3"
                OCPack.ObjectType = "OPRQ"
                OCFL = OCFLS.Add(OCPack)
            Catch ex As Exception
                MsgBox(Err.Description())
            End Try
    <b>then i link the choose from list to the Button(choosefromlist) namely OLBut. the code is follws</b>
                            <b>ONewItem = OForm.Items.Item("67")
                            OLBut = ONewItem.Specific
                            OLBut.ChooseFromListUID = "CFL3"</b>
    but this is not working.i.e when i click the choose from list button nothing it is showing.what mistake i have done?please help me
    thanks in advance

  • Custom Choose From List

    Hi all,
    I am trying to develop a custom choose from list functionality for my addon. I have created two forms first.srf and second.srf .In the key down event of an edittext in my first form i wrote the code for opening the second form
    LoadFromXML(&quot;Second.srf&quot;)
        Private Sub LoadFromXML(ByRef FileName As String)
                Dim oXmlDoc As Xml.XmlDocument
                oXmlDoc = New Xml.XmlDocument
                       Dim sPath As String
                sPath = System.Windows.Forms.Application.StartupPath()
                sPath = sPath.Remove(sPath.Length - 3, 3)
                oXmlDoc.Load(sPath &#38; &quot;&quot; &#38; FileName)
                B1Connections.theAppl.LoadBatchActions(oXmlDoc.InnerXml)
         End Sub
    second form is loading very well but my problem is that in the form load event of the second form when i try to access the grid i will get an error message
    Item - Invalid Item [66000-3]. Form unique Id &quot;Second&quot;, Item Unique Id : &quot;grdItem&quot;
    I am using SAP B1 8.8 PL 10, visual Studio 2008 and B1DE 2.1.
    Any help
    Regards
    Arun

    Hi Sebastian,
    Thanks for your reply. i used
    Dim oForm As SAPbouiCOM.Form = B1Connections.theAppl.Forms.GetForm("FrmSecond", 0)
    to get the form also tried
    Dim oForm As SAPbouiCOM.Form
    oForm = B1Connections.theAppl.Forms.ActiveForm
    but not working . second forms unique id and type are set correctly but the object type is not set because this form is not binded to any UDT.
    The OForm objects item count is always 0
    Thanks in advance
    Regards
    Arun

  • Is it possible to populate a Choose From List manually?

    Hi
    I've got a requirement in a SDK screen that needs to be written to have a Choose From List contained on a Matrix column that should allow the selection of Item Masters as well as the selection of specific data contained within a User Defined Table. Whenever using ChooseFromLists I've always only ever used them to link to a object such as Items, Sales Order etc. and not a combination, or even to a User Defined Table. Is this even possible.
    If not I guess the only way around it would be to create a form mimicking the ChooseFromList which I could populate with what ever I like?
    Thanks
    Steve

    Hi Steven,
    Yes, Its possible which behaves as system CFL.
    Design the form like cfl having grid, choose button, cancel button and edittext of find. When you tab on edittext on form open the CFL form and after load form fill the grid by Datatable using sql query. Write code for select grid line on click of grid. Write the code on choose button which retrive value from grid.
    Thanks,
    Mahesh

  • Get cardname along with cardcode usuing Choose From List Button

    Hi,
    I am using Choose From List button in my form. If I click the button then I can see the matrix containing business partners list and if I choose any business partner from that list then I can see the business partners id or cardcode from ocrd table in the corresponding textbox.
    But I want the business partner's name or cardname also should come simultaneously in the next textbox of my form. Can some one provide me any code help for this process.
    Regards,
    Sudeshna.

    Hi Sudesha,
    You can get the CardName with the following code:
    sCardCode = oDataTable.GetValue(0, 0)
    sCardName = oDataTable.GetValue(1, 0)
    Hope it helps,
    Adele

  • Multiple Values For one Condition in Choose From List

    I have used one Business Partner Choose From List in my form but i want to give condition in that choose from list on GroupCode .But the condition will have multiple values like 100,102,104 then how i will write the code to incorporate multiple values for one single condition.

    Hi,
    Check this thread
    How to set a Multiple condition in a single CFL
    Hope that helps,
    Vasu Natari.

  • Choose from List-CFL button is not visible

    Hi Experts,
    I am using SAP B1 8.8 PL 05 in ramp up. I have observed that in some of the clients PCs in Sales Order window I am not able to see the Choose from list button / CFL button for selecting Customer Or say Item.
    This happens only in some Client PCs, where as in other clients PCs it works fine.
    BR
    Samir Gandhi

    Hi Rashid,
    I did that. Now the indicator is displayed, but still I am not able to see the customer / item  list.
    BR
    Samir Gandhi

  • Removing Duplicates from a choose from list

    Hi All,
    I have a choose from list of obj 73 )Catalog Numbers (Table OSCN)
    I also added conditions in the CFL that it only shows the Substitute for the CardType = 'S' (Supllier) Business Partners.
    But I want to remove all the duplicate Substitutes from the CFL so that only distinct Catalog Numbers shows in the CFL.
            //  Adding 2 CFL, one for the button and one for the edit text.
                    oCFLCreationParams.MultiSelection = false;
                    oCFLCreationParams.ObjectType = "73";
                    oCFLCreationParams.UniqueID = "CFL1";
                    oCFL = oCFLs.Add(oCFLCreationParams);
                    //Adding Conditions to CFL1
                    oCons = oCFL.GetConditions();
                    oCon = oCons.Add();
                    oCon.Alias = "Substitute";
                    SAPbobsCOM.Recordset oSuppliers = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                    oSuppliers.DoQuery("Select Distinct t1.Substitute From OSCN t1 Join OCRD t2 on t1.CardCode = t2.CardCode Where t2.CardType = 'S' Group By t1.Substitute");
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    while (!oSuppliers.EoF)
                        oCon.CondVal = oSuppliers.Fields.Item(0).Value.ToString();
                        oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
                        oCon = oCons.Add();
                        oCon.Alias = "Substitute";
                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                        oSuppliers.MoveNext();
                    oCFL.SetConditions(oCons);
    Please advise....
    Kind Regards,
    Brenden Draper

    Hi Brenden,
    what you are trying to archieve won't work. Simply because CFL is getting all row data from  OSCN and ItemCode or CardCode can differ for a specific substitute.
    For example.
    ItemCode,CardCode,Substitute
    ItemA,BP1,sub1
    ItemA,BP2,sub1
    Would be 2 resultlines both with sub1 as substitute.
    SQL equivalent :
    Select Distinct t0.* from oscn t0 inner join OCRD t1 on t0.CardCode = t1.CardCode where t1.CardType = 'S'
    My advise would be to open a simple form with a grid and datatable bound.
    Some lines of coding and you get all you need.
    regards,
    Maik

Maybe you are looking for