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: 

ALV with Objects - repost.

Former Member
0 Kudos

Hi Gurus

I have an internal table displayed using ALV - OOPS concept. THe internal table has 15 rows in my test program but it can go up depending on user inpout.

I am able to display it . on the screen . One of the fields is editable . It is required that it take input from user and on pressing enter , the value entered in that cell should be subtracted from a total amout displayed in the cell next to it.

I have used the following code . There are no errors , but nothing happens when I edit it. The screen remains as it is.

Any help will be very useful

DATA : ITAB type ITABT occurs 0.

DATA : itab_w like line of itab.

CLASS LCL_EVENTS_D0100 IMPLEMENTATION.

METHOD handle_data_changed.

DATA: ls_good TYPE lvc_s_modi.

DATA : L_PLANETYPE TYPE ITABT-SEL_QUANT.

LOOP AT er_data_changed->mt_good_cells INTO ls_good.

CASE ls_good-fieldname.

  • check if column PLANETYPE of this row was changed

WHEN 'SEL_QUANT'.

CALL METHOD pr_data_changed->get_cell_value

EXPORTING

i_row_id = ls_good-row_id

i_fieldname = ls_good-fieldname

IMPORTING

e_value = l_planetype.

ENDCASE.

LOOP AT ITAB INTO ITAB_W .

read table itab into itab_w WITH KEY FINDEX = LS_GOOD-ROW_ID .

itab_w-f_balquant = itab_w-f_balquant - l_planetype.

modify itab FROM itab_w .

endloop.

ENDLOOP.

ENDMETHOD.

ENDCLASS.

1 REPLY 1

Former Member
0 Kudos

You have to use a method 'Refersh_table_display' to refresh the onscreen contents of your report.

The method should be in same class that you use for 'set_table_for_first_display' method.