DropDownByKey in Table

Hi all,
I want to have a DropDownByKey in the column of a table. The table is bound to a model that is coming from R/3 and I also get another table from R/3 with two columns that contain the "id" and "text" for the DropDownByKey. I have done this many times in a standard web dnypro form (see code below), but never in a table. How to go about this?
2nd question, after using the "apply table template" function, some of the columns were already as "dropdownbykey" with the selection options prefilled. How is this possible since I didn't specify anywhere what the selction options should be? I have also noticed strange (but great) functionality when binding an inputfield to an element of type "currency" (EUR, CAD, USD, etc. was available as input help, but the data wasn't coming from any of the function module in my model!) .... What's going on here?
Thanks for the help.
Cheers,
faB
the code for a normal dropdownbykey bound to a string context element:
// Fill ValueHelps with data:
// Lstar inputField
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute("Lstar");
ISimpleTypeModifiable lstar_Type = attributeInfo.getModifiableSimpleType();
lstar_Type.setFieldLabel("Lstar");
IModifiableSimpleValueSet lstar_valueSet = lstar_Type.getSVServices().getModifiableSimpleValueSet();
int numberOfLstars = wdContext.nodeLstar_Tab().size();
for (int i = 0; i < numberOfLstars; ++i) {
     lstar_valueSet.put(
          wdContext.nodeLstar_Tab().getLstar_TabElementAt(i).getLstar(),
          wdContext.nodeLstar_Tab().getLstar_TabElementAt(i).getName());

Thanks for the responses.
when I use the code above and the "attribute" is simply a string value attribute that I have created in the root context, selecting a value changes all rows.
when bind the ddbk to the model node atribute, I get his error:
com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo : must not modify the datatype of a mapped attribute
does that mean I have create a "sub" value node and attribute in the model node ( with cardinality=1...1 and singleton=false ) and bind the ddbk to this ... doing a manual copy every time a value is selcted?
thanks for the input
faB

Similar Messages

  • Different dropDownByKey in table row

    Hi,
    I have a table and in each row i need to have combo with different values (depends in the other values of row).
    I created below my output table another value node (cardinality 1..n, selection 1..1, singleton false with suplly function) and in the supply func i'm creating value set with my desired values to every value attribute in it.
    I see that every DropDownByKey has all the values of all the rows. I could not create every valueSet alone. Somehow all the values mix up.
    Can Anyone Help?
    Roni.

    Roni,
    You need DropDownBy<b>Index</b> (DDI) instead of DropDownBy<b>Key</b> (DDK).
    Strange thing -- you did everything necessary for DDI, but place DDK instead
    Just replace cell editor with DDI and bind its "texts" properties to some attribute of sub-node 1..n.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Using WD messages with DropDownByKey in a table

    Hello,
    Has anyone here tried using the method
    reportContextAttributeMessage with dropdownbykey in a table?
    For some reason, the dropdownbykey field is marked as a missing field but the <b>cursor doesn't jump</b> to the field.
    Thanks.
    Ruthie.

    Hallo Ruthie,
    could you please specify the used NW '04  SP stack?
    Regards, Bertram

  • WebDynpro ABAP : Table with DropDownByKey does not have neat focus

    Hi Experts,
    I have a table, with one column of type dropdownbyKey, i need this so that i can display the DESCRIPTION rather than key. Issue is when i select a ROW in this table i see a special YELLOW BG COLOR on all columns except the column that has drop down by key   it is first thing enduser points out as issue ???
    Any help would attract points

    >
    ramkumarvalluru wrote:
    > Hi Eureka,
    >
    > I am new to webdynpro abap area.Please provide me step by step procedure for working on Dropdown by key,Check boxes  Radio buttons aand all UI elements.
    >
    > Please provide me.
    First of all, please don't attach new questions to existing threads. Second asking for step by step procedures on all UI elements is really outside the scope of a forum posting and asking for too much.  If you are that new to Web Dynpro ABAP, then start by reading the online documentation, the WDA WIKI section, and the WDA eLearnings.

  • Accessing DropDownByKey value in Table

    Hi everyone,
    I have a table and inside it dropdownbykey.
    I want to go with a loop on the table contents.
    with the following command:
    wdContext.nodeResearcherTable().getElementAt(i)...
    I get the selected row of the table.
    But, how do I get what the user chose?How do I get the selected key of the dropdownbykey in the table ?
    Thanks you guys.
    Ruthie.

    > Hi everyone,
    >
    > I have a table and inside it dropdownbykey.
    > I want to go with a loop on the table contents.
    > with the following command:
    > wdContext.nodeResearcherTable().getElementAt(i)...
    > I get the selected row of the table.
    > But, how do I get what the user chose?How do I get
    > the selected key of the dropdownbykey in the table ?
    >
    > Thanks you guys.
    > Ruthie.
    Hi Guys,
    I still have problems.
    Anilkumar - I can't use currentTableNodeElement() because
    I need to go over the intire table with a loop so I need
    some condition which uses the iterator of the loop -
    like - getElementAt(i)...
    Bharathwaj - I wasn't clear enough. key isn't a name of
    a field but I wanted to get the key of the dropdownbykey.
    after:
    wdContext.nodeResearcherTable().getElementAt(i)
    I can use either getAttributeValue()
    or getAttributeAsText().
    Any suggestions ???
    Thanks.
    Ruthie.

  • DropdownByKey inside ALV Table - Problem with Value set

    Hi,
    I have Component A which has a custom controller that uses the interface controller of the ALV Component.
    Custom controller has node ITAB.. that has certain attributes...
    I want DropdownByKey inside the ALV Table column. I am populating the corresponding attribute of ITAB node with the value set that I want the drop down to have.
    However when I execute the application..I get error
    " Key XXX not present in Value Set and is not initial"
    XXX is present in the Value Set table of the attribute.
    <b>Following is my code in the methods of CUSTOM CONTROLLER</b>
    <u>Generate Value Set</u>
    nodeinfo_context = wd_context->get_node_info( ).
    nodeinfo_ITAB= nodeinfo_context->get_child_node( wd_this->wdctx_ITAB ).
    <u> Populate the Value Set</u>
    data ls_valueset type wdy_key_value.
    data it_valueset type wdy_key_value_table.
    ls_valueset-key = 'FRA'.
    ls_valueset-value = 'FRANCE'.
    Append ls_valueset to it_valueset.
    ls_valueset-key = 'SFO'.
    ls_valueset-value = 'SAN FRANCISCO'.
    Append ls_valueset to it_valueset.
    <u>Set the Value Set for the Attribute</u>
    call method nodeinfo_ITAB->SET_ATTRIBUTE_VALUE_SET
                  EXPORTING
                     NAME = <b>'ATTR1'</b>
                     VALUE_SET = it_valueset.
    <u>Changing ALV Column</u>
    Get the ALV Configuration Model
      ifc_alv2 = wd_this->wd_cpifc_alv2( ).
      itab_alv2_config = ifc_alv2->get_model( ).
      itab_alv2_config->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
    <u>Get the Column reference for ATTR1</u> 
    ref_alv2_colset = itab_alv2_config->if_salv_wd_column_settings~get_column( <b>'ATTR1'</b> ).
    <u>Create the DropDownByKey Object</u>
    CREATE OBJECT ref_dropdownkey
              exporting SELECTED_KEY_FIELDNAME = ref_alv2_colset->id.
      ref_dropdownkey->SET_SELECTED_KEY_FIELDNAME( <b>ref_alv2_colset->id</b> ).
      ref_alv2_colset->SET_CELL_EDITOR( <b>ref_dropdownkey</b> ).
    <u>Check the value set</u>
      ref_attr_info = nodeinfo_flight_details2->get_attribute( ref_alv2_colset->id ).
    I do get back the value set if I see ref_attr_info->value_set.
    SO the Value Set is getting set for attribute ATTR1, but still I get Error
    <b>"The value selectedKey = "SFO" in DropDownByKey "_8C" does not exist in the value list and is not initial either "</b><u></u>
    SAP  User

    You have forgotten to set a cell variant. I had the same with setting a ProgressIndicator cell-editor to a table column as default editor. This causes the column to be hidden on the table while it did show up in the settings dialog. I removed the set_editor( lr_progressindicator) and created a cell variant instead with this lr_progressindicator. You then need to add this cell variant to your column. By default it will select the standard viewtext-cell-editor (which can only be textview and inputfield, like when you create a table yourself in a view), but if you use a cell variant, it will display the required cell editor if you set it (last line of the code).
    <b>In your case, replace lr_progressindicator by your ref_dropdownkey.</b>
      DATA: lr_column_settings    TYPE REF TO if_salv_wd_column_settings,
            lr_column             TYPE REF TO cl_salv_wd_column,
            lr_column_header      TYPE REF TO cl_salv_wd_column_header,
            lr_cellvar            TYPE REF TO cl_salv_wd_cv_standard,
            l_cellvar             TYPE string,
            lr_progress_indicator TYPE REF TO cl_salv_wd_uie_progr_indicator.
      lr_column_settings ?= wd_this->mr_table.
      lr_column = lr_column_settings->get_column( 'STATUSBAR' ).
      lr_column_header = lr_column->get_header( ).
      lr_column_header->set_text( 'Completed' ).
    CREATE OBJECT lr_cellvar.
      l_cellvar = 'CV_SB'.
      lr_cellvar->set_key( l_cellvar ).
      CREATE OBJECT lr_progress_indicator.
      lr_progress_indicator->set_percent_value_fieldname( 'STATUSBAR' ).
      lr_progress_indicator->set_tooltip( 'completed' ).
      lr_cellvar->set_editor( lr_progress_indicator ).
      lr_column->add_cell_variant( lr_cellvar ).
      lr_column->set_selected_cell_variant( l_cellvar ).
    I hope this will solve your issues.

  • How to Populate DropDownByKey boxes in a table ??

    Hiii
    The scenario is like this...
    In a table there are 2 columns ( statically created , nothing is dynamic UI  creation ) . The 1st column has a textview and the other has DDBK . In the DDBK the value to be populated is dependent on the value in the 1st column for that particular row of the table. Eg : If the two columns are like 1st is the Month  and 2nd as the No.of days , the 1st column is filled with the data which the user selects from some other view (only the month ) . The user can select multiple months . So accordingly the no.of days should appear in dat Dropdowns for that month for dat row in the table .
    i.e  If the 1st row in the table has month as february then d the dropdown should show 28 ( or 29 days accord.  logic is incorporated )  and if the next row is say month of August , then it should display all the 31 days .
    In my case , the dropdowns for both the months ( i.e the two rows of the table display the same no. of days , which it sholud not !! ).
    The data type of the context value attribute is changed with the IModifiableValueSet  & etc......
    Plz suggest the possible context node  structure ? do i hav to use a child node  "Days" with the valueAttrib "NumberOfDays"  say with the child node "Days" having singleton  as false !!
    Plz do reply  @ the earliest
    Thanks in advance.

    Hi Varad,
    In the doInit() call a method passing the month (getting from the text view) somthing like
    wddoInit()
        wdThis.populateDay(String strMonth);
    public void populateDay(String strMonth)
        String strMnth = wdContext.current<node name>.getDay();
        if(strMnth.equalsIgnoreCase(strMonth)
                 //logic for populating the dropdown
                           objSimpleTypeFactData =
                   wdThis.wdGetAPI().getContext().getModifiableTypeOf("ctx_FactType");
              objSimpleValueSetFactData =
                   objSimpleTypeFactData.getSVServices().getModifiableSimpleValueSet();
    objSimpleValueSetFactData.put(<key>,<value>);

  • DropDownByKey into a Table

    Hi experts,
    I need insert a Drop Down By Key into a Table, in a WebDynpro application.
    I have created a node (cardinality 0...1) which has all fields that I have to populate in the table. The table only must show one row.
    I think that I must create a SubNode (cardinality 0...n) into the other Node to map this with my DropDown, but I'm not sure.
    Could anybody tell me how can I add a Drop Down By Key into a Table?
    Thanks in Advance!
    Lucas

    The process is no different than if the DDBK was used outside a table.  You don't need another context node for the values.  You would just set them into the Node Info of the node for your table using the IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET method call.  Something like the following:
    data l_activities type zpm_activity_typ_tbl.
      l_activities = wd_assist->read_all_activities( ).
      data lt_valueset type wdr_context_attr_value_list.
      field-symbols <wa_act> like line of l_activities.
      field-symbols <wa_vs>  like line of lt_valueset.
      loop at l_activities assigning <wa_act>.
        append initial line to lt_valueset assigning <wa_vs>.
        <wa_vs>-value = <wa_act>-activity_type.
        <wa_vs>-text  = <wa_act>-activity_desc.
      endloop.
      data lo_nd_meeting type ref to if_wd_context_node.
    * navigate from <CONTEXT> to <MEETING> via lead selection
      lo_nd_meeting = wd_context->get_child_node( name = wd_this->wdctx_meeting ).
      data lo_node_info type ref to if_wd_context_node_info.
      lo_node_info = lo_nd_meeting->get_node_info( ).
      lo_node_info->set_attribute_value_set(
         name = 'ACTIVITY_TYPE'
         value_set = lt_valueset ).

  • How to get selected/focused cell from table, and action on clicked

    Hello Web Dynpro Community!
    i have a view with a table, (id "Table_0");
    table is 3x3 size, as celleditors i used inputfields; (standard binding to context with string atributes)
    below table i have textarea.
    when i select any cell in table i want to add that cell coords to textarea (col and row)
    i know that i should use onLeadSelect action, but i dont know exacly how. or to be precise.. how to access to ID and row variables in that action.
    the other problem is.. that onLeadSelect seems to work only when i change lead not the cell in same row.. so prabobly there is better way to do that..
    any ideas?
    Looking to hear from You.
    EDIT:
    Now i have following problem:
    i have a table 3x3 with one column as dropdownbykey box and 2 as TableSingleMarkableCell (and inputFields As editors).
    it works as i wanted:
    so when i click on one of those input cells, insert vale AND click enter then the action onEnter( for inputfield) is fired... i can get the coords of that cell..
    problem is.. that i want to get the coords before i click enter.. just when i click in cell.
    i tried to use onAction event for column.. but it doesnt work for TableSingleMArkableCells (but it works for ddk column correctly).
    so there is any way to do that?
    ie:
    below table i have inputfield (called  value).
    when i click on cell (and DO NOT press enter) i want to see the cell value in inputfield value.
    future (and target need) is that i need to show some additional text for specific Cell. (i have an Object with 2 strings attributes, one i want to show in cell, and one in inputfield when cell is clicked).
    M.
    Edited by: Michal Rowinski on Jan 16, 2008 9:51 AM

    You can use cell variant  for your requirement . Go through the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961
    Regards,
    Nethaji

  • Drop down in a table not in ALV table but the normal table

    Dear All,
    My question is regarding the drop down in a table.
    I am trying to put the drop down in a table and i am trying to fetch the data from the Data dictionary.
    Since my table contains more than 3 records all the columns are fetched accordingly but the drop down column is not getting set as per the reords of the database.
    When there is one record in the table then i am able to set the value of drop down as per the database and fill the drop down but when there are multiple records in the database all the values are set as same .
    For eg my datbase consits of 2 records and 1st record consists of drop down value as ""open"" and my 2nd record as "Cancelled"   then the two values are over written as ""Cancelled " "Cancelled".
    To over come this situation suggest me with a solution .
    Hope  i am clear with my question.
    Regards,
    Sana.

    Hi......
    I too got the same prblm like you but i solved it... here is the solution...
    first i have  used dropdownbykey list box for my scenario...
    then in the wd_doint...
      DATA LS_VALUESET  TYPE WDR_CONTEXT_ATTR_VALUE.
      DATA LT_VALUESET  TYPE WDR_CONTEXT_ATTR_VALUE_LIST.
    DATA LO_ND_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
      DATA LO_ND_ND_EDUCATION TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA LO_EL_ND_EDUCATION TYPE REF TO IF_WD_CONTEXT_ELEMENT.
    navigate from <CONTEXT> to <ND_EDUCATION> via lead selection
      LO_ND_ND_EDUCATION = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ND_EDUCATION ).
    get element via lead selection
      LO_EL_ND_EDUCATION = LO_ND_ND_EDUCATION->GET_ELEMENT(  ).
    get element via lead selection
      LO_ND_INFO = LO_ND_ND_EDUCATION->GET_NODE_INFO( ).
    i have the values in lt_subty fetched from database.
      LOOP AT LT_SUBTY INTO LS_SUBTY.
        LS_VALUESET-VALUE = LS_SUBTY-SLART.
        LS_VALUESET-TEXT  = LS_SUBTY-STEXT.
        APPEND LS_VALUESET TO LT_VALUESET.
      ENDLOOP.
    get all declared attributes
      LO_ND_INFO->SET_ATTRIBUTE_VALUE_SET(
        EXPORTING
            NAME = 'SLART'
            VALUE_SET = LT_VALUESET ).
    Hope this will help you.....
    if still dint come.... reply me....
    Thanks & regards
    Raja

  • Dropdown editable in a table based on a condition

    Hi,
    I would like to know how to solve these problems.
    1. I have a cell (of the type dropdown by key) in a table, which is editable or not, depending on a condition ? Is this is possible? Please let me know if there is a sample code
    2. So basically I have a  table that has 2 entries in it, user details and one of the fields in FLAG showing the values Yand N for the user. I want the table in the webdynpro application to show the 2 user entries and then in the Flag column have a DROPDOWNBYKEY that DEFAULTS to showing what flag the user has, but also allows the user to CHANGE the entry.
    Thanks in advance
    I appreciate for the help.

    is possible
    In your Context node which is binded to the table as DataSource, add an attribute WDY_BOOLEAN type
    In layout bind the newly created attribute to the dropdown UI element Enable property
    while filling your context node, fill the attribute with abap_true and abap_false based on your condition
    Abhi

  • How to populate values in dropdownbykey in webdynpro

    I have a scenario where I have to populte data in the dropdownbykey element, select and then submit .
    How do you first insert data from database into the dropdown list ?
    Kindly help me out by providing the steps.I am new to webdynpro.
    Thanks n regards

    Hi Saju,
    There are 2 types of dropdown ui elemts:
    1. For DropDownByIndex UI element we need to bind the text property to an attribute within a context node, which contains several elements (cardinality = 0..n). The number of elements defines the possible entries in the list. In the WDDOINIT method we can prepare an internal table with the values and bind it to the node and the lead selection defines the selected element.
    For example if u have defined a node 'TEXT' with cardinality '0..n' with attribute TEXT. Bind the text property of DropDownbyIndex UI element to attribute Text of context node Text.
    In the WDDOINIT method you can prepare an internal table with the values and bind it to the node and the lead selection defines the selected element.
    The below code sample may help.
    method WDDOINIT .
    data:
    node_text type ref to if_wd_context_node,
    stru_text type if_componentcontroller=>element_text,
    tab_text type if_componentcontroller=>elements_text .
    node_text = wd_context->get_child_node( name = if_componentcontroller=>wdctx_text ).
    * Set/fill your values
    stru_text-text = 'Value1'.
    append stru_text to tab_text.
    stru_text-text = 'Value2'.
    append stru_text to tab_text.
    * set values to the node
    call method node_ddi_also_text->bind_table
    exporting
    new_items = tab_text.
    endmethod.
    2. For DropDownByKey UI element bind the SelectedKey property to an attribute within a context node. Then you must provide the fixed values (table with key value combination) in a different way and store them in the node info. We can use the elements get_attribute method to get the attribute value which user has selected.
    For this we need to use the interface IF_WD_CONTEXT_NODE which has a method GET_NODE_INFO, which returns meta information on the respective node. This information is of type IF_WD_CONTEXT_NODE_INFO.
    Kindly refer the following code:
    method WDDOINIT .
    data: NODE_INFO type ref to IF_WD_CONTEXT_NODE_INFO,
    NODE type ref to IF_WD_CONTEXT_NODE.
    NODE = WD_CONTEXT->GET_CHILD_NODE( 'NODE1' ).
    NODE_INFO = NODE->GET_NODE_INFO( ).
    * To be able to store the fixed values for the attribute in the node info, two
    *additional variables are necessary:
    data: LT_VALUESET type WDR_CONTEXT_ATTR_VALUE_LIST ,
    L_VALUE type WDR_CONTEXT_ATTR_VALUE.
    *WDR_CONTEXT_ATTR_VALUE is a data type defined in the DDIC. It contains *two components KEY and VALUE, both of type STRING.
    *WDR_CONTEXT_ATTR_VALUE_LIST is a table type stored in the DDIC, whose *rows are of type WDR_CONTEXT_ATTR_VALUE.
    *The two variables created in the source text example are used to accept the value *pairs that will later be passed to the node info.
    L_VALUE-VALUE = 'V1'.
    L_VALUE-TEXT = 'yesterday'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE = 'V2'.
    L_VALUE-TEXT = 'today'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE = 'V3'.
    L_VALUE-TEXT = 'tomorrow'.
    INSERT L_VALUE into table LT_VALUESET.
    NODE_INFO->SET_ATTRIBUTE_VALUE_SET (
    NAME = 'ATTRIBUTE1'
    VALUE_SET = LT_VALUESET ).
    endmethod.
    Hope this helps.
    Best regards,
    Suresh
    Message was edited by:
            Suresh Honnappanavar

  • Data population in a dropdown inside a Table in WebDynpro Java

    Hi All ,
    I have a table inside which there is a dropdown in a ZCI Form. I am using enumerated dropdown list.
    The issue is binding of this dropdown is not woking as it works for normal dropdown.
    I am getting pdfdocumentcreation exception if trying to bind this dropdown using dynamic binding.
    Anybody help me out to solve this issue.
    regards
    Ravindra

    Hi,
      Refer the below link you will get useful information
    Dropdownlist to display r3 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
    create context value attribute and bind to drop down by key
    not getting value from DropDownByKey
    Dynamically adding values to dropdown by key thread
    Dynamicaly adding values to DropDownByKey
    Dropdown by key
    dynamic DropDownByKey
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/content.htm
    Regards,
    Saraswathi.
    Pls reward points for useful info
    Message was edited by: Saraswathi D

  • To populate drop down in a table..

    Hi,
    In my Application i have a table populated from an EJB bean through a class[]....
    Node:GroupNode
    Attributes:user , name, location.
    User attribute is the dropdown field in table..
    below values are to be  poupulated in the dropdown of the table from the string array.
    String[] ca  = { "user1","user2","user3"}
    I am populating the table from my class...but i am not able to populate the dropdownbox...
    Below is the code i used to populate the table:
    UserDTO[] cat = wdContext.currentBeanElement.modelobject.Objuser();
    for(int i-0;i<cat.length;i++)
    IPrivateUserView.IGroupNodeElement e =  wdContext.createGroupNodeElement();
    e.setUser(cat<i>.getUser());
    e.setName(cat<i>.getNmae());
    wdContext.nodeGroupNode.addElement(e);
    When I use Textview element in the table UI , the values are populating..
    But I need the User column in DropDown...So when i change the UI element to Drop Down Box in User column in Table,the User Column in the table is alone empty..
    How can I populate the values in dropdownbox with  String[] ca  = { "user1","user2","user3"} ...
    And I am usin DropDownByIndex UI element...
    Thanx in advance...
    Arjun.G
    Edited by: arjun swamy on Jan 22, 2008 7:22 AM

    Hi 
    To populate a dropdown by key inside a table, you should do it this way:
    //YOURNODENAME card: 1..n selection: 1..n    ,  attribute within node,
    // it could be card: 0..n y  sel: 0..1, depend on your liking/mandatory
    //condition.
    IModifiableSimpleValueSet ValueSet= wdContext.getNodeInfo().
         getChild("YOURNODENAME").getAttribute("ATTRIBUTENAME").
         getModifiableSimpleType().getSVServices().
         getModifiableSimpleValueSet();
    //Fill dropdownbykey with data
    ValueSet.put("user1","user1");
    ValueSet.put("user2","user2");
    ValueSet.put("user3","user3");
    ValueSet.put("user4","user4"); //... etc.. fill to fit your needs
    //Fill table with independant copies, that means choosing one doesnt modify the others
    for (int i = 0; i<5 ; i++)
      wdContext.nodeYOURNODENAME().addElement(wdContext.nodeYOURNODENAME().createElement());
    Regards
    Julio Herrera

  • Numerous ALV Issues - Saved Initial View shows table with no columns

    Saved a personal View and made it initial. View was saved by Sorting and FIltering certain columns. When I retrive the view, it shows the tabke has no columns at all.
    This is in addition to the Problem in getting DropdownbyKey inside a ALV Table Cell in DropdownByKey inside ALV Table - Problem with Value set
    Regards,

    You have forgotten to set a cell variant. I had the same with setting a ProgressIndicator cell-editor to a table column as default editor. This causes the column to be hidden on the table while it did show up in the settings dialog. I removed the set_editor( lr_progressindicator) and created a cell variant instead with this lr_progressindicator. You then need to add this cell variant to your column. By default it will select the standard viewtext-cell-editor (which can only be textview and inputfield, like when you create a table yourself in a view), but if you use a cell variant, it will display the required cell editor if you set it (last line of the code).
    <b>In your case, replace lr_progressindicator by your ref_dropdownkey.</b>
      DATA: lr_column_settings    TYPE REF TO if_salv_wd_column_settings,
            lr_column             TYPE REF TO cl_salv_wd_column,
            lr_column_header      TYPE REF TO cl_salv_wd_column_header,
            lr_cellvar            TYPE REF TO cl_salv_wd_cv_standard,
            l_cellvar             TYPE string,
            lr_progress_indicator TYPE REF TO cl_salv_wd_uie_progr_indicator.
      lr_column_settings ?= wd_this->mr_table.
      lr_column = lr_column_settings->get_column( 'STATUSBAR' ).
      lr_column_header = lr_column->get_header( ).
      lr_column_header->set_text( 'Completed' ).
    CREATE OBJECT lr_cellvar.
      l_cellvar = 'CV_SB'.
      lr_cellvar->set_key( l_cellvar ).
      CREATE OBJECT lr_progress_indicator.
      lr_progress_indicator->set_percent_value_fieldname( 'STATUSBAR' ).
      lr_progress_indicator->set_tooltip( 'completed' ).
      lr_cellvar->set_editor( lr_progress_indicator ).
      lr_column->add_cell_variant( lr_cellvar ).
      lr_column->set_selected_cell_variant( l_cellvar ).
    I hope this will solve your issues.

Maybe you are looking for

  • InterVideo WinDVR encountered a problem and needs to close (VOX USB 2.0)

    Device: MSI VOX USB 2.0 Driver: vox_1.1.0505.0.zip Software: msipvs_8609.zip (both driver and windvr software were download from official MSI site). Machine: Dell Latitude D600 with 1G memory Symptom: Installed ok, during starting the following is po

  • Installed latest update, and now ipod touch won't work

    Hello, I clicked on the download and install option for the latest update to my ipod touch. I think it was 2.2.1, but I'm not 100% sure. Anyway, now I have to hold the power button down several seconds, and I see the apple logo, and then the itunes i

  • Can sky+ HD box interfere with the internet?

    I have been having problems with my internet for about 4 weeks, 6 weeks ago I got sky with a sky+ hd with recording etc. So for 2 weeks it seemed fine but I am starting to doubt it. My internet cut off exactly 8pm tonight which is when I had the box

  • Report based on sql or plsql

    Hello, I have an LOV_COLS, which contains the columns of scott.emp and is represented by a list P50_MY_COLS, and textfield P50_SEARCHTERM where I can enter a search term. Now I like to have a report which displays something like SELECT EMPNO, ENAME,

  • Regarding security in Xi

    hi how can we handle security in Xi,i mean if i connect different systems using Xi how can flow of files  from one system to other system be secure. regards ramakrishna