READ - Read text elements

Basic form

READ TEXTPOOL prog ... INTO itab ... LANGUAGE lg.


Parts marked with " ..." are interchangeable

Addition:

... STATE state

Effect

Reads the text elements for the program prog and the language lg from the library into the internal table itab. The line structure of the table itab is described in the section on text elements.

The Return Code is set as follows:

SY-SUBRC = 0:
Text elements were read.
SY-SUBRC <> 0:
Unable to read text elements.

Example

Read text elements for the program PROGNAME:

DATA: PROGRAM(8) VALUE 'PROGNAME',
      TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.

READ TEXTPOOL PROGRAM INTO TAB LANGUAGE SY-LANGU.

Addition

... STATE state.

Note

This addition is intended for internal use. SAP reserves the right to make changes, which may be incompatible, at any time.

Effect

The STATE addition indicates whether you want to read the active or inactive version of the text pool. state may have the value A for active, or I for inactive. Inactive text elements are only visible to the user curretly working on them. All other users work with the active version.

In the ABAP Workbench, you can define a list of objects being edited by each user. These objects are saved in their inactive state until the user activates them. If you omit the STATE addition, the system reads the inactive version of these objects, and the active version of all other objects.

Since this set of objects is only available at short notice in the ABAP Workbench, you can be sure that other programs using the READ TEXTPOOL statement without the STATE addition always read "active" text elements.

Exceptions

Non-Catchable Exceptions

Related

INSERT TEXTPOOL, DELETE TEXTPOOL