From dd813ed807cefb5df12ae65d99192f385aa50974 Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Tue, 2 Feb 2021 15:01:48 -0500 Subject: [PATCH] DEVC: Fix check if package is empty (#4466) * DEVC: Fix check if package is empty SOTR object is linked to SAP package and removed together with the package on uninstall. Therefore, it should not be taken into account when checking if a package is empty. * Update comment Co-authored-by: Lars Hvam Co-authored-by: Lars Hvam --- src/objects/zcl_abapgit_object_devc.clas.abap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/objects/zcl_abapgit_object_devc.clas.abap b/src/objects/zcl_abapgit_object_devc.clas.abap index 64e509427..fb9afa9ba 100644 --- a/src/objects/zcl_abapgit_object_devc.clas.abap +++ b/src/objects/zcl_abapgit_object_devc.clas.abap @@ -91,11 +91,12 @@ CLASS zcl_abapgit_object_devc IMPLEMENTATION. RETURN. ENDIF. + " Ignore the SOTR if is linked to the current SAP package (DEVC) SELECT SINGLE obj_name FROM tadir INTO lv_object_name WHERE pgmid = 'R3TR' - AND NOT ( object = 'DEVC' AND obj_name = iv_package_name ) + AND NOT ( ( object = 'DEVC' OR object = 'SOTR' ) AND obj_name = iv_package_name ) AND devclass = iv_package_name. rv_is_empty = boolc( sy-subrc <> 0 ).