cancel
Showing results for 
Search instead for 
Did you mean: 

Mass delete records in SAP

Former Member
0 Kudos

Hi,

I am just wondering if anyone can tell me how to mass delete the record in SAP. I mistakenly uploaded like 500 values in a wrong table and want to delete them.

Thank you in advance,

Sunny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If u want to delete records in ZTEST table.

Then u can do as

Select * from ztest into table i_ztest.

if sy-subrc = 0.

Delete ztest from TABLE i_ztest.

endif.

Or if u have any dtae field in the table can do as

TABLES SBOOK.

DELETE FROM SBOOK WHERE CARRID = 'LH'

similarly u can give the where conditon with the specified date.

Do a COMMIT after u delete.

Also check

http://help.sap.com/saphelp_46c/helpdata/en/7e/c81e1f52c511d182c50000e829fbfe/frameset.htm

http://www.sapdevelopment.co.uk/abap/bypass/bp_updtable.htm

Thanks & Regards,

Judith.

Answers (1)

Answers (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

What table? Custom table? SAP table? How did you upload them. If sap table, must likely you used a transaction, if this is the case, then there is probably a transaction to delete them. If a custom table, then you would write a short program to select these records and delete. More infomation is required to point you in the right direction.

Regards,

Rich Heilman