Using WRITE via a Statement Structure 

The R/3 System provides a useful facility for trying out all options and output formats of the WRITE statement and inserting them into your program. To do this, choose Edit ® Insert Statement... in the ABAP Editor and then select WRITE in the relevant dialog box:

When you have confirmed your selection with Enter, you see the following screen:

On this screen, you can

On the screen Assemble a WRITE-Statement, select the radio button Symbol and then Display. The following dialog box appears:

Here, you can choose a symbol, for example, SYM_FOLDER. The next dialog box displays the relevant WRITE statement and the resulting output on the output screen:

In addition, a note is displayed informing you that you need an include program in your program (see Displaying Symbols and Icons on the Screen).

After choosing Continue, you see that the Symbol field on the Assemble a WRITE Statement screen now contains a value:

If you now choose Execute, the following text is inserted into your program:

WRITE sym_folder AS SYMBOL.

On the Assemble a WRITE Statement screen, select the radio button Structure and enter the following in the appropriate input field:

Then, choose Select components. On the next screen, you can select the components of the ABAP Dictionary structure SFLIGHT you want to output with WRITE, for example:

If you adopt this selection, the following WRITE statement is inserted into your program:

WRITE: sflight-carrid,
       sflight-connid,
       sflight-fldate,
       sflight-price,
       sflight-planetype,
       sflight-seatsocc.