2014 Apr 29 10:38 PM
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.
2014 Apr 29 10:43 PM
Try registering event
CALL METHOD tf_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
as well.
2014 Apr 29 10:46 PM
Hi Daniel I put this method in PAI but the filed remains empity.
2014 Apr 29 10:55 PM
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...
2014 Apr 29 11:28 PM
2014 Apr 30 8:18 AM