Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

updating cells with F4 in OO ALV grid

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

While filling the field catalog for that column .mkahe the column editable.

Thanks

Mohit

3 REPLIES 3

Former Member
0 Kudos

Hi,

please provide the code...

Former Member
0 Kudos

Hi

While filling the field catalog for that column .mkahe the column editable.

Thanks

Mohit

0 Kudos

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.