Data Clusters

A data cluster is a group of several data objects. It can contain elementary fields, field strings and internal tables.

You can write a data cluster to the global ABAP memory with EXPORT or read it from there with IMPORT. In addition, you can use the same statements to write to or read from a database table.


Structure of a database table for storing data clusters

The database table is divided into logically related areas, each identified by a two-character name. You can export a data cluster to one of these areas under a freely definable key and re-import it from there.

A table suitable for exporting or importing data clusters must have a standardized structure which satisfies the following rules:

In addition, you should note the following points:

The table INDX can be considered as an example of a table that is suitable for storing data clusters (to view this, go into the ABAP/4 Dictionary, enter the table and select Dictionary → Tables → Display). It has the following structure:

Field   Key  Type   Length  Short text
------------------------------------------------------------
MANDT    x   CLNT      3    Client field
RELID    x   CHAR      2    Area ID
SRTFD    x   CHAR     22    User-defined key part
SRTF2    x   INT4     10    Last key field
LOEKZ        CHAR      1    Field to be explicitly specified
SPERR        CHAR      1       "      "       "        "
AEDAT        DATS      8       "      "       "        "
USERA        CHAR     12       "      "       "        "
PGMID        CHAR     40       "      "       "        "
BEGDT        DATS      8       "      "       "        "
ENDDT        DATS      8       "      "       "        "
CLUSTR       INT2      5    Next to last data field
CLUSTD       LRAW   2886    Last data field