We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
DELETE ${ FROM target $[
connection$] $[
WHERE sql_cond$] $[db_hints$]
$[ORDER BY ... $[OFFSET o$]$] $[UP TO n ROWS$] $}
$| ${ target $[
connection$] FROM source $}
$[MAPPING FROM ENTITY$].
1. DELETE FROM target ...
2. DELETE target FROM source.
3. ... MAPPING FROM ENTITY.
The statement DELETE deletes one or more rows from the DDIC database table or DDIC table view specified in target. The rows to be deleted can be specified as follows:
The addition connection can be used to specify a
secondary connection.
System Fields
The statement DELETE sets the values of the system fields sy-subrc and sy-dbcnt.
sy-subrc | Meaning |
0 | In the variant DELETE FROM target, at least one row was deleted if a WHERE condition was specified and all or n rows were deleted if no condition was specified. In the variant DELETE target FROM, the specified row was deleted if a work area was specified in source and all specified rows were deleted if an internal table was specified in source or the internal table is empty. |
4 | In the variant DELETE FROM target, no row was deleted if a WHERE condition was specified or no row was deleted if no condition was specified, since the database table was already empty. In the variant DELETE target FROM, no row was deleted if a work area was specified in source or not all specified rows were deleted if an internal table was specified in source. |
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.
DELETE FROM target ...
In the variant DELETE FROM target, either all rows are deleted or the rows to be deleted are restricted using a WHERE condition or additions ORDER BY, OFFSET, and UP TO.
Deletion of a row in a DDIC database table. The row is specified using a WHERE condition.
DELETE target FROM source.
In the variant DELETE target FROM, either a row specified by a work area is deleted or multiple rows specified by an internal table are deleted.
Deletion of a row in a DDIC database table. The row is specified using a work area.
... MAPPING FROM ENTITY.
The addition MAPPING FROM ENTITY is used to handle structures and internal tables that are typed with BDEF derived types. Find more information in the topic ABAP SQL Statements with MAPPING FROM ENTITY.
Leave us your contact details and we will call you back. Fields marked with * are mandatory.
We offer holistic SAP solutions from a single source to shape digital change and develop new business areas.
Switzerland
Schaffhausen
Germany
Mannheim, Düsseldorf, Munich
USA
Haverhill
Greece
Thessaloniki