DELETE - Delete a Data Cluster

Variants:

1. DELETE FROM MEMORY ID key.

2. DELETE FROM SHARED MEMORY itab(ar) ... ID key.

3. DELETE FROM SHARED BUFFER itab(ar) ... ID key.

4. DELETE FROM DATABASE dbtab(ar) ... ID key.

Variant 1

DELETE FROM MEMORY ID key.


Effect

With this statement, you again release a data cluster in the ABAP memory that was created previously using EXPORT TO MEMORY ID key . Afterwards, an IMPORT ... FROM MEMORY ID key would issue Return Code 4. The specification ID key must be a character-like data object (except for strings).

Notes

Please consult Data Area and Modularization Unit Organization documentation as well.

Related

EXPORT TO MEMORY, IMPORT FROM MEMORY

Additional help

Delete Data Cluster in theMemory

Variant 2

DELETE FROM SHARED MEMORY itab(ar) ... ID key.


Addition:

... CLIENT f (hinter itab(ar))

Effect

The data cluster that is stored (EXPORT ... TO SHARED MEMORY) in the shared memory in the table itab under the area ar (direct value) and the ID key (field or literal) is deleted.

Addition

... CLIENT f (hinter itab(ar))

Effect

The selected data cluster is deleted in the client specified in the field f (only for client-dependent import/export tables).

Variant 3

DELETE FROM SHARED BUFFER itab(ar) ... ID key.


Addition:

... CLIENT f (after itab(ar))

Effect

The data cluster that is stored (EXPORT ... TO SHARED BUFFER) in the cross-transaction application buffer of the table dbtab under the area ar (direct value) and the ID key (field or literal) is deleted.

Example

TYPES: BEGIN OF TAB_TYPE,

          CONT(30),

       END   OF TAB_TYPE.
DATA: TAB TYPE STANDARD TABLE OF TAB_TYPE WITH
               NON-UNIQUE DEFAULT KEY INITIAL SIZE 1.
DATA: FLD(30) TYPE C,
      WA_INDX TYPE INDX.
...
EXPORT TAB FROM TAB
       FLD FROM FLD TO SHARED BUFFER INDX(AR) FROM WA_INDX
       ID 'TEST'.

A data cluster created in this way can be deleted again using:

DELETE FROM SHARED BUFFER INDX(AR) ID 'TEST'.

Addition

... CLIENT f (after dbtab(ar))

Effect

The selected data cluster is deleted in the client specified in the field f (only for client-dependent import/export tables).

Example

DELETE FROM SHARED BUFFER INDX(AR) CLIENT '001' ID 'TEST'.

Variant 4

DELETE FROM DATABASE dbtab(ar) ... ID key.


Addition:

... CLIENT f

Effect

The data cluster that is stored (EXPORT ... TO DATABASE ...) in the table dbtab under the area ar (direct value) and the ID key (character-like data object except for strings) is deleted.

Example

TYPES: BEGIN OF TAB_TYPE,
         CONT(30),
       END   OF TAB_TYPE.
DATA:  FLD(30) TYPE C,
       TAB TYPE TABLE OF TAB_TYPE WITH NON-UNIQUE DEFAULT KEY,
       WA_INDX TYPE INDX.
...
EXPORT TAB FROM TAB
       FLD FROM FLD TO DATABASE INDX(AR) FROM WA_INDX
       ID 'TEST'.

A data cluster created in this way can be deleted again using:

DELETE FROM DATABASE INDX(AR) ID 'TEST'.

Addition 1

... CLIENT f

Effect

The selected data cluster is deleted in the client specified in the field f (character-like data object except for strings) (only in the case of client-dependent import/export databases).

Example

DELETE FROM DATABASE INDX(AR) CLIENT '001' ID 'TEST'.

Additional help

Delete Data Cluster in Cluster Databases.