03-02-2007 9:28 AM
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
03-02-2007 9:45 AM
Hi,
Just check whether the you refreshing the ALV after you popuate the internal table.Refresh it with g_grid->refresh_table_display.
Hope this helps.
Regards,
Prasanth
*Reward all the helpful answers
03-02-2007 9:45 AM
Hi,
Just check whether the you refreshing the ALV after you popuate the internal table.Refresh it with g_grid->refresh_table_display.
Hope this helps.
Regards,
Prasanth
*Reward all the helpful answers
03-02-2007 11:01 AM
Hi Prashant,
I have inserted the code as u said but now when ever I am pressing enter the selected value of the column where the dropdown is there is getting cleared out , please suggest what can be the solution for this
03-02-2007 9:47 AM
03-02-2007 10:42 AM
Hi,
You can take the help for ALV Dropdown programs from :
SE80>package>SLIS>Programs>BCALV_EDIT_06
& BCALV_EDIT_07
Sandeep