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

Update internal table.

ronaldo_aparecido
Contributor
0 Likes
823

Hi Gurus.

I have a program MODULE POOL and he call ALV OO.

PROCESS BEFORE OUTPUT.

   MODULE status_9400.

   MODULE inicializa_dados_9400.

   MODULE set_alv_atributos_9400.

   MODULE inicia_objetos_9400.

   MODULE show_alv_9400.

PROCESS AFTER INPUT.

   MODULE user_command_9400.

   MODULE exit_command_9400 AT EXIT-COMMAND.



*&---------------------------------------------------------------------*

*&      Module  SHOW_ALV_9400  OUTPUT

*&---------------------------------------------------------------------*

MODULE show_alv_9400 OUTPUT.

DATA: e_posicao TYPE lvc_s_stbl.

*- Gerando o objeto do ALV

  IF vg_grid8 IS INITIAL.

    CREATE OBJECT vg_grid8

      EXPORTING

        i_parent      = vg_contain8

        i_appl_events = c_x.

    CALL METHOD vg_grid8->set_table_for_first_display

      EXPORTING

        is_variant           = wa_variante

        i_save               = c_a

*        i_default            = c_x

        is_layout            = wa_layoutcl

        is_print             = wa_printcl

        i_buffer_active      = space

        it_toolbar_excluding = t_excludingcl

      CHANGING

        it_fieldcatalog      = t_fieldcatcl[]

        it_outtab            = pt_alv_itm_ata_ex

        it_sort              = t_sortcl.

    IF sy-subrc NE 0.

*-    ERRO na execução do ALV

      MESSAGE e007(zbc001).

    ENDIF.

    CLEAR t_f4.

    PERFORM f_det_fldswtf4_8 USING 'ZITEM_ATA' CHANGING t_f4.

    PERFORM f_set_events_ata_ex.

  ENDIF.

  vg_grid8->set_ready_for_input( ).

  e_posicao-row = c_x.

  e_posicao-col = c_x.

  CALL METHOD vg_grid8->refresh_table_display

    EXPORTING

      is_stable = e_posicao.

*

  CALL METHOD vg_grid8->register_edit_event

    EXPORTING

      i_event_id = cl_gui_alv_grid=>mc_evt_modified.

endmodule.

My problem Is :When I insert data in field of screen and  click in OK in PAI module the filed appears empity in internal table  ,but I insert data in Screen .

How Can I show the data insert in screen , in my internal table Too.?

Thanks Gurus.

5 REPLIES 5
Read only

Former Member
0 Likes
792

Try registering event

  CALL METHOD tf_grid->register_edit_event
    EXPORTING                                             
      i_event_id = cl_gui_alv_grid=>mc_evt_enter.

as well.

Read only

0 Likes
792

Hi Daniel I put this method in PAI but the filed remains empity.

Read only

0 Likes
792

Try registering the events before calling set_table_for_first_display and add this after calling the ALV:

  SET HANDLER g_application->handle_tf_user_command FOR
              tf_grid.
  SET HANDLER g_application->handle_tf_data_changed FOR
              tf_grid.
  SET HANDLER g_application->handle_tf_data_changed_finish FOR
              tf_grid.


I know, ALVs can make you nuts...

Read only

0 Likes
792

HI

worked with

  CALL METHOD vg_grid8->check_changed_data.




Read only

0 Likes
792

So your problem is resolved? Glad to hear.