From bdf66424dc33da7a97f9ce583c255807ff0d8d0d Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Tue, 26 Sep 2023 11:36:31 +0200 Subject: [PATCH] line_exists instead of read table --- src/z_generate_repo.prog.abap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/z_generate_repo.prog.abap b/src/z_generate_repo.prog.abap index c756adc9..c8056df8 100644 --- a/src/z_generate_repo.prog.abap +++ b/src/z_generate_repo.prog.abap @@ -1213,8 +1213,8 @@ CLASS ltcl_generator IMPLEMENTATION. cl_abap_unit_assert=>assert_equals( act = cut->report_log exp = expected_report_log ). cl_abap_unit_assert=>assert_equals( act = lines( cut->generator_log->get_messages( ) ) exp = lines( expected_log_messages ) ). LOOP AT expected_log_messages ASSIGNING FIELD-SYMBOL(). - READ TABLE cut->generator_log->get_messages( ) WITH KEY message_text = -message_text TRANSPORTING NO FIELDS. - IF sy-subrc <> 0. + DATA(messages) = cut->generator_log->get_messages( ). + IF line_exists( messages[ message_text = -message_text ] ). cl_abap_unit_assert=>fail( ). ENDIF. ENDLOOP.