mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
ZIF_ABAPGIT_SAP_PACKAGE~LIST_SUBPACKAGES in ZCL_ABAPGIT_SAP_PACKAGE returned duplicate entries for subpackages with more than 1 hierarchy level, because the recursion selected all subpackages of a given package and added them to the list and then parsed the added subpackages again, which would in turn again select the subpackages of the subpackage.
This commit is contained in:
parent
bb82f2c8bd
commit
9f50c2d59e
|
@ -269,11 +269,13 @@ CLASS ZCL_ABAPGIT_SAP_PACKAGE IMPLEMENTATION.
|
|||
lv_devclass LIKE LINE OF rt_list.
|
||||
|
||||
|
||||
SELECT devclass INTO TABLE rt_list
|
||||
FROM tdevc WHERE parentcl = mv_package. "#EC CI_GENBUFF "#EC CI_SUBRC
|
||||
SELECT devclass FROM tdevc
|
||||
INTO TABLE rt_list
|
||||
WHERE parentcl = mv_package. "#EC CI_GENBUFF "#EC CI_SUBRC
|
||||
children = sy-dbcnt.
|
||||
|
||||
* note the recursion, since packages are added to the list
|
||||
LOOP AT rt_list INTO lv_devclass.
|
||||
LOOP AT rt_list INTO lv_devclass FROM 1 TO children.
|
||||
"Get Children of Child
|
||||
lt_list = zcl_abapgit_factory=>get_sap_package( lv_devclass )->list_subpackages( ).
|
||||
APPEND LINES OF lt_list TO rt_list.
|
||||
ENDLOOP.
|
||||
|
|
Loading…
Reference in New Issue
Block a user