Column with dropdown with different values in each cell

Hello,
I have a Table and one of the columns contains a dropdown list (dropdownbykey). My problem is that the list of values for each drop down element is different because it depends on the value in the rest of the row cells. Obviously I need to calculate the values dynamically at runtime.
I have created a context node and linked it to the table columns, one of the attributes in the node is linked to the 'selectedKey' property of the dropdown. Then in my code I try to give the list of values to this attribute using the method set_attribute_value_set from the if_wd_context_node_info interface. The process it's explained in the DEMO_UIEL_STD_SELECTION component.
But I only get the same values for each row.
I would like to know if it's possible to have dropdowns with different values in the same column of a Table, and if so any indication of how to do that.
Best regards,

Hello Javier,
unfortunately you cannot use dropdown by key if you want to have different dropdowns per line of your table.
Instead you will need to use dropdown by index, and bind your dropdown to a subnode of the table element (ensure that this is a non-singleton node).
To make life easier for yourself, I would also have an attribute in your main structure that holds the selected value of the dropdown by index - update this value on any "onSelect" action of the dropdown by index.
e.g. for a table that holds addresses:
Context Node Address:
attribute street
attribute city
attribute country
attribute region
subnode regionlist
...attribute regionkey
...attribute region_text
table - bound to node address
input field bound to street
input field bound to city
dropdown by key bound to country (onSelect event populates subnode regionlist)
dropdown by index bound to subnode regionlist, text bound to region text, (onSelect event populates address element attribute region with key field of selected element).
I hope this helps,
Chris

