Application Development and Automation 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: 
Read only

ALV - OO - editable fields dynamically

fabio_passoni
Explorer
0 Likes
1,301

Friends!

I have a ALV program - OO with an editable field dynamically, with controls for lines.

______________________________________________________________________


PBO


     wa_stilo-fieldname = 'VALOR'.

     wa_stilo-style cl_gui_alv_grid=>mc_style_enabled.

     INSERT wa_stilo INTO TABLE wa_oper-celltab.

     MODIFY t_oper FROM wa_oper INDEX l_tabix TRANSPORTING celltab.



   CALL METHOD oref_alv->set_ready_for_input

     EXPORTING

       i_ready_for_input = 1.


___//___



SET HANDLER g_application->handle_data_changed FOR oref_alv.


CALL METHOD oref_alv->register_edit_event

     EXPORTING

       i_event_id = cl_gui_alv_grid=>mc_evt_enter.

   CALL METHOD oref_alv->register_edit_event

     EXPORTING

       i_event_id = cl_gui_alv_grid=>mc_evt_modified.


_____________________________________________________________________


PAI



WHEN c_save.

       CALL METHOD oref_alv->check_changed_data

         IMPORTING

           e_valid   = lv_valid

         CHANGING

           c_refresh = lv_refresh.

       PERFORM salva_dados.

       CALL METHOD oref_alv->refresh_table_display

         EXPORTING

           is_stable = lvc_s_stbl.

______________________________________________________________________



The value of editable field is only updated in case my inner table of a "ENTER" in the editable field!

Should fill the field and do not give "ENTER" and go on "SAVE" button it only works the first time! I enter the screen!

from the next time he does not work anymore!

debugging:

From the second time the method

CALL METHOD oref_alv-> check_changed_data

It does not work!

Does anyone have a help!



3 REPLIES 3
Read only

rosenberg_eitan
Active Contributor
0 Likes
810

Hi,

Have look at program BCALV_TEST_GRID_EDITABLE .

Check the way the method REGISTER_EDIT_EVENT is used .

Also look at the demo program in package SLIS.

Regards.

Read only

0 Likes
810

Eiltan

1 -- I will check the prog. example

2 -- yes I am using the method to record the event.

Read only

0 Likes
810

Hi,

BCALV_TEST_GRID_EDITABLE is NOT using "cl_gui_alv_grid=>mc_evt_enter" and "cl_gui_alv_grid=>mc_evt_modified" at the same time.

Regards.