Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove subpackage from package hierarchy

Sheng
Product and Topic Expert
Product and Topic Expert
0 Likes
6,329

Hi,

I've embedded a package as subpackage in a package hierarchy, which was a mistake. Is it possible to remove this subpackage from the package hierarchy? The subpackage should not be deleted because it already contains objects. Thanks for a tip!

1 ACCEPTED SOLUTION
Read only

ttrapp
SAP Mentor
SAP Mentor
0 Likes
3,341

This is described in OSS note 636704 - Undo embedding into a surronding package.

Regards,

Tobias Trapp

Hi,

I've embedded a package as subpackage in a package hierarchy, which was a mistake. Is it possible to remove this subpackage from the package hierarchy? The subpackage should not be deleted because it already contains objects. Thanks for a tip!

7 REPLIES 7
Read only

brunobex
Active Participant
0 Likes
3,341

Hi Sheng Gong,

See if this note helps you:

[Note 1156585 - How to delete packages|https://service.sap.com/sap/support/notes/1156585]

Best Regards

Bruno Xavier.

Read only

Sheng
Product and Topic Expert
Product and Topic Expert
0 Likes
3,341

Hi Bruno,

thank you! But I don't want to delete the package. I want to remove the package from the package hierarchy so it is stand alone again, and no more subpackage from the main package.

Best regards

Sheng

Read only

kiran_k8
Active Contributor
0 Likes
3,341

Not a reply to your solution,but could you please let me know how you were able to do that.

Because I am not able to find any option for such a thing neither in SE80 nor in SE21.Just curious to know how you were able to change the package hierarchy.

Thanks,

K.Kiran.

Read only

brunobex
Active Participant
0 Likes
3,341

Hi Sheng Gong,

I did not find any standard solution.

I did a test scenario:

My scenario:

Transaction: SE80

package: ZTESTE

TAB "Package Hiearchy"

-ZTESTE

--ZTESTE3 (Embedded Packages).

My Package ZTESTE3 contain program test: ZPROG_TEST2

Message before create implicit enhancement: (Button Delete in TAB "Package Included").

"Package ZTESTE3 still contains development objects or other packages"

"Message no. PAK051"

-


Two Palliative solution non-standard SAP:

1)

Create a implicit enhancement the end of the method M_CHECK_PACKAGE_IS_EMPTY class CL_PACKAGE and put "X" in the variable e_package_empty


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2 ) Class CL_PACKAGE, Method 
M_CHECK_PACKAGE_IS_EMPTY, End                                                                                D
*$*$-Start: (2 )--------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZEI_PACKAGE.    "active version
 if me->package_name = 'ZTESTE3'.
    e_package_empty = 'X'.
 endif.
ENDENHANCEMENT.
*$*$-End:   (2 )--------------------------------------------------------------------------------$*$*
ENDMETHOD.

Call transaction SE80 again, show the package ZTESTE and delete the Embedded Packages ZTESTE3 in TAB "Package Included".

Attention: Package ZTESTE3 will be deleted, but not its objects. Recreate the package ZTESTE3 and all objects will appear again.

After DELETE Embedded Packages , do not forget to delete implicit enhancement.

2) OR Bypass message e051(pak) in debug mode. Method: IF_PACKAGE~DELETE Class: CL_PACKAGE

-


Please use this information as you want, I am not responsible for consequence just did a test.

I hope I have helped.

Best Regards

Bruno Xavier.

Read only

Former Member
0 Likes
3,341

Hi Sheng Gong,

have you found a way to remove the subpackage? I'm just curious as I have the same issue.

Thanks, Beate

Read only

Former Member
0 Likes
3,341

SAP stores package assignment in table TDEVC-PARENTCL field for the embedded package.

I removed this via SE16, then in SE80 I have rebuilt the object list of the parent package, and the assigment gone.

I have also not found a standard solution for that, but this workaround was good for that.

Read only

ttrapp
SAP Mentor
SAP Mentor
0 Likes
3,342

This is described in OSS note 636704 - Undo embedding into a surronding package.

Regards,

Tobias Trapp