Does your own coding comply with the Clean ABAP guidelines?
The tool is freely available via GitHub and can be imported into SAP systems via abapGit. The check variant can be used to statically check some of the Clean ABAP guidelines, even for existing coding. However, the check variant cannot statically check all Clean ABAP guidelines, so that one check is not sufficient on its own. The check variant can be adapted in transaction SCI according to customer requirements and deviations from pure Clean ABAP. Exemption functions can also be set up.
Another version called “Code Pal for ABAP Cloud” is also available for cloud development. In the following, however, we will focus on the version for on-premise systems.
- GitHub-Link for abapGit onPremise: https://github.com/SAP/code-pal-for-abap
- GitHub-Link for abapGit Cloud Pal: https://github.com/SAP/code-pal-for-abap-cloud
- Installation instructions: https://github.com/SAP/code-pal-for-abap/blob/master/pages/how-to-install.md
First, abapGit must be set up on the SAP system to be tested. Then a new project can be created with the Code Pal for Clean ABAP. This can look something like this:
ATC test variant for the code checks
Once the GitHub project has been imported into the system, a new ATC check variant can be created for the code checks via the code inspector (for example: Z_CLEAN_ABAP).
Transaction: SCI
On the S/4HANA system on which we imported the ATC check, there were initially dumps during the ATC check:
We were able to avoid this by not excluding the following tests in the test variant:
- Branch Coverage: Y_CHECK_BRANCH_COVERAGE
- Procedure Coverage: Y_CHECK_PROCEDURE_COVERAGE
- Statement Coverage: Y_CHECK_STATEMENT_COVERAG
After this adjustment, the check could now be used in SE80 and in Eclipse to check the coding for the Clean ABAP specifications:
Call up via SE80
Result of the check:
Call in ADT for Eclipse
Result of the check:
Related topics
Clean ABAP
Modern ABAP Coding
Clean ABAP Guideline
Git with all current specifications for ABAP
ABAP Cleaner
New, better “Pretty Printer” for Eclipse and as standalone
Do you have any questions?
Get in touch with us.