Clear the values in Drop down by key

hi all ,
i m using drop down by key (Combo box) ..
i have populated some values in that ..
then i navigate to next view ... from that view i m again navigating back to the
previous view .. now the values which was filled needs to be cleared ..
i used invalidete method also even though the values are present in the list ..
can any one help in this ...
points will be rewarded
Thanks and regards
JK

Hi,
Do you want the currently selected value to be reset, or do you want to delete the entire list of values? If you want to only reset your current selection, node->invalidate( ) should do it. Invalidate your node in the inbound plug handler.
Regards
Nithya

Similar Messages

  • How to get the values of drop downs, which are gonna create at run time.

    As per my design requirement, I have to create drop downs in an ADF display table.
    The no# of rows of the table are gonna decide the no# of the drop downs. User can select the values from drop downs. My issue is, how can I capture the selected values of those drop downs as those are gonna created run time.

    Hi
    ohh ,ok ,then as u said that u r storing twenty values ,thats y i aksed earlier ,are these form values part of tbale ,or as u said 20 values are there ,for these u r creating 20 form values ???.
    My suggestion would be ,u do four calculation and put all your results in a hashmap ,and keep this hash map in to sesion ,using the following method
    pageContext.putTransactionTransientValue("HashMapName",myHashMap);
    and inside the PFR method when u want to display these values ,u can loop through your hashmap and can display these values.
    like this
    HasMap hm=pageContext.getTransactionTransientValue("HashMapName");
    thanx
    Pratap

  • Restrict the number of visible values in drop down by key?

    Hello,
    Is it possible to restrict the max. number of entries displayed in a drop down by key element? By default i get 10 entries which i would like to limit to 5. Thanks.
    Regards,
    Vasu

    Hi,
    If you have a set of default values (which come from the domain), you can restrict them to the specific values which you need to display. In the INIT method of the view in which this UI element is present, you will have to write code to delete the entries which you do not wish to show in the drop down by key element.
    Have a look at this code snippet:
      data:     node_info type ref to if_wd_context_node_info,
                elem_attr type wdr_context_attribute_info.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'CHILD_NODE' ).
      data:    lt_valueset type wdr_context_attr_value_list,
            l_value type wdr_context_attr_value.
      call method node_info->get_attribute
        exporting
          name           = 'ATTR1'
        receiving
          attribute_info = elem_attr.
      lt_valueset = elem_attr-value_set.
      delete lt_valueset where value = 'VALUE1'.
      node_info->set_attribute_value_set(
                name = 'ATTR1'
                value_set = lt_valueset ).
    Hope this helps.
    Regards,
    Wenonah

  • Restricting the values in Drop Down list for ESS application

    Hello Experts,
    We are trying to restrict the values in the drop down list box for payment method field for direct deposit iview.
    Here Payment is the Zlsch field.
    here we are trying to have only 3 vlaues in the drop down. Do I have to do it from java code or can this be restricted on the ECC side?
    Plese let me know.
    Thanks,
    James.

    James,
    What you have to do is create a DropDown ByIndex element instead of by Key and create a context node PaymentMethodNode and a value attribute PaymentAttribute under it ....then write the following code in the wdDoInit() method as :
    //Add whatever values you want in the DropDown
    String[] priority_options= new String[]{"Payroll/Corp/Partner Check","Employee Payroll ACH(PPD)"};
              List ListOfPriorities = new ArrayList();
              for(int i=0;i<priority_options.length;i++)
                   IPrivateDetailView.IPayment_MethodNodeElement pr= wdContext.createPayment_MethodNodeElement();
                   pr.setPaymentAttribute(priority_options<i>);
                   ListOfPriorities.add(pr);
              wdContext.nodePayment_MethodNode().bind(ListOfPriorities);
              for(int e=0;e<wdContext.nodePayment_MethodNode().size();++e)
                   wdContext.nodePayment_MethodNode().setSelected(e,e>=0 && e<=1);
    and then write the following code in wdDoModifyView() method:
    IWDDropDownByIndex di =(IWDDropDownByIndex)view.getElement("DropDownByIndex");
             di.bindTexts("Payment_MethodNode.PaymentAttribute");
    then create an Action and bind it to the onselect property of the DropDown and write the following code in the onAction method :
    if(wdContext.currentPayment_MethodNodeElement().getPaymentAttribute().equalsIgnoreCase("Payroll/Corp/Partner Check"))
        wdContext.currentSelectedInfotypeElement().setZlsch("C");
        else
         wdContext.currentSelectedInfotypeElement().setZlsch("P");
    I am sure it will work..

  • Varying the values in drop-down

    Hi All,
    We have created a report to display certain data using object oriented ALV. In the display, drop-down help is provided for one column.
    Now, I want to vary the values in the dropdown help depending on certain criteria.
    Is it possible?
    Thanks,
    Supriya.

    hi,
    go through the given below link..
    link:[https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/dropdowns%252bin%252balv]
    hope this help you..
    Regards
    Ritesh J

  • On basis of drop down by key values i want to enable and disable ui elements is wda

    How to enable and disable ui elements on basis of drop down by key values as i show in screen shot i have 3 values in drop down by key on basis of those values i need to enable and disable ui elements in webdynpro abap kindly reply back

    Hi Sreedhara,
    There are many tutorials on SCN for learning Web Dynpro ABAP. If the following steps don't make sense to you, please do a search for some tutorials and read through the tutorial materials. Hopefully the tutorials will help you to become familiar with some of the basics of Web Dynpro ABAP.
    Here is how to enable or disable a UI element upon selection from a DropDownByKey.
    In your view context, create a context attribute of type wdy_boolean. For now, let's call this attribute IS_ENABLED
    In your view layout, bind the enabled property of the UI element to the context attribute IS_ENABLED.
    In your view actions, create an action-- let's call it SET_ENABLED-- and bind this action to the DropDownByKey element's onSelect event in the view layout.
    In the event handler method for the SET_ENABLED action, use the Code Wizard to read the value of the DropDownByKey selected value, then use the Code Wizard again to set the value of context attribute IS_ENABLED to either true or false.
    Now when a value is selected from the DropDownByKey, the SET_ENABLED action will be triggered and the IS_ENABLED context attribute will be set to either true or false. Since your UI element's enabled property is bound to this true or false value via the context binding, the UI element will change to enabled or disabled.
    Good luck!
    Cheers,
    Amy

  • Dashboard prompt issue  (Restricting Values in drop down) ????

    Hi Friends,
    In my report I have "days to start" column which list almost 10,000 values ranging from -1000 to 5000.
    I need to create a prompt for this report on "Days to Start" column.
    When I create a prompt on Days to start with Operator "Greater than" and Control "Drop Down List" it shows me all the values in Drop down.
    I need only specific Values like 30, 60, 90, 180 which might not be in the "days to start" column.
    If I select "SQL Result" what should be the SQL for that??
    Is there any other way to solve this problem
    Aprreciate your help on this
    Thanks

    You could make a table VALUES with 1 column and fill it with values like 30,60,90....then in sql you'd write SELECT * FROM VALUES....as simple as that
    (of course, it'd have to be in RPD, and you'd need to expose it in Presentation layer)
    Edited by: wildmight on Feb 19, 2009 8:18 AM
    Also, you could try this - it works for me - but it could be slower and you might want to figure out how to round it - also, it has to be a number or cast to number format
    SELECT Table."Column"/30 saw_0 FROM "Subj Area" ORDER BY saw_0
    Edited by: wildmight on Feb 19, 2009 8:29 AM

  • Webdynpro " How to add values in Drop down list By Key"

    Hi experts ,
    i want to create a drop down list by key, i don't know how to assign values to it ( i.e. add list entries ) . Please help me on this ..
    With regards ,
    James..
    Valuable answers will be rewarded ....

    Hi,
    To fix values to the drop down key at runtime in the webdynpro application you can use the following code:
    DATA:
    lr_node_flightinfo TYPE REF TO if_wd_context_node,
    lr_nodeinfo_flightinfo TYPE REF TO if_wd_context_node_info,
    l_scarr type scarr,
    lt_value_set TYPE TABLE OF wdr_context_attr_value,
    lw_value_set like line of lt_value_set.
    get nodeinfo of node flightinfo
    lr_node_flightinfo = wd_context->get_child_node( name = 'FLIGHTINFO' ).
    lr_nodeinfo_flightinfo = lr_node_flightinfo->get_node_info( ).
    get value set (VALUE = CARRID , TEXT = CARRNAME)
    select carrid carrname from scarr into table lt_value_set.
    clear lw_value_set.
    lw_value_set-value = 'AI'.
    lw_value_set-text = 'Air India'.
    append lw_value_set to lt_value_set.
    sort the value set by the describing TEXT
    SORT lt_value_set BY text.
    set value to context attribute
    lr_nodeinfo_flightinfo->set_attribute_value_set(
    name = 'CARRID' value_set = lt_value_set ).
    Here CARRID is a drop down by key field on the screen.
    in The context it is an attribute in the node FLIGHTINFO.
    Please give Reward Points if this piece of code helps
    Regards,
    Manish

  • The "Clear Search History" feature in the upper right drop-down menu no longer works in Firefox 4.

    The "Clear Search History" feature in the upper right drop-down menu that shows search terms no longer seems to work in Firefox 4.

    It is possible that there is a problem with the file that stores the "Saved Form" data.<br />
    Rename or delete formhistory.sqlite (plus formhistory.sqlite-journal and formhistory.sqlite.corrupt and formhistory.dat, if they exist) in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case there is a problem with the file that stores the "Saved Form" data.<br />
    This will remove all saved form data, so you may want to rename formhistory.sqlite to formhistory.sqlite.sav or move the file to another folder in case you need to recover some saved data.
    You may also need to delete search.sqlite and search.json in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder]

  • Drop Down BY Index Vs Drop Down By Key

    What is the difference between Drop Down By Index & Drop Down By Key.
    How Do we retrive What value is selected in a drop down
    regards
    Nilesh

    Hello Nilesh,
    //Create ISimpleTypeModifiable to fill the dropdownbox
    //XXX is your Desc field
                    IWDAttributeInfo soAttribInfo= wdContext.getNodeInfo().getAttribute("XXX");
                    ISimpleTypeModifiable soType = soAttribInfo.getModifiableSimpleType();
                    soType.setFieldLabel("XXXX");
                    IModifiableSimpleValueSet soSet= soType.getSVServices().getModifiableSimpleValueSet();
                    soSet.clear();
                    //To Get desc and key from web services you pass some information to the run the given Webservice do it here
                    wdContext.currentRequest_XXXViDocument_getDescnKeyArrayElement().setInfo(infonr);
                    wdThis.wdGetXXXController().getDescObjects();
                    int size = wdContext.nodeResult_getDescObjectsArray().size();
                    if (size != 0)
                         //Filling the desc in the dropdownbykey field
                         for (int i=0; i<wdContext.nodeResult_getDescObjectsArray().size(); i++ )
                              IPrivateXXView.IResult_getDescObjectsArrayElement soElement =
                                  wdContext.nodeResult_getDescObjectsArray().getResult_getDescObjectsArrayElementAt(i);
                               soSet.put(soElement.getkey(),
                              soElement.getDesc().trim() + " " + soElement.getkey().trim() );
    Implement this code for populating the drowdown when that works I can tell you the next step.
    Good Luck,
    Dharmi

  • I was trying to figure out how to stop my pinned apps from disappearing after I've shut-down my computer during storms. In the process of trying things I lost the Orange Firefox drop down box in the upper left corner. How do I get it back?

    Question 1 - How do I restore the Orange Firefox drop-down box that was originally at the top of the screen.
    Question 2 - How do I undo the last command I changed
    Question 3 - How do I prevent my pinned apps from disappearing. I have about 10 loaded and it's a pain to have to reload those several days a week. Seems to only happen if I shut down the computer.

    You see the orange (on Linux gray) Firefox button if the Menu Bar is hidden.
    *View > Toolbars > Customize
    *Right-click a toolbar).
    *Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily if the Menu Bar is hidden.
    Make sure that you do not use "Clear Recent History" to clear the "Browsing History" when Firefox is closed because that prevails and prevents Firefox from opening tabs from the previous session.
    * https://support.mozilla.com/kb/Clear+Recent+History
    What do you mean with Question 2: ''How do I undo the last command I changed'' ?
    Which last command are you referring to?

  • Size of Drop down by key

    Hi,
    when i built value set for the first time for drop down by key, values( texts ) are displayed correctly, however when it is re-built based on other drop down instead of showing texts it is showing the key value in drop down, however if select drop down, text will be selected though key is displayed.
    i think it is something to do with drop down by key size adjustment, how to solve this.
    i guess we can use 'CALC_WIDTH4DDLBBYKEY' method of cl_wd_utilities, but how to use this??
    Please suggest!!
    Edited by: kranthi kumar on May 5, 2011 3:58 PM

    Hi Kranthi,
    You cant adjust drop down size manually.
    According to the values inserted in the dropdown, its size increased automatically.
    If there are no values in dropdown it will be small in size but with values its size increases.
    You can adjust WIDTH of drop down, but after filled with values it takes value size.
    While filling drop down key and value, pass same value to key and value.
    Example code :
          DATA : node_info TYPE REF TO if_wd_context_node_info,
            value TYPE wdy_key_value,
            set TYPE wdy_key_value_table,
            k2 type string value 'BOX',
            v2 type string value 'BOX',
            k3 type string value 'LOOSE',
            v3 type string value 'LOOSE'.
          value-key = k2.
          value-value = v2.
          APPEND value to set.
          value-key = k3.
          value-value = v3.
          APPEND value to set.
          node_info = wd_context->get_node_info( ).
          node_info = node_info->get_child_node( 'PACK_MAT' ).
          node_info->set_attribute_value_set( name = 'PACK_MATERIAL'
                                               value_set = set ).
    Cheers,
    Kris.

  • Query for Drop Down By key

    Hi,
    Explaining my problem with an example.
    There is a hotel table where user enter hotel details
    Like City, Dep Date, Arr Date, No of Days , rate  etc  and these in turn get saved to table say USER_HOTEL_DETAILS  . When user comes to his plan/entered details again, previously saved data is shown to him.
    For making a selection for City I have to give a dropdown to user with cities list that are maintained in other table say HOTEL_DATA which has city, rate, and currency fields and city is the key of table.
    Now if I use drop down by key or index for city I need to fetch city values from table HOTEL_DATA and have to populate context of city field of USER_HOTEL_DETAILS.
    For dropdown my value text is going to be city .For key if I try to give serial numbers say 1, 2, 3 as key for populating dropdown, the key will get stored in database table against city name. To avoid this while saving data I have to write additional code while saving and retrieving data that take value against selected key.
    To avoid this one way is to use city name as both Key and Value. What is the other alternative I can use for? Please help
      Regards,
      Madhvika

    Hi ,
    It is better to have citykey in HOTEL table and maintain a text table for the same.This is good approach.
    Because tommorow if city needs to be displayed in other text also just adding the same in the text table would be suffice.
    For city texts retrieve it from text table and bind to the node.
    Regards,
    Madhu

  • Problem with Drop down by key

    Hi all,
          I Inserted several drop down by key in my view at design time. When I try to run the application it displays an error as
    java.lang.ClassCastException at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)
    My requirement is,
    I am getting a table with two fields(key,value) from R/3 I want to display these in the drop down by key box how to bind them to this drop down.

    Hi Refer the below link
    DropdownList box to display R/3 table  
    Re: DropdownList box to display R/3 table
    see this link for when to use DropDownByIndex (DDI) vs DDK (DropDownByKey) and how populate data from R/3.
    Re: webdynpro populating dropdown values programmatically
    populating dropdownbyvalue with the r/3 value?  
    Re: Regarding DropDown Box
    /message/2187817#2187817 [original link is broken]
    Re: DropdownList box to display R/3 table
    create context value attribute and bind to drop down by key
    not getting value from DropDownByKey
    Dropdown by key
    dynamic DropDownByKey
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/content.htm
    For DropdownbyKey
    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/content.htm
    For DropdownByIndex
    http://help.sap.com/saphelp_nw04/helpdata/en/24/25e08d4ba6c743b55f1d375637ba8d/frameset.htm
    Regards,
    Saraswathi
    Pls reward points for useful info.

  • How to set default value for drop down box in jsf

    Hi,
    Can anyone help me to set the default value in drop down box using <af:selectManyChoice> ?
    As I know there is an unselectedLabel attribute in <af:selectOneChoice> but not valid attribute for <af:selectManyChoice>.
    Any help must be appreciated.
    Regards,
    AK

    Hi Frank
    My entity type is a List in managed bean. I have set the entityType in the constructor of the managed bean. I have attached my code here.
    TPSearchCriteriaBean.java****************************************
    /** Constructor */
    public TPSearchCriteriaBean() {
    super();
    entityType=new ArrayList<String>();
    entityType.add(UIConstants.LIST_ITEM_ALL);
    authorizationType=new ArrayList<String>();
    authorizationType.add(UIConstants.LIST_ITEM_ALL);
    companyType=new ArrayList<String>();
    companyType.add(UIConstants.LIST_ITEM_ALL);
    mrgStatus=new ArrayList<String>();
    mrgStatus.add(UIConstants.LIST_ITEM_ALL);
    legalStatus=new ArrayList<String>();
    setEntityType(entityType);
    setAuthorizationType(authorizationType);
    setCompanyType(companyType);
    setMrgStatus(mrgStatus);
    country = "0";
    //address = new AddressBean();
    UIConstants.java***********************************************************
    public static final String LIST_ITEM_DEFAULT = "select";
    public static final String LIST_ITEM_ALL = "0";
    LOVManager.java*****************************************************************
    public List<SelectItem> getLovList(String lovType, boolean requiredOption_SELECT, boolean requiredOption_ALL)
    log.debug("LOV loading for " + lovType + ": START");
    List<SelectItem> lovList = new ArrayList<SelectItem>();
    //check validity of lov loading request
    validLov:
    for (int i = 0; i < lovTypeArray.length; i++)
    if (lovTypeArray.equals(lovType))
    break validLov;
    log.debug("ERROR: LOV Type not valid.");
    return lovList;
    //First select is replaced by ALL here
    //<-- Select --> should be an option
    if (requiredOption_SELECT)
    lovList.add(new SelectItem(UIConstants.LIST_ITEM_DEFAULT, "--Select--"));
    LOVDao dao = new LOVDao();
    dao.loadLOVValues(lovType, lovList);
    log.debug("LOV Loading successful!");
    //<ALL> should be an option
    if (requiredOption_ALL)
    lovList.add(new SelectItem( UIConstants.LIST_ITEM_ALL, "ALL"));
    return lovList;
    Kindly help me.
    Regards,
    AK

Maybe you are looking for

  • Quantity in report FBL1N

    Hello experts, when i run standard report FBL1N, quantity has to be displayed along with other data. I am getting quantity field but with no data. Probably the quantity field in the G/L table BSEG is not getting updated when we do MIRO, so how to get

  • There s no sound when I connect my aux wire with my Bose dock

    There s no sound coming when I connect my Aux wire to my Bose dock.but my internal speakers are working perfectly , there's no output through aux

  • Send Reports through E-mail

    Hi I have a scenario where in an e-mail (Report) has to be triggered to various customers(BP) Can any one help on this Thanks Nanda

  • SELECT Bottom n records?

    I know we can select the top (n) records but cannot seem to find a way to get the bottom (n) records. My goal is to find a way to do paging with a query so if there is a better way then please let me know. I was hoping to do something like select the

  • Updatexml function is returning error. Syntax problem....

    I have a xmlfile which is shown below... cat MYTEMP.xml <?xml version="1.0" encoding = "AL32UTF8"?> <ROWSET> <ROW> <EDETAIL>test</EDETAIL> <T1>3</T1> </ROW> <ROW> <EDETAIL> test1</EDETAIL> <T1>4</T1> </ROW> <ROW> <EDETAIL>test2 </EDETAIL> <T1>2</T1>