Similar Messages

  • GL Accounts Planning with different value in each period through SPL ledger

    Can any one help me for the below issue:
    We want to load ( EXCEL  SHEET) planning amount through special purpose ledger against each GL account or all P&L and Balance sheet accounts, perhaps, a different value in each period.We would want to compare actual and budget figures by using T-CODE F.01.
    The example Given below:
    GL - 250112                
    PERIOD 1  - 10,000    
    PERIOD 2  - 10,500         
    Pd3           - 10,500       
    Pd4           - 8500    
    Pd5           - 8000    
    Pd6           - 9500        
    Pd7           - 10000     
    Pd8           - 9400          
    Pd9            - 10500          
    Pd10          - 11000        
    Pd11          - 6000     
    PERIOD 12 - 8400               
    Can anyone give me step by step procedure to do this.Thanks in advance.
    Edited by: DhanuSAPFICO on Dec 28, 2010 5:52 PM

    Hi,
    A bit not clear requirements. You are trying to create separate accounts for Opening and Closing? Looks strange! Please, use Flow dimension for this things. Trying to emulate it on the report level will create a lot of misunderstanding...
    B.R. Vadim

  • Different link for each cell on table item

    hello..,
    I have one table item on my WAD template.
    I created Characteristic Structure/Selection for rows and Key Figure Structure/Selection for columns.
    There is a requirement to jump to different report for each cell on that table.
    Is it possible?
    I try to created class "ZCL_MYCLASS" with superclass of "CL_RSR_WWW_MODIFY_TABLE".
    And put some code on HTML as below:
    <P><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TABLE"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER"/>
             <param name="MODIFY_CLASS" value="ZCL_MYCLASS"/>
             ITEM:            TABLE
    </object></P>
    For testing purpose, I put coding on CHARACTERISTIC_CELL method:
    if I_CHAVL = 'Revenue'. "This is selection description
    c_cell_content = 'R_e_v_e_n_u_e'.
    endif.
    But, it seems that it doesn't work.
    The question:
    1. How do I create simple MODIFY_CLASS, just for testing purpose that what I modify in class is already correct.
    2. How to debug class on WAD?
    Thanks in advance

    Not statically, but you can do this in code:
    That's a method on the left and a property on the right.
    I don't know if this will work as you expect (it should change the tip strip, but I don't know if it will appear like you want it to), so you can also implement this yourself by having a string indicator which you show and move around using its properties.
    Try to take over the world!

  • How can i apply different color for each cell in jlist component?

    hi guys i need your help and sorry if my english is very bad..guys how can i apply different colors for each cell in jlist component? for example for the first cell i want to apply color blue, for the second cell i want red, etc... i need your answer guys tnx..
    Edited by: ryrene on Mar 21, 2010 12:13 AM

    ryrene wrote:
    hi guys i need your help and sorry if my english is very bad.
    ..guys how can i apply different colors for each cell in jlist component? for example for the first cell i want to apply color blue, for the second cell i want red, etc... i need your answer guys tnx..I'll see your tnx, and raise you dve bmbrs & nplm.

  • Table control list box. different values in each row of the list box

    Hi all,
    i have a requirement to display text box in table control. Each row of list box should contain different values.
    i tried with the below code  but the values are not getting populated in list  box. please give your ideas.
    I tried with list box which is having same values in all rows, it is working fine.
    loop at itab.
    select vbeln from ZSD_PS_BLAWB into ZSD_PS_BLAWB-vbeln
    where BLAWBNO = itab-BLAWBNO and
    BLAWBDT = itab-BLAWBDT and
    CTRNO = itab-CTRNO.
    if sy-subrc = 0.
    index = 1.
    list3-key = index.
    list3-text = ZSD_PS_BLAWB-vbeln.
    append list3 to list2.
    index = index + 1.
    endif.
    endselect.
    clear index.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = 'ITAB-VBELN'
    VALUES = list2
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    modify itab.
    endloop.
    Thanks in advance.

    Hi,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

  • Sortable jtable with jcombo having different values

    Hi,
    I have a contacts list with name, addrerss etc., and telephone numbers where each contact can have several telephone numbers.
    The data is stored in a Derby DB in two tables with a PK and FK relationship. I need to load all the Contact fields in to a JTable where one of the columns will be the JCombos with telephone number(s) for that paticular contact.
    I have studied two neat sample code segments posted by a senior mrmber "camickr" at;
    [http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581 |http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581 ]
    Also another by " skdaga " at;
    [http://forums.sun.com/thread.jspa?threadID=749031&messageID=4284078|http://forums.sun.com/thread.jspa?threadID=749031&messageID=4284078]
    both are solid working examples.
    My problem is that I need to let the user to sort the table by columns and also filter by a text box entry. Meaning, the Combo boxes cannot have a fixed row index.
    Could someone advice if this is possible or I should use some other approach.
    Thanking you in advance,

    Hi camickr;
    Many thanks for your kind reply. I have managed to slightly modify your code to load the combos of individual telephone numbers dynamically.
    I have done so by returning a TableCellEditor from the public TableCellEditor getCellEditor(int row, int column) method, in place of storing the
    DefaultCellEditor dce1 = new DefaultCellEditor( comboBox1 ); etc., in an ArrayList.
    It goes as this. Following method is called by the return statement.
    private TableCellEditor createCellEditorWithCombo(int contactId) {
            JComboBox cmbNumbers = new JComboBox( <passed a Vector here thro' a PreparedStatement from the DB>);
            DefaultCellEditor editor = new DefaultCellEditor(cmbNumbers);
            return (TableCellEditor)editor;
        }The contactId of course could be easily desiphered from the "row" parameter then and there.
    I will follow your advice on the sorting part (on which I am yet to read the API fully) and get back with the result. Btw, I use the JDK 1.6u7 with Netbeans 6.1
    Thanking you once again for your great contributions,
    ViKARLL
    NB: By the way;
    camickr wrote:
    Well, if you look at my example you will note it uses the convertColumnIndexToModel(...). So you need to do the same thing for the row.It looks like you are referring to a diffrent post by you, since your example I worked on does not contain this method ??
    Edited by: ViKARLL on Sep 13, 2008 4:19 AM

  • Is it possible to make an album, with seperate, and different artwork for each track? Thanks.

    Got a few tracks and I was wondering if its possible to make like an album, but each track different art?  

    You can give each track its own artwork. iTunes will normally display the artwork of track 1 in album listings. The individual track art will show in the small window at the top of the screen when playing, or the artwork panel of the mini player, or the now playing window on a device. Try it and see.
    tt2

  • JTable - different editor for each cell?

    I have a JTable where two columns have combo box editors. When the user makes a selection in one combo box, the other combo box's options must change, as its allowable options depend on selection in the other combo box.
    So in short, I need a way of changing the combo box options for ONLY a specific cell, NOT the entire column. I currently only know how to do this for a whole column:
    // first put stuff in myComboBox, and then...
    myJTable.getColumnModel().getColumn().setCellEditor( new DefaultCellEditor( myComboBox ) );
    Is there any way to change the values in the combo box of a specific cell, rather than the entire column?
    I apologize if this is a newbish question... I am fairly new to Swing, but I didn't see anything addressing this in the documentation.
    -Vern

    The solution is like the one I gave you in one of
    your previous postings. In that posting you wanted a
    renderer for a specific cell. In this posting you
    want a editor for a specific cell. The solution is
    the same, only the method name changes.Okay, thanks. Sorry if it seems like I'm a slow learner. ;-)
    -Vern

  • ABAP WebDynpro: Table cells with different values.

    Hello,
    I am not sure how the following can be achieved.
    I have a table with 10 rows in it. First column should have different values in cells (static value that do not come from anywhere). For example, colors: black, green, yellow, etc.
    I inserted a table column. In that column I inserted a Cell Editor of type TextView. If I define a 'text' property of this element than it marks all cells in this column with this text. I need to assign different values to each cell.
    How can this be done?
    Thank you.

    Probably you should post this the Web Dynpro Forum
    Web Dynpro Java
    Regards,
    Ravi
    Note : Please close this thread.

  • Joint 2 datatable with column type double with a seperater

    Can anyone please tell me how to merge 2 datatable of column type double with a seperator (|). one with datetime header and 2nd table with integer headers, like this
    table 1
    01/02/2015   01/03/2015
      12346          47894
    table 2
    1               2
    7899       45678
    to become
    01/02/2015        01/03/2015
    12346 | 7899    47894 | 45678
    thanks

    Hi Sysaide,
    According to your description, you'd like to migration the two dataTable to one.
    What is the corresponding relationship of these two DataTables? Or when you migrating, the 01/02/2015 column and 1 column are fixed to one column. what is the relationship between these two columns?
    Or, Does the first column of table1 correspond to the first column of table2? the second correspont to the second? ...
    If the column index is corresponding each other. you could use the following way.
    Getting out the value of each cell, then rebuild a new table to get this new value.
    In your example, your column type is DataTime, but the value in the column is still string type. The below sample is used two different column type, string and int. And I show the result in a dataGridView.
    DataTable dt1 = new DataTable();
    dt1.Columns.Add("01/02/2015", typeof(string));
    dt1.Columns.Add("01/03/2015", typeof(string));
    DataRow dr = dt1.NewRow();
    dr["01/02/2015"] = "11";
    dr["01/03/2015"] = "12";
    dt1.Rows.Add(dr);
    dr = dt1.NewRow();
    dr["01/02/2015"] = "21";
    dr["01/03/2015"] = "22";
    dt1.Rows.Add(dr);
    DataTable dt2 = new DataTable();
    dt2.Columns.Add("1", typeof(int));
    dt2.Columns.Add("2", typeof(int));
    DataRow dr2 = dt2.NewRow();
    dr2["1"] = 1111;
    dr2["2"] = 1122;
    dt2.Rows.Add(dr2);
    dr2 = dt2.NewRow();
    dr2["1"] = 2211;
    dr2["2"] = 2222;
    dt2.Rows.Add(dr2);
    DataTable dt = new DataTable();
    dt = dt1.Clone();
    for (int i = 0; i < dt1.Rows.Count; i++)
    dt.Rows.Add();
    for (int j = 0; j < dt1.Columns.Count; j++)
    dt.Rows[i][j] = dt1.Rows[i][j].ToString() + " | " + dt2.Rows[i][j].ToString();
    this.dataGridView1.DataSource = dt;
    Result:
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Different values in a list box for each row of the table control...

    Dear Experts,
    Is it possible to populate different values for each row in a listbox inside a table control ?
    Example,
    Row 1 in the the table contains A, B & C
    Row 2 in the same table contains C, D & E
    If yes, How?
    yes i am using
      call function 'VRM_SET_VALUES'
        exporting
          id     = i_name
          values = i_list.
    Thank you .
    Message was edited by:
            Kokwei Wong
    Message was edited by:
            Kokwei Wong

    Hi Wong,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

  • Oracle 11gR2 RAC with ASM with asm_preferred_read_failure_group

    Hello DBAs,
    I apologize first if this question has been posted somewhere.
    I have a two nodes cluster so essentially, I have 2 ASM instances (ASM1 & ASM2). It seems like both instances share the same ASM spfile.
    +ASM1> show parameter spfile;
    NAME TYPE VALUE
    spfile string +OCRDG/clone-cluster/asmparame
    terfile/registry.253.759424467
    =====================================
    +ASM2> show parameter spfile;
    NAME TYPE VALUE
    spfile string +OCRDG/clone-cluster/asmparame
    terfile/registry.253.759424467
    The Oracle docs says that you can configure asm_preferred_read_failure_group for each instance so when I logged in instance 1, I ran the command:
    +ASM1> alter system set asm_preferred_read_failure_groups='DATA.FG1', 'DATA.FG2';
    then it showed DATA.FG1 is primary and DATA.FG2 is secondary but this also shows on instance 2 because it uses the same spfile.
    How can I make instance 1 uses DATA.FG1 for primary and instance 2 uses DATA.FG2 for primary. I have separate GRID home for each node.
    Any help is much appreciated.
    thanks,
    TD

    user11380530 wrote:
    Hello DBAs,
    I apologize first if this question has been posted somewhere.
    I have a two nodes cluster so essentially, I have 2 ASM instances (ASM1 & ASM2). It seems like both instances share the same ASM spfile.
    +ASM1> show parameter spfile;
    NAME TYPE VALUE
    spfile string +OCRDG/clone-cluster/asmparame
    terfile/registry.253.759424467
    =====================================
    +ASM2> show parameter spfile;
    NAME TYPE VALUE
    spfile string +OCRDG/clone-cluster/asmparame
    terfile/registry.253.759424467
    The Oracle docs says that you can configure asm_preferred_read_failure_group for each instance so when I logged in instance 1, I ran the command:
    +ASM1> alter system set asm_preferred_read_failure_groups='DATA.FG1', 'DATA.FG2';
    then it showed DATA.FG1 is primary and DATA.FG2 is secondary but this also shows on instance 2 because it uses the same spfile.
    How can I make instance 1 uses DATA.FG1 for primary and instance 2 uses DATA.FG2 for primary. I have separate GRID home for each node.
    Any help is much appreciated.Normally we can give different values for each instance, But i never tried in ASM.
    Here is example
    SQL> alter system set  asm_preferred_read_failure_groups='DATA.FG1' sid='ASM1';
    SQL> alter system set  asm_preferred_read_failure_groups='DATA.FG2' sid='ASM2';So DATA.FG1 will be allocated to ASM1, DATA.FG2 will be allocated to ASM2.
    Now check from ASM1
    SQL> show parameter asm_preferred_read_failure_group
    & from ASM2
    SQL> show parameter asm_preferred_read_failure_group
    HTH.

  • How to read the value of OLAPDataGrid cell/s from external object

    Hi,
    I have an OLAPDataGrid control in an Adobe flex application,
    and I am using the cutom renderer to render the cells of the
    OLAPDataGrid ,
    any Idea how I can read the value of each cell at the
    renderer , so I will be able to decide about the actions for each
    cell at the renderer?

    "j_shawqi" <[email protected]> wrote in
    message
    news:gkqgdl$539$[email protected]..
    > Hi,
    > I have an OLAPDataGrid control in an Adobe flex
    application,
    > and I am using the cutom renderer to render the cells of
    the OLAPDataGrid
    > ,
    > any Idea how I can read the value of each cell at the
    renderer , so I will
    > be
    > able to decide about the actions for each cell at the
    renderer?
    I'm thinking that you'll need to look at the listData
    property. I'm not
    sure what you get in an OLAP Grid that orients you to your
    cell position,
    but I'd set a break point in the listData override of your
    renderer and see
    what you actually have, or look at the docs for the data type
    of the
    listData object that the default renderer expects to get.
    HTH;
    Amy

  • How to get IAttributeStrand for each Cell in Table

    Hello All,
    I am trying to set the font and size depending upon the user inputs under each cell in the table.
    For Text frame I am able to achieve this by using ITextModel->QueryStrand(). But for Table I am not able to find any function which can allow me to query the Cell Strand and allow to apply the attributes.
    Has anyone been able to achieve the same. If so please do let me know its urgent.
    Thank you all in advance.
    regards
    Farzana.

    Hi,<br /> <br />Thanks for the prompt reply. By the way I forgot to mention that we are using the same in CS3.<br />We tried as you have mentioned in your mail. But we did not find any way to achieve the ITextStoryThread from ICellConent. We tried all possible ways but we always get the Text Frame TextModel.<br />We have used following code to get TextModel for each cell. We get correct startindex and endindex for each cell and also get the valid TextModel Interface. But when we try to find out its length then it returns the whole TextModel length. <br />Thus when we try to apply different attributes for each cell then it applies to whole table. <br />E.g. When we try to apply 12 font size for 1st cell then it also applies to remaining cells.  So we think we are not able to find out correct TextModel for each cell. <br /> <br />Below is our snippet of code on what we tried.<br /> <br />ITableModel::const_iterator iterTable(tableModel->begin());<br />ITableModel::const_iterator end(tableModel->end());<br /> <br />while(iterTable != end) <br />{<br />GridAddress gridAddress = *iterTable; <br />GridID gridid= tableModel->GetGridID(gridAddress);<br /> <br />   InterfacePtr<ITableTextContainer> tableTextContainer(tableModel, UseDefaultIID());<br />   if(tableTextContainer != nil) <br />   {<br />       InterfacePtr<ITextModel> textModel(tableTextContainer->QueryTextModel());<br />       if(textModel != nil) <br />       {<br />          InterfacePtr<ITextStoryThreadDict> textStoryThreadDict(tableModel, UseDefaultIID());<br />          if (textStoryThreadDict != nil) <br />          {<br />              InterfacePtr<ITextStoryThread> textStoryThread(textStoryThreadDict->QueryThread(gridid));<br />              if (textStoryThread != nil)<br />              {<br />                 InterfacePtr<ITextModel> iTextModel(textStoryThread->QueryTextModel());<br />                 if (iTextModel != nil)<br />                 {<br />                      TextIndex startIndx;<br />                      TextIndex endIndx;<br />                      startIndx=textStoryThread->GetTextStart(&endIndx);<br />                 }<br />                 else<br />                     CAlert::ErrorAlert("iTextModel == nil");<br />             }<br />          }<br />       } <br />   }<br />                                     <br />   ++iterTable;    <br /> }<br /><br />Regards,<br />Farzana.

  • Drop downs in a table column..... want to populate with different values

    Hi experts,
    I have drop down in one column of a table.In each row i want to populate different values to the drop down.But since i have binded the drop down with a single node, so all the drop down gets same values.
    for example. row1 i want to populate drop doen with value say A,B,C and in row2  i want to populate drop doen with value say D,E,F. But i am getting the values in both drop downs as A,B,C,D,E,F.
    The values are coming from backend as a arraylist.
    Please help.
    Regards
    Narendra

    HI
    I hope you may know the values you want to  present in the DropDownByIndex in each row of the Table ,
            Are the Values static . if so you may have to catch the index of the Node , remove the
            elements that you are not necessary . 
                  When you bind the same node of the RFC to all the dropdown of the tables  
         then it will show the same data in all DDI as you are getting it from .  .
             if you want different data then you can make bind different nodes from the RFC  or
             if you have less amount of values you have present in the DD  , i hope  you can go with
             Simples Types .

Maybe you are looking for