SAP NetWeaver AS ABAP Release 750, ©Copyright 2016 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Open SQL → Open SQL - Write Accesses →
DELETE dbtab
Syntax
DELETE { {FROM
target [WHERE sql_cond]}
| {
target FROM source} }.
Effect
The statement DELETE deletes one or more rows from the database table or
classic view specified in target.
The rows that are to be deleted are declared either in a WHERE condition
sql_cond or with data objects in source.
System Fields
The statement DELETE sets the values of the system fields sy-subrc and sy-dbcnt.
sy-subrc | Meaning |
0 | When the WHERE condition was declared, at least one row was deleted. When a work area in source was declared, the declared row was deleted. In the declaration of an internal table in source, all declared rows were deleted or the internal table is empty. If no conditions were declared, all rows were deleted. |
4 | When a WHERE condition or a work area in source was declared, no rows were deleted. When an internal table in source was declared, not all of the specified rows were deleted. If no conditions were specified, no rows were deleted, since the database table was already empty. |
The statement DELETE sets sy-dbcnt to the number
of deleted rows. If an overflow occurs because the number or rows is greater than 2,147,483,647, sy-dbcnt is set to -1.
Notes