Skip to Content
0
Former Member
Jul 30, 2007 at 12:05 PM

regarding OOPS ALV..........urgent plzzzzzzzzzzzzzzz

12 Views

hi all,

i have a requirement...

in the <b>ALV GRID</b> output...i have <b>3 buttons</b> on application toolbar...

when i select some <b>5 records</b> and click on <b>BUTTON 1.</b>

first time i am selecting some rows and click <b>'SEL'f</b> function code in applicatin tool bar

get_selected_rows

retrieving values

The first column which is initially blank ...'' X" shud appear when i click first button

when <b>'DSEL'</b> is selected...the first column must again become blank.

for this ii have used followin code...

WHEN 'DSEL'.

CALL METHOD cl_gui_cfw=>flush.

CALL METHOD g_grid->get_selected_rows

IMPORTING

et_index_rows = lt_rows.

IF sy-subrc EQ 0.

LOOP AT lt_rows

INTO ls_selected_line.

lf_row_index = ls_selected_line-index.

CLEAR <fs_final>.

READ TABLE i_final

INTO <fs_final>

INDEX lf_row_index.

IF sy-subrc EQ 0.

MOVE c_space TO <fs_final>-check.

MODIFY i_final INDEX sy-tabix FROM <fs_final>

TRANSPORTING check .

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

is_layout = gs_layout

CHANGING

it_outtab = i_final

it_fieldcatalog = gi_fieldcat

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDIF.

ENDLOOP.

CALL METHOD cl_gui_cfw=>flush.

CALL METHOD g_grid->refresh_table_display.

ENDIF.

i have writeen like this