Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue when using handle_data_changed of cl_gui_alv_grid...

Hello Experts, 

I am using the said method(handle_data_changed) in my ALV grid using cl_gui_alv_grid.
My question is, The value that I enter in one of the editable columns(TREAS_TRANSACTIONS) is not being passed
into structure ls_good. By the way, I am using BCALV_EDIT_03 as my reference. 
Below is my code guys: 

CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
      handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
        IMPORTING
          er_data_changed.

  PRIVATE SECTION.
    DATA: ls_good TYPE lvc_s_modi.

    METHODS: check_input
               IMPORTING
                 im_amount       TYPE lvc_s_modi
                 im_data_changed TYPE REF TO cl_alv_changed_data_protocol.

ENDCLASS.                    "lcl_event_receiver DEFINITION

CLASS lcl_event_receiver IMPLEMENTATION.
  METHOD handle_data_changed.
    LOOP AT er_data_changed->mt_good_cells INTO ls_good.
      CASE ls_good-fieldname.
        WHEN 'TREAS_TRANSACTIONS'.
          CALL METHOD check_input
            EXPORTING
              im_amount       = ls_good
              im_data_changed = er_data_changed.
      ENDCASE.
    ENDLOOP.
  ENDMETHOD.                    "handle_data_changed

  METHOD check_input.
    DATA: ls_input TYPE lvc_s_modi.
    READ TABLE im_data_changed->mt_good_cells INTO ls_input
                       WITH KEY row_id    = im_amount-row_id
                                fieldname = 'TOT_CASH_BAL'.

  ENDMETHOD.                    "check_input
ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question