on 11-26-2013 8:03 PM
Hello
I am aware of fillling a drop down list for a DDK field of UI by using below code, but am looking to read / get the value list of a DDK field, so that i can delete 1 entry from that, pls. let me know how can get / read value list of a DDK
IF_WD_CONTEXT_NODE_INFO-SET_ATTRIBUET_VALUE_SET
Thank you
Hi,
You can get the value list of ddk field by using method GET_ATTRIBUTE of interface IF_WD_CONTEXT_NODE_INFO which returns the attribute info type structure WDR_CONTEXT_ATTRIBUTE_INFO.
You can find the field VALUE_SET in the structure WDR_CONTEXT_ATTRIBUTE_INFO which contains the value list of ddk field.
------------------------------------------
Example:
I want to read the drop list of an attribute FIELD1 of node INPUT
Data: lo_node type ref to if_wd_context_node,
lo_node_info type ref to if_wd_context_node_info,
ls_attr_info type WDR_CONTEXT_ATTRIBUTE_INFO.
" read the node reference
lo_node = wd_context->get_child_node( name = wdctx_input ).
"Get node info ref
lo_node_info = lo_node->get_node_info( ).
" get the attribute info
ls_attr_info = lo_node_info->get_attribute( name = 'FIELD1' ).
" here you can get the value list as below
"ls_attr_info-value_set
------------------------------------------
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the following code..
DATA: lt_valueset TYPE wdr_context_attr_value_list,
ls_valueset TYPE wdr_context_attr_value.
DATA: lo_node_info TYPE REF TO if_wd_context_node_info,
lo_node TYPE REF TO if_wd_context_node,
ls_attribute_info type WDR_CONTEXT_ATTRIBUTE_INFO.
lo_node = wd_context->get_child_node( name = 'NODE_NAME' ).
lo_node_info = lo_node->get_node_info( ).
ls_valueset-text = '10'.
ls_valueset-value = 10.
APPEND ls_valueset TO lt_valueset.
ls_valueset-text = '25'.
ls_valueset-value = 25.
APPEND ls_valueset TO lt_valueset.
ls_valueset-text = '50'.
ls_valueset-value = 50.
APPEND ls_valueset TO lt_valueset.
ls_valueset-text = '100'.
ls_valueset-value = 100.
APPEND ls_valueset TO lt_valueset.
lo_node_info->set_attribute_value_set(
EXPORTING
name = 'ATTRIBUTE_NAME'
value_set = lt_valueset ).
REFRESH lt_valueset[].
CLEAR ls_valueset.
ls_attribute_info = lo_node_info->get_attribute( name = 'ATTRIBUTE_NAME' ).
lt_valueset = ls_attribute_info-value_set.
Now Lt_valueset have all values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.