SAP READ TEXTPOOL ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• READ TEXTPOOL ABAP Statement
• INTO READ TEXTPOOL
• LANGUAGE READ TEXTPOOL

READ TEXTPOOL
Short Reference

ABAP_SYNTAX
READ TEXTPOOL prog INTO itab LANGUAGE lang.

What does it do?
This statement reads the text elements of the text pool of the language specified in lang and the program specified in prog from the repository and places them into the internal table itab. The previous content of itab is deleted. If the text elements cannot be read, the content of itab remains unchanged. The active text elements of the program are read by default.
prog expects a flat character-like data object, which contains the name of the program of the text elements to be read. The name is not case-sensitive. The internal table itab can have any table category and its line type must correspond to the DDIC structure TEXTPOOL.
lang expects a character-like flat data object that contains a language key with a maximum length of one character, and this value must be contained in the column SPRAS of the database table T002. If lang contains a space, the behavior is undefined.
After a successful read, itab contains the texts of the text symbols, the selection texts, the list headers, and the title from the program properties in the ENTRY column. Every text element that exists for the specified language occupies one line of the internal table and is identified uniquely by the columns ID and KEY. The column LENGTH contains the length of the text element. The table below shows the possible values of the columns ID and KEY and their meaning: IDKEYENTRY
H001 through 004List Header Column Headers
IID of a text symbolText of the text symbol
R-Program title
SName of a parameter or selection criterionSelection text
T-List Header Title bar
System Fields sy-subrcMeaning 0At least one text element was read. 4The program specified in prog or the language specified in lang does not exist or there is no text pool in the specified language.



Latest notes:

The table of program types indicates which program types support text pools. sy-subrc is always set to 4, for programs without text pools.
When handling global classes and function pools, it should be noted that the name of the master program must be specified in the repository and not the name of the class or function pool. The composition of these names is documented in the statements CLASS-POOL and FUNCTION-POOL.
For selection texts that are not taken from the ABAP Dictionary, the actual text in ENTRY is preceded by eight blanks.
Selection texts taken from the ABAP Dictionary are not stored in the text pool and cannot be read with READ TEXTPOOL. They contain a D in the first position of ENTRY. The function module RS_TEXTPOOL_READ can also be used to read the selection texts stored in the ABAP Dictionary.
ABAP_HINT_END



Example ABAP Coding

See INSERT TEXTPOOL
ABAP_EXAMPLE_END

Return to menu