on 07-31-2007 4:16 AM
Hi,
I am putting a drop down in table row. each row of the table has the drop down in first column .It basicaly gives the wages type code(Dropdown).Now i have to display the description of the corresponding code in the second column. I am also able to do that but problem is that when in onselect i write some code the all the drop down showing the same selection & same description. Please hlep me.
use supply function,and bind it to the node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have a same problem. I am getting data from R/3, I am populating one of the columns in a table(direct binding). It is working fine. Whenever user selects one of the values in that column(dropdown), the value is changing to other values in other rows of the column as same value.
Ex:
empl1 epmname1 florida(dropdown)
emp2 epmname1 california (this will change to any other state)
emp2 epmname1 florida (if i select other states - the above staes are become florida) - I believe you got my point.
Please help me out
Thanks...
HI Prosun,
If you code for displaying the description in the OnSelect Event, you will always get the same text for all the rows. You do not need to code anything in the event handler. Just leave it empty (do not delete the event) and try this.
Bind the wages type code to the node info of an attribute in the table (say CODE).
Now, in the table, create two columns, one with 'DropDownByKey' as cell editor and other with 'TextView' as cell editor. Bind property 'selectedKey' of first column to CODE. Bind property 'text' of second column to CODE too.
Now when you select a value in the drop down, the corresponding value will be displayed in the text view.
Also, to attach the values to the node info, follow this.
Say your attribute CODE lies in a node called CTX_TAB. In WDDOINIT of the view (or controller) use the following code.
DATA:
lo_nd_ctx_tab TYPE REF TO if_wd_context_node,
lo_ndinfo_ctx_tab TYPE REF TO if_wd_context_node_info,
lt_value_set TYPE TABLE OF wdr_context_attr_value,
ls_value_set TYPE wdr_context_attr_value.
ls_value_set-value = '01'.
ls_value_set-text = 'One'.
APPEND ls_value_set TO lt_value_set.
ls_value_set-value = '02'.
ls_value_set-text = 'Two'.
APPEND ls_value_set TO lt_value_set.
lo_nd_ctx_tab = wd_context->get_child_node( 'CTX_TAB' ).
lo_ndinfo_ctx_tab = lo_nd_ctx_tab->get_node_info( ).
lo_ndinfo_ctx_tab->set_attribute_value_set( name = 'CODE' value_set = lt_value_set ).
Also, lead selection should be intialized for the node CTX_TAB.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
thanks for your answer. One custom Function Module is returning me the three table EX_WAGETYPES(Fields wages type),EXWAGETYPE_TEXTS(Fields wages type,desc),EXRETURN(for any errors.).I am populating the drop down from the first table. In view i have table column mapped to wages_type, second column mapped to desc.Now my FM returning me 75 values. It is almost impossible to give them index. Do u have any suggestion for this? What should be my approch?
Hi Prosun,
Instead of using 'DropDownByIndex', use 'DropDownByKey'. This way you will not have to maintain an index. In the ls_value_set (type wdr_context_attr_value), use the wages_type-wage_type as ls_value_set-value and wages_type-desc as ls_value_set-text.
'DropDownByIndex' works on the elements of a node. But 'DropDownByKey' works on the node info.
Regards,
Neha
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.