2008 Jul 29 6:24 AM
Hi all,
I am displayed database table records in a table created
using "screen painter" .
My request is if i select one record and press delete button
means then the selected record should be deleted.
I did this but the data was not deleted, because i dont
know how to set 'X' to "Mark" variable. i have created this
Mark in screen painter.
Can any one help me how to set 'X' to a selected row and delete the corresponding row....
regards
Ranjith
2008 Jul 29 6:31 AM
Hi,
Deleting a set of lines
LOOP AT TAB_DEST WHERE K = KVAL.
DELETE TAB_DEST.
ENDLOOP
DELETE TAB_DEST WHERE K = KVAL.
Deleting a sequence of lines
DO 101 TIMES.
DELETE TAB_DEST INDEX 450.
ENDDO.
DELETE TAB_DEST FROM 450 TO 550.
Reward Points if useful
Raghunath.S
9986076729
Hi all,
I am displayed database table records in a table created
using "screen painter" .
My request is if i select one record and press delete button
means then the selected record should be deleted.
I did this but the data was not deleted, because i dont
know how to set 'X' to "Mark" variable. i have created this
Mark in screen painter.
Can any one help me how to set 'X' to a selected row and delete the corresponding row....
regards
Ranjith
2008 Jul 29 6:26 AM
2008 Jul 29 6:30 AM
hi,
set the internal table field to the mark field. so that when ever u mark it then the field in the internal table will be updated to X . so by reading u can delete the record from internal table.
rgds.,
subash
2008 Jul 29 6:31 AM
Hi,
Deleting a set of lines
LOOP AT TAB_DEST WHERE K = KVAL.
DELETE TAB_DEST.
ENDLOOP
DELETE TAB_DEST WHERE K = KVAL.
Deleting a sequence of lines
DO 101 TIMES.
DELETE TAB_DEST INDEX 450.
ENDDO.
DELETE TAB_DEST FROM 450 TO 550.
Reward Points if useful
Raghunath.S
9986076729
2008 Jul 29 6:31 AM
2008 Jul 29 6:40 AM
hi ranjith,
You created mark in the screen painter means you also included that field in the internal table, if not you a include a field called mark in the internal table ,
DATA : Begin of i_tab occurs o,
mark type c,
end of i_tab.
Then follow like this ,
when you select the field that record automatically updated by X in the interal table so after that what you do is
case sy-ucomm.
when 'DELETE'
LOOP AT I_TAB WHERE MARK = 'X'.
DELETE IT_TAB.
ENDLOOP.
hope this wil solve your problem,
Reward if it is usefull,
Regards,
KP
2008 Jul 29 6:42 AM
2008 Jul 29 6:44 AM
hiiii
you can use delete statement for internal table and its records like follows
LOOP AT ITAB WHERE MARK = 'X'.
DELETE ITAB.
ENDLOOP.or if you want to delete record at particular index then use
DELETE itab INDEX wa_index.regards
twinkal
2008 Jul 29 6:44 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |