From 2b8c21bdbc10b745047eb86deced0896d4428133 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Tue, 5 Oct 2021 00:12:45 -0400 Subject: [PATCH] SXCI: Inactive classic BAdIs (#5006) * SXCI: Inactive classic BAdIs Implements a workaround since SAP does not show inactive classic BAdIs properly (missing entry in table `dwinactive`). * Update zcl_abapgit_object_sxci.clas.abap * Update src/objects/zcl_abapgit_object_sxci.clas.abap Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com> * Change by Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com> Co-authored-by: Lars Hvam --- src/objects/zcl_abapgit_object_sxci.clas.abap | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/objects/zcl_abapgit_object_sxci.clas.abap b/src/objects/zcl_abapgit_object_sxci.clas.abap index 09eea30d4..a876078c8 100644 --- a/src/objects/zcl_abapgit_object_sxci.clas.abap +++ b/src/objects/zcl_abapgit_object_sxci.clas.abap @@ -22,7 +22,10 @@ CLASS zcl_abapgit_object_sxci IMPLEMENTATION. METHOD zif_abapgit_object~changed_by. - rv_user = c_user_unknown. + SELECT SINGLE uname FROM sxc_attr INTO rv_user WHERE imp_name = ms_item-obj_name. + IF sy-subrc <> 0. + rv_user = c_user_unknown. + ENDIF. ENDMETHOD. @@ -171,6 +174,10 @@ CLASS zcl_abapgit_object_sxci IMPLEMENTATION. METHOD zif_abapgit_object~is_active. rv_active = is_active( ). + + "Note: SAP does not show inactive classic BAdIs as "Inactive objects" in SE80 + "Therefore, rv_active will always be true. The implementation state (runtime + "behaviour of the BAdI) will be serialized as part of the XML ENDMETHOD. @@ -276,8 +283,7 @@ CLASS zcl_abapgit_object_sxci IMPLEMENTATION. ls_classic_badi_implementation-implementation_data-atime, ls_classic_badi_implementation-implementation_data-uname, ls_classic_badi_implementation-implementation_data-udate, - ls_classic_badi_implementation-implementation_data-utime, - ls_classic_badi_implementation-implementation_data-active. + ls_classic_badi_implementation-implementation_data-utime. io_xml->add( iv_name = 'SXCI' ig_data = ls_classic_badi_implementation ).