INSERT TEXTPOOL

INSERT - Insert text elements

Basic form

INSERT TEXTPOOL prog ...FROM itab ...LANGUAGE lg.

Parts marked with " ..." are interchangeable

Addition:

... STATE state

Effect

Assigns the text elements in the internal table itab to the program prog and the language lg and inserts them in the library. The line structure of the table itab is described in the section Text elements.

Example

The following program uses the internal table TAB to set the text elements of the program PROGNAME.

DATA: PROGRAM(8) VALUE 'PROGNAME', 
	TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE. 
 
TAB-ID = 'T'. TAB-KEY = SPACE.  TAB-ENTRY = 'Sales'. 
APPEND TAB. 
TAB-ID = 'I'. TAB-KEY = '200'.  TAB-ENTRY = 'Tax'. 
APPEND TAB. 
TAB-ID = 'H'. TAB-KEY = '001'.  TAB-ENTRY = 'Name   Age'. 
APPEND TAB. 
TAB-ID = 'S'. TAB-KEY = 'CUST'. TAB-ENTRY = 'Customer'. 
APPEND TAB. 
TAB-ID = 'R'. TAB-KEY = SPACE.  TAB-ENTRY = 'Test program'. 
APPEND TAB. 
 
SORT TAB BY ID KEY. 
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.

Note

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

Effect

Determines the state in whcih the text elements in itab are stored in the library. State may be either A (for active) or I (for inactive). Inactive text elements are only visible to the user currently editing them, All other users work with the active version.

In the ABAP Workbench, you can define a list of objects being edited for each user (for example, text elements). These objects are saved as inactive until they are activated. If you omit the STATE addition, the system uses the "inactive" state for these objecs, and t the "active" state for all other objects.

As in the example, the internal table should be sorted by the components ID and KEY to enable faster access to the text elements at runtime. However, this is not obligatory.

INSERT_REPORT_ILLEGAL_STATE: state has a value other than A or I.

Related

DELETE TEXTPOOL, READ TEXTPOOL