Skip to Content
0
Former Member
Mar 02, 2007 at 09:28 AM

Dropdown in ALV Grid (OO)

182 Views

Hi All,

I am populating a dropdown in the ALV grid, Now I have a requirement to fill this dropdown when I press enter button after selecting a value in the grid for a previous column ,I have written the code for this but the values are not getting filled into the dropdown , I tried debug the program and found out that the internal table I am using to fill the dropdown is getting filled with correct values but when I am calling the function

CALL METHOD g_grid->set_drop_down_table

EXPORTING

it_drop_down_alias = lt_dropdown.

the values are not getting passed to that field in the grid.

Please help.

I am posting the code also.

DATA : lt_ct1_mat TYPE STANDARD TABLE OF eina .

DATA: ls_dropdown TYPE lvc_s_dral.

DATA : wa like line of lt_ct1_mat.

SELECT * FROM eina INTO TABLE lt_ct1_mat

WHERE matnr = l_partno.

IF NOT lt_ct1_mat[] IS INITIAL.

clear lt_dropdown[].

LOOP AT lt_ct1_mat into wa.

ls_dropdown-handle = '1'.

ls_dropdown-value = wa-lifnr.

APPEND ls_dropdown TO lt_dropdown.

CLEAR ls_dropdown.

ENDLOOP.

ENDIF.

CALL METHOD g_grid->set_drop_down_table

EXPORTING

it_drop_down_alias = lt_dropdown.

Thanks