Comparing Text Symbols

If you insert new text symbols or change existing ones in the program code, these text symbols are not automatically copied to the text pool. To update this list and to eliminate any discrepancies, choose Text symbols and the function Compare on the ABAP Text Elements screen.

After calling this function for a program, the system displays a screen showing all the text symbols which occur in the program code with their texts as defined in the program and in the text pool. On the right, you can see whether these texts are the same ("P=T") in the program and in the text pool. If the texts are not the same, the texts in the text pool are flagged with T and the texts defined in the program are flagged with P.

In the column +/- you can specify

If you choose Adjust, the system refreshes the text symbols in the text pool according to these settings. It does not change the program code.

The system offers you a further possibility for comparing text symbols. You can double-click on literals in WRITE statements where the numbers of text symbols are given in parentheses. If the contents of literal and text symbol are not the same, the system asks you, whether you want to replace the contents of the text symbol with the contents of the literal.

The following example shows how to work with the function Compare with text symbols.

Write the following program:

PROGRAM SAPMZTST.

WRITE: TEXT-010,
'Placeholder'(020),
TEXT-030.

Create no text symbols. The text symbol list is empty. After choosing Compare for Text symbols on the ABAP Text Elements screen, the system generates the program (if necessary) and displays the following picture:

The text symbols 010, 020, and 030 specified in the program are not defined in the text pool. To copy all the text symbols to the text pool, keep the symbols "+" in the column +/- and choose Adjust. When you have done this, the text symbol list looks as follows in display mode:

The system has created the text symbols 010, 020, and 030 in the text pool. It has assigned no text to 010 and 030, and the text defined in the program to 020. Now you can change the text symbols as described in Text Symbols.

Change the program code to

PROGRAM TEXTTEST.

WRITE:  TEXT-010,
'Placeholder'(020),
'Text Symbol'(030).

Again choose Compare for Text symbols on the ABAP Text Elements screen. Now the comparison looks as follows:

First, you see the two correctly defined text symbols 010 and 020 and then the message that the texts are different for text symbol 030 in the text pool and in the program. The "+" and "-" symbols allow you to define which text you want to keep.