on 2016 Apr 12 11:12 AM
Hi All,
I have added drop down by key in Field. I am getting the entries in the 'drop down by key' but unable to catch the
user selected value.
Please help me on how we can read the user selected value in the drop down by key?
Thanks in advance...
Thanks,
Vasanth
code which I have written to bind the values in dropdown in Modify view post exit.
DATA: node_info TYPE REF TO if_wd_context_node_info,
node TYPE REF TO if_wd_context_node.
DATA: lt_ztxcdplnt TYPE TABLE OF ztxcdplnt,
ls_ztxcdplnt TYPE ztxcdplnt,
lt_tax_desc TYPE TABLE OF bbp_taxt,
ls_tax_desc TYPE bbp_taxt.
DATA: lt_valueset TYPE wdr_context_attr_value_list ,
l_value TYPE wdr_context_attr_value.
DATA lo_nd_item_basic_data TYPE REF TO if_wd_context_node.
DATA lo_el_item_basic_data TYPE REF TO if_wd_context_element.
DATA ls_item_basic_data TYPE wd_this->element_item_basic_data.
node = wd_context->get_child_node( 'ITEM_BASIC_DATA' ).
node_info = node->get_node_info( ).
* navigate from <CONTEXT> to <ITEM_BASIC_DATA> via lead selection
lo_nd_item_basic_data = wd_context->get_child_node( name = wd_this->wdctx_item_basic_data ).
* get element via lead selection
lo_el_item_basic_data = lo_nd_item_basic_data->get_element( ).
lo_el_item_basic_data->get_static_attributes(
IMPORTING
static_attributes = ls_item_basic_data ).
REFRESH lt_ztxcdplnt.
SELECT * FROM ztxcdplnt
INTO TABLE lt_ztxcdplnt
WHERE werks = ls_item_basic_data-plant.
IF lt_ztxcdplnt[] IS NOT INITIAL.
SELECT *
FROM bbp_taxt
INTO TABLE lt_tax_desc
FOR ALL ENTRIES IN lt_ztxcdplnt
WHERE tax_code = lt_ztxcdplnt-zcodes.
LOOP AT lt_ztxcdplnt INTO ls_ztxcdplnt.
READ TABLE lt_tax_desc INTO ls_tax_desc
WITH KEY tax_code = ls_ztxcdplnt-zcodes.
IF sy-subrc = 0.
l_value-text = ls_tax_desc-tax_description."ls_ztxcdplnt-zcodes.
INSERT l_value INTO TABLE lt_valueset.
ENDIF.
CLEAR: l_value, ls_ztxcdplnt.
ENDLOOP.
ENDIF.
node_info->set_attribute_value_set(
name = 'ZZ_TAX_CODE'
value_set = lt_valueset ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.