If you don't take some pride in your work, it probably shows - in that same work. Doesn't even matter what you do. In Abap, there's beauty prizes to be won too - even though the end customer may never get to see them. I found that the pretty printer is a nice way to produce readable coding, but it lacked a personal touch, so I've introduced the auto pimper.
This adds good looking coding blocks to your coding, using a template for the actual additions. Abap coding is turned into a document, which has clear(er) reference points that will help you move around. Don't auto-pimp as last development step. Auto pimp through the whole development process, when most of the searching and scrolling is done. Help yourself to some clear land-marks during the development phase !.
The selection screen - to get an idea of how this works. Supply the abap program name you want to be processed and adjusted coding is placed on the clipboard.
The report header is usually where a comment block is prepared and filled in with a description, version information and even the history of changes. If you have used the auto pimper on your coding before, you will probably not want to overwrite the report header just to refresh pimped coding. The checkox is there to avoid overwriting report header comments.
If my template is not to your likings/taste/customer guidelines, simply apply your own ! And if you do compose a good looking one, please send it to me, so I can add other developers styles to this page.
Auto pimper
There's 2 reports you need to install: the template report and the auto pimp report. The auto pimper will read your coding, apply comment blocks and show the results in a simple (WRITE
ten) report. The comment lines that are added will be shown in white. Note that existing comment lines can be removed too, which makes applying the auto pimp functionality repeatedly over time a workable option.
To demonstrate the pimp-effect, have a look at the output from this report. It is shown as a report and it can also be placed in your clipboard.
The report shows the added comments with a white background. The actual comments are picked up from a template report which looks like this:
All comment blocks that are used/involved in the auto pimp process, are set up in the template report as macro-definitions. If there are entries you don't want to use, simply remove the macro. Alternatively move the comment coding from the macro outside the macro - which will have the same effect (but is more easy to reverse). The template above after being implemented:
Comments control
Existing comment coding blocks will be removed - if they align with so-called anchor points. This is best explained with an example: the following examples use START-OF-SELECTION
as an anchor point, where the effect is applicable on all possible anchor points (CLASS
, MODULE
, ...
).
* This comment block will be left un-touched by the auto-pimper, as * there is a blank line between comment block and anchor point: START-OF-SELECTION.
In the following example, some coding may be lost:
* This comment block will be DESCINERATED by the auto-pimper, as * there is NO blank line between comment block and anchor point: START-OF-SELECTION.
So it there are comment blocks you don't want to overwrite with the auto pimper, you know what to do. Make sure the coding blocks that live on the template have no blank lines, unless you want the auto pimper to add the block with every auto pimp run.
Clipboard ?
That's right, this report doesn't touch your report, it merely hands you a pimped version of your coding. It's up to you what to do with it. Paste it into a test report to see whether it still works and whether you are happy with the outcome. Or do a CTRL-A in your abap editor, and CTRL-V the complete code into the editor.
What about includes
The auto pimper is designed for small to medium applications. And the need for includes - on smaller applications - is unclear to me. The auto pimper will either resolve includes and hand pimped coding as if it was only for your main program, without includes OR leave the includes as-is (and apply no auto pimping to the contents of the includes).
Effectively this means you may want to get rid of some includes that your old report used before the auto pimper was applied.
Download your copy here
No strings attached. This is a get your free gooddies site, and a good one too. The first download button holds the main auto pimper report.
The following source code holds the fully functional template report. Adjust to your own needs - if needed...