Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete records in SAP R/3

Former Member
0 Kudos

Hi Experts!!!

Pls help me for this query.

How to delete or modify a record in physical database tables in SAP R/3 (standard tables) by ABAP Program?

4 REPLIES 4

former_member212002
Active Contributor
0 Kudos

if u are working on customer tables then u can use keywords like insert,update,modify or delete to update and modify the contents of the table.

but if u are working on sap standard tables then i guess u need an access key to modify or delete the contents.

raymond_giuseppi
Active Contributor
0 Kudos

Two main cases

- If these tables are standard tables, you must use BAPI, CALL TRANSACTION (or BTC) or any valid access given by SAP

- If these tables are customer tables, you may use the DELETE statement, but insure yourself the coherence of the database (don't delete an header leaving poor orphan items behind...) look for foreign key in where-used.

Also this question has already been answered many times, perform some search at sdn.

Regards

Former Member
0 Kudos

Hi Anil

You can create a normal ABAP report to delete or modify records from database table.

You can use statements such as delete or modify for this purpose.

First select the records from table bring them into internal table and use that table to delete the records from database.

Note: If you are trying to delete records from Z tables then this approch can be adopted but if you are dealing with Standard tables it`s not a option to directly delte the reocrds from database table .

For that purpose you can use BDC or any othe available FM/BAPI.

Note :When you are deleting records from the database table please use locking function module to lock the database entries.

Regards

Neha

GauthamV
Active Contributor
0 Kudos

hi,

check this.

[https://forums.sdn.sap.com/click.jspa?searchID=19034822&messageID=5070876]