‎2008 Sep 26 1:04 PM
where is the mistake in this coding
data: grid1 TYPE REF TO cl_gui_alv_grid.
MODULE user_command_0100 INPUT.
case ok_code.
MOVE: lips-vbeln TO wa_input-vbeln,
lips-posnr TO wa_input-posnr,
lips-sernr TO wa_input-sernr.
APPEND wa_input TO lt_input.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ZSERIALNO_INPUT'
is_layout = gs_layout
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
CHANGING
it_outtab = lt_zserialno_input
it_fieldcatalog = lt_fct
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
when 'DELETE'.
CALL METHOD grid1->get_selected_rows
IMPORTING
et_index_rows = lt_selected_rows.
endcase.
endmodule.
yesterday it worked but now the table lt_selected_rows is always initial.
‎2008 Sep 26 2:27 PM
while creating the Grid object did you set the
parameter to 'X'
create object grid
exporting
i_parent = custom_container
i_appl_events = 'X'. "Set this...
if not Set it and Try it once.
‎2008 Sep 26 1:18 PM
Hi,
Call the
method grid1->set_table_for_first_display
outside the Case andif it not works flush the layout each time.
CALL METHOD cl_gui_cfw=>flush.Regards,
Nandha
‎2008 Sep 26 2:27 PM
while creating the Grid object did you set the
parameter to 'X'
create object grid
exporting
i_parent = custom_container
i_appl_events = 'X'. "Set this...
if not Set it and Try it once.
‎2008 Sep 26 2:33 PM
sorry it works. the mistake was that i habe to append the data in
case ok_code.
when space.
then append section.
then alv display.
etc.
the problem was that the system has a initial value in lt_selected_rows when the append section is direct under case ok_code without a case section.