Application Development 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: 

Remove subpackage from package hierarchy

Sheng
Advisor
Advisor
0 Kudos
3,481

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

ttrapp
Active Contributor
0 Kudos
493

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

Regards,

Tobias Trapp

7 REPLIES 7

brunobex
Active Participant
0 Kudos
493

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.

0 Kudos
493

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

kiran_k8
Active Contributor
0 Kudos
493

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.

brunobex
Active Participant
0 Kudos
493

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.

Former Member
0 Kudos
493

Hi Sheng Gong,

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

Thanks, Beate

Former Member
0 Kudos
493

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.

ttrapp
Active Contributor
0 Kudos
494

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

Regards,

Tobias Trapp