Internal Table EXTRACT

Definition

The table EXTRACT is the data display work table. At runtime it contains all the data which was selected from the table TOTAL in the extended table maintenance. The selection is made by the user by calling functions such as All entries read, All selected entries, or All changed entries. The data is sorted in ascending order.

The table is a formal parameter of a function module. The formal parameter EXTRACT can also be accessed via the parameter <view name_EXTRACT>, if:

  • the maintenance dialog is based on a view
  • the maintenance dialog was called from
  • the extended table maintenance transaction (SM30)
  • the function module VIEW_MAINTENANCE_CALL

Structure

For views or tables without text tables, the internal table has the structure of the view or table plus a processing and a selection flag.

INCLUDE STRUCTURE <view name> or <table name>

INCLUDE STRUCTURE VIMTBFLAGS

For tables connected to a text table via the foreign key relationship TEXT, the structure of the table comprises the structure of the entity table and the text table, plus two processing flags and a selection flag.

INCLUDE STRUCTURE <table name>

INCLUDE STRUCTURE <text table name>

INCLUDE STRUCTURE VIMTBFLAGS

The structure of the table EXTRACT is not transparent. You should define a record with this structure to access the table fields. After assigning the header line of the table EXTRACT to the structure, the fields can be accessed via the structure. You can also use the predefined internen table EXTRACT work area field symbols.

Processing and Selection flags

Each record in the table EXTRACT contains processing and selection flags. They can be read for each record in a loop over the table.

  • Processing flag: The processing flag can be accessed via the field symbol <XACT>. It indicates whether the table record is unchanged (original), changed, new or flagged for deletion.

If the maintenance dialog is based on a table with a text table, linked by the foreign key relationship TEXT, the field symbol <XACT> refers only to the entity table and not to the text table. The text table therefore has its own processing flag with the same semantics, which can be accessed via the field symbol <XACT_TEXT>.

  • Selection flag: The selection flag can be accessed via the field symbol <MARK>. It indicates whether the record is selected or not.