Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

pretty printer

Former Member
0 Kudos

Hi,

what is the use of pretty printer

Please let know

Thanks

Ali

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

pretty printer is used to allign the code

for eg

do 10 times.

if sy-tabix = 10.

write:/'Hai'.

endif.

enddo.

after pretty printer it wil become

do 10 times.

if sy-tabix = 10.

write:/ " Hai".

endif.

enddo.

so it can tell u clearly where the loop starts and where it ends

same as if you have nested if you will confused to see the code

if you do pretty printer

it wil lallign the code properly...

regards,

Venkatesh

10 REPLIES 10

amit_khare
Active Contributor
0 Kudos

Refer the links -

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Hi Shaik,

As the name suggest.

It is for good looking code :).

Regards,

Atish

Former Member
0 Kudos

HI,

pretty printer is used to allign the code

for eg

do 10 times.

if sy-tabix = 10.

write:/'Hai'.

endif.

enddo.

after pretty printer it wil become

do 10 times.

if sy-tabix = 10.

write:/ " Hai".

endif.

enddo.

so it can tell u clearly where the loop starts and where it ends

same as if you have nested if you will confused to see the code

if you do pretty printer

it wil lallign the code properly...

regards,

Venkatesh

Former Member
0 Kudos

Hi,

->Pretty printer will make your code more readable....

->it will arrange the code in the standard format

<b>reward points if useful.</b>

regards,

Vinod Samuel.

Former Member
0 Kudos

Hi,

As said above, it makes ur code more readable.

To configure the settings of ur Pretty Printer (in SE38 for ex) go to:

Utilities -> Settings -> ABAP Editor -> Pretty Printer

Reward if usefull.

Regards,

Amine

Former Member
0 Kudos

Hi

whenever you can write the program yours likely (means your program code is not looking good or not looking ordered)

So whenever you click the pretty printer your program code is looking good.

for example:

If

......................

elseif

..............

endif.

after you can click the pretty printer its come to ordered

if

...................

elseif

...................

endif.

So whenever you can click the pretty printer your program is looking good

Former Member
0 Kudos

Hi,

You can use the Pretty Printer function to standardize the layout of your program

http://help.sap.com/saphelp_nw04/helpdata/en/d1/801ad6454211d189710000e8322d00/frameset.htm

Reward points If Usefull

Regards

Fareedas

Former Member
0 Kudos

hi,

- The use of the pretty printer is that it standardize the layout of the program according to option we select either entire program to upper case letters or to lowercase letters.

It doesnot break the loops that continue in single line.

Former Member
0 Kudos

Hi,

Pretty printer is used for improving the readability of the program.

Regards,

Former Member
0 Kudos

hi,

The pretty printer alligns your code perfectly, its like identation automatically and also can be used to capitalizes all the ABAP keywords.

You can use the Pretty Printer function to standardize the layout of your program. This function arranges associated key words in groups and indents individual statements clearly. The Pretty Printer ensures that your program layout meets the guidelines described in the ABAP User's Guide.

Features

The Pretty Printer performs the following functions:

  • Standardizes the source code display according to the options you set (upper-/lowercase).

  • Places event, control, and INCLUDE key words on separate lines.

  • Moves event key words, FORM statements, and MODULE statements to the beginning of the line. In this case, the Pretty Printer function uses the first program line as a reference.

  • Inserts a blank line before event key words that are not preceded by a blank or a comment line.

  • Indents all command lines and control structures associated with an event by 2 spaces.

  • Locates commands that extend beyond one line and writes subsequent commands on a new line.

  • Inserts appropriate comment blocks before FORM and MODULE statements that do not have comments. The Pretty Printer function uses the routine name and the USING parameter to fill in the comment blocks.

  • Left-justifies comments that appear in command lines. Left-justification is only performed on comment lines of 32 characters or less that begin with " (double-quotes). Pretty Printer starts the comment at column 40.

The Pretty Printer does not break down loops and control processing blocks that are contained on a single line. Also, the Pretty printer does not separate statements associated with a WHEN condition if the WHEN statement is contained on one line. To call the pretty printer, select Program ® Pretty Printer.