SAP ABAP SYNTAX FOR DELETE PART THREE

Variant 4

DELETE dbtab VERSION vers.
DELETE *dbtab VERSION vers.

Note

This variant is obsolete, since variants 1 - 3 allow you to specify the database table name dynamically.

Effect

Deletes a line in a database table, the name of which is taken from the field vers at run time. The database table must be known to the ABAP/4 Dictionary and its name must conform to the following naming convention: It must begin with 'T' and can consist of four additional characters. The field vers must contain the table name without a leading 'T'. Only lines in the current client are deleted. The line to be deleted is taken from the statically specified table work area dbtab or *dbtab .

The return code value is set as follows:

SY-SUBRC = 0 The line was deleted.
SY_SUBRC = 4 No lines could be deleted because no line existed with the specified primary key.

DELETE DYNEPRO - delete a screen

Basic form

DELETE DYNPRO f.

Effect

Deletes the screen specified in the field f .

The return code value is set as follows:
SY-SUBRC = 0 The screen was deleted.
SY_SUBRC = 4 The screen does not exist.
The contents of f consist of the 8-character program name and the 4-character screen number.

Example

DELETE DYNPRO 'SAPTESTX0100'.

DELETE - delete a data cluster 

Basic form

DELETE FROM DATABASE dbtab(ar) ID key.

Addition

... CLIENT f

Effect

Deletes the data cluster stored in the table dbtab under the area ar (constant) and the ID key (field or literal) .

Example

 TABLES INDX.
DATA: BEGIN OF TAB OCCURS 1,
        CONT(30),
      END   OF TAB.
DATA: FLD(30) TYPE C.
...
EXPORT TAB FLD TO DATABASE INDX(AR) ID 'TEST'.

You can delete this data cluster with the following statement:
 DELETE FROM DATABASE INDX(AR) ID 'TEST'.
Addition  1
... CLIENT f

Effect

Deletes the data cluster in the client specified in the table f (only with client-specific import/export databases).

Example

No comments :

Post a Comment