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 <larshp@hotmail.com>

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2021-02-02 15:01:48 -05:00 committed by GitHub
parent 0cd25ce331
commit dd813ed807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ).