on 06-17-2015 1:02 AM
Hello everyone,
I`m trying to create a Dropdownbykey in a webdynpro screen. For that i've created a data element and a domain with a list of values.
When I bind the data element with my Dropdownbykey, just the first value appears on list and i can't switch between values.
I don't know why it's happening. I already compared with other DropDowns in my system, but i couldn't identify the problem. Someone have an idea how to solve this?
Hi,
Have you tried the below code?.
DATA lo_nd_<node> TYPE REF TO if_wd_context_node.
DATA lo_nd_<node>_info TYPE REF TO if_wd_context_node_info.
DATA lt_value_set TYPE wdr_context_attr_value_list.
DATA lw_entry TYPE wdr_context_attr_value.
DATA lt_taba TYPE STANDARD TABLE OF dd07v.
DATA lt_tabb TYPE STANDARD TABLE OF dd07v.
DATA lw_tabb TYPE dd07v.
lo_nd_<node>_info = lo_nd_<node>->get_node_info( ).
*--->GET DOMAIN VALUES
CALL FUNCTION 'DD_DOMA_GET'
EXPORTING
domain_name = <DOMAIN_NAME>
langu = sy-langu
withtext = 'X'
TABLES
dd07v_tab_a = lt_taba
dd07v_tab_n = lt_tabb
EXCEPTIONS
illegal_value = 1
op_failure = 2
OTHERS = 3.
IF SY-SUBRC IS INITIAL.
LOOP AT lt_tabb INTO lw_tabb .
lw_entry-text = lw_tabb-ddtext.
lw_entry-value = lw_tabb-domvalue_l.
APPEND lw_entry TO lt_value_set.
CLEAR: lw_entry,lw_tabb.
ENDLOOP.
lo_nd_<node>_info->set_attribute_value_set(
EXPORTING
name = '<ATTRIBUTE_NAME' " Web Dynpro: Name of Context Element
value_set = lt_value_set ). " All Fixed Values of an Attribute with Texts
REFRESH lt_value_set.
ENDIF.
It might help you.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, everyone
Thank you for help. I found were was the problem. The node that was bound with DropDownByIndex element was created in Context of View instead of Controller Context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you say the Read Only property is enabled ? Can you post screenshots of your screen and the context binding ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hevanderson,
Kindly check the following points
- Gowtham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suggest you to check the cardinality of the node once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Katrice.
Thank you for help. I tried to do this but I've got the same result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.