There are quite a few useful standard ATC checks delivered by SAP. Recently I found myself using one of the standard ATC checks, but wanting to change the priority level of one of the messages issued by the check. The check wasn’t configurable, so I decided to look into how the priority level could be changed programmatically. I’ll share my solution in this blog post.


One of the standard ATC checks delivered by SAP can identify an issue with the following code:

    INTO @DATA(ls_t002t)
    WHERE spras = 'V'.

Table T002T has two key fields: SPRAS and SPRSL. Since the SELECT statement is not unique, in an S/4 HANA system it is not guaranteed to always return the same result.

The ATC check issues an information message stating:

“SELECT SINGLE is possibly not unique”

This is however only an information message, and our development team wanted it to be an error message (priority 1 instead of priority 3). To prepare ourselves for a future S/4 HANA conversion, this check is important to us. Let us see how we can change the priority.


The ATC check that triggers this message is located here in transaction SCI:

SCI - Standard check 01

Navigating to the Management of tests in transaction SCI, we see that the corresponding class is CL_CI_TEST_NO_ORDER_BY:

SCI => Code Inspector => Management of => Tests

SCI - Standard check 02

When looking into this class, we see that in the CONSTRUCTOR the priority level has been hard-coded to 3.


To change the priority level, we can create a new class, e.g. ZCL_AOC_CHECK_Z01, which inherits the standard class CL_CI_TEST_NO_ORDER_BY. In class ZCL_AOC_CHECK_Z01, we can create a CONSTRUCTOR which executes the CONSTRUCTOR of the super-class, and then changes the priority level to 1. In the CONSTRUCTOR we can also change the description of the check, e.g. by adding a prefix Z - . The code looks like this:

CLASS zcl_aoc_check_z01 DEFINITION
  INHERITING FROM cl_ci_test_no_order_by

    METHODS constructor.
    CONSTANTS c_code_ambiguous_single TYPE sci_errc VALUE 'AMB_SINGLE' ##NO_TEXT.

CLASS zcl_aoc_check_z01 IMPLEMENTATION.

  METHOD constructor.
    super->constructor( ).

    description = |Z - { description }|.

    READ TABLE scimessages ASSIGNING FIELD-SYMBOL(<lf_smsg>)
        WITH KEY code = c_code_ambiguous_single.
    IF sy-subrc = 0.
      <lf_smsg>-kind = c_error.


Now that we have implemented the new check class, it needs to be activated in transaction SCI. Navigate to the Management of tests:

SCI => Code Inspector => Management of => Tests

Check the check-box for the class:

SCI - activate new check 01

We also need to replace the standard check with the new check in the check variant. Deselect the standard check, and select our new check instead:

SCI - activate new check 02


When running the ATC check for the problematic code, we now get an error message instead of an information message:


Mission accomplished. Happy coding!

If you would like to comment on this post, please head over to SAP Community.