Analyzing Text Symbols
When you enter text symbols in the source code of your program, they are not automatically entered in the text pool. To keep the list up to date and avoid discrepancies, use the Analyze function.
This allows you to
- Delete obsolete text symbols from the text pool
- Adopt new text symbols in the text pool
This is important for text symbols that are used in the program, but not yet included in the text pool
- Compare text symbols with the program code
Prerequisites
Suppose we have the following program for which no text symbols have yet been maintained:
PROGRAM TEXT_ELEMENTS_4.
WRITE: TEXT-010,
/'Default Text'(020),
/TEXT-030.
Procedure
From the ABAP Editor:
- Go to the text element maintenance
initial screen.
Select Text symbols and choose Analyze.
If you have not yet maintained any text symbols for the program, the following screen appears:
Since the list of text symbols is empty, the second option is selected.
Choose Edit.
The following screen appears:
Select the text symbols that you want to include in the text pool.
Choose Insert text symbol.
The selected text symbols are marked for transfer into the text pool. The following screen appears:
Use the Log function to display the changes again.
You can adopt the changes by choosing Save, or cancel them by choosing Undo.
Result
If we choose Save in our example, the system inserts the text symbols "010", "020", and "030" in the text pool. No texts are assigned to symbols "010" or "030", but the text literal defined in the program is assigned to symbol "020".
Other Functions
You can change the above program slightly to use other analysis functions.
PROGRAM TEXT_ELEMENTS_4.
WRITE: TEXT-010,
/'Default Text'(020),
/'Test_Symbol'(030).
Comparing Text Symbols with the Source Code
You can compare texts that are defined differently in the program and in the text pool as follows:
- Select Text symbols defined repeatedly/differently in program.
- Choose Edit.
In our example, the following screen would appear:
You can now replace the empty text from text symbol 030 in the text pool with the program text "test_symbol".
The third column indicates whether the text is defined in the text pool (T) or in the program (P).
- Choose Replace.
- Save
your entries.
Deleting Text Symbols from the Text Pool
Before deleting a text symbol, check its where-used list.
To delete text symbols from the text pool in the Analysis results:
- Select the first option: Text symbols which can be deleted from the text pool.
- Choose Edit.
- If text symbol "020" is no longer needed in the program, you can delete it.
- Choose Delete.