ABAPDELETE_WHERE - DELETE WHERE

Addresses (Business Address Services)   PERFORM Short Reference  
This documentation is copyright by SAP AG.

DELETE dbtab - cond

Short Reference



Syntax

... WHERE sql_cond.

Effect

The WHERE addition uses a logical expression sql_cond to specify which rows are deletedfrom the database table. The same rules apply to the logical expression sql_cond as to the WHERE condition of the SELECT statement, with the exception that subqueries cannotbe evaluated in the database table to be changed. If there is no row in the database that fulfills theWHERE condition, a row is not deleted and sy-subrc is set to 4. If a WHERE condition is not specified, all rows are deleted.

Example

All of an airline's flights that are scheduled for today and in which no seats are occupied are deleted from database tableSFLIGHT (also see the example for dtab-source).

PARAMETERS p_carrid TYPE sflight-carrid.

DELETE FROM sflight
WHERE  carrid = p_carrid AND
       fldate = sy-datum AND
       seatsocc = 0.


SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.


Length: 1672 Date: 20120522 Time: 050443     triton ( 114 ms )