SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

Delete All Data from SAP Database Table

ABAP developers can delete all data from SAP database table using one of two methods. First method is to create an ABAP program which runs DELETE ABAP command to remove all data from database table. And the second method is to use SAP transaction SE14 ABAP Dictionary Database Utility to delete data from ABAP table.

As summarized in introduction of this ABAP tutorial, SAP developers or SAP professionals can choose one of two methods to delete data from database table.
To run ABAP program which includes the ABAP statement DELETE or to call SAP transaction SE14 Database Utility.


Execute DELETE Command to Remove Data from ABAP Table

Create a custom ABAP report and execute following ABAP program code.
"DELETE FROM [tablename]" ABAP code deletes all rows from database table.

delete from Z_TR_PFORM_H.
Code

I want to truncate table data for the following ABAP table

SAP table to delete all its data using ABAP program

After I execute "Delete From" command, as seen in below screenshot all data is deleted.

delete SAP table data using ABAP


SAP Transaction SE14 to Delete Data from Database Table

Use SAP transaction code SE14 "ABAP Dictionary: Database Utility" SAP screen.

Here is my demo table which I want to delete all entries in it.

delete data from ABAP database table using SE14 utility

Type the ABAP database table name and press Enter

remove all table data using SE14

Be sure that you select option "Delete data"
Then press "Activate and adjust database" button.

SAP SE14 transaction: Utility for database tables

A confirmation request will be displayed to delete table data and truncate all data in the database table. Approve the deletion by pressing Yes

Adjust and Delete data from ABAP table using SE14

When I check the number of records in the database table using SE11, the query returns 0 entries.

delete table data using SE14 transaction in SAP



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.