There are many instances in which you might want to insert a symbol in a report. The most popular use of symbols is for the insertion of field-relevant pictures. For example, you could easily insert a picture of a telephone next to a column containing telephone numbers. To use local fields to insert a symbol, follow these steps:
Navigate to the main screen of the SAP Query tool, using transaction code SQ01. Select the query you want to work with (for example, DLS_QUERY_11) and then click the Change button.
Navigate to the Select Fields screen by using the white forward Next button on the Application toolbar.
Select Edit, Short Names, Switch On/Off. This allows you to create short names for your existing query fields so that you can easily refer to them in calculations. Start by giving the Flight Class field the short name CLASS.
Select Edit, Local Field, Create. Because your cursor was on the Flight Class field, a custom field is added to its field group (Flight Booking Table). The Field Definition dialog box appears.
In the Field Definition dialog box, input a short name for your newly created local field (for example, SYMBOL) and input a field description (for example, Symbol), which will be the heading for the column in the report.
Define the attributes for the field. To output a symbol, select the Symbol option (see Figure 11.3).
Figure 11.3. When you set the Attributes section to Symbol, SAP formats the field so that a black-and-white picture can be displayed.
Click the Symbols button at the bottom of the Field Definition box to bring up a list of symbols and their names (refer to Figure 11.1). Note the name of the symbol you want to use, because you will need to type it in in the next step. For example, you could select SYM_UNLOCKED, a symbol representing an item that is unlocked.
Although the Symbols in Lists dialog box has a button labeled Choose, you actually have to click the green check mark Choose button to return to the Field Definition dialog box and type your symbol name in the Calculation field (see Figure 11.4). Press Enter to return to the SAP query.
Figure 11.4. The SYM_UNLOCKED symbol typically represents an item that is unlocked.
To add the newly created field to your report output, confirm that the field is selected on the Select Field screen. In other words, the small box to the right of the Symbol field at the bottom of the Flight Booking field group should be selected.
Navigate to the Basic List Line Structure screen by clicking the Basic List button on the Application toolbar. You should see your newly created field listed there. Add the new local field to your report output on the Basic List screen of the SAP Query tool by using the skills you learned in Chapter 3 (indicating a line and sequence number). Click the Save button on your SAP query.
Execute your report by clicking the F8 Execute button; you are presented with the SAP query's standard selection screen. Click the F8 Execute button again to see your updated SAP query, which now contains your newly added symbol (see Figure 11.5).
Figure 11.5. The added symbol field appears in the report output in the last column, as indicated on the Basic List Line screen.