Skip to Content

Over the last 6 months I’ve been working on a set of custom checks for code inspector, the project is available on github.

Currently it contains the following general purpose checks, some complex and some simple.

CHECK_01 – IF in IF

CHECK_02 – EXIT outside of loop

CHECK_03 – TRY without CATCH

CHECK_04 – Line length

CHECK_05 – 7 bit ASCII

CHECK_06 – Check for use of pretty printer

CHECK_07 – Functional writing style for CALL METHOD

CHECK_08 – Obsolete statement

CHECK_09 – Tab instead of spaces

CHECK_10 – Use icon_ constants

CHECK_11 – Max one statement per line

CHECK_12 – Specify SORT order

CHECK_13 – Sequential blank lines

CHECK_14 – Commented code

CHECK_17 – Definitions in top of routine

CHECK_18 – Empty branch


CHECK_20 – Bad indentation

CHECK_21 – Unused FORM parameter

CHECK_22 – Conditions contain identical code

CHECK_23 – CHECK outside of loop

CHECK_24 – Identical code blocks

CHECK_25 – Selection screen data not referenced statically

CHECK_26 – No direct changes to standard tables

You can configure code inspector or ATC to use these checks in your default variant.


The checks are provided “AS IS”, some might not fit your development requirement, and some might be slow or not even work.

This is a box of chocolates; take the ones you like πŸ™‚ . Some of the checks contains settings so it is possible to change to fit your requirements.

Feel free to submit pull requests or open issues. More checks will be added over time.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Peter Inotai

    Hi Lars,

    Thanks a lot for sharing these checks.

    I believe in SAP BASIS 7.02 CHECK_02 (EXIT outside of loop) and CHECK_23 (CHECK outside of loop) are part of the standard checks:

    Anyway in lower releases it might not be there, so it makes sense to implement there.


    1. Lars Hvam Post author

      These 2 checks are part of “Extended Program Check” -> “Programming Guidelines”.

      There are some of the checks in “Programming Guidelines” that I personally don’t like, whereas I like the CHECK / EXIT checks. Having these checks in abapOpenChecks allows for enabling and changing the message priority, as changes of message priorities for “Extended Program Check” is not supported(see note 1887255). I’ll keep the note on the wiki page for the 2 checks so people can choose the approach they like.

      1. Peter Inotai

        You’re right. Changing priorities is not supported for “Extended Program Check” (not even in 7.40 system). I didn’t notice it before. πŸ™


        1. Lars Hvam Post author

          One note on message priorities for abapOpenChecks, the “Management of” -> “Message Priorities” is not supported. Instead its possible to define the message priority in the check variant, this allows users to have different variants with different message priorities for the same check.

  2. Praveer Sen

    nice post Lars, really help full and contains lots of information to reduce extra works after code writing.

    πŸ™‚ Happy Learning.


    1. Lars Hvam Post author

      oh, regarding clones, CHECK 24 can help finding identical code blocks within the same object(class/program), it does not compare across objects.

  3. Lars Hvam Post author
  4. Florian Henninger

    It seems that there are some checks included, which need an additional product called CVA (SAP NetWeaver Application Server addon for code vulnerability analysis).

    Can you confirm it and if so, can I find a overview, what checks need this?

    Thank you


    1. Lars Hvam Post author

      It is intended to work as a standalone package without dependencies. Though it might use a few standard SAP function modules that are not available on all versions, I will try to rewrite logic if this is the case, minimum ABAP version requirement is 702.

      I don’t have access to any systems with CVA, so I’m pretty sure it will work without. Do you get an error when installing/activating it? Please create an issue on github, then I’ll try to help you out.

  5. Kirill Gorin

    Lars HvamΒ Β Loving this. Just installed and checking out.

    I just recently got a bug in code (not mine) due to not sorting table prior to binary search with a full list of fields. I tried standart check for read but it didn’t react. I’d like to make myself a new one, probably by starting on your examples. Any tips where to start on writing your own?


    1. Lars Hvam Post author

      cool, I suggest start reading through some of the AOC checks plus standard code to get a feeling on how the CI checks work.

      And then just do it, start out with a simple example, ABAP is a crazy language so all scnearios are usually not covered in the initial implementation of a check.


Leave a Reply