Skip to Content
author's profile photo
Former Member

updating cells with F4 in OO ALV grid

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 10:50 AM

    Hi

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

    Thanks

    Mohit

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 10:35 AM

    Hi,

    please provide the code...

    Add comment
    10|10000 characters needed characters exceeded