Skip to Content
Technical Articles
Author's profile photo Marcello Urbani

Format your code from the command line

I use diff editors quite a bit when I peer review a new development or try to remember what I did yesterday. And I get really annoyed by code formatting changes

Don’t get me wrong, I use the pretty printer all the time, and think is a great idea to do so. But works much better if everybody has the same case and indentation¬† settings.

Which is pretty easy to enforce for the future, not so much for the past.

Enter abapPretty , a small command line utility I just wrote to fix this.


Will convert something like this:

into this:


At the moment only supports classes, interfaces, includes, programs and function groups. Which make up about 99% of my non-generated codebase. And formats them with the standard ADT, plan to add abaplint support in the near future.

PS: you might need this to use it on a pre-7.51 system

As usual, use at your own risk, and don’t try this before you backed up your code!

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.