INSERT - Insert text elements
INSERT TEXTPOOL prog ...FROM itab ...LANGUAGE
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 .
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'.
TAB-ID = 'I'. TAB-KEY = '200'. TAB-ENTRY = 'Tax'.
TAB-ID = 'H'. TAB-KEY = '001'. TAB-ENTRY = 'Name Age'.
TAB-ID = 'S'. TAB-KEY = 'CUST'. TAB-ENTRY = 'Customer'.
TAB-ID = 'R'. TAB-KEY = SPACE. TAB-ENTRY = 'Test program'.
SORT TAB BY ID KEY.
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.
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.
The component LENGTH (see text elements
) for the length of a text element does not have to be set
explicitly. In this case - as in the example - the actual length of the
text element is used.
The value of LENGTH cannot be smaller than the text to which
it applies. If your length specification is too short, it is ignored by
INSERT and the actual length is used instead.
On the other hand, larger values are allowed and can be used to reserve
space for texts that may be longer when translated into other
, READ TEXTPOOL
© SAP AG 1996