EXTRACT

Basic form

EXTRACT fg.

Effect

Writes all fields of the field group fg (see FIELD-GROUPS) as one record to a sequential dataset (paging). If a field group HEADER has been defined, its fields prefix each record to form a sort key. You can then sort this dataset using SORT and process it with LOOP ... ENDLOOP. After this, EXTRACT cannot be executed again.

Notes

General:

  1. As soon as the first dataset for a field group has been extracted with EXTRACT, the field group cannot be expanded using INSERT. The field group HEADER, in particular, cannot be expanded after the first EXTRACT (regardless of field group).

  2. Large extract datasets are not kept in main memory; instead, they are written to an external help file. You can specify the directory in which this file is to be stored using the SAP profile parameter DIR_EXTRACT. By default, the system uses the SAP file directory SAP profile parameter DIR_DATA).


Exceptions

Non-Catchable Exceptions

Additional help

Filling an Extract with Data