09-29-2007 10:52 AM
Hi,
I want to implement F4 search help for some cells in ALV grid. I added the necessary class methods and the program runs fine and displays the list of values to be chosen. The function (F4IF_INT_TABLE_VALUE_REQUEST) returns a value but the cell in ALV grid is not updated. How can I pass the returned value to the cell in ALV grid?
Thx
Ali
09-29-2007 11:50 AM
Hi
While filling the field catalog for that column .mkahe the column editable.
Thanks
Mohit
09-29-2007 11:35 AM
09-29-2007 11:50 AM
Hi
While filling the field catalog for that column .mkahe the column editable.
Thanks
Mohit
09-29-2007 11:58 AM
Hi,
Code piece is something like this :
case p_e_fieldname.
when 'CHARG'.
read table gt_list index row_id.
select mcha~charg into value_charg-charg
from mcha
where werks = werks and
matnr = gt_list-matnr.
append value_charg.
endselect.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CHARG'
value_org = 'S'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'PRUEFLOS'
TABLES
value_tab = value_charg
field_tab = field_tab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
move return_tab-fieldval to charg.
ls_mod_cell-row_id = row_id.
ls_mod_cell-fieldname = 'CHARG'.
move charg to lv_value.
CALL METHOD ir_data_changed->modify_cell
EXPORTING
i_row_id = ls_mod_cell-row_id
i_fieldname = ls_mod_cell-fieldname
i_value = lv_value.
ENDIF.
internal table field CAHRG is editable and F4 enabled in field catalogue.