SELECT SINGLE * FROM t002t
INTO @DATA(ls_t002t)
WHERE spras = 'V'.
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.SCI
:SCI
, we see that the corresponding class is CL_CI_TEST_NO_ORDER_BY
:CONSTRUCTOR
the priority level has been hard-coded to 3.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
PUBLIC
INHERITING FROM cl_ci_test_no_order_by
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS constructor.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS c_code_ambiguous_single TYPE sci_errc VALUE 'AMB_SINGLE' ##NO_TEXT.
ENDCLASS.
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.
ENDIF.
ENDMETHOD.
ENDCLASS.
SCI
. Navigate to the Management of tests:You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |