How to set conditions as a query in cfl?

i have a combo box and a matrix. i have a cfl in the matrix column, once i select the particular value in the combobox the corresponding values must appear in the cfl. how can this be done?

Hi Metilda,
You can try this, i'use this code to set conditions in a CFL for item list. I put this code in the et_CHOOSE_FROM_LIST event in beforeaction=True :
                                        SAPbouiCOM.EditText oEdit;
                                        oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("7").Specific;
                                        string typeMag = oEdit.Value.ToString().Trim();
                                        oCons = oCFL.GetConditions();
                                        if (oCons.Count == 0)
                                            if (typeMag.Substring(0, 1) == "C")
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 2;
                                                oCon.Alias = "SellItem";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = "Y";
                                                oCon.BracketCloseNum = 1;
                                                oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 1;
                                                oCon.Alias = "U_IFC_CAT";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = typeMag;
                                                oCon.BracketCloseNum = 2;
                                                oCFL.SetConditions(oCons);
                                            else
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 2;
                                                oCon.Alias = "SellItem";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = "Y";
                                                oCon.BracketCloseNum = 1;
                                                oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 2;
                                                oCon.Alias = "U_IFC_CAT";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_IS_NULL;
                                                //oCon.CondVal = null;
                                                oCon.BracketCloseNum = 1;
                                                oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 1;
                                                oCon.Alias = "U_IFC_CAT";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = "";
                                                oCon.BracketCloseNum = 3;
                                                oCFL.SetConditions(oCons);
                                        else
                                            oCons = null;
                                            oCFL.SetConditions(oCons);
                                            oCons = oCFL.GetConditions();
                                            if (typeMag.Substring(0, 1) == "C")
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 2;
                                                oCon.Alias = "SellItem";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = "Y";
                                                oCon.BracketCloseNum = 1;
                                                oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 1;
                                                oCon.Alias = "U_IFC_CAT";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = typeMag;
                                                oCon.BracketCloseNum = 2;
                                                oCFL.SetConditions(oCons);
                                            else
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 2;
                                                oCon.Alias = "SellItem";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = "Y";
                                                oCon.BracketCloseNum = 1;
                                                oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 2;
                                                oCon.Alias = "U_IFC_CAT";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_IS_NULL;
                                                //oCon.CondVal = null;
                                                oCon.BracketCloseNum = 1;
                                                oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
                                                oCon = oCons.Add();
                                                oCon.BracketOpenNum = 1;
                                                oCon.Alias = "U_IFC_CAT";
                                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                                oCon.CondVal = "";
                                                oCon.BracketCloseNum = 3;
                                                oCFL.SetConditions(oCons);
It's work fine for me.

Similar Messages

  • How to set fetchsize of sql Query when using Database Adapter.

    Hi All,
    I am using DatabaseAdapter to connect to database and retriving huge amount of data.For improvement in the performance I want to set the "fetchsize" of sql query. I know fetchsize can be preset in Java using Jdbc 2.0 API.Please let me know how to set this value in BPEL when using DBAdapter?
    Thanks
    Chandra

    I talked to the developer of the db adapter - and he told me this feature will be available in BPEL PM 10.1.3 (which is supposed to be production later this year, and a public beta soon). If this is an emergency I would recommend going throug Oracle support and have them file an enhancement for 10.1.2.0.2
    hth clemens

  • How to set condition in CFL which are alredy assign in EditText

    Hi
      All
    I create a Screen Printer Form where i assign a edit text to ChooseFromList as follow-
    1)1st create a CFL using Collection Tab in screen printer and set the Object type=2 and Unique Id=CFL_2
    2)Then assign CFL_2 to EditText in Item Tab window.
    In that case CFL show All the Business partners. so my question is how i set the Condition in CFL_2 according to CardType.
    thanks
    Subhas

    Hi,
    Give a new Unique Id and assign that to edittext
                Dim oCons As SAPbouiCOM.Conditions
                Dim oCon As SAPbouiCOM.Condition
                oCons = New SAPbouiCOM.Conditions
                oCon = oCons.Add()
                 oCon.Alias = "U_CLEARED"
           'oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCon.CondVal = val        
                Dim oCFL As SAPbouiCOM.ChooseFromList
                Dim oEdit As SAPbouiCOM.EditText
                Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                oCFLs = oForm.ChooseFromLists
                oitem = oForm.Items.Item(ItemUID)
                oEdit = oitem.Specific
                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "AUCTIONS"
                Try
                    oCFLCreationParams.UniqueID = "CFL1_ACV" & val
                Catch ex As Exception
                End Try
                Try
                    oCFL = oCFLs.Add(oCFLCreationParams)
                Catch ex As Exception
                End Try
                Try
                    oCFL.SetConditions(oCons)
                Catch ex As Exception
                End Try
                oEdit.ChooseFromListUID = "CFL1_ACV" & val
                oEdit.ChooseFromListAlias = "Code"

  • How to set condition for my Choose From List

    hi ..plz check my code...i want to set a condition on my CFL which opens GL Accounts..it has to show only Active Accounts...but when i run the program iam able to see all accounts..what might me the proble..
    my code is as follows
    '''''''''' load form
    private sub loadform()
    '' here iam loading form which is designed in Screen painter where i have a textbox (uid = 19) and CFL_2 as its choosefromlist and object type = 1 alias name = ActCode
    conditionCFL()
    oform.visble = true
    end sub
    '''''''''' end of load form
    '''''''''setting condition
    private sub ConditionCFL()
    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)
                ' Adding 2 CFL, one for the button and one for the edit text.
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "1"
                oCFLCreationParams.UniqueID = "CFL1"
                oCFL = oCFLs.Add(oCFLCreationParams)
                ' Adding Conditions to CFL1
                oCons = oCFL.GetConditions()
                oCon = oCons.Add()
                oCon.Alias = "Postable"
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCon.CondVal = "Y"
                oCFL.SetConditions(oCons)
                oCFLCreationParams.UniqueID = "CFL2"
                oCFL = oCFLs.Add(oCFLCreationParams)
            Catch
                MsgBox(Err.Description)
            End Try
    end sub
    '''''''''end of setting condition
    i have still more code...plz follow the next code which is posted below.....

    continuation from above code...plz foloow complete code
    '''''''''''item event
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            Dim EventEnum As SAPbouiCOM.BoEventTypes
            EventEnum = pVal.EventType
            Try
                Select Case pVal.EventType
                    Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                        If pVal.BeforeAction = True Then
                          Dim oCFLEvent As SAPbouiCOM.IChooseFromListEvent = DirectCast(pVal, SAPbouiCOM.IChooseFromListEvent)
                            Dim oDataTable As SAPbouiCOM.DataTable = oCFLEvent.SelectedObjects
                            Dim val As String
                            Try
                                If pVal.ItemUID = "19" Then
                                   Me.oDBDataSource.SetValue("U_BalenceSheet_Acct", 0, oCFLEvent.SelectedObjects.GetValue(0, 0))
                                End If
                             Catch ex As Exception
                                MsgBox(ex.ToString)
                            End Try
                        End If
                        Exit Select
                End Select
                           Catch ex As Exception
                                MsgBox(ex.ToString)
                            End Try
    end sub
    ''''''''''end of item event
    Edited by: Shenaz Sultana on Nov 13, 2009 2:18 PM

  • How to set condition scale according to accumulated purchasing quantity?

    Hi,
    I want to set different condition scale for a material according to the accumulated purchase quantity against a vendor (includeing historical  purchase order), just like follows:
    Accumulated purchasing qty (including hostorical PO): 100 pcs --->  1.5$/pc
    Accumulated purchasing qty (including hostorical PO): 200 pcs --->  1.4$/pc
    Accumulated purchasing qty (including hostorical PO): 300 pcs --->  1.3$/pc
    Accumulated purchasing qty (including hostorical PO): 400 pcs --->  1.2$/pc
    Accumulated purchasing qty (including hostorical PO): 400 pcs --->  1.1$/pc
    So, how to realize this by standard functions?
    Please kindly advise.
    Thanks and best regards.

    Hi, Sanjay,
    Thank you very much for your answer.
    But  manybe I had not described my qustion more clear, my requirement is, to control the quanaity-based scale according to accumulated purchasing quantity including historical purchase order but no the one/individual purchase order.
    So, please kindly advise again.
    Thanks and best regards.

  • How to set condition scale according to accumulated consignment quantity?

    Hello,
    We have different consignment prices for the same material vendor depending on the quantity.
    For example:
    First 100 pcs         -->1.5$/pc
    Following 100 pcs -->1.4$/pc
    Following 100 pcs --> 1.3$/pc
    So, I want to set different condition scale for a material according to the accumulated quantity transferred from vendor consignment to own.
    So, how to realize this by standard functions?
    Everything that I have tried with the scale condition type in consignment info record only works with the quantity that I am transferring in that moment from consignment to own. Is there any anything that I can setup to take into account the accumulated quantity?
    Please kindly advise.
    Thanks and best regards.

    Look at the Group Condition settings of your Condition Type.  You'll need to some ABAP resource to create a Requirement.

  • How to include conditions in select query

    i want to write a select query wherein plants have to to be fetched from table vekp
    and if it is a plant then the  set movement type to 999 else leave for exiting.please help me on this

    >
    deep shikha wrote:
    > (This is module pool programming)
    what is modulepool programming doing in form printing forum.
    Please use appropriate forum next time.
    кu03B1ятu03B9к

  • Vofm: how to set condition value.

    i complete a formula routin.and would like to set the price condition value . but when i set the value to
    xkomv-kbetr, the result don't save. it seems like that xkomv is replaced by rettkomv.

    Hi there,
    Try to check this site.
    Re: creating new formula via tcode VOFM, Formulas->Condition base value
    To set the condition value, you should populate XKWERT variable.
    Regards,
    Kezia

  • Hi, how to set date in bex query.

    hi
    experts
    i need do display date and name in my bex query.

    Hi,
    I hope it is not possible in BeX Query designer but it is possible in WAD by using Text elements:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    With rgds,
    Anil Kumar Sharma .P

  • How to set condition in choose from list based on the combo selection

    Dear Members,
         i have a requirement to filter the item based on the itemgroup. After choosing the itemgroup in the dropdown list i have to filter the item for the particular group in the choose from the list.since i have tried in the combo select it doesnt work out for me.any body can suggest me is it doable. if so pls tell me the work around.
    My coding is as follows..
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    if pval.itemUID="Cmb"
                                objChooseCollection = objForm.ChooseFromLists
                                objChooseFromList = objChooseCollection.Item("CFL1")
                                objConditions = objChooseFromList.GetConditions()
                                objcondition = objConditions.Add()
                                objcondition.Alias = "itmsgrpcod"
                                objcondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                                objcondition.CondVal = Form.items.item("Cmb").specific.selected.value
                                objChooseFromList.SetConditions(objConditions)
    End if
    With Regards,
    jai.
    Edited by: JaiShankarRaman on Dec 23, 2009 10:47 AM

    Hello,
    Following is a code sample which I am using:
            Dim oForm As SAPbouiCOM.Form
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oChooseFromList As SAPbouiCOM.ChooseFromList
            Dim oConditions As SAPbouiCOM.Conditions
            Dim oCondition As SAPbouiCOM.Condition
            Dim CodeType As Integer
            Try
                oForm = oPayOn.SBO_Application.Forms.GetForm(CflEvent.FormTypeEx, CflEvent.FormTypeCount)
                oMatrix = oForm.Items.Item("AC_MATRIX").Specific
                oChooseFromList = oForm.ChooseFromLists.Item("ACC_CFL1")
                CodeType = oMatrix.Columns.Item("AC_MC00").Cells.Item(CflEvent.Row).Specific.Selected.Value
                oConditions = oChooseFromList.GetConditions
                If oConditions.Count > 0 Then
                    oCondition = oConditions.Item(0)
                Else
                    oCondition = oConditions.Add
                End If
                oCondition.Alias = "U_CodeType"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = CodeType
                oChooseFromList.SetConditions(oConditions)
            Catch ex As Exception
                'oPayOn.SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
            End Try
        End Sub
    I am calling this in the CFL event - before action. So when the user clicks on CFL button - but before it opens - this code is called and the condition is applied. Here AC_MC00 is a combo column in a matrix.
    Regards
    Rahul Jain

  • How to set condition to display page

    In adobe form ,I want to display page only if term konda=02
    can anone guid me the steps needed for the result
    thank's

    Hi Shaul,
    To display the Body Page based on the condition then we must write the code in the FormCalc or JavaScript under the event :initialization or Form Ready or Layout Ready event for the Root Node in the Heirarchy Palette of the Layout Designer.
    For Example:
    Consider JavaScript under the Initialization event for root node "Data"
    if (konda.rawValue == "02")
       bodypage.presence = "visible";
    else
      bodypage.presence = "hidden";
    Regards
    Pradeep Goli

  • How to set condition according to accumulative PO quantity?

    Hi,
    Is there a way to maintain purchasing price according to <b>accumulative purchase order quantity</b>??
    For example:
    Material : M6286412
    Vendor :  1600
    PurOrg.:  T001
    accumulative po quantity: 10000 pcs          ---> Price:10.0  US$  per 100 pcs
    accumulative po quantity: 30000 pcs          ---> Price: 8.20 US$  per 100 pcs
    accumulative po quantity: 31000 pcs above ---> Price: 7.00 US$  per 100 pcs
    Thanks and best regards.

    Hi,
    I am not sure either that I have understood the question.
    I have just seen your last repsonse relating to "Historical" PO values and so I think that you did NOT mean multiple lines on the asme PO.
    If you really mean scales that apply over a period of time and across many POs for the same item, then this is possible, but you have to use "Subsequent settlement".
    You set up the settlement agreement and specify the date range that applies and then set up the scales of discounts that you would achieve (you don't set up prices, you set up discount percentages).
    So you would set up the agreement as follows
    Over the period XX/XX/XXXX to YY/YY/YYYY the vendor will giove you the following discounts
    If you spend more than 111111 you will get an extra G% discount
    If you spend more than 222222 you will get an extra H% discount
    And so on.
    This is retrospective discounts and you can only ever use this type of solution because until all of the orders have been raised you cannot know which scale to apply.
    So if you mean an extra discount for spending more than X (on one material or across a whole range of items) over a set period, then yes, use subsequent settlement.
    Steve B

  • How to set condition for Characteristic values in report

    Hi Experts,
    I have a report where the service order will have 1or more part and its corresponding part status.
    I want to highlight or give some indication to those service orders where all the parts status are Part Received.
    The service order with different part status can be ignored.
    FYI: I don't have any keyfigure in my report.
    Can anyone please advice me on this.
    Thanks

    Hi Ahmed,
    You cannot achieve this using this Conditions, as the condition can be defined on a characteristic but u cannot say that for a service orders all the parts status are PART RECEIVED.
    For this kind of requirements, you need to add an Flag (Characteristic) and check in the Transformation if all the Part Status are PART RECEIVED for a Service Order and mark the Flag as 'X'.
    In the report jst filter on the flag as 'X'. It should resolve.
    Regards,
    Chathia.

  • How to popup form according to query by  CFL for user defined tables?

    Hi Experts!
    Please write a simple code for adding CFL in UDO and popup the window according to query. suppose i want to execute query
    "select code,name from [@WITM]". I want to add CFL in edittext which is on UDO. how can we add CFL in that Edittext by code.
    Thanking You
    vishwajit kumar

    Hi Vishwajit,
    Please response to your previous posting or close it first. Whatever the answer working or not, you need reply.
    Thanks,
    Gordon

  • How to set input ready query cell is different color?

    Dear All
      Hi, everyone, hereby i have a IP question.
      i would like to know, how to set the input ready query's cell different color between those cell which is unable to change value one in workbook..?
    Example :
      For my workbook which have a input ready query,
      i have 4 rows for my input ready query report.
      For the first row which is not input ready cell and unable to change any value for the cell, then following rows's cell can be change value,
      so, i would like to make first row's color cell different with following row's cell.
      In additional, all value of cell is initial zero.
      therefore, is there any mehtod to make different color between able cell and unable cell?
    Thanks a million.
    Regards,
    WenLong.

    Cells in the input ready query result have different styles given by SAP. All rows will have one style, column headings will have one style whereas input ready cells will have one style. If you are in Excel 2003, put cursor in the input ready cell, goto format -> style, you can see one BeX style attached to that cell, apply watever color you want for that style, save the workbook. If you do this for one cell, it will be applied to all the input ready cells by default. In the same way you can give different color to the non input ready cell styles. In Excel 2007, Cell styles are available in Home -> Cell styles. Here you can see all Bex related styles.

Maybe you are looking for

  • Transaction code for Seeing No of users working in a particular client?

    Hi Guys,                When i am debugging the program i go struck some where and the program is not coming out of debugging mode.So i pressed Ctrl Alt Del and closed that screen.I freshly my program in same client but iwas not able change the progr

  • How to save video effects for title templates?

    I just started playing with Premiere Pro CS4. I have a beginners question, hope you don't mind: In my video I use a third-low title to tell the name of songs played. I put them in a bin, basically just copy the first one and change the names in the c

  • Will there be a free Update to Aperture 4 ?

    Will there be a free Update to Aperture 4 ? I am still hoping for a Aperture 4 release with Mountain Lion. Should i buy Aperture 3.3 now and could i download thenAperture 4 for free ? Thank you guys !          

  • How to attach computer to non-HD TV?

    What are my options to connect my Apple notebook to my TV, which is not HD? This would be for family to view stored photos and videos on the TV, also for enlarge web-streamed sites (received through Airport). How do I get both video and sound to my T

  • CS3 and CS5 on same computer

    I am currently using CS3 on a Mac with Leopard and I am about to upgrade to CS5.  I've read discussions about compatibility issues between the two versions, so I would like to keep CS3 on my computer even after adding CS5.  Would this be a problem? A