Hi All,
I have created an ABAP webdynpro ALV table and one of the fields on this table is priority, which stores 10, 20 or 30 to represent high medium or low. I have then used the below code to turn this field into a drop down which displays the words 'high', 'medium' and 'low' as options rather than 10, 20, 30.
This all works fine apart from when i enter the settings of the ALV grid and remove/add a field from/to the alv displayed fields list. When the ALV grid is re-drawn the text dropdown displaying 'high', medium and 'low' is no longer active and it simply displays the basic raw data i.e. 10, 20 or 30. Anyone got an ideas how i could fix this issue, any info would be much appreciated!
lr_column_settings ?= wd_this->alv_config_table.
*Get context data
context_node = wd_context->get_child_node( name = 'ALV_TABLE').
context_nodeinfo = context_node->get_node_info( ).
*get dropddown values
select priority text
from zpriotable
into table it_ddvalues.
*Assign values to filed
context_nodeinfo->set_attribute_value_set( name = 'PRIORITY'
value_set = it_ddvalues ).
create object ld_DROPDOWNKEY exporting selected_key_fieldname = 'PRIORITY'.
lr_column = lr_column_settings->get_column( 'PRIORITY' ).
lr_column->set_cell_editor( ld_DROPDOWNKEY ).
FURTHER INFO.
I can actualy fix this issue by creating the drop down in the WDDOMODIFYVIEW method, so when it returns from the settings menu it recreates the dropdown on the ALV. The only problem with this is that the WDDOMODIFYVIEW is called every time there is a change to the view including when you click on the page down buttons. And recreating the dropdown when you are trying to page down seems to reset the ALV and stops it from paging down. Is there any way to call this code when returning from the settings menu but not anywhere else or is there any other way to fix this issue.
Thanks in advance
Mart