cancel
Showing results for 
Search instead for 
Did you mean: 

Error creating BAdI Enhancement Implementation: "SAP object ENHS cannot be assigned to package"

08-27-2025 8:25 PM
2257 views 3 comments
0 Likes
SAP Managed Tags
Labels
'SAP S4 HANA'ABAPBAdIEclipse ADT
Subscribe

Hello everyone,

I'm encountering an issue while trying to create a new BAdI Enhancement Implementation in Eclipse (using ABAP Development Tools), and I was hoping someone could shed some light on what might be causing it.

When I get to the "Select Transport Request" step, I receive the following error message:

"SAP object ENHS BADI_WHT cannot be assigned to package Z_WHT_EXTENSION_DGR"

I'm trying to create the enhancement implementation within my custom package Z_WHT_EXTENSION_DGR. I've already checked the package, and it seems to be configured correctly for development objects, but this specific error is preventing me from saving the enhancement to a transport request.

Could someone explain why this error occurs? Is there a specific configuration for the package or the object type ENHS (Enhancement Spot) that I might be missing?

Any help or guidance would be greatly appreciated!

Thanks in advance.

BAdi
https://api.sap.com/products/SAPS4HANACloud/onstackextensibility/badi


0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

Chuma
Active Contributor

Hello @diana_gonzalezcr60 

Thank you for sharing the screenshots and details.

The error

SAP object ENHS/ENHO … cannot be assigned to package Z_WHT_EXTENSION_DGR

This occurs because your package is created under the software component ZLOCAL. Objects in ZLOCAL are local and non-transportable, and therefore not valid for enhancement implementations (ENHS/ENHO), which must be stored in a transportable package.

Possible Resolution steps:

  1. Create or utilise a portable software component (not ZLOCAL) supplied for ABAP Cloud development.
  2. Under that SWC, assemble a package including
    •  ABAP language version is the same as ABAP for Cloud Development
    • Recording object changes in transport requests enabled
    • Assigned transport layer
  3. Create your BAdI implementation in this new package and assign it to the relevant transport request.
  4. Transport the objects using Software Collections / ATO not classic CTS .

This is the expected system behaviour; enhancement implementations cannot be stored in ZLOCAL.

SAP Useful References:

Let me know if you need further support

With regards

Chuma

0 Likes

Hi @Chuma!!!

Thank you for your prompt reply and the detailed explanation regarding packages and software components.

Following your instructions, I attempted to create a new, transportable package outside of the ZLOCAL component. However, the system still produces an error when I try to create the transportation.

I suspect the root cause may not be just the package type, but the extension methodology itself. My understanding is that for S/4HANA Cloud Public Edition, classic extensions (like creating an ENHO object from Eclipse) are not permitted in order to maintain a "Clean Core." Instead, the recommended approach is to use the "Custom Logic" Fiori app to implement BAdIs that SAP has explicitly released for the cloud.

My specific question is: Is the BADI_WHT BAdI enabled for extension via Eclipse ADT in our public cloud environment, or is it mandatory that we find an alternative, released BAdI within the "Custom Logic" app?

I am attaching screenshots of the new error I receive when using the transportable package.

I appreciate your guidance in ensuring we are using the correct extensibility method for our platform.

Best regards,

Diana González
I only have ZLOCAL and Z001 for superpackage
new external package.pnglayer.pngtransport error.pngobject.png

OwenLiu
Product and Topic Expert
Product and Topic Expert
0 Likes