on 04-10-2006 12:52 PM
hi,
i have a alv report with check boxes,
can any one say how to delete the row for the corresponding checked rows.
hi,
place your own button in tool bar, and handle it in the user_command.
delete the entries from itab where checkbox is checked.
Regards
vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
give In REUSE_ALV_LIST_DISPLAY
I_CALLBACK_USER_COMMAND = P_USER_COMMAND
FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = C_DELETE. where CONSTANTS : C_DELETE(6) TYPE C VALUE 'DELETE',
READ TABLE IT_ITAB WITH KEY REC_SEL = C_X.
LOOP AT IT_MARA WHERE REC_SEL = 'X'.
MOVE-CORRESPONDING IT_ITAB TO IT_TEMP.
APPEND IT_TEMP.
CLEAR IT_TEMP.
ENDLOOP.
where it_temp IT_TEMP TYPE STANDARD TABLE OF itab WITH HEADER LINE,
DELETE ITAB FROM TABLE IT_TEMP.
HOPE THIS HELPS
PRIYA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
write user command
I_CALLBACK_USERCOMMAND = 'USERCOMMAND'.
FORM USERCOMMAND.
when 'DELETE'.
Loop at itab where chk = 'X'.
delete itab index sy-tabix.
Endloop.
ENDFORM>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Charles,
As your Check Box is a part of the internal table,
you can simply use
DELETE ITAB WHERE COLUMN (Check Box) = 'X'.
After that refresh the table display, by REFRESH_TABLE_DISPLAY if you using OO ALV, or call the REUSE function again to refresh the data on the screen.
Regards,
Ravi
Note : Please mark the helpful answers
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.