Skip to Content
0
Former Member
Jun 30, 2009 at 05:35 PM

ALV refresh with the Old Data

161 Views

Hi All,

I have a question with OO ALV. I have an Editable ALV output which contains around 10 fields. In the output the User can Edit/Insert/Delete the Records, and on the application tool bar I have a button (CHANGE)by which the user can swtich between the change and display mode of ALV.

Once the ALV list is displayed, when the user click on change the output is open for Editing. Lets say the user deletes the record, and again clicks on the change(which should take to display) by giving the message "Changes made will be lost" and the old data should get displayed.

The logic i followed is,

1. displayed the ALV.

CALL METHOD gr_grid->set_table_for_first_display

EXPORTING

it_toolbar_excluding = gt_exclude

is_layout = gs_layout

CHANGING

it_fieldcatalog = pt_fieldcat

it_outtab = pt_outtab[].

2. when I click on the change button, the ALV is set for Edit using

CALL METHOD gr_grid->set_ready_for_input

EXPORTING

i_ready_for_input = 1.

lets say, now the record in the output is deleted, and I clicked on Change again, which should take me to display with the old data.

can you help me in displaying the old data.