From 353f748bd6feb3402249ae521e9312c1d567e056 Mon Sep 17 00:00:00 2001 From: Alexandr Razinkin <69163585+raaleksandr@users.noreply.github.com> Date: Sun, 20 Feb 2022 13:39:09 +0300 Subject: [PATCH] Don't fail if a dictionary object is activated with warnings (#5362) * Fix proposal for issue #5347: added support for 'TYPE REF TO DATA' DDIC data elements as components in DDIC structures * Fix proposal for issue #5347. Added support for 'REF TO DATA' DTEL DDIC element residing in DDIC structure * Fix proposal for issue #5347, added support for 'TYPE REF TO DATA' DDIC data element residing in DDIC data structurees * REF TO DATA for DDIC element support (#5347) * No error if ddic type has warning (abapGit#5361) during import * Update zcl_abapgit_objects_activation.clas.abap * Fix for (abapGit#5361). Warnings during DDIC objects activation shouldn't be considered as error but will be shown as 'yellow' messages after activation * Fix for (#5361). Warnings during DDIC objects activation shouldn't be considered as error but will be shown as 'yellow' messages after activation Co-authored-by: Lars Hvam --- .../core/zcl_abapgit_objects_activation.clas.abap | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/objects/core/zcl_abapgit_objects_activation.clas.abap b/src/objects/core/zcl_abapgit_objects_activation.clas.abap index d80d616c9..e35a617aa 100644 --- a/src/objects/core/zcl_abapgit_objects_activation.clas.abap +++ b/src/objects/core/zcl_abapgit_objects_activation.clas.abap @@ -65,7 +65,7 @@ CLASS zcl_abapgit_objects_activation DEFINITION !ii_log TYPE REF TO zif_abapgit_log RAISING zcx_abapgit_exception . - CLASS-METHODS add_errors_to_log + CLASS-METHODS add_errors_and_warnings_to_log IMPORTING !iv_logname TYPE ddmass-logname !ii_log TYPE REF TO zif_abapgit_log @@ -164,9 +164,12 @@ CLASS zcl_abapgit_objects_activation IMPLEMENTATION. ENDIF. IF lv_rc > 0. - add_errors_to_log( + add_errors_and_warnings_to_log( iv_logname = lv_logname ii_log = ii_log ). + ENDIF. + + IF lv_rc > 4. zcx_abapgit_exception=>raise( 'Activation cancelled. Check the inactive objects.' ). ENDIF. @@ -280,7 +283,7 @@ CLASS zcl_abapgit_objects_activation IMPLEMENTATION. ENDMETHOD. - METHOD add_errors_to_log. + METHOD add_errors_and_warnings_to_log. DATA: lt_lines TYPE STANDARD TABLE OF trlog, lv_logname_db TYPE ddprh-protname. @@ -306,12 +309,14 @@ CLASS zcl_abapgit_objects_activation IMPLEMENTATION. ENDIF. " Only error messsages - DELETE lt_lines WHERE severity <> 'E'. + DELETE lt_lines WHERE severity <> 'E' + AND severity <> 'W'. " Remove "Return code..." message DELETE lt_lines WHERE class = 'D0' AND number = '319'. LOOP AT lt_lines ASSIGNING . - ii_log->add( -line ). + ii_log->add( iv_msg = -line + iv_type = -severity ). ENDLOOP. ENDMETHOD.