if you are using CL_SALV_WD_UIE_A_DRDN_BY_KEY as dropdown
use SET_SELECTED_KEY_FIELDNAME method to set the selected key property and fill the values using
data:
lr_node type ref to If_Wd_Context_Node.
data : lr_nodeinfo type ref to if_wd_context_node_info,
lt_valueset type wdr_context_attr_value_list,
ls_valueset type wdr_context_attr_value,
WA TYPE SPFLI.
lr_node = wd_context->get_child_node( 'node name' ).
lr_nodeinfo = lr_node->get_node_info( ).
USE UR TABLE AND FILL ACCORDINGLY
SELECT * FROM SPFLI INTO WA.
ls_valueset-value = 'key1'. " actual values
ls_valueset-text = WA-CARRID. " text displaying on the dropdown
append ls_valueset to lt_valueset.
ENDSELECT.
lr_nodeinfo->set_attribute_value_set(
exporting
name = '<attribute name>'
value_set = lt_valueset
).
Abhi
Hi Abhi, thanks.
I did try that code and several others and it is still not working. I'm not sure what else is missing.
The attribute name mapped to the cell in the alv is type string.
I've tried to put the code in several places, like event handler methods for on_data_check, on_cell_action, init, and still does not work. I have other codes in there and they all work.
I have a non-alv dropdown and that works. I just can't get the values in that dropdown within the alv.
I searched for an sap sample that works and could not find any. Those that works are non-alv dropdowns. The closest I could find is salv_wd_test_table_events but even that does not have values in it. I haven't debug that one to figure out if it's because of lack of data or code is just not there.
I see a lot of postings saying they had the same issues and they've resolved it. But have not found any postings that says this is the solution.
Any other ideas are appreciated.
Thanks,
Irene
Add comment