cancel
Showing results for 
Search instead for 
Did you mean: 

deleting entries from table by using internal table

Former Member
0 Kudos

Hi All,

In my application i've table.. when user selects single row and clicks on delete

entries are getting deleted from internal table but its not deleting in Database.

please let me know how how delete the particular entry from the table.

regards

Suprith

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

Write the ABAP update/modify statement to make the changes in DB table according to the internal table. Write it in the ONACTIONDELETE method.

Regards

Arjun

P.S: These types of questions should be asked in ABAP,general forum.

Answers (3)

Answers (3)

uday_gubbala2
Active Contributor
0 Kudos

Hi Suprith,

This is more of an general ABAP query rather than a WDA one.. You need to incorporate the below code within your delete buttons action handler.

You seem to have allowed only single row selection & deletion by the user so you can just make use of a workarea for the same. Fetch the selected row information into your workarea & say as:

DELETE <db> FROM <workarea>.
COMMIT WORK.

If you are however allowing the user to select & delete multiple rows then fetch all the row information into an internal table and say as:

DELETE <db> FROM TABLE <Internal table>.
COMMIT WORK.

However please keep it in mind that you are not supposed to directly delete data from a database table in this manner. This information is just for your practice purpose.

Regards,

Uday

Former Member
0 Kudos

HI,

Write the delete sataement."DELETE <db> FROM TABLE <Internal table>.

Write it in the ONACTIONDELETE method.

former_member226203
Active Contributor
0 Kudos

u can use MODIFY.

MODIFY ztable from itab. "here ztable is a custom table and itab is the internal table