SAP Knowledge Base Article - Public

2757984 - You want to delete Enhancement Option (BADI) from your custom solution

Symptom

You have implemented Enhancement Option, so called BADI, in your custom solution. It does not fulfill your requirement, or this requirement is now obsolete and you wish to delete this BADI from your solution.

Environment

  • SAP Cloud Application Studio
  • SAP Business ByDesign
  • SAP Cloud for Customer

Reproducing the Issue

You have created BADI in your custom solution in the following way:

  1. Click on Add Add new item within the Solution Explorer window of Cloud Application Studio
  2. You are displayed with lists of items which you can create such as Business Configuration Objects, Business Objects etc. Choose Enhancement Implelemtation
  3. In next step choose an appropriate namespace and an SAP enhancement option 
  4. System automatically creates 3 elements like shown in the below screenshot:

BADI.png

 

After some time, that is after creating multiple solution versions you wish to either delete or deactivate this BADI as it is no longer needed.

Cause

Deletion of BADI's once solution is in maintenance mode is no longer possible.  BADI itself cannot be deleted, as this option is grayed out in Cloud Application Studio. You can however deactivate scrip (absl file) and this way BADI is no longer considered by the System. For more information regarding Maintenance Mode of your custom solution please refer to Cloud Application Studio help documentation.

NOTE: BADI is an object-oriented enhancement option which provides mechanism to change functionality of a well-defined business function without making changes to the delivered source code. SAP provides detailed documentation regarding BADI's which can be accessed via See Also section of this KBA.

BADI consist of 3 elements:

  • enhancement option itself (.enht)  
  • filter, which is needed to select amongs diffrent BADI implementaions (.fltr)
  • and absl script where you provide scripting logic for your BADI (.absl)

All Enhancement Options can be found in Repository Explorer within Cloud Application Studio. Information provided indicate for example to which Namespace BADI belongs.

BADI_rep.png

Resolution

Comment out the script created within the Enhancement option. Afterwards perform solution activation.

NOTE: Cloud Application Studio gives you possibility to delete the absl script, however to keep the system consistent please refrain from doing so. In this sutuation it is highly advisable to comment out the script.

See Also

Documentation about Enhancement Options

Keywords

BADI's, deletion of BADI's, Enhancement option , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem

Product

SAP Business ByDesign all versions ; SAP Cloud Applications Studio all versions ; SAP Cloud for Customer add-ins all versions