Let’s suppose that there is a business requirement, where we have to implement any (specific BADI as per business requirement) BAdI multiple times. But the challenge we are facing with requirement is – the BAdI we found out for this purpose is a single use BAdI. This implies we can implement this BAdI for a single Use NOT for multiple times.
To overcome this roadblock – we have to migrate this Standard Classic BAdI to New BAdI and make it to multiple use. We need to follow below steps in order to migrate standard Classic BAdI to New BAdI:
- From the properties tab of the BAdI we can see if it is single use or multiple use BAdI. Please refer to below snapshot:
2. For migration we have to go to Utilities -> Migrate Classic BAdI. Please refer to below snapshot:
3. Once we click on Migrate Classic BAdI (as shown in above snapshot), a Pop-up will come which will ask for Enhancement Spot and short description.
Please refer to below snapshot:
4. After that it will ask for Package and TR. Save it. It will give a pop-up. Please refer to below snapshot:
5. Spot will be created. Tick the Multiple Use Checkbox and Context –Specific Instantiation.
6. Copy the interface from classic BAdI and create a Z Interface and attach it to Spot. (Here in our case ZIF_EX_EINE_DB_STRG).
Please refer to below snapshot for further clarification:
7. After that right click on the Implementation and create custom BADI implementations according to business need.
8. To create the implementation, create custom class by copying the class as present in classic BADI. Save and Activate.
Below screen will appear:
9. As we have changed the BAdI to “Multiple Use” so in the same way we can create multiple implementations and meet our business need. As in our case two implementations are created.