2007 Jan 11 6:39 AM
Hi friends,
How to delete a line from the table using table control. ie., I have created a check box in the table control and whenever the check box is clicked, and when I press a delete button, the line should get delete from the screen and also the corresponding line should be deleted from the database table.
Kindly guide me.
TIA.
Regards,
Mark K
Hi friends,
How to delete a line from the table using table control. ie., I have created a check box in the table control and whenever the check box is clicked, and when I press a delete button, the line should get delete from the screen and also the corresponding line should be deleted from the database table.
Kindly guide me.
TIA.
Regards,
Mark K
2007 Jan 11 6:42 AM
Hi,
Get the values of the field by using get cursor and delete the record from the DB table and refresh ur table control and pass the values again.
2007 Jan 11 6:44 AM
i think better u wud have added a one char field to ur table control and in the properties of table control ,go to W/ Sel Column - give this fieldname here like itab1-ch.
now u have to just select the row and press delete ..
demo code is as follows-
module USER_COMMAND_0300 input.
case ok_code.
when 'DELETE'.
READ TABLE tabcontrl-cols INTO cols WITH KEY screen-input = '1'.
if sy-subrc = 0.
LOOP AT itab2 INTO itab1 WHERE CH = 'X'.
DELETE itab2.
ENDLOOP.
endif.
CLEAR OK_CODE.
ENDCASE.
endmodule. " USER_COMMAND_0300 INPUT
2007 Jan 11 6:45 AM
Hi,
Check this link.
This will give you some idea eventhough I am not using checkbox there.
2007 Jan 11 6:45 AM
Hi ,
Give me ur mail id . i will send a pdf file . It is very useful .
Regards ,
Senthil
2007 Jan 11 6:55 AM
2007 Jun 21 5:51 AM
2007 Jan 11 7:12 AM
2007 Jun 21 5:53 AM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |