on 01-31-2011 9:42 AM
Hi at all,
I am trying to create a drop down within the toolbar of an alv component.
My context contains a node "DROPDOWN_DATA_TYPE" with two attributes:
- key type char2
- value type string
I fill this context node in the wddoinit of my Component controller.
Now I am trying to add the drop down into the alv component:
* Drop Down
DATA: lr_drop TYPE REF TO CL_SALV_WD_FE_DROPDOWN_BY_KEY,
lref_drop TYPE REF TO cl_salv_wd_fe_a_drdn_by_key.
lr_function = lr_config->if_salv_wd_function_settings~create_function( id = 'DROP_DATA_TYPE' ).
CREATE OBJECT lr_drop
EXPORTING
selected_key_elementname = 'DROPDOWN_DATA_TYPE-VALUE'
.
lref_drop ?= lr_drop.
lv_text = wd_assist->if_wd_component_assistance~get_text( '041' ).
lr_drop->set_label_text( lv_text ).
lr_function->set_editor( value = lr_drop ).
* CALL METHOD lref_drop->set_selected_key_elementname
* EXPORTING
* value =
* .
When I start the application I get the message:
"External Mapping of Node SALV_WD_TABLE#COMPONENTCONTROLLER.CONTEXT.FUNCTION_ELEMENTS Is Not Completed Yet
Translated:"
What am I doing wrong?
The additional detail Button created before works perfectly:
* Eigenen Button einfügen
lr_function = lr_config->if_salv_wd_function_settings~create_function( id = 'DETAIL_UEBER' ).
CREATE OBJECT lr_toggle_button.
lref_toggle_button ?= lr_toggle_button.
lv_text = wd_assist->if_wd_component_assistance~get_text( '041' ).
lr_toggle_button->set_text( lv_text ).
lr_function->set_editor( value = lr_toggle_button ).
Thanks for any help...
Dirk
hI
Your node DROPDOWN_DATA_TYPE should be mapped to the node Function_Elements interface controller of the used
component SALV_WD_TABLE. For this open the component usage and then select the interface controller of the used comp.
then MAP the node DROPDOWN_DATA_TYPE to Function_Elements .
and obviously for this the node should be present in the comp controller. so if the node is not present there create it there
and map to the view controller.
and then in the code change the line
selected_key_elementname = 'DROPDOWN_DATA_TYPE-VALUE'
to
selected_key_elementname = 'VALUE'
This will solve your problem.
thanks
sarbjeet singh
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 followed the same process but getting only one value in drop down , could you please help me.
Thanks
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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_attr_info TYPE wdr_context_attribute_info.
DATA lo_nd_visible_row_node TYPE REF TO if_wd_context_node.
DATA lo_el_visible_row_node TYPE REF TO if_wd_context_element.
DATA ls_visible_row_node TYPE wd_this->element_<node_name>.
DATA lv_visible_row TYPE wd_this->element_<node_name>-<attribute_name>.
lo_node = wd_context->get_child_node( name = wd_this->wdctx_<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 ).
CLEAR ls_valueset.
REFRESH lt_valueset.
hi Dirk Schilling ,
problem with mapping the node function_elements
refer the below standard component
SALV_WD_TEST_TABLE_TOOLBR
regards
chinnaiya P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now for filling the node, you need to fill the the valueset of the attribute.
as you are using dropdown by key, one element in the node will be enough.
Then you need to fill the valueset of the attribute value.
let me know if you need coding help on that also.
thanks
sarbjeet singh
Edited by: sarbjeet singh on Jan 31, 2011 4:12 PM
Hi,
The issue , It hink with the Assistance Class acessing the text id.
Pls. check the Assistace class exist with the id no. 041.
Regards,
Dadarao.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assistance Text exists and was filled as dummy value like the same way at the alv button.
Error Message
"External Mapping of Node SALV_WD_TABLE#COMPONENTCONTROLLER.CONTEXT.FUNCTION_ELEMENTS Is Not Completed Yet"
still appears on starting the application
Edited by: Dirk Schilling on Jan 31, 2011 11:18 AM
User | Count |
---|---|
71 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.