Changing values in drop-down dynamically

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,
Please refer the program BCALV_EDIT_06.In one form set_drdn_table, Loop the table whose values you want to show in drop down,append and pass to method set_drop_down_table of ALV class.
Hope this helps you
Raj

Similar Messages

  • Changing value in drop-down based on selected value in another drop-down

    Hi,
    I have two drop-downs - changing value in Combo1, should cause the form to be submitted and values to be populated in Combo 2.
    Approaches i tried - 1) I am using an ActionListener. I am having a valueChange method which accepts an action event. However this appraoch is not working for me. 2) I was wondering if I could use Javacsript to catch the OnChange event , the javascript function would call an appropirate method in my ActionListener. I know in Struts its straightforward, but how do i achive the same here in JSF.
    Any tips would be helpful.
    Thanks
    PS: I already came across some threads in the forum, but could not get an answer. Also, I have a retsriction in terms of using Action LIsteners itself.

    Try using ValueChangeListener instead of ActionListener.
    Here's a working example of a ValueChangeListener. You can customize it and use it for your application.
    The JSP will look like this:
         <h:selectOneMenu value="#{globalsBean.selectedFirst}"
              valueChangeListener="#{globalsBean.changeList}" onchange="submit()">
              <f:selectItems value="#{globalsBean.first}" />
         </h:selectOneMenu>
         <h:selectOneMenu value="#{globalsBean.selectedSecond}">
              <f:selectItems value="#{globalsBean.second}" />
         </h:selectOneMenu>The globalsBean will look like this:
    public class GlobalsBean extends Bean {
         ArrayList first;
         ArrayList second;
         String selectedFirst;
         String selectedSecond;
         public GlobalsBean() {
              first = new ArrayList();
              second = new ArrayList();
              first.add(new SelectItem("1", "1"));
              first.add(new SelectItem("2", "2"));
              selectedFirst = "1";
              selectedSecond = "";
              second.add(new SelectItem("White", "White Cows"));
              second.add(new SelectItem("Brown", "Brown Cows"));
              second.add(new SelectItem("Green", "Green Cows?!?"));
         public ArrayList getFirst() {
              return first;
         public ArrayList getSecond() {
              return second;
         public String getSelectedFirst() {
              return selectedFirst;
         public void setSelectedFirst(String selected) {
               selectedFirst = selected;
         public String getSelectedSecond() {
              return selectedSecond;
         public void setSelectedSecond(String selected) {
               selectedSecond = selected;
         public void changeList(ValueChangeEvent event) throws AbortProcessingException{
              second = new ArrayList();
              String newValue = (String)event.getNewValue();
              setSelectedFirst(newValue);
              if (newValue.equals("1")) {
                   second.add(new SelectItem("White", "White Cows"));
                   second.add(new SelectItem("Brown", "Brown Cows"));
                   second.add(new SelectItem("Green", "Green Cows?!?"));
              } else if (newValue.equals("2")) {
                   second.add(new SelectItem("White/Black", "White Cows with Black spots"));
                   second.add(new SelectItem("Black", "Black Cows"));
              setSelectedSecond("");
    }Let me know how it works out for you.
    CowKing

  • Change values of drop down list when other drop-down list value is clicked

    Hi Gurus,
    I look for my requirement very much but I can't find. I think it must be very simple but I can't do it, please help :
    I have to custom added fields. Both of them is made drop-down list by picklist defined in GET_P...methods.
    When I click and select a value from the first drop-down list, I want that second drop-down values are fully changed, depend on what I select in the first list. If I select my value and press enter in the first drop down box, I can do my requirement with GET_V...method. But if I don't press enter, the values of second list doesn't change, they remain same. I want exactly that when I click and select a value from first drop-down list, second drop-down list values are automatically change, dependent on what selected. Do I have to define and event?? where and how, please help me..

    Hi,
    You must have created the field as a dropdown using the below code in the get_p method.
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
            rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
      ENDCASE.
    Here you need to add the below lines of code along with the previous code. for the first dropdown value
      IF iv_property =  if_bsp_wd_model_setter_getter=>fp_server_event.
        rv_value = 'DDLB_CLICK'.
      ENDIF.
    This would refresh the screen when the user selects any value from the dropdown.
    Regards,
    Radhika

  • Changing Values of Drop Down Box??

    I have created a form that has 100 drop down boxes, each drop down box has the same values for the user to choose. I would like to know if it is possible to remove the selected value from the remaining drop downs once it has been selected?
    Example:
    Drop Down Box 1: user selects "A" when the user moves to Drop Down Box 2 "A" is not available for selection but the remaining values are. User Selects "B", moves to Drop Down 3 and both "A and B" are not available for selection.
    I hope this makes sense and can't figure out how to make this happen, I am a fairly new user to LC and would appreciate any help. Thank you for your time!!

    Hi,
    While technically you can do this, I think that it would be a poor performance because the script would need to loop through the 100 dropdowns.
    You would need to place script in the preOpen event of the dropdowns, that loops through and looks at previous selections.
    I worked this up over the weekend, but it is not 100%. http://assure.ly/KXAUg5.
    The script in the preOpen event calls a function in the AssureDynamics script object (see the Hierarchy).
    Hopefully someone can pick up the running on this, as I wont be able to for the week.
    Good luck,
    Niall

  • Populating values to drop down list in Adobe Forms

    Hi,
    We have added a drop down list in our adobe form. Our requirement is Payment Terms should be displayed in this drop down list. We tried by adding values to drop down list in object palette window by using '+' sign. But now we want to display values dynamically from table T052U. We need to bring two fields ZTERM and TEXT1. We don't want to use database connection, just from a table as an importing parameter it should be appended to this list.
    Atpresent, we don't want to use webdynpro or java for getting values.
    Please provide suitable answers.

    hi,
    cretae simple type in data dictionary i don't have any idea to create simple type in adobe forms.
    For creating Simple Type------in Dictionary->Local Dictionary->Data Type->Simple Type(here right click u get  create simple type).and after that choose Enumaration Here u can add values
    and create a node WITH one attribute and this attribute is off Type of that simple type u created in local dictionary and bind that node with interactive form data source property ,now in interactive form drag and drop that attribte from your dataView Run your application  these values will populate in your Interactive form.
    Regards
    Trilochan

  • 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

  • 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

  • How to set a default value in a Value Help Drop Down List

    Hi,
    I used an age Range field in my adobe form, the control  is a Value Help Drop Down List. i am populating the drop down using following code.
    IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");
         ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();     
         IModifiableSimpleValueSet ageValueSet =  ageType.getSVServices().getModifiableSimpleValueSet();
         ageValueSet.put("1","21-29");
         ageValueSet.put("2","30-34");
         ageValueSet.put("3","35 or Above");
    My requirement is to set a default value e.g. 30-34 in the age range field.
    I want to give input to iform from my Implementation code only.
    Please help.
    Thanks in advance

    hi Ranjan,
    that means you have to set at design time,
    to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
    This generally done in Initialization method of the controller.

  • How to capture selected value from drop down by index

    Dear friends,
    i want to capture the value of select value from drop down by index, for eg if  select air france, how to capture , could any one please let me know
    Thanks
    Vijaya

    Hi Vijaya,
    You can get the value of selected from drop down as below
    Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
    Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
                   data lo_element type ref to if_wd_context_element.
                   lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
    Now, you can get the static attribute value of selected  drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
                   data ls_data type wd_this->element_nd_drp_down.
                             lo_element->get_static_attributes(
                                       importing
                                       static_attributes = ls_data ).
    Hope this helps you.
    Regards,
    Rama

  • External XML data files to add values to drop down lists

    I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not sure whether it will work in the form manager..!plzz help me!
    Raghava Kumar V.S.S.

    Hi,
    For the case of raghavakumar, Is it really that I need to have LiveCycle Reader Extensions? Is there any other way that could do the same?
    Thank you

  • I have made one field as drop down in web ui. there are 3 values in drop down suppose a, b , c.

    i have made one field as drop down in web ui. there are 3 values in drop down suppose a, b , c.
    now i want to make c value as default value in drop down what to do?

    Hello Bala,
    you can find number of discussions regarding this on SCN.
    Search and do code in DO_INIT_CONTEXT method of view to set the value in entity.
    lr_entity ?= me->typed_context->context_node_name->collection_wrapper->get_current( ).
          lr_entity->set_property( iv_attr_name = 'Attribute_name' iv_value = 'value' ).
    Regards Harish Kumar

  • 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

  • Not able to set values in drop down for a table field

    Hi All,
    I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
    Pls help.
    Regards,
    Bhaskar

    Hi Otto,
    Here is the code I am using:
    * navigate from <CONTEXT> to <DATASOURCE> via lead selection
      lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
    * navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
      lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
    * navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
      lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
      node_info = lo_nd_education_tab->get_node_info( ).
      REFRESH ddlb_value_set.
      DATA: wa_edu_est TYPE t517t.
      SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
        s_element-text = wa_edu_est-stext.
        s_element-value = wa_edu_est-slart.
        APPEND s_element TO ddlb_value_set.
      ENDSELECT.
      SORT ddlb_value_set BY text.
    *    Set Value_sets to node_info
      node_info->set_attribute_value_set(
         name      = 'EDU_EST'
         value_set = ddlb_value_set ).
    Regards,
    Bhaskar

  • How to add values to drop down list in adobe forms

    how to add values to drop down list in adobe forms

    Hi,
    If you are using WD Java following are steps of filling values in DD Box:
    1 Create a simple type in the Dictionary.
    2 Create an attribute "CountryNew" in the Context of type created by you.
    3 Write following code in the init method of the form:
    IWDAttributeInfo countryinfo =
                   wdContext.nodeEmployee().getNodeInfo().getAttribute("CountryNew");
    ISimpleTypeModifiable Country = countryinfo.getModifiableSimpleType();
    IModifiableSimpleValueSet countryValueSet =
                   Country.getSVServices().getModifiableSimpleValueSet();
    countryValueSet.put("IN", "INDIA");
    countryValueSet.put("US "USA");
    4 Add a Enumrated DD box in the form and bind it to the attribute "CountryNew"
    Hope this helps
    Amit

  • How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

    Hi,
    How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am seeing Default Value set it to 'HI'. Please let me know how to change from HIgh to Low.
    I appreciate your help!
    Thanks,
    Monica

    hi,
    use the set_attribute( ) method now to set the attribute with a particular key eg HIGH in ur case
    // u can use the code wizard( control +f7) this code will be auto generated when u select the
    //radio button to read the context node
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
      DATA ls_cn_node TYPE wd_this->element_cn_node.
    * navigate from <CONTEXT> to <CN_NODE> via lead selection
      lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
    * get element via lead selection
      lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    * set single attribute
      lo_el_cn_node->set_attribute(
          name =  `ATTribute name.`
          value = 'LOW' ).
    it will solve ur query ..
    also refer to this component
    wdr_test_events -> view dropdownbyidx and dropdownbykey ->method name onactionselect.
    regards,
    amit

Maybe you are looking for

  • How can I add a particular website to the Windows8 Start Screen. IE has an option but I can't find one for Firefox.

    I have a new PC with Windows8 installed. I would like to add Facebook. twitter and outlook mail etc to the Start Screen. I do not wish to use the Microsoft 'Apps' as they are all mobile versions and I do not like them. The only way to get these progr

  • Error in Installing AIA FP 11gR1 - Linux - Build Failed - UrgentHelp

    Hi All., Actually we are in process of setting up AIA FP 11gR1 (AIA 3.0) FMW environment in OEL 4 (Linux) platform. Everytime while installing the AIA FP we are facing the following errors during final stage of configurations setup of FP. PFB the err

  • Photoshop Elements 5.0 can not find raw files on camera

    I'm running Photoshop Element 5.0 on Windoze Vista. For some reason Adobe Photo Downloader does not see any of the raw files on the CF card. I have a Canon G3 and Canon D20 neither of them work anymore. It used to work with PS 4.0. The weird thing is

  • Worried about my powerbook g4

    First of all I'm a new mac user never used or touch one before I always was a PC guy until my family talked me into trying one. So I was looking on craiglist one day and seen someone that posted a ad a Powerbook G4 ,1.4GHZ,512,80GB,Superdrive,15" for

  • [SOLVED] MPD: empty playlist

    Hi, I just installed and configured MPD, but I'm not able to play anything. There are simply no items in my playlist. This is what I did so far: - I installed MPD using pacman - I adjusted /etc/mpd.conf according to the official wiki. This is what it