ABAP Keyword Documentation → ABAP − Reference → Processing External Data → Data Cluster → EXPORT → Export/Import Tables
SQL access to export tables/import tables
Export/import tables are relational databases defined in ABAP Dictionary. This means that, in principle, SQL statements can also be used to access export tables/import tables.
To use SQL statements on export tables/import tables effectively, the special structure of these tables must be respected.
It is not a good idea to perform reads or writes on the fields that manage the data cluster, such as
CLUSTD or SRTF2 and CLUSTR. These fields contain the data cluster in an internal format and can only
be handled correctly using the EXPORT TO DATABASE
and IMPORT FROM DATABASE
statements.
SQL statements should only be used if the corresponding combination of specific data cluster statements
would be too inefficient. The SQL statement INSERT
should never be used on export tables/import tables.
ABAP SQL statements can, in certain circumstances, be used for administrative operations on export tables/import tables, for which the data cluster specific statements are not suitable.
Other versions: 7.31 | 7.40 | 7.54
Example
An export table/import table can be searched systematically for a particular data cluster using SELECT
; at the same time, information in the freely definable columns can be evaluated.
Example
The following example deletes all data clusters of an area from the export tables/import tables DEMO_INDX_BLOB and DEMO_INDX_TABLE. Each time, all rows of the data cluster are to be deleted.
DELETE FROM demo_indx_blob WHERE relid = '..'.
DELETE FROM demo_indx_table WHERE relid = '..'.
Example
The following example demonstrates how the name and area of a data cluster can be changed in the database
tables DEMO_INDX_BLOB and DEMO_INDX_TABLE
using UPDATE
. Solving this problem using the special cluster statements would be considerably more time-consuming.
SET relid = @new_relid,
id = @new_id
WHERE relid = @old_relid AND
id = @old_id.
UPDATE demo_indx_table
SET relid = @new_relid,
id = @new_id
WHERE relid = @old_relid AND
id = @old_id.