03-18-2010 12:04 PM
I have an SALV output (simple list) that updates a database table based upon user action. During the user_command processing, I modify the internal table for the SALV, removing the rows that have been updated by the user, and clearing my index row table created from the get selects methods (this appears to prevent this problem in older ALV versions). Then, I do a alv->refresh( ).
Upon re-entry to the SALV display, all the data is correct, but the rows that were previously selected by the user are highlighted. For example, if the user updated row 1, I do the processing and return to the SALV display after refresh. Row 1 (formerly row 2) is now highlighted.
If the user updated rows 1 and 3, upon return to the screen 1 and 3 are still selected (were 2 and 4 before the update). . If the user updated the last row, the SALV display has no rows highlighted and cursor is on row 1, column 1, which would seem to be the correct behavior after the refresh.
SALV_DEMO* programs don't appear to handle this, and I don't find any method that will let me reset that prior user selection.
Any suggestions to correct the "memory" feature of the SALV display?
03-18-2010 12:13 PM
Hi ,
Try to free your container before clearing your alv grid.
try the below code.
CALL METHOD containername->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
CLEAR containername.
CALL METHOD grid name->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
CLEAR grid name.
Regards,
Chitra
03-18-2010 12:16 PM
Thanks, but please note the post>>>.
SALV.....simple list.....there's no container.
03-18-2010 12:43 PM
While there is no container needed for simple table lists with SALV, the reply prompted research and a different course of action:
Upon update of the database, I call method
"screen_close", then execute the ALV output subroutine again....essentially, restarting the entire output process. This solves the "remembered" rows problem.
03-18-2010 12:44 PM
03-18-2010 12:47 PM
Sorry, Chitra. I tried to award very helpful answer points, but the network will not allow that...keeps giving an error and will not allow me to mark as correct....
03-18-2010 12:55 PM