Pretty Printer

Using the Pretty Printer enables you to follow the ABAP layout guidelines more easily.

The Pretty Printer is an optional function of the ABAP Editor (for more information, see the documentation on the ABAP Editor in the ABAP Workbench Tools documentation).

To call the Pretty Printer from the ABAP Editor, choose Program ® Pretty Printer.

Here is an example of how the Pretty Printer works.

The following shows the layout of a program before using the Pretty Printer:

PROGRAM SAPMTEST.

                DATA: SUM1 TYPE I, SUM2 TYPE I, SUM3 TYPE I.

             IF SUM1 = SUM2.

       WRITE 'Case 1'.

            ELSEIF SUM1 = SUM3.   WRITE 'Case 2'.

                                                   ENDIF.

The following is the same program after using the Pretty Printer:

PROGRAM SAPMTEST.

DATA: SUM1 TYPE I, SUM2 TYPE I, SUM3 TYPE I.

IF SUM1 = SUM2.

  WRITE 'Case 1'.

ELSEIF SUM1 = SUM3.

  WRITE 'Case 2'.

ENDIF